.mobile-app-bar,
.mobile-tab-bar {
  display: none;
}

@media (max-width: 680px) {
  :root {
    color-scheme: dark;
  }

  html,
  body {
    width: 100%;
    height: 100%;
    overscroll-behavior: none;
  }

  body {
    --mobile-app-top: calc(66px + env(safe-area-inset-top));
    --mobile-app-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  body .side-rail,
  body .scroll-cue {
    display: none !important;
  }

  .mobile-app-bar {
    position: fixed;
    z-index: 160;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 10px;
    height: var(--mobile-app-top);
    padding: calc(env(safe-area-inset-top) + 8px) 16px 8px;
    border-bottom: 1px solid rgba(151, 175, 210, 0.13);
    background:
      linear-gradient(180deg, rgba(3, 5, 8, 0.96), rgba(3, 5, 8, 0.78)),
      radial-gradient(circle at 72% 0%, rgba(70, 105, 158, 0.13), transparent 58%);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
    backdrop-filter: blur(22px) saturate(1.15);
    -webkit-backdrop-filter: blur(22px) saturate(1.15);
  }

  .mobile-app-brand,
  .mobile-app-action {
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-app-brand {
    display: flex;
    align-items: center;
    width: 92px;
    height: 42px;
    padding: 5px 0;
  }

  .mobile-app-brand img {
    display: block;
    width: 82px;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    object-position: left center;
    opacity: 0.9;
    filter: drop-shadow(0 0 9px rgba(157, 190, 235, 0.18));
  }

  .mobile-app-action {
    position: relative;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(166, 188, 220, 0.2);
    border-radius: 50%;
    color: rgba(220, 230, 242, 0.88);
    background: linear-gradient(145deg, rgba(26, 31, 40, 0.88), rgba(7, 9, 13, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 22px rgba(0, 0, 0, 0.28);
  }

  .mobile-app-action svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform: translateY(0.5px);
  }

  body[data-page="contacts"] .mobile-app-action {
    color: #e7bd70;
    border-color: rgba(231, 189, 112, 0.34);
  }

  .mobile-tab-bar {
    position: fixed;
    z-index: 160;
    right: 10px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    height: 66px;
    padding: 6px;
    border: 1px solid rgba(147, 170, 205, 0.2);
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(15, 19, 26, 0.93), rgba(5, 7, 11, 0.96)),
      radial-gradient(circle at 50% 0%, rgba(80, 119, 176, 0.14), transparent 62%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.075),
      0 18px 45px rgba(0, 0, 0, 0.5),
      0 0 28px rgba(42, 67, 103, 0.1);
    backdrop-filter: blur(26px) saturate(1.2);
    -webkit-backdrop-filter: blur(26px) saturate(1.2);
  }

  .mobile-tab-bar .mobile-tab-link {
    position: relative !important;
    display: grid !important;
    grid-template-rows: 24px 12px !important;
    place-items: center !important;
    align-content: center !important;
    gap: 3px !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 54px !important;
    margin: 0 !important;
    padding: 5px 1px !important;
    border: 0 !important;
    border-radius: 14px !important;
    color: rgba(151, 163, 180, 0.7) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
    justify-self: stretch !important;
    grid-column: auto !important;
    transition: color 220ms ease, background-color 220ms ease, box-shadow 220ms ease !important;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-tab-bar .mobile-tab-link::before {
    content: "" !important;
    position: absolute !important;
    top: 3px !important;
    right: 5px !important;
    bottom: 3px !important;
    left: 5px !important;
    width: auto !important;
    height: auto !important;
    border: 1px solid transparent !important;
    border-radius: 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-tab-bar .mobile-tab-link::after {
    display: none !important;
  }

  .mobile-tab-bar .mobile-tab-link svg {
    position: relative;
    z-index: 1;
    grid-row: 1;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-tab-bar .mobile-tab-link > span {
    position: relative;
    z-index: 1;
    grid-row: 2;
    width: 100%;
    overflow: hidden;
    font-family: var(--font-sans, "Manrope", sans-serif);
    font-size: 8px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
    opacity: 1 !important;
    transform: none !important;
  }

  .mobile-tab-bar .mobile-tab-link.is-active {
    color: #e7bd70 !important;
  }

  .mobile-tab-bar .mobile-tab-link.is-active::before {
    border-color: rgba(132, 162, 204, 0.18) !important;
    background:
      linear-gradient(180deg, rgba(53, 73, 102, 0.34), rgba(18, 25, 36, 0.3)),
      radial-gradient(circle at 50% 10%, rgba(224, 184, 108, 0.13), transparent 60%) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 0 18px rgba(70, 104, 151, 0.08) !important;
  }

  body .page,
  body .page.content-page {
    scroll-padding-top: var(--mobile-app-top);
    scroll-padding-bottom: var(--mobile-app-bottom);
  }

  body .page.content-page .app-screen {
    padding-top: 0 !important;
  }

  body .mobile-page-legal {
    margin-bottom: var(--mobile-app-bottom) !important;
  }

  body:has(.page-home.is-active) .site-legal {
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
  }

  body .page-home .brand-lockup {
    top: calc(50% - 6px) !important;
  }

  body.is-contact-dialog-open .mobile-app-bar,
  body.is-contact-dialog-open .mobile-tab-bar {
    opacity: 0;
    pointer-events: none;
  }

  .mobile-app-bar,
  .mobile-tab-bar {
    transition: opacity 180ms ease;
  }
}

@media (max-width: 360px) {
  .mobile-tab-bar {
    right: 6px;
    left: 6px;
  }

  .mobile-tab-bar .mobile-tab-link > span {
    font-size: 7.5px;
  }
}

@media (max-width: 680px) {
  body .page-home .logo-pass {
    height: auto !important;
    object-fit: initial !important;
  }

  body .page-home .brand-subtitle,
  body .page-home .brand-subtitle-light {
    left: 9.5% !important;
    right: 13.5% !important;
    bottom: 1.4% !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 61% minmax(0, 1fr) !important;
    align-items: center !important;
    justify-content: stretch !important;
    column-gap: 3% !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    font-size: clamp(8px, 2.15vw, 10px) !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    transform: none !important;
  }

  body .page-home .brand-subtitle-rule,
  body .page-home .brand-subtitle-light .brand-subtitle-rule {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 1px !important;
    opacity: 0.72 !important;
  }

  body .page-home .brand-subtitle-rule:first-child,
  body .page-home .brand-subtitle-light .brand-subtitle-rule:first-child {
    background: linear-gradient(90deg, transparent, rgba(222, 234, 250, 0.72)) !important;
  }

  body .page-home .brand-subtitle-rule:last-child,
  body .page-home .brand-subtitle-light .brand-subtitle-rule:last-child {
    background: linear-gradient(90deg, rgba(222, 234, 250, 0.72), transparent) !important;
  }

  body .page-home .brand-subtitle-wordmark,
  body .page-home .brand-subtitle-light .brand-subtitle-wordmark {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0 !important;
    width: 100% !important;
    height: auto !important;
    white-space: nowrap !important;
  }

  body .page-home .brand-subtitle .subtitle-letter,
  body .page-home .brand-subtitle-light .subtitle-letter {
    display: block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    transform: none !important;
  }

  body .page-home .brand-subtitle .subtitle-space,
  body .page-home .brand-subtitle-light .subtitle-space {
    display: block !important;
    flex: 0 0 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 1px !important;
  }
}
