.mipwa-install{display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:44px;padding:.6rem .85rem;border:1px solid #d9dfd6;border-radius:14px;background:#172d3c;color:#fff;font:inherit;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap}
.mipwa-install:disabled{background:#edf2e8;color:#35504a;cursor:default}
.mipwa-install:focus-visible,.mipwa-dialog button:focus-visible,.mipwa-update button:focus-visible{outline:3px solid #db785a;outline-offset:3px}
.mipwa-dialog{width:min(520px,calc(100vw - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid #e1e5dc;border-radius:26px;padding:26px;background:#fff;color:#172d3c;box-shadow:0 24px 80px #172d3c33;box-sizing:border-box}
.mipwa-dialog::backdrop{background:#172d3c99;backdrop-filter:blur(5px)}
.mipwa-dialog[open]{animation:mipwa-in .16s ease-out}
.mipwa-dialog:not([open]){display:none}
.mipwa-head{display:flex;align-items:center;gap:14px;margin-bottom:20px}
.mipwa-head img{width:58px;height:58px;border-radius:17px;flex:none}
.mipwa-head h2{margin:0;font-size:1.5rem;line-height:1.25;letter-spacing:-.025em}
.mipwa-head small{display:block;margin-top:4px;color:#63766a;font-size:.82rem}
.mipwa-close{margin-left:auto;flex:none;align-self:flex-start;border:0;border-radius:50%;width:40px;height:40px;background:#f2f4ed;color:#172d3c;font-size:1.45rem;cursor:pointer}
.mipwa-tabs{display:flex;gap:6px;padding:5px;margin-bottom:18px;border-radius:14px;background:#f2f4ed}
.mipwa-tabs button{flex:1;min-height:42px;padding:8px;border:0;border-radius:10px;background:transparent;color:#172d3c;font:inherit;font-size:.87rem;font-weight:700;cursor:pointer}
.mipwa-tabs button[aria-pressed=true]{background:#fff;box-shadow:0 2px 5px #172d3c12}
.mipwa-instructions{margin:0 0 16px;padding:0;list-style:none;counter-reset:mipwa-step}
.mipwa-instructions li{position:relative;counter-increment:mipwa-step;padding:12px 0 12px 44px;line-height:1.5;font-size:.95rem}
.mipwa-instructions li::before{content:counter(mipwa-step);position:absolute;left:0;top:11px;width:29px;height:29px;border-radius:10px;background:#f8d857;color:#172d3c;text-align:center;line-height:29px;font-weight:800}
.mipwa-note{margin:15px 0 0;padding:13px 15px;border-radius:13px;background:#f6f7f1;color:#556858;font-size:.86rem;line-height:1.5}
.mipwa-primary{display:block;width:100%;min-height:46px;margin-top:14px;padding:12px;border:0;border-radius:13px;background:#f8d857;color:#172d3c;font:inherit;font-weight:800;cursor:pointer}
.mipwa-status{font-size:.86rem;line-height:1.5;color:#526757;margin:12px 0 0;min-height:1.5em}
.mipwa-update{position:fixed;z-index:90;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(570px,calc(100vw - 28px));padding:16px 18px;border:1px solid #d9dfd6;border-radius:18px;background:#fff;box-shadow:0 9px 45px #172d3c26;box-sizing:border-box;color:#172d3c}
.mipwa-update[hidden]{display:none}
.mipwa-update strong{display:block;font-size:.96rem}
.mipwa-update p{margin:6px 0 12px;font-size:.82rem;line-height:1.45;color:#556858}
.mipwa-update-actions{display:flex;gap:8px;flex-wrap:wrap}
.mipwa-update button{min-height:40px;padding:9px 12px;border:1px solid #d9dfd6;border-radius:11px;background:#172d3c;color:#fff;font:inherit;font-size:.84rem;font-weight:700;cursor:pointer}
.mipwa-update button:last-child{background:#fff;color:#172d3c}
.mipwa-fallback-entry{display:flex;justify-content:center;padding:12px 16px}
.mipwa-runtime-status{position:fixed;z-index:89;left:50%;bottom:max(16px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(570px,calc(100vw - 28px));margin:0;padding:14px 18px;border:1px solid #d9dfd6;border-radius:16px;background:#fff;color:#556858;box-shadow:0 9px 45px #172d3c26;box-sizing:border-box;font-size:.86rem;line-height:1.5}
.mipwa-runtime-status[hidden]{display:none}
@keyframes mipwa-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){.mipwa-install{font-size:.8rem;min-height:42px;padding:.6rem .75rem}.mipwa-dialog{padding:20px;border-radius:23px}.mipwa-head h2{font-size:1.3rem}.mipwa-head img{width:48px;height:48px}.mipwa-tabs button{font-size:.79rem}}
@media(prefers-reduced-motion:reduce){.mipwa-dialog[open]{animation:none}}
