/* Sprint 14: install and online-only PWA states. */
#pwaInstall14[hidden],
#pwaUpdate14[hidden],
#pwaOffline14[hidden] { display: none !important; }

#pwaInstall14 {
  box-sizing: border-box;
  width: min(100%, 440px);
  margin: 10px auto 14px;
  padding: 12px 14px;
  border: 1px dashed #8b754f;
  border-radius: 12px;
  color: #4b452f;
  background: rgba(229, 235, 207, .72);
}

#pwaInstall14 p { margin: 0 0 9px; line-height: 1.35; }
#pwaInstall14 button { margin: 0; }

#pwaOffline14 {
  position: fixed;
  z-index: 10020;
  box-sizing: border-box;
  left: 50%;
  width: min(520px, calc(100vw - max(20px, env(safe-area-inset-left) + env(safe-area-inset-right))));
  border: 2px solid #e8d59c;
  border-radius: 14px;
  color: #fff5d7;
  background: rgba(42, 50, 30, .97);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .45);
  transform: translateX(-50%);
}

#pwaUpdate14 {
  box-sizing: border-box;
  width: min(100%, 440px);
  margin: 10px auto 14px;
  padding: 11px 13px;
  border: 2px solid #8b754f;
  border-radius: 12px;
  color: #40392c;
  background: rgba(240, 225, 183, .84);
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

#pwaUpdate14 button {
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px;
}

#pwaOffline14 {
  top: max(10px, env(safe-area-inset-top));
  padding: 12px 16px;
  text-align: center;
  font: 700 18px/1.25 Neucha, system-ui, sans-serif;
}

@media (max-width: 600px) {
  #pwaInstall14 { padding: 10px 12px; font-size: 15px; }
  #pwaUpdate14 { align-items: stretch; flex-direction: column; text-align: center; }
  #pwaUpdate14 button { width: 100%; }
}

@media (orientation: landscape) and (max-height: 500px) {
  #pwaInstall14 { margin-block: 6px 10px; padding: 8px 12px; }
  #pwaUpdate14 { margin-block: 6px 10px; flex-direction: row; padding: 7px 10px; }
  #pwaUpdate14 button { width: auto; min-height: 40px; }
}
