@media (max-width: 1023px) {
  body.h5-shell-active {
    background: hsl(var(--background));
  }

  body.h5-shell-active main {
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important;
  }

  body.h5-shell-active iframe[title="漫画图库"] {
    min-height: calc(100dvh - 132px) !important;
    border-radius: 0 !important;
  }

  body.h5-shell-active nav.lg\:hidden.fixed.bottom-0.left-0.right-0 {
    display: none !important;
  }

  .h5-app-nav {
    position: fixed;
    z-index: 65;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: 10px;
    display: grid;
    height: 66px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 5px;
    border: 1px solid hsl(var(--border) / 0.9);
    border-radius: 18px;
    background: hsl(var(--card) / 0.94);
    box-shadow:
      0 16px 40px rgba(0, 0, 0, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(1.2);
  }

  .h5-app-tab {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 13px;
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition:
      color 150ms ease,
      background-color 150ms ease,
      transform 150ms ease;
  }

  .h5-app-tab:active {
    transform: scale(0.94);
  }

  .h5-app-tab.is-active {
    background: hsl(var(--primary) / 0.12);
    color: hsl(var(--primary));
  }

  .h5-app-tab-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
  }

  .h5-app-tab-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }

  .h5-app-tab.is-active .h5-app-tab-icon svg {
    stroke-width: 2.2;
  }

  .h5-app-tab-label {
    overflow: hidden;
    max-width: 100%;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .h5-app-tab.is-active::after {
    position: absolute;
    bottom: 4px;
    width: 12px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
  }
}

@media (min-width: 1024px) {
  .h5-app-nav {
    display: none;
  }
}
