/* onboarding-bottom: do not inject siblings into app-shell grid */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--navy-950)}
body{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:radial-gradient(circle at 50% -10%,#0f3c70 0,#06152b 42%,#020a16 100%)}
button,a{font:inherit;color:inherit}button{border:0}button,a{text-decoration:none}
.app-shell{width:min(100%,520px);height:100dvh;margin:0 auto;display:grid;grid-template-rows:minmax(0,1fr) calc(var(--nav-h) + env(safe-area-inset-bottom));background:linear-gradient(180deg,#04152a 0%,#03101e 100%);position:relative;overflow:hidden;box-shadow:0 0 0 1px rgba(255,255,255,.03)}
.app-shell>.app-view{grid-row:1;grid-column:1}
.app-shell>.bottom-slot{grid-row:2;grid-column:1}
.app-view{height:100%;min-height:0;overflow:hidden}
.app-loader{height:100%;display:grid;place-items:center}.app-loader span{width:34px;height:34px;border:3px solid rgba(255,255,255,.18);border-top-color:#5bd6ff;border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.bottom-nav{display:grid;grid-template-columns:repeat(4,1fr);padding:6px 10px max(6px,env(safe-area-inset-bottom));background:linear-gradient(180deg,rgba(7,30,55,.97),rgba(4,20,39,.99));border-top:1px solid rgba(255,255,255,.09);box-shadow:0 -12px 34px rgba(0,0,0,.18);z-index:40}
.bottom-nav-item{background:transparent;color:#9ab3cf;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:11px;font-weight:700;border-radius:16px;min-width:0;cursor:pointer}.bottom-nav-item img{width:25px;height:25px;opacity:.82;filter:drop-shadow(0 0 10px rgba(78,171,255,.15))}.bottom-nav-item.active{color:#43aaff}.bottom-nav-item.active img{opacity:1;filter:drop-shadow(0 0 10px rgba(45,171,255,.55))}
.menu-backdrop{position:fixed;inset:0;background:rgba(0,6,16,.52);backdrop-filter:blur(5px);z-index:80}.more-sheet{position:fixed;left:50%;bottom:0;transform:translate(-50%,110%);width:min(100%,520px);padding:10px 16px calc(20px + env(safe-area-inset-bottom));border-radius:28px 28px 0 0;background:linear-gradient(180deg,#0a2745,#06192f);border:1px solid rgba(255,255,255,.12);box-shadow:0 -30px 80px rgba(0,0,0,.48);z-index:90;transition:transform .25s ease}.more-sheet.open{transform:translate(-50%,0)}.sheet-handle{width:46px;height:5px;background:rgba(255,255,255,.22);border-radius:99px;margin:0 auto 14px}.sheet-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.sheet-head span{display:block;color:#7fa4c9;font-size:11px;font-weight:800;letter-spacing:.13em}.sheet-head strong{display:block;font-size:20px;margin-top:2px}.sheet-close{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.08);color:#d7e9fb;font-size:25px;cursor:pointer}.sheet-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.sheet-grid button,.sheet-grid a{min-height:92px;border-radius:20px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.09);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:9px;color:#eaf6ff;font-size:12px;font-weight:800}.sheet-grid img{width:30px;height:30px}
@media(min-width:700px){body{display:grid;place-items:center;padding:20px}.app-shell{height:calc(100dvh - 40px);max-height:900px;border-radius:34px;border:1px solid rgba(255,255,255,.1);box-shadow:0 35px 100px rgba(0,0,0,.48)}}

/* v3.2 install experience */
.bottom-slot{position:relative;min-height:0;height:100%;z-index:40}.bottom-slot>.bottom-nav{height:100%}
.install-dock{height:100%;padding:7px 8px max(7px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr) 34px;gap:6px;align-items:center;background:linear-gradient(180deg,rgba(5,36,72,.98),rgba(3,22,47,.99));border-top:1px solid rgba(117,194,255,.18);box-shadow:0 -14px 38px rgba(0,0,0,.25)}
.install-dock[hidden]{display:none}.install-dock-main{height:54px;min-width:0;padding:6px 10px;display:grid;grid-template-columns:40px minmax(0,1fr) 24px;align-items:center;gap:9px;text-align:left;border-radius:18px;background:linear-gradient(115deg,#0b8fff,#0757d7);border:1px solid rgba(153,224,255,.36);box-shadow:0 10px 25px rgba(0,75,199,.30),inset 0 1px 0 rgba(255,255,255,.16);color:#fff}.install-dock-icon{width:38px;height:38px;border-radius:13px;display:grid;place-items:center;background:rgba(255,255,255,.16)}.install-dock-icon img{width:21px;height:21px}.install-dock-copy{min-width:0}.install-dock-copy strong{display:block;font-size:13px;line-height:1.1;font-weight:950}.install-dock-copy small{display:block;margin-top:3px;color:#d8f1ff;font-size:9px;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.install-dock-arrow{font-size:25px;line-height:1;color:#e5f7ff}.install-dock-close{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.08);color:#abc8e3;font-size:20px}
.install-guide-backdrop{position:fixed;inset:0;background:rgba(0,6,16,.56);backdrop-filter:blur(5px);z-index:110}.install-guide{position:fixed;left:50%;bottom:0;transform:translate(-50%,110%);width:min(100%,520px);padding:10px 16px calc(18px + env(safe-area-inset-bottom));border-radius:28px 28px 0 0;background:linear-gradient(180deg,#0b2f57,#06192f);border:1px solid rgba(255,255,255,.13);box-shadow:0 -30px 80px rgba(0,0,0,.50);z-index:120;transition:transform .24s ease}.install-guide.open{transform:translate(-50%,0)}.install-guide-head{display:grid;grid-template-columns:46px minmax(0,1fr) 38px;align-items:center;gap:10px}.install-guide-app-icon{width:46px;height:46px;border-radius:14px;overflow:hidden;box-shadow:0 8px 20px rgba(0,0,0,.24)}.install-guide-app-icon img{width:100%;height:100%;object-fit:cover}.install-guide-head small{display:block;color:#80b9e8;font-size:9px;font-weight:900;letter-spacing:.12em}.install-guide-head strong{display:block;margin-top:3px;font-size:17px}.install-guide-text{margin:14px 0 0;color:#c7def2;font-size:13px;line-height:1.5}.install-guide-done{width:100%;height:48px;margin-top:14px;border-radius:16px;background:linear-gradient(120deg,#1297ff,#075ee0);color:#fff;font-size:13px;font-weight:900}

/* v3.4 — footer/navigation is always visible. First-install offer floats above it instead of replacing it. */
.bottom-slot{overflow:visible}.bottom-slot>.bottom-nav{display:grid!important;visibility:visible!important;height:100%}
.install-dock{position:absolute;left:8px;right:8px;bottom:calc(100% + 8px);height:auto;min-height:62px;padding:6px;grid-template-columns:minmax(0,1fr) 32px;border-radius:20px;background:linear-gradient(130deg,rgba(5,54,112,.98),rgba(5,27,59,.98));border:1px solid rgba(111,203,255,.24);box-shadow:0 18px 48px rgba(0,0,0,.42),inset 0 1px 0 rgba(255,255,255,.10)}
.install-dock-main{height:50px}.install-dock-close{align-self:center}

/* Document-level navigation stays outside clipped page containers. */
.app-shell.app-shell--fixed-nav {
  height:100vh;
  height:100dvh;
  grid-template-rows:minmax(0,1fr);
  padding-bottom:calc(var(--nav-h) + env(safe-area-inset-bottom,0px));
}
.bottom-slot--fixed {display:contents}
.bottom-slot--fixed > .bottom-nav {
  position:fixed;
  bottom:0;
  left:0;
  right:0;
  width:min(100%,520px);
  height:calc(var(--nav-h) + env(safe-area-inset-bottom,0px));
  margin-inline:auto;
  z-index:9999;
}
/* Explicit menus can cover navigation while open. */
body:has(.bottom-slot--fixed) .menu-backdrop {z-index:10000}
body:has(.bottom-slot--fixed) .more-sheet {z-index:10001}
@media(min-width:700px) {
  .app-shell.app-shell--fixed-nav {height:calc(100dvh - 40px)}
}

body:has(.bottom-slot--fixed) .power-wizard-backdrop,
body:has(.bottom-slot--fixed) .power-manage-backdrop {z-index:10000}
body:has(.bottom-slot--fixed) .power-wizard,
body:has(.bottom-slot--fixed) .power-manage-modal {z-index:10001}

/* Auto anchor ads overlay the app; only the normal desktop frame adds space. */
body {
  --app-frame-gap:0px;
  padding-top:var(--app-frame-gap)!important;
  margin-top:0!important;
}
@media(min-width:700px) {
  body { --app-frame-gap:20px; }
}
