/* Floating theme button — top-right on every page, above content, below modals */
#fx-theme-btn{ position:fixed; top:calc(env(safe-area-inset-top,0px) + 14px); right:14px; z-index:1200; }
#fx-theme-btn > button{
  width:44px; height:44px; border-radius:50%; cursor:pointer;
  display:flex; align-items:center; justify-content:center; font-size:19px;
  background:var(--bg2,#111); color:var(--text,#fff);
  border:1px solid var(--border,#2a2a2a);
  box-shadow:0 6px 20px rgba(0,0,0,.35); transition:transform .2s, box-shadow .2s;
}
#fx-theme-btn > button:hover{ transform:translateY(-1px) scale(1.05); box-shadow:0 10px 26px rgba(0,0,0,.45); }
#fx-theme-btn > button:active{ transform:scale(.96); }

.fx-theme-menu{
  position:absolute; top:54px; right:0; min-width:210px; padding:6px;
  background:var(--bg2,#111); border:1px solid var(--border,#2a2a2a);
  border-radius:14px; box-shadow:0 16px 40px rgba(0,0,0,.5);
  display:flex; flex-direction:column; gap:2px;
  opacity:0; visibility:hidden; transform:translateY(-8px) scale(.98);
  transition:opacity .18s, transform .18s, visibility .18s; transform-origin:top right;
}
.fx-theme-menu.open{ opacity:1; visibility:visible; transform:translateY(0) scale(1); }

.fx-theme-opt{
  display:flex; align-items:center; gap:10px; width:100%;
  padding:9px 11px; border:0; border-radius:10px; cursor:pointer;
  background:transparent; color:var(--text,#f0f0f0); font-size:14px; text-align:left;
  transition:background .15s;
}
.fx-theme-opt:hover{ background:var(--bg3,#1a1a1a); }
.fx-theme-opt.on{ background:color-mix(in srgb, var(--yellow,#a855f7) 18%, transparent); }
.fx-theme-opt .sw{ width:18px; height:18px; border-radius:5px; flex:0 0 auto; }
.fx-theme-opt .ic{ font-size:15px; }
.fx-theme-opt .nm{ flex:1; }

@media (max-width:768px){
  #fx-theme-btn{ top:calc(env(safe-area-inset-top,0px) + 10px); right:10px; }
  #fx-theme-btn > button{ width:40px; height:40px; font-size:17px; }
}
