

.mobile-dock {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-dock {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    pointer-events: none;
  }

  .mobile-dock[data-open-search='1'] {
    z-index: 160;
    inset: 0;
    bottom: auto;
    height: 100%;
  }

  .mobile-dock__bar {
    pointer-events: auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 0.15rem;
    margin: 0;
    width: 100%;
    max-width: none;
    padding: 0.35rem 0.45rem calc(0.4rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
    background: rgba(12, 12, 14, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .mobile-dock__item {
    appearance: none;
    border: 0;
    background: transparent;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.18rem;
    min-height: 3.15rem;
    padding: 0.2rem 0.15rem 0.15rem;
    text-decoration: none;
    font: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  .mobile-dock__ico {
    display: grid;
    place-items: center;
    width: 1.45rem;
    height: 1.45rem;
    color: inherit;
    transition: transform 0.15s ease, color 0.15s ease;
  }

  .mobile-dock__ico svg {
    display: block;
  }

  .mobile-dock__label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.1;
    white-space: nowrap;
  }

  .mobile-dock__item.is-active {
    color: var(--accent);
  }

  .mobile-dock__item.is-active .mobile-dock__ico {
    transform: translateY(-1px);
  }

  .mobile-dock__item--search {
    position: relative;
    z-index: 1;
  }

  .mobile-dock__fab {
    display: grid;
    place-items: center;
    width: 3.05rem;
    height: 3.05rem;
    margin-top: -1.15rem;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    box-shadow:
      0 0 0 4px rgba(12, 12, 14, 0.95),
      0 8px 20px rgba(204, 28, 57, 0.45);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  }

  .mobile-dock__fab svg {
    display: block;
  }

  .mobile-dock__item--search.is-active .mobile-dock__fab,
  .mobile-dock__item--search:active .mobile-dock__fab {
    background: var(--accent-hover);
    transform: scale(0.96);
  }

  .mobile-dock__item--search .mobile-dock__label {
    margin-top: 0.05rem;
  }


  .mobile-dock__sheet {
    pointer-events: auto;
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .mobile-dock[data-open-search='1'] .mobile-dock__bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
  }

  .mobile-dock__sheet-backdrop {
    appearance: none;
    border: 0;
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
  }

  .mobile-dock__sheet-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: 0;
    padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 0.85rem 1rem;
    border-radius: 0 0 16px 16px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #141416;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  }

  .mobile-dock__sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
    font-weight: 700;
    font-size: 0.95rem;
  }

  .mobile-dock__sheet-close {
    appearance: none;
    border: 0;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #e4e4e7;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .search--dock .search__field {
    border-color: rgba(204, 28, 57, 0.45);
  }


  .app-main {
    padding-bottom: calc(5.25rem + var(--safe-bottom, 0px));
  }

  .footer {
    padding-bottom: calc(5.5rem + var(--safe-bottom, 0px));
  }

  .minimal-fab--float {
    display: none !important;
  }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 540px) {
  .mobile-dock {
    display: none !important;
  }

  .app-main {
    padding-bottom: 0.35rem;
  }

  .footer {
    padding-bottom: 0.5rem;
  }
}
