.owm-menu,
.owm-menu * {
  box-sizing: border-box;
}

.owm-menu {
  --owm-blue: #168df0;
  --owm-blue-dark: #0874ce;
  --owm-ink: #172635;
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid rgba(24, 55, 82, 0.07);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(24, 49, 73, 0.12), 0 1px 4px rgba(24, 49, 73, 0.05);
  color: var(--owm-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.25;
}

.owm-menu__list {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.owm-menu__item {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.owm-menu__link {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 68px;
  height: 100%;
  padding: 12px 6px 11px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  border: 1px solid rgba(24, 55, 82, 0.055);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fefefe 100%);
  box-shadow: 0 2px 9px rgba(25, 49, 72, 0.045);
  color: var(--owm-ink);
  text-align: center;
  text-decoration: none !important;
  transform: translateY(0);
  transition: color 220ms ease, background-color 220ms ease, border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
  -webkit-tap-highlight-color: transparent;
}

.owm-menu__link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: var(--owm-blue);
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 220ms ease, transform 220ms ease;
}

.owm-menu__label {
  display: block;
  max-width: 100%;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.owm-menu__label--mobile {
  display: none;
}

.owm-menu__link.is-active {
  border-color: rgba(22, 141, 240, 0.13);
  background: linear-gradient(180deg, rgba(22, 141, 240, 0.045), rgba(22, 141, 240, 0.025));
  color: var(--owm-blue-dark);
}

.owm-menu__link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .owm-menu__link:hover {
    z-index: 1;
    border-color: rgba(22, 141, 240, 0.15);
    background: #fff;
    box-shadow: 0 7px 16px rgba(24, 63, 98, 0.13);
    color: var(--owm-blue-dark);
    transform: translateY(-2px);
  }
}

.owm-menu__link:focus-visible {
  z-index: 2;
  outline: 3px solid rgba(22, 141, 240, 0.42);
  outline-offset: 1px;
  color: var(--owm-blue-dark);
}

@media (prefers-reduced-motion: reduce) {
  .owm-menu__link,
  .owm-menu__link::after {
    transition: none;
  }
}

/* Tablet: two compact rows, avoiding cramped or clipped labels. */
@media (min-width: 701px) and (max-width: 1180px) {
  .owm-menu {
    max-width: 920px;
    padding: 8px;
    border-radius: 16px;
  }

  .owm-menu__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .owm-menu__link {
    min-height: 58px;
    padding: 9px 5px 8px;
    gap: 0;
  }

  .owm-menu__label {
    font-size: 12px;
  }
}

/* Phones: all 12 links remain visible in a compact five-column grid. */
@media (max-width: 700px) {
  .owm-menu {
    width: 100%;
    padding: 5px;
    border-radius: 13px;
    box-shadow: 0 4px 15px rgba(24, 49, 73, 0.11), 0 1px 3px rgba(24, 49, 73, 0.04);
  }

  .owm-menu__list {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
  }

  .owm-menu__link {
    min-height: 44px;
    padding: 6px 2px 7px;
    gap: 0;
    border-radius: 8px;
  }

  .owm-menu__link::after {
    height: 3px;
  }

  .owm-menu__label--desktop {
    display: none;
  }

  .owm-menu__label--mobile {
    display: block;
  }

  .owm-menu__label {
    font-size: clamp(9px, 2.55vw, 10.5px);
    font-weight: 650;
    line-height: 1.12;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* Intelligent fallback for unusually narrow devices only. */
@media (max-width: 339px) {
  .owm-menu__list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
