/* PWA install/update bar for the T80-derived Chat/Memory runtime.
   Additive only: fixed overlay, no layout reflow of the existing page. */
.pwa-bar {
  position: fixed;
  z-index: 9998;
  left: 8px;
  right: 8px;
  bottom: calc(34px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 8px;
  padding: 5px 9px;
  border-radius: 10px;
  border: 1px solid #4b4560;
  background: rgba(30, 28, 38, 0.95);
  color: #f2edff;
  font: 11px/1.4 system-ui, "Noto Sans SC", sans-serif;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.pwa-bar-text {
  flex: 1 1 60%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-bar-detail {
  flex: 1 1 100%;
  min-width: 0;
  color: #b9b1d0;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pwa-bar-detail:empty { display: none; }
.pwa-bar-actions { display: flex; gap: 6px; }
.pwa-bar button {
  border: 1px solid #5a5273;
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 3px 8px;
  font: inherit;
  cursor: pointer;
}
.pwa-bar button[hidden] { display: none; }
.pwa-bar button:hover { background: rgba(183, 156, 255, 0.16); }
@media (min-width: 501px) {
  .pwa-bar { left: auto; right: 14px; bottom: 14px; max-width: 420px; }
}
@media (display-mode: standalone) {
  .pwa-bar { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* Narrow screens: keep install/update status above the composer and away from the soft keyboard. */
@media (max-width: 500px) {
  .pwa-bar { top: calc(8px + env(safe-area-inset-top, 0px)); bottom: auto; }
}
