@media (max-width: 768px) {
  .pwa-assist-layer {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 140;
    pointer-events: none;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  }

  .pwa-network-pill,
  .pwa-install-fab,
  .pwa-update-pill {
    position: fixed;
    left: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 2.38rem;
    max-width: calc(100vw - 2rem);
    padding: 0.52rem 0.82rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08)),
      rgba(14, 14, 13, 0.72);
    color: #f8f2e7;
    box-shadow:
      0 18px 42px rgba(0, 0, 0, 0.42),
      inset 0 1px 0 rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(30px) saturate(210%);
    -webkit-backdrop-filter: blur(30px) saturate(210%);
    transform: translateX(-50%);
    font-size: 0.76rem;
    font-weight: 760;
    letter-spacing: 0;
    white-space: nowrap;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
  }

  .light .pwa-network-pill,
  .light .pwa-install-fab,
  .light .pwa-update-pill,
  body.light .pwa-network-pill,
  body.light .pwa-install-fab,
  body.light .pwa-update-pill {
    border-color: rgba(255, 255, 255, 0.82);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.58)),
      rgba(249, 243, 232, 0.7);
    color: #211609;
    box-shadow:
      0 16px 36px rgba(76, 57, 35, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }

  .pwa-network-pill {
    bottom: calc(6.75rem + env(safe-area-inset-bottom, 0px));
    opacity: 0;
    transform: translateX(-50%) translateY(0.45rem) scale(0.96);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.2s ease;
  }

  .pwa-network-pill.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .pwa-install-fab,
  .pwa-update-pill {
    right: 0.82rem;
    left: auto;
    bottom: calc(6.62rem + env(safe-area-inset-bottom, 0px));
    transform: none;
  }

  .pwa-update-pill {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
  }

  .is-pwa-standalone .pwa-install-fab {
    display: none !important;
  }

  .pwa-install-fab:active,
  .pwa-update-pill:active,
  .pwa-sheet-secondary:active {
    transform: translateY(1px) scale(0.98);
  }

  .pwa-update-pill:active {
    transform: translateX(-50%) translateY(1px) scale(0.98);
  }

  .pwa-install-sheet {
    position: fixed;
    left: 50%;
    bottom: calc(0.88rem + env(safe-area-inset-bottom, 0px));
    z-index: 160;
    width: min(22.1rem, calc(100vw - 1rem));
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.82rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 1.75rem;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.08)),
      radial-gradient(circle at 18% 0%, rgba(255, 226, 180, 0.2), transparent 42%),
      rgba(16, 16, 15, 0.82);
    color: #f8f2e7;
    box-shadow:
      0 28px 76px rgba(0, 0, 0, 0.58),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
    backdrop-filter: blur(42px) saturate(230%);
    -webkit-backdrop-filter: blur(42px) saturate(230%);
    clip-path: inset(0 round 1.75rem);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(0.7rem) scale(0.98);
    transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.18, 0.9, 0.22, 1);
  }

  .pwa-install-sheet.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
  }

  .light .pwa-install-sheet,
  body.light .pwa-install-sheet {
    border-color: rgba(255, 255, 255, 0.88);
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.58)),
      radial-gradient(circle at 18% 0%, rgba(255, 237, 209, 0.7), transparent 42%),
      rgba(247, 241, 231, 0.76);
    color: #211609;
    box-shadow:
      0 24px 58px rgba(76, 57, 35, 0.22),
      inset 0 1px 0 rgba(255, 255, 255, 0.96);
  }

  .pwa-sheet-close {
    position: absolute;
    top: 0.62rem;
    right: 0.68rem;
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: currentColor;
    font-size: 1.45rem;
    line-height: 1;
  }

  .pwa-sheet-mark {
    width: 3.35rem;
    height: 3.35rem;
    display: grid;
    place-items: center;
    border-radius: 1.18rem;
    background:
      linear-gradient(145deg, #f7b352, #b86f16);
    color: #211609;
    font-weight: 900;
    box-shadow:
      0 14px 28px rgba(184, 111, 22, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.48);
  }

  .pwa-sheet-kicker {
    margin: 0 0 0.18rem;
    color: rgba(248, 242, 231, 0.62);
    font-size: 0.68rem;
    font-weight: 820;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .light .pwa-sheet-kicker,
  body.light .pwa-sheet-kicker {
    color: rgba(33, 22, 9, 0.58);
  }

  .pwa-install-sheet h2 {
    margin: 0;
    padding-right: 2.2rem;
    font-size: 1.04rem;
    line-height: 1.08;
    font-weight: 860;
    letter-spacing: 0;
  }

  .pwa-sheet-copy {
    margin: 0.34rem 0 0;
    color: rgba(248, 242, 231, 0.76);
    font-size: 0.83rem;
    line-height: 1.35;
    font-weight: 650;
  }

  .light .pwa-sheet-copy,
  body.light .pwa-sheet-copy {
    color: rgba(33, 22, 9, 0.68);
  }

  .pwa-install-steps {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .pwa-install-steps span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(248, 242, 231, 0.84);
    font-size: 0.72rem;
    font-weight: 780;
    text-align: center;
  }

  .light .pwa-install-steps span,
  body.light .pwa-install-steps span {
    background: rgba(255, 255, 255, 0.62);
    color: rgba(33, 22, 9, 0.78);
  }

  .pwa-sheet-secondary {
    grid-column: 1 / -1;
    min-height: 2.44rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.15);
    color: currentColor;
    font-weight: 820;
  }
}

@media (min-width: 769px) {
  .pwa-assist-layer {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-network-pill,
  .pwa-install-sheet,
  .pwa-install-fab,
  .pwa-update-pill {
    transition: none !important;
  }
}
