:root{--dark:#111827;--orange:#ff9418;--bg:#f6f7fb}
*{box-sizing:border-box}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);font-family:Inter,Arial,sans-serif}
#app{position:fixed;inset:0}
iframe{border:0;width:100%;height:100%;display:block;background:#fff}
.splash{position:fixed;inset:0;z-index:1000;display:flex;flex-direction:column;align-items:center;justify-content:center;background:linear-gradient(145deg,#111827,#171717);color:#fff;transition:opacity .35s ease,visibility .35s ease}
.splash.hidden{opacity:0;visibility:hidden}
.splash img{width:min(72vw,330px);filter:drop-shadow(0 14px 30px rgba(0,0,0,.35))}
.splash p{font-size:13px;color:#d1d5db;margin-top:14px}
.spinner{width:36px;height:36px;border:4px solid rgba(255,255,255,.18);border-top-color:var(--orange);border-radius:50%;animation:spin .8s linear infinite;margin-top:28px}
@keyframes spin{to{transform:rotate(360deg)}}
.install-bar{position:fixed;left:14px;right:14px;bottom:14px;z-index:900;background:#111827;color:#fff;border-radius:16px;padding:13px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 18px 45px rgba(0,0,0,.3)}
.install-bar div{min-width:0;flex:1}
.install-bar strong,.install-bar span{display:block}
.install-bar strong{font-size:13px}.install-bar span{font-size:11px;color:#c4c8cf;margin-top:3px}
.install-bar button{border:0;border-radius:10px;background:var(--orange);color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}
.install-bar .dismiss{background:transparent;font-size:22px;padding:4px 7px}
.hidden{display:none!important}
.state-screen{position:fixed;inset:0;z-index:800;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:28px;background:var(--bg);color:#1f2937}
.state-screen img{width:min(66vw,290px);max-height:180px;object-fit:contain;margin-bottom:25px}
#offlineScreen img{width:110px;height:110px}
.state-screen h1{font-size:24px;margin:0 0 10px}.state-screen p{max-width:560px;line-height:1.6;color:#6b7280}
.state-screen code{background:#e5e7eb;padding:2px 5px;border-radius:5px}
.state-screen button{border:0;border-radius:11px;background:var(--orange);color:white;padding:12px 18px;font-weight:800}
@media(display-mode:standalone){.install-bar{display:none!important}}
