responsive-navigation {
  display: none;
}

@media (max-width: 767px) {
  responsive-navigation {
    position: fixed;
    inset: auto 0 0;
    z-index: 1250;
    display: block;
    pointer-events: none;
  }

  .mobile-bottom-nav {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px max(8px, env(safe-area-inset-left)) max(6px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
    border-top: 1px solid #d7e0e9;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 24px rgba(20, 43, 67, 0.14);
    backdrop-filter: blur(14px);
    pointer-events: auto;
  }

  .mobile-nav__button {
    position: relative;
    min-width: 44px;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 0 2px;
    padding: 4px;
    border: 0;
    border-radius: 11px;
    color: #52677b;
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: color 200ms ease, background-color 200ms ease, transform 200ms ease;
  }

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

  .mobile-nav__button.active,
  .mobile-nav__button:active {
    color: #076ca8;
    background: #e8f4fb;
  }

  .mobile-more-sheet {
    position: fixed;
    right: max(8px, env(safe-area-inset-right));
    bottom: calc(70px + env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    z-index: 1;
    max-height: min(72dvh, 560px);
    padding: 8px 14px 16px;
    overflow-y: auto;
    border: 1px solid #d9e2eb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(10, 34, 58, 0.25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(calc(100% + 90px));
    transition: transform 200ms ease, opacity 200ms ease;
  }

  responsive-navigation.is-more-open .mobile-more-sheet {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .mobile-more__handle {
    width: 38px;
    height: 4px;
    margin: 0 auto 8px;
    border-radius: 99px;
    background: #c4ced8;
  }

  .mobile-more__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
  }

  .mobile-more__header strong,
  .mobile-more__header span {
    display: block;
  }

  .mobile-more__header strong {
    color: #193b5c;
    font-size: 15px;
  }

  .mobile-more__header span {
    margin-top: 2px;
    color: #6d7e90;
    font-size: 12px;
  }

  .mobile-more__close {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid #d5dfe8;
    border-radius: 12px;
    color: #42596f;
    background: #f5f8fa;
    font-size: 24px;
    cursor: pointer;
  }

  .mobile-more__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .mobile-more__action {
    min-width: 0;
    min-height: 62px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid #dbe4ec;
    border-radius: 12px;
    color: #146b9e;
    background: #f8fbfd;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: border-color 200ms ease, background-color 200ms ease, transform 200ms ease;
  }

  .mobile-more__action:active {
    border-color: #63acd2;
    background: #eaf6fb;
    transform: scale(0.98);
  }

  .mobile-more__action strong,
  .mobile-more__action small {
    display: block;
  }

  .mobile-more__action strong {
    color: #27445e;
    font-size: 12px;
  }

  .mobile-more__action small {
    margin-top: 2px;
    overflow: hidden;
    color: #718295;
    font-size: 12px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-more__base-label {
    display: block;
    margin: 14px 0 6px;
    color: #39556e;
    font-size: 12px;
    font-weight: 700;
  }

  .mobile-more__base-select {
    width: 100%;
    min-height: 44px;
    padding: 8px 34px 8px 10px;
    border: 1px solid #cbd8e4;
    border-radius: 10px;
    color: #263e55;
    background: #fff;
    font: inherit;
    font-size: 13px;
  }

  html[data-theme="dark"] .mobile-bottom-nav,
  html[data-theme="dark"] .mobile-more-sheet {
    color: #dce5f0;
    background: rgba(21, 29, 41, 0.98);
    border-color: #354255;
  }

  html[data-theme="dark"] .mobile-nav__button {
    color: #aebdd0;
  }

  html[data-theme="dark"] .mobile-nav__button.active {
    color: #72c8f2;
    background: #173657;
  }

  html[data-theme="dark"] .mobile-more__header strong,
  html[data-theme="dark"] .mobile-more__action strong {
    color: #e5edf6;
  }

  html[data-theme="dark"] .mobile-more__header span,
  html[data-theme="dark"] .mobile-more__action small,
  html[data-theme="dark"] .mobile-more__base-label {
    color: #aebdd0;
  }

  html[data-theme="dark"] .mobile-more__action,
  html[data-theme="dark"] .mobile-more__close,
  html[data-theme="dark"] .mobile-more__base-select {
    color: #b8ddf3;
    background: #1d2a39;
    border-color: #3b4a5e;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav__button,
  .mobile-more-sheet,
  .mobile-more__action {
    transition: none;
  }
}
