.install-prompt {
  position: relative;
  box-sizing: border-box;
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(90dvh, 760px);
  overflow: hidden;
  padding: 0;
  border: 1px solid #b9ebee;
  border-radius: 28px;
  background: #f9ffff;
  color: #315b61;
  box-shadow: 0 24px 80px #163a402e;
  font: 500 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.install-prompt::backdrop { background: #123d46a8; backdrop-filter: blur(5px); }
.install-prompt[open] { animation: install-prompt-in .22s ease-out both; }
.install-prompt-card {
  box-sizing: border-box;
  max-height: min(90dvh, 758px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 46px 34px 24px;
}
.install-prompt-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #b9e6e9;
  border-radius: 50%;
  background: #eaf8f9;
  color: #168f98;
  cursor: pointer;
}
.install-prompt-close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.install-prompt-brand {
  position: relative;
  width: 118px;
  height: 54px;
  margin: 0 auto 12px;
}
.install-prompt-brand span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: linear-gradient(135deg, #22d7de, #0daab1);
  box-shadow: 0 8px 22px #0fc7ce38;
  animation: medsiLogoFloat 1.9s infinite ease-in-out;
}
.install-prompt-brand span:nth-child(1) { width: 32px; height: 32px; left: 0; bottom: 2px; }
.install-prompt-brand span:nth-child(2) { width: 25px; height: 25px; left: 27px; top: 1px; animation-delay: .1s; }
.install-prompt-brand span:nth-child(3) { width: 22px; height: 22px; left: 52px; bottom: 9px; animation-delay: .2s; }
.install-prompt-brand span:nth-child(4) { width: 18px; height: 18px; left: 76px; top: 7px; animation-delay: .3s; }
.install-prompt-brand span:nth-child(5) { width: 14px; height: 14px; left: 97px; bottom: 13px; animation-delay: .4s; }
.install-prompt h2 { margin: 0; text-align: center; color: #17444b; font-size: clamp(1.5rem, 5vw, 2rem); line-height: 1.15; font-weight: 850; }
.install-prompt #installPromptDescription { margin: 15px 0 20px; text-align: center; color: #5d7c81; line-height: 1.48; }
.install-prompt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; border-radius: 15px; background: #eaf7f8; }
.install-prompt-tabs button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: #54777c; font: 700 15px/1 system-ui, -apple-system, sans-serif; cursor: pointer; }
.install-prompt-tabs button[aria-pressed="true"] { background: #fff; color: #0daeb8; box-shadow: 0 3px 12px #28666b16; }
.install-prompt-steps { margin: 17px 0 20px; padding-left: 26px; color: #355f64; }
.install-prompt-guides { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.install-prompt-guides .install-prompt-steps { margin-bottom: 20px; }
.install-prompt-result { margin: 0 0 18px; text-align: center; color: #5d7c81; font-size: .94rem; line-height: 1.4; font-weight: 650; }
.install-prompt-steps::before { content: attr(data-install-label); display: block; margin: 0 0 7px -26px; color: #147f87; font-weight: 800; }
.install-prompt-steps li { padding-left: 3px; margin: 9px 0; }
.install-prompt-share { display: inline-flex; align-items: center; gap: 5px; color: #168f98; white-space: nowrap; }
.install-prompt-share svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.install-prompt-steps[hidden], .install-prompt-actions [hidden] { display: none !important; }
.install-prompt-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 8px; }
.install-prompt-actions #installPromptInstall { min-height: 48px; padding-inline: 24px; font-size: .96rem; }
.install-prompt-actions .install-prompt-dismiss { min-height: 34px; padding: 4px 14px; border: 0; background: transparent; color: #168f98; font: 700 .92rem/1.2 system-ui, -apple-system, sans-serif; cursor: pointer; }
.install-prompt :focus-visible { outline: 3px solid #12b8c2; outline-offset: 3px; }
@keyframes install-prompt-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes medsiLogoFloat { 0%, 100% { transform: translateY(0) scale(1); opacity: .96; } 50% { transform: translateY(-5px) scale(1.04); opacity: 1; } }
@media (max-width: 600px) {
  .install-prompt { position: fixed; inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .install-prompt-card { height: 100%; max-height: 100%; padding: calc(62px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom)); }
  .install-prompt-close { top: calc(12px + env(safe-area-inset-top)); right: 16px; }
  .install-prompt-brand { margin-bottom: 12px; }
  .install-prompt #installPromptDescription { font-size: 1rem; }
  .install-prompt-guides { grid-template-columns: 1fr; gap: 0; }
  .install-prompt-result { margin-bottom: 16px; }
  .install-prompt-steps { font-size: .97rem; }
  .install-prompt-actions #installPromptInstall { min-height: 52px; }
}
@media (min-width: 601px) { .install-prompt-tabs { display: none; } }
@media (max-height: 650px) and (max-width: 600px) {
  .install-prompt-card { padding-top: calc(52px + env(safe-area-inset-top)); }
  .install-prompt-brand { height: 42px; margin-bottom: 6px; }
  .install-prompt-brand span:nth-child(1) { width: 25px; height: 25px; }
  .install-prompt-brand span:nth-child(2) { width: 19px; height: 19px; }
  .install-prompt-brand span:nth-child(3) { width: 17px; height: 17px; }
  .install-prompt-brand span:nth-child(4) { width: 14px; height: 14px; }
  .install-prompt-brand span:nth-child(5) { width: 11px; height: 11px; }
  .install-prompt #installPromptDescription { margin: 9px 0 12px; font-size: .91rem; }
  .install-prompt-steps { margin: 10px 0 12px; font-size: .88rem; }
  .install-prompt-steps li { margin: 6px 0; }
}
@media (prefers-reduced-motion: reduce) { .install-prompt[open], .install-prompt-brand span { animation: none; } }
