.header__mobile-actions,
.grace-mobile-nav,
.grace-mobile-nav__backdrop,
.grace-mobile-nav__panel {
  display: none;
}

@media (max-width: 991.98px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  #ohub-chat-widget {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .header__mobile-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 7px;
  }

  .header__mobile-actions-vk,
  .header__mobile-actions-call {
    align-items: center;
    border-radius: 10px;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    text-decoration: none;
    width: 42px;
  }

  .header__mobile-actions-vk {
    background: #0077ff;
    color: #fff;
  }

  .header__mobile-actions-vk svg {
    fill: currentColor;
    height: 24px;
    width: 24px;
  }

  .header__mobile-actions-call {
    background: #ef7d00;
    color: #fff;
  }

  .header__mobile-actions-call svg {
    fill: none;
    height: 20px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 20px;
  }

  .header__mobile-actions-quiz {
    align-items: center;
    background: linear-gradient(135deg, #f08a10, #df6f00);
    border-radius: 10px;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 42px;
    justify-content: center;
    padding: 0 10px;
    text-decoration: none;
    white-space: nowrap;
  }

  .header__mobile-actions a:focus-visible,
  .grace-mobile-nav__tab:focus-visible,
  .grace-mobile-nav__close:focus-visible,
  .grace-mobile-nav__link:focus-visible {
    outline: 2px solid #b74a46;
    outline-offset: 2px;
  }

  .grace-mobile-nav {
    align-items: stretch;
    background: #fff;
    border-top: 1px solid #e2e5e8;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: calc(70px + env(safe-area-inset-bottom));
    left: 0;
    padding: 3px max(8px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-right));
    position: fixed;
    right: 0;
    z-index: 2200;
  }

  .grace-mobile-nav__tab {
    align-items: center;
    background: none;
    border: 0;
    color: #1c314b;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    gap: 2px;
    justify-content: center;
    min-height: 44px;
    padding: 4px 0;
    text-decoration: none;
  }

  .grace-mobile-nav__tab svg {
    fill: none;
    height: 24px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 24px;
  }

  .grace-mobile-nav__tab[aria-expanded="true"] {
    color: #b74a46;
  }

  .grace-mobile-nav__backdrop:not([hidden]) {
    background: rgb(15 28 42 / 55%);
    display: block;
    inset: 0;
    position: fixed;
    z-index: 2100;
  }

  .grace-mobile-nav__panel:not([hidden]) {
    background: #fff;
    border-radius: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    box-shadow: 0 14px 40px rgb(15 28 42 / 22%);
    display: block;
    left: max(12px, env(safe-area-inset-left));
    max-height: calc(100dvh - 124px - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 16px 18px;
    position: fixed;
    right: max(12px, env(safe-area-inset-right));
    z-index: 2150;
  }

  .grace-mobile-nav__drag {
    align-items: center;
    cursor: grab;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    min-height: 38px;
    touch-action: none;
  }

  .grace-mobile-nav__grabber {
    background: #aeb7bf;
    border-radius: 4px;
    height: 4px;
    width: 40px;
  }

  .grace-mobile-nav__gesture {
    color: #5d6d7c;
    font-size: 12px;
    line-height: 1.2;
  }

  .grace-mobile-nav__panel-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    padding: 4px 0 12px;
  }

  .grace-mobile-nav__panel-head h2 {
    color: #1c314b;
    font-size: 20px;
    margin: 0;
  }

  .grace-mobile-nav__close {
    align-items: center;
    background: #f2f3f5;
    border: 0;
    border-radius: 10px;
    color: #1c314b;
    display: flex;
    font-size: 25px;
    height: 44px;
    justify-content: center;
    width: 44px;
  }

  .grace-mobile-nav__links {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    list-style: none;
    margin: 0;
    padding: 0;
  }

  .grace-mobile-nav__item {
    margin: 0;
    min-width: 0;
  }

  .grace-mobile-nav__link {
    align-items: center;
    background: #f5f7f9;
    border-radius: 12px;
    color: #1c314b;
    display: flex;
    flex-direction: column;
    font-size: 12px;
    font-weight: 700;
    gap: 8px;
    justify-content: center;
    line-height: 1.25;
    min-height: 104px;
    padding: 12px 5px;
    text-align: center;
    text-decoration: none;
    width: 100%;
  }

  .grace-mobile-nav__icon {
    align-items: center;
    color: #1c314b;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
  }

  .grace-mobile-nav__icon svg {
    fill: none;
    height: 26px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    width: 26px;
  }

  .grace-mobile-nav__label {
    overflow-wrap: anywhere;
  }

  body.grace-mobile-nav-open {
    overflow: hidden;
  }
}

@media (max-width: 359.98px) {
  .header__mobile-actions {
    gap: 4px;
  }

  .header__mobile-actions-vk,
  .header__mobile-actions-call {
    height: 40px;
    width: 40px;
  }

  .header__mobile-actions-quiz {
    height: 40px;
    font-size: 11px;
    padding: 0 7px;
  }
}
