#pwa-banner {
  position: fixed;
  bottom: env(safe-area-inset-bottom, 0);
  left: 0;
  right: 0;
  background: #ffffff;
  color: #111;
  padding: 0.5em 0.75em;
  min-height: 4.5em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 99999;
  font: inherit;
  font-size: 16px;
  box-shadow: 0 -2px 8px rgba(0,0,0,.12);
  will-change: transform;
  transform: translateY(100%);
  animation: pwaSlideUp .25s ease-out forwards;
}

@keyframes pwaSlideUp {
  to { transform: translateY(0); }
}

#pwa-banner .pwa-left {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#pwa-banner .pwa-logo {
  width: 3em;
  height: 3em;
  border-radius: 0.4em;
  flex-shrink: 0;
}

#pwa-banner .pwa-text {
  display: flex;
  flex-direction: column;
}

#pwa-banner strong {
  font-size: 1.1em;
  font-weight: 700;
  line-height: 1.1;
}

#pwa-banner .pwa-text span {
  font-size: 0.9em;
  line-height: 1.2;
  opacity: 0.85;
}

#pwa-banner .pwa-actions {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

#pwa-banner button {
  border: none;
  border-radius: 0.5em;
  padding: 0.45em 0.85em;
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

#pwa-install {
  background-color: #006DC6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,109,198,.35);
  min-height: 2.25em;
}

#pwa-close {
  background: transparent;
  color: #888;
  font-size: 1.2em;
  padding: 0.2em;
  min-width: 2.75em;
  min-height: 2.75em;
}

body {
  transition: padding-bottom .2s ease;
}

body.has-pwa-banner {
  padding-bottom: calc(5.5em + env(safe-area-inset-bottom, 0));
}

@media (prefers-reduced-motion: reduce) {
  #pwa-banner {
    animation: none;
    transform: translateY(0);
  }
}

body.dark #pwa-banner {
  background: #181818;
}

body.dark #pwa-banner strong {
  color: #ffffff;
}

body.dark #pwa-banner .pwa-text span {
  color: #cccccc;
}

body.dark #pwa-install {
  background-color: #0b5cff;
}

body.dark #pwa-close {
  color: #aaaaaa;
}

#pwa-banner[hidden] {
  display: none;
}
