/* Scope every rule to the home-screen feature. No global theme resets. */
#sd-home-save-card[hidden], #sd-home-invite[hidden], #sd-home-install[hidden], #sd-home-steps[hidden] { display: none !important; }
#sd-home-save-card {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    max-width: 720px; margin: 22px auto 100px; padding: 18px;
    background: #effafa; border: 1px solid #cce9eb; border-radius: 14px; color: #243447;
}
#sd-home-save-card strong { font-size: 16px; }
#sd-home-save-card p { margin: 5px 0 0; font-size: 13px; line-height: 1.5; }
#sd-home-save-card button, #sd-home-install, #sd-home-invite [data-sd-home-open] {
    flex-shrink: 0; appearance: none; border: 0; border-radius: 10px;
    padding: 12px 15px; font: inherit; font-size: 14px; font-weight: 700;
    background: #008f9a; color: #fff; cursor: pointer;
}
#sd-home-invite {
    box-sizing: border-box; position: fixed; left: 12px; right: 12px;
    bottom: max(calc(86px + env(safe-area-inset-bottom, 0px)), var(--sd-home-invite-bottom, 0px));
    z-index: 999900; width: auto; max-width: 420px; margin: 0 auto; padding: 17px 19px 14px;
    border: 1px solid #c7e9ec; border-radius: 18px; background: #fff;
    box-shadow: 0 10px 34px rgba(17,60,75,.16); color: #243447;
    animation: sd-home-invite-in 180ms ease-out;
}
#sd-home-invite .sd-home-invite-label { color: #008f9a; font-size: 10px; letter-spacing: 1.2px; font-weight: 800; }
#sd-home-invite h2 { margin: 6px 25px 5px 0; padding: 0; font-size: 19px; line-height: 1.3; color: #18364a; }
#sd-home-invite p { margin: 0; padding: 0; font-size: 13px; line-height: 1.5; }
#sd-home-invite .sd-home-invite-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
#sd-home-invite [data-sd-home-open] { min-height: 44px; }
#sd-home-later { appearance: none; border: 0; background: transparent; color: #526875; padding: 10px 12px; min-height: 44px; font: inherit; font-size: 13px; cursor: pointer; }
#sd-home-dismiss { position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; font: inherit; font-size: 23px; background: transparent; color: #607582; cursor: pointer; }
@keyframes sd-home-invite-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
#sd-home-dialog {
    box-sizing: border-box; position: fixed; inset: 0; margin: auto;
    width: min(430px, calc(100vw - 32px)); max-height: calc(100dvh - 48px);
    overflow-y: auto; padding: 30px 25px 24px; border: 1px solid #d4e8ec;
    border-radius: 20px; background: #fff; color: #243447;
    box-shadow: 0 22px 70px rgba(10,44,59,.2); font-family: inherit;
}
#sd-home-dialog:not([open]) { display: none !important; }
#sd-home-dialog::backdrop { background: rgba(17,42,56,.42); }
#sd-home-close {
    position: absolute; right: 8px; top: 8px; width: 44px; height: 44px;
    border: 0; border-radius: 50%; background: transparent; color: #526875;
    font-size: 25px; cursor: pointer;
}
#sd-home-dialog .sd-home-eyebrow { color: #008f9a; font-size: 11px; font-weight: 800; letter-spacing: 1.3px; }
#sd-home-dialog h2 { margin: 12px 24px 10px 0; font-size: 25px; line-height: 1.18; color: #18364a; }
#sd-home-dialog p, #sd-home-dialog li { font-size: 14px; line-height: 1.65; }
#sd-home-dialog ol { padding-left: 23px; margin: 18px 0; }
#sd-home-dialog li { padding-left: 3px; margin: 10px 0; }
#sd-home-dialog .sd-home-note { margin: 20px 0 0; color: #657b86; font-size: 12px; }
#sd-home-install { width: 100%; margin: 10px 0 0; min-height: 46px; }
#sd-home-invite button:focus-visible, #sd-home-save-card button:focus-visible,
#sd-home-dialog button:focus-visible { outline: 3px solid #1e57a0; outline-offset: -3px; }
@media (max-width: 760px) { #sd-home-save-card { margin-left: 14px; margin-right: 14px; } }
@media (max-width: 360px) { #sd-home-save-card { align-items: flex-start; flex-direction: column; } }
@media (min-width: 1025px), (display-mode: standalone), (display-mode: fullscreen) {
    #sd-home-save-card, #sd-home-invite { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { #sd-home-invite { animation: none; } }
