/* 19 · Connect launcher (#connectFab) + desktop popover (#connectPop) — js/connect.js
   Sits above the full pages (About / Accessibility, z 120) and below sheets, menus and the
   welcome menu. Night is the default ink; body.sky-day switches it. */
#connectFab{position:fixed;z-index:125;bottom:calc(18px + env(safe-area-inset-bottom));inset-inline-end:clamp(16px,2vw,28px);
  display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 18px 0 14px;border:1px solid rgba(255,255,255,.16);border-radius:999px;
  background:rgba(12,15,20,.82);color:#fff;font-family:var(--ui);font-size:13px;font-weight:600;letter-spacing:.04em;cursor:pointer;
  -webkit-backdrop-filter:blur(18px) saturate(1.3);backdrop-filter:blur(18px) saturate(1.3);box-shadow:0 10px 30px -12px rgba(0,0,0,.5);
  transition:transform .15s ease,background .2s ease}
#connectFab[hidden]{display:none}
#connectFab:hover{transform:translateY(-1px)}
#connectFab:active{transform:scale(.97)}
#connectFab:focus-visible{outline:2px solid #fff;outline-offset:3px}
#connectFab .k-ic{font-size:18px;width:1em;height:1em;fill:currentColor;flex:0 0 auto}
#connectFab[aria-expanded="true"]{background:#c8102e;border-color:transparent}

#connectPop{position:fixed;z-index:126;bottom:calc(74px + env(safe-area-inset-bottom));inset-inline-end:clamp(16px,2vw,28px);
  width:min(300px,calc(100vw - 32px));max-height:calc(100dvh - 120px);overflow-y:auto;padding:14px 14px 16px;
  border:1px solid rgba(255,255,255,.12);border-radius:24px;background:rgba(12,15,20,.92);color:#e8eef5;font-family:var(--ui);
  -webkit-backdrop-filter:blur(22px) saturate(1.3);backdrop-filter:blur(22px) saturate(1.3);box-shadow:0 24px 60px -20px rgba(0,0,0,.6);
  opacity:0;transform:translateY(6px);transition:opacity .16s ease,transform .16s ease}
#connectPop[hidden]{display:none}
#connectPop.show{opacity:1;transform:none}
#connectPop .cx-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 4px 4px}
#connectPop .cx-title{margin:0;font-size:16px;font-weight:600;letter-spacing:.01em}
#connectPop .cx-x{width:36px;height:36px;border:0;border-radius:50%;background:rgba(255,255,255,.08);color:inherit;font-size:14px;cursor:pointer}
#connectPop .cx-k{margin:14px 4px 6px;font-size:10.5px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:rgba(232,238,245,.72)}
#connectPop .cx-list{display:flex;flex-direction:column;gap:4px}
#connectPop .cx-link{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 12px;border-radius:14px;background:rgba(255,255,255,.06);
  color:inherit;text-decoration:none;font-size:14px;font-weight:500;overflow-wrap:anywhere}
#connectPop .cx-link:hover{background:rgba(255,255,255,.12)}
#connectPop .cx-link:focus-visible{outline:2px solid #fff;outline-offset:1px}
#connectPop .cx-ic{display:inline-flex;width:18px;height:18px;flex:0 0 auto}
#connectPop .cx-ic :is(svg,img){width:18px;height:18px;display:block;fill:currentColor;border-radius:22%}

body.sky-day #connectFab{background:rgba(250,252,254,.92);color:#0b2742;border-color:rgba(11,39,66,.14);box-shadow:0 10px 30px -14px rgba(11,39,66,.4)}
body.sky-day #connectFab:focus-visible{outline-color:#0b2742}
body.sky-day #connectFab[aria-expanded="true"]{background:#c8102e;color:#fff;border-color:transparent}
body.sky-day #connectPop{background:rgba(250,252,254,.96);color:#0b2742;border-color:rgba(11,39,66,.12);box-shadow:0 24px 60px -24px rgba(11,39,66,.45)}
body.sky-day #connectPop .cx-k{color:#3b5874}
body.sky-day #connectPop .cx-x{background:rgba(11,39,66,.07)}
body.sky-day #connectPop .cx-link{background:rgba(11,39,66,.05)}
body.sky-day #connectPop .cx-link:hover{background:rgba(11,39,66,.1)}
body.sky-day #connectPop .cx-link:focus-visible{outline-color:#0b2742}
/* phone pages: clear the home indicator, same corner */
@media (max-width:959px){
#connectFab{bottom:calc(16px + env(safe-area-inset-bottom))}
}
html.rm :is(#connectFab,#connectPop){transition:none}
