/* Keep navigation in normal flow; never let a full action row overlap the brand. */
body[data-dingous-match-shell="true"] .dm-topbar {
  flex-wrap: wrap !important;
  gap: 12px 24px !important;
  padding-block: 12px !important;
}
body[data-dingous-match-shell="true"] .dm-topbar .dm-brand {
  flex: 0 0 auto !important;
  margin: 0 !important;
  white-space: nowrap;
}
body[data-dingous-match-shell="true"] .dm-topbar .dm-top-actions {
  flex: 1 1 680px !important;
  min-width: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  align-items: center !important;
  justify-content: flex-end !important;
}
body[data-dingous-match-shell="true"] .dm-topbar .dm-top-actions > :is(a,button) {
  flex: 0 0 auto !important;
}
body[data-dingous-match-shell="true"] .dm-topbar .dm-about-link::before { display: none !important; }

@media (max-width: 900px) {
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host {
    position: relative;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-toggle {
    position: static !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    flex: 0 0 44px !important; width: 44px; min-height: 44px;
    background: #101a2c; color: #fff; border: 1px solid #475569; border-radius: 12px;
    font-size: 26px; cursor: pointer;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host .dm-mobile-menu-source,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host.dm-mobile-menu-open .dm-mobile-menu-source,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover {
    display: none !important;
    position: absolute !important; top: calc(100% + 6px) !important;
    right: 12px !important; left: auto !important;
    width: min(340px, calc(100vw - 24px)) !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(70dvh, 540px) !important; overflow: auto !important;
    padding: 12px !important; margin: 0 !important;
    background: #101a2c !important; border: 1px solid #334155 !important;
    border-radius: 16px !important; z-index: 1400;
    flex-direction: column !important; align-items: stretch !important;
    justify-content: flex-start !important; gap: 8px !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host.dm-mobile-menu-open .dm-mobile-menu-source,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover.dm-mobile-menu-open {
    display: flex !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host .dm-mobile-menu-source > :is(a,button),
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover > :is(a,button) {
    display: flex !important; visibility: visible !important;
    width: 100% !important; min-width: 0 !important; max-width: 100% !important;
    height: auto !important; min-height: 44px !important; margin: 0 !important;
    padding: 10px 12px !important; font-size: 14px !important; line-height: 1.4 !important;
    justify-content: flex-start !important; white-space: normal !important;
    flex: 0 0 auto !important; box-sizing: border-box !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source .dm-my-matches::after { display: none !important; }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source .dm-language-choice { padding: 4px 12px; }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source > .dm-user-session {
    width: 100% !important;
    min-height: 48px !important;
    margin: 2px 0 0 !important;
    padding: 7px 10px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,.035) !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source > .dm-user-session .dm-user-name {
    max-width: none !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source > .dm-logout-form {
    width: 100% !important;
    margin: 0 !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source > .dm-logout-form > .dm-logout {
    width: 100% !important;
    min-height: 48px !important;
    padding: 11px 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    border: 1px solid rgba(244,63,94,.16) !important;
    border-radius: 12px !important;
    background: rgba(244,63,94,.06) !important;
    color: #fda4af !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    text-align: left !important;
  }
}


/* Product polish: interaction states shared by desktop and compact navigation. */
body[data-dingous-match-shell="true"] .dm-topbar :is(.dm-brand,.dm-top-actions>a,.dm-top-actions>button):focus-visible {
  outline: 3px solid rgba(96,165,250,.76);
  outline-offset: 3px;
}
@media (min-width: 901px) {
  body[data-dingous-match-shell="true"] .dm-topbar .dm-top-actions > :is(a,button) {
    min-height: 40px;
    touch-action: manipulation;
    transition: border-color .15s ease, background .15s ease, color .15s ease, transform .15s ease;
  }
}
@media (hover:hover) and (pointer:fine) and (min-width:901px) {
  body[data-dingous-match-shell="true"] .dm-topbar .dm-top-actions > :is(a,button):hover {
    transform: translateY(-1px);
  }
}
@media (max-width: 900px) {
  body[data-dingous-match-shell="true"] .dm-mobile-menu-toggle,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host .dm-mobile-menu-source > :is(a,button),
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover > :is(a,button) {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host .dm-mobile-menu-source,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover {
    max-height: min(70dvh, calc(100dvh - env(safe-area-inset-top) - 24px)) !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-host .dm-mobile-menu-source > :is(a,button),
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover > :is(a,button) {
    min-height: 48px !important;
  }
  body[data-dingous-match-shell="true"] .dm-mobile-menu-toggle:focus-visible,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-source > :is(a,button):focus-visible,
  body[data-dingous-match-shell="true"] .dm-mobile-menu-popover > :is(a,button):focus-visible {
    outline: 3px solid rgba(196,181,253,.82) !important;
    outline-offset: 2px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body[data-dingous-match-shell="true"] .dm-topbar .dm-top-actions > :is(a,button) {
    transition: none !important;
  }
}
