/* Theme picker floating button + panel */
#theme-picker-btn{
  position:fixed;
  right:16px;
  bottom:18px;
  z-index:9999;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background:rgba(20,20,20,.72);
  color:rgba(255,255,255,.92);
  font-weight:800;
  letter-spacing:.02em;
  cursor:pointer;
  user-select:none;
  backdrop-filter: blur(10px);
}
#theme-picker-btn:active{transform: translateY(1px);}

#theme-picker-panel{
  position:fixed;
  right:16px;
  bottom:66px;
  z-index:9999;
  width: min(340px, calc(100vw - 32px));
  border-radius:16px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(18,18,18,.92);
  color:rgba(255,255,255,.92);
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
  padding:12px;
}
#theme-picker-panel[hidden]{display:none !important;}

#theme-picker-panel .tp-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
#theme-picker-panel .tp-title{font-weight:900;}
#theme-picker-panel .tp-close{
  border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.88);
  border-radius:12px;
  padding:6px 10px;
  cursor:pointer;
}

#theme-picker-panel .tp-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:8px;
}
#theme-picker-panel .tp-chip{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:10px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.04);
  cursor:pointer;
  font-weight:800;
  font-size:13px;
}
#theme-picker-panel .tp-chip[data-active="1"]{
  border-color: rgba(255,255,255,.26);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08) inset;
}
#theme-picker-panel .tp-swatch{
  height:10px;
  border-radius:999px;
  background: var(--accent, #ffb05a);
  box-shadow: 0 0 0 1px rgba(255,255,255,.10) inset, 0 8px 18px rgba(0,0,0,.35);
}
#theme-picker-panel .tp-foot{
  margin-top:10px;
  color:rgba(255,255,255,.65);
  font-size:12px;
  line-height:1.35;
}

@media (max-width:720px){
  #theme-picker-btn{ right:12px; bottom:12px; }
  #theme-picker-panel{ right:12px; bottom:58px; }
  #theme-picker-panel .tp-grid{ grid-template-columns: repeat(2, 1fr); }
}


/* Inline mount (e.g. chat header) */
#theme-picker-btn.tp-inline-btn{
  position: static;
  right: auto;
  bottom: auto;
  padding: 6px 10px;
  border-radius: 999px;
}
#theme-picker-panel.tp-inline-panel{
  position: absolute;
  right: 0;
  bottom: auto;
  top: calc(100% + 10px);
}
