/* Install help uses its own theme tokens so it stays legible in every screen. */
:is(.pwaInstructionModal,.pwaInstallBtn,.pwaInstallBtnMini) {
  --pwa-text:#f1f5fb; --pwa-muted:#b8c7dc; --pwa-panel:#17253a;
  --pwa-panel2:#20324a; --pwa-stroke:#435675; --pwa-brand:#aac7ec;
  font-family:"Segoe UI",Arial,sans-serif;
}
html[data-theme=light] :is(.pwaInstructionModal,.pwaInstallBtn,.pwaInstallBtnMini) {
  --pwa-text:#1b2d48; --pwa-muted:#51647f; --pwa-panel:#fff;
  --pwa-panel2:#eaf0f8; --pwa-stroke:#cbd6e6; --pwa-brand:#223e68;
}
.pwaInstructionModal {
  padding:16px; background:rgba(0,0,0,.58); backdrop-filter:none; animation:none;
  color:var(--pwa-text); z-index:100000;
}
.pwaInstructionCard {
  display:flex; flex-direction:column; width:min(460px,100%);
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  overflow:hidden; background:var(--pwa-panel); color:var(--pwa-text);
  border:1px solid var(--pwa-stroke); border-radius:12px; box-shadow:none;
  outline:none; font-size:16px; line-height:1.55;
}
.pwaInstructionHeader {
  flex:none; gap:8px; padding:8px 12px; border-bottom:1px solid var(--pwa-stroke);
}
.pwaInstructionTitle { margin:0; font-size:20px; line-height:1.3; color:var(--pwa-text); }
.pwaInstructionClose {
  flex:none; display:inline-flex; align-items:center; justify-content:center;
  width:44px; height:44px; padding:10px; color:var(--pwa-text); border-radius:8px;
}
.pwaInstructionClose svg { width:20px; height:20px; }
.pwaInstructionClose:hover { background:var(--pwa-panel2); color:var(--pwa-text); }
.pwaInstructionBody { padding:16px; min-height:0; overflow:auto; scrollbar-color:var(--pwa-stroke) var(--pwa-panel); }
.pwaInstructionBody p { margin:0 0 12px; overflow-wrap:break-word; }
.pwaInstructionSteps { margin:12px 0; padding-inline-start:26px; }
.pwaInstructionStep {
  padding:4px 0 4px 4px; margin-bottom:12px; color:var(--pwa-text);
  background:none; border:0; border-radius:0; font-size:16px; line-height:1.55;
  overflow-wrap:break-word;
}
.pwaInstructionStep::marker { color:var(--pwa-brand); font-weight:700; }
.pwaInstructionStep :is(b,strong) { color:var(--pwa-text); font-weight:650; }
.pwaInstructionNote {
  padding:12px; margin-top:12px; background:var(--pwa-panel2); border:0;
  border-radius:8px; color:var(--pwa-text); font-size:14px; line-height:1.55;
}
.pwaInstructionFallback { color:var(--pwa-muted); font-size:14px; line-height:1.55; }
.pwaInstructionStatus { color:var(--pwa-text); font-weight:600; }
.pwaInstructionHelp { display:inline-block; min-height:44px; padding-block:10px; color:var(--pwa-brand); font-size:14px; text-underline-offset:3px; }
.pwaInstructionFooter { flex:none; flex-wrap:wrap; gap:8px; padding:12px 16px; border-top:1px solid var(--pwa-stroke); }
.pwaInstructionFooter .btn {
  min-height:44px; padding:10px 14px; border-radius:8px; font:600 14px/1.5 "Segoe UI",Arial,sans-serif;
  background:var(--pwa-panel2); color:var(--pwa-text); border:1px solid var(--pwa-stroke); box-shadow:none; transform:none;
}
.pwaInstructionFooter .btn.primary { background:#223e68; color:#fff; border-color:transparent; }
.pwaInstructionFooter .btn.primary:hover { background:#182e50; color:#fff; }
.pwaInstructionModal [hidden] { display:none!important; }
.pwaInstructionModal :focus-visible,.pwaInstallBtn:focus-visible,.topbar-pwa-mobile .pwaInstallBtnMini:focus-visible {
  outline:3px solid var(--pwa-brand)!important; outline-offset:2px;
}
.pwaInstructionModal ::selection { color:var(--pwa-text); background:var(--pwa-panel2); }
.pwaInstallBtn {
  min-height:44px; padding:8px 12px; gap:8px; background:#223e68; color:#fff;
  border:0; border-radius:8px; font-size:14px; line-height:1.4; box-shadow:none; transform:none;
}
.pwaInstallBtn svg { width:20px; height:20px; display:block; }
.pwaInstallBtn:hover,.pwaInstallBtn:active { background:#182e50; color:#fff; box-shadow:none; transform:none; }
.topbar-pwa-mobile .pwaInstallBtnMini {
  flex-direction:column; gap:1px; width:44px; height:44px; padding:3px;
  background:#223e68; color:#fff; border-radius:8px; box-shadow:none; transform:none;
}
.pwaInstallBtnMini svg { display:block; width:18px; height:18px; }
.pwaInstallBtnMini span { font-size:11px; font-weight:650; line-height:1.2; color:inherit; }
.topbar-pwa-mobile .pwaInstallBtnMini:active { transform:none; }
.pwaInstallBtn:disabled,.pwaInstallBtnMini:disabled { cursor:wait; }
@media(forced-colors:active) {
  .pwaInstructionCard,.pwaInstructionNote,.pwaInstructionFooter .btn { background:Canvas; color:CanvasText; border-color:CanvasText; }
  .pwaInstructionStep::marker,.pwaInstructionHelp { color:LinkText; }
}
