/* Giao diện nâng cao (theme.js). Mọi luật đều bám #th-dlg để không đụng style.css / chat.css */
#th-dlg{padding:0;border:1px solid var(--ln,rgba(255,255,255,.12));border-radius:18px;background:var(--card,#1c1630);color:var(--tx,#f5efff);width:min(460px,calc(100% - 24px));max-height:88vh;overflow:auto;box-shadow:0 20px 60px rgba(0,0,0,.45)}
#th-dlg::backdrop{background:rgba(0,0,0,.55)}
#th-dlg .tp{padding:18px}
#th-dlg .ph{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
#th-dlg h3{margin:0;font-size:18px}
#th-dlg h4{margin:16px 0 8px;font-size:13px;color:var(--mut,#b4abd0);text-transform:uppercase;letter-spacing:.04em}
#th-dlg .x{position:static;background:none;border:0;color:inherit;font-size:18px;cursor:pointer;padding:4px 8px}
#th-dlg p{margin:8px 0;font-size:13.5px;line-height:1.5}
#th-dlg .hint{color:var(--mut,#b4abd0);font-size:12.5px}
#th-dlg .lockrow{background:var(--bg2,rgba(255,255,255,.06));padding:10px 12px;border-radius:12px}
#th-dlg .sws{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
#th-dlg .tsw{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 6px;border:2px solid var(--ln,rgba(255,255,255,.12));border-radius:14px;background:var(--bg2,rgba(255,255,255,.05));color:inherit;font:inherit;font-size:12px;cursor:pointer}
#th-dlg .tsw i{display:block;width:100%;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--a) 0 55%,var(--b) 55% 100%);border:1px solid rgba(128,128,128,.35)}
#th-dlg .tsw.on{border-color:var(--pink,#ff6f9c)}
#th-dlg .tsw.lock{opacity:.6}
#th-dlg .tsw em{position:absolute;top:4px;right:6px;font-style:normal;font-size:11px}
#th-dlg .cc{display:flex;gap:16px;flex-wrap:wrap}
#th-dlg .cc label{display:flex;align-items:center;gap:8px;font-size:13px}
#th-dlg input[type=color]{width:44px;height:30px;padding:0;border:1px solid var(--ln,rgba(255,255,255,.2));border-radius:8px;background:none;cursor:pointer}
#th-dlg .gal{display:flex;flex-wrap:wrap;gap:8px}
#th-dlg .th{position:relative;width:76px;height:56px;border-radius:12px;border:2px solid var(--ln,rgba(255,255,255,.12));overflow:visible;padding:0;display:flex;align-items:center;justify-content:center;background:var(--bg2,rgba(255,255,255,.05));color:inherit;font:inherit;font-size:12px}
#th-dlg .th>button{position:absolute;inset:0;border:0;border-radius:10px;background-size:cover;background-position:center;cursor:pointer;padding:0}
#th-dlg .th>button b{position:absolute;left:4px;bottom:4px;font-size:9px;background:var(--pink,#ff6f9c);color:#fff;border-radius:6px;padding:1px 5px}
#th-dlg .th>a{position:absolute;top:-7px;right:-7px;width:20px;height:20px;border-radius:50%;background:#e5484d;color:#fff;font-size:11px;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none}
#th-dlg .th.on{border-color:var(--pink,#ff6f9c)}
#th-dlg .th.add,#th-dlg .th.none{cursor:pointer;font-size:20px}
#th-dlg .th.none{font-size:12px}
#th-dlg .sl{display:grid;gap:10px;margin-top:8px}
#th-dlg .sl label{display:grid;gap:4px;font-size:13px}
#th-dlg .sl input[type=range]{width:100%;accent-color:var(--pink,#ff6f9c)}
#th-dlg .acts{display:flex;gap:8px;margin-top:14px}
#th-dlg .buy,#th-dlg .ghost,#th-dlg .lk{font:inherit;font-size:14px;border-radius:12px;padding:10px 14px;cursor:pointer}
#th-dlg .buy{flex:1;border:0;background:var(--pink,#ff6f9c);color:#fff;font-weight:700}
#th-dlg .ghost{border:1px solid var(--ln,rgba(255,255,255,.2));background:none;color:inherit}
#th-dlg .lk{display:inline;border:0;background:none;color:var(--pink,#ff6f9c);text-decoration:underline;padding:0 2px;font-size:inherit}
#th-dlg .thmsg{min-height:18px;color:#ff8a8a;font-size:13px}
#th-dlg .thmsg.ok{color:#5be3a0}

/* ảnh nền toàn trang */
#hb{position:fixed;inset:0;z-index:-1;pointer-events:none;overflow:hidden}
#hb .i{position:absolute;inset:-24px;background-size:cover;background-position:center;filter:blur(var(--hb-blur,0px))}
#hb .o{position:absolute;inset:0;background:rgba(0,0,0,var(--hb-ov,.55))}
html.hb-on,html.hb-on body,body.hb-on{background:transparent!important}
