:root{
  --bg:#07111f;--glass:rgba(21,39,62,.68);--panel:rgba(255,255,255,.08);--panel-strong:rgba(255,255,255,.13);--stroke:rgba(215,240,255,.34);--title:#0c413a;--text:#eff8ff;--muted:#9fb0c3;--accent:#1598ff;--blue:#158ce2;--red:#df3f51;--green:#30d976;--shadow:0 26px 80px rgba(0,0,0,.46), inset 0 1px rgba(255,255,255,.18);--toolbar-h:72px;--dock-h:54px;font-family:"Segoe UI",system-ui,-apple-system,BlinkMacSystemFont,sans-serif
}
body.theme-light{--bg:#dfe8f1;--glass:rgba(238,244,250,.72);--panel:rgba(255,255,255,.52);--panel-strong:rgba(255,255,255,.78);--title:#dfeaf2;--text:#17202b;--muted:#596575;--stroke:rgba(40,60,80,.25);--accent:#1678d2}
body.theme-dark{--bg:#06080d;--glass:rgba(16,18,25,.78);--title:#111722;--text:#edf2ff}
body.theme-blues{--bg:#07111f;--glass:rgba(21,39,62,.68);--title:#0c413a;--text:#eff8ff}
body.theme-coffee{--bg:#21170f;--glass:rgba(74,49,30,.68);--title:#4a2f1d;--accent:#cf8b43}
body.theme-aol{--bg:#06182b;--glass:rgba(14,46,84,.70);--title:#064f8e;--accent:#139cff}
body.theme-forest{--bg:#07150e;--glass:rgba(19,55,39,.72);--title:#0d4a36;--accent:#34c878}
body.theme-neon{--bg:#12091f;--glass:rgba(34,20,58,.72);--title:#29124b;--text:#fff7ff;--muted:#c7b4d8;--accent:#ff4fd8}
body.theme-sunset{--bg:#241128;--glass:rgba(70,34,64,.70);--title:#6f2f4f;--text:#fff6ed;--muted:#d8b8a8;--accent:#ff8b4f}
body.theme-terminal{--bg:#06110b;--glass:rgba(12,32,22,.76);--title:#082516;--text:#eaffef;--muted:#9fcbaa;--accent:#42e66f}
body.theme-violet{--bg:#130d2b;--glass:rgba(31,24,68,.74);--title:#2a1d58;--text:#f4efff;--muted:#bab0d7;--accent:#9b7cff}
body.theme-rose{--bg:#231018;--glass:rgba(72,34,48,.70);--title:#5a2639;--text:#fff3f7;--muted:#d9adb9;--accent:#ff6f9f}
body.theme-steel{--bg:#101722;--glass:rgba(30,42,56,.74);--title:#223043;--text:#edf4fb;--muted:#aab8c6;--accent:#8ab4d6}
body.theme-aol-light{--bg:#dcecf8;--glass:rgba(236,246,255,.74);--panel:rgba(255,255,255,.56);--panel-strong:rgba(255,255,255,.82);--title:#2e82cf;--text:#142338;--muted:#5a6f86;--stroke:rgba(25,105,190,.28);--accent:#138ee9}
body.theme-ice{--bg:#eaf4fb;--glass:rgba(245,251,255,.70);--panel:rgba(255,255,255,.58);--panel-strong:rgba(255,255,255,.84);--title:#bdd7eb;--text:#172737;--muted:#5f7485;--stroke:rgba(74,136,180,.24);--accent:#4aa6d8}
body.theme-mint{--bg:#dff5ed;--glass:rgba(239,253,248,.70);--panel:rgba(255,255,255,.54);--panel-strong:rgba(255,255,255,.82);--title:#8acbb6;--text:#142a25;--muted:#5f776f;--stroke:rgba(48,145,110,.24);--accent:#24a77b}
body.theme-pearl{--bg:#efeef7;--glass:rgba(251,249,255,.72);--panel:rgba(255,255,255,.56);--panel-strong:rgba(255,255,255,.84);--title:#d7d4e8;--text:#242336;--muted:#6f6c82;--stroke:rgba(115,105,160,.22);--accent:#7b72c9}
body.theme-midnight-light{--bg:#18253c;--glass:rgba(35,48,74,.72);--panel:rgba(255,255,255,.12);--panel-strong:rgba(255,255,255,.20);--title:#243957;--text:#f2f7ff;--muted:#b4c0cf;--stroke:rgba(150,185,230,.26);--accent:#6fb8ff}
body.theme-lavender-light{--bg:#eee9fb;--glass:rgba(249,246,255,.72);--panel:rgba(255,255,255,.56);--panel-strong:rgba(255,255,255,.84);--title:#cfc2ef;--text:#261f38;--muted:#716582;--stroke:rgba(126,92,184,.22);--accent:#9a72df}

*{box-sizing:border-box}
body{
  margin:0;height:100vh;overflow:hidden;color:var(--text);
  background:
    radial-gradient(circle at 67% 20%,rgba(52,139,224,.33),transparent 35%),
    radial-gradient(circle at 20% 68%,rgba(255,255,255,.14),transparent 42%),
    linear-gradient(140deg,var(--bg),#050b12);
}
body.has-wallpaper{
  background:
    linear-gradient(140deg,rgba(4,8,14,.42),rgba(4,8,14,.62)),
    var(--wallpaper-image) center/cover no-repeat fixed;
}
body:before{content:"";position:fixed;inset:0;pointer-events:none;background:none}

.glass{background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.030)),var(--glass);border:1px solid var(--stroke);box-shadow:var(--shadow);backdrop-filter:blur(12px) saturate(130%);-webkit-backdrop-filter:blur(12px) saturate(130%)}

.fm-toolbar{position:fixed;left:0;right:0;top:0;height:72px;z-index:500;display:flex;align-items:center;padding:0 16px;border-radius:0 0 14px 14px;background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.08)),var(--glass);border-bottom:1px solid rgba(255,255,255,.14);backdrop-filter:blur(14px) saturate(140%);-webkit-backdrop-filter:blur(14px) saturate(140%);box-shadow:0 10px 40px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.24)}
.toolbar-center-wrap{position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;justify-content:center;pointer-events:none}
.toolbar-center-cluster{display:flex;align-items:center;justify-content:center;gap:2px;pointer-events:auto}
.toolbar-btn{width:88px;height:58px;border:0;background:transparent;color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;border-radius:12px;transition:background .18s ease,transform .16s ease,opacity .18s ease}
.toolbar-btn:hover{background:rgba(255,255,255,.08)}
.toolbar-btn.active{background:rgba(44,144,255,.16);box-shadow:inset 0 1px rgba(255,255,255,.16),0 0 18px rgba(70,160,255,.12)}
.toolbar-btn svg,.toolbar-btn i{width:20px;height:20px;font-size:20px;opacity:.92}
.toolbar-btn span{font-size:11px;font-weight:500}
.toolbar-spacer{flex:1}
.profile-card{height:48px;min-width:188px;margin-left:auto;margin-right:4px;display:flex;align-items:center;gap:10px;padding:0 12px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.10);box-shadow:inset 0 1px rgba(255,255,255,.12)}
body.theme-light .fm-toolbar{background:linear-gradient(180deg,rgba(255,255,255,.70),rgba(255,255,255,.34)),rgba(240,245,250,.55)}
body.theme-light .toolbar-btn:hover{background:rgba(255,255,255,.34)}
body.theme-light .profile-card{background:rgba(255,255,255,.34)}

.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#15243a;border:1px solid rgba(255,255,255,.3);color:#fff;font-weight:800;overflow:hidden;padding:0;cursor:pointer}
.avatar.large{width:70px;height:70px}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.avatar,
.presence-avatar,
.chat-line-avatar,
.admin-bot-avatar-preview,
.admin-bot-avatar{
  position:relative;
  transform-origin:center;
  transition:transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.avatar:hover,
.presence-avatar:hover,
.chat-line-avatar:hover,
.admin-bot-avatar-preview:hover,
.admin-bot-avatar:hover{
  transform:scale(2.15);
  z-index:400;
  box-shadow:0 16px 38px rgba(0,0,0,.38),0 0 0 2px rgba(255,255,255,.72);
  border-color:rgba(255,255,255,.78);
}
.welcome-avatar{
  width:104px!important;
  height:104px!important;
  font-size:28px;
  flex-shrink:0;
}
.profile-status{font-size:11px;color:var(--muted)}
.profile-status span,.buddy-row span{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:5px}

#desktop{position:relative;width:100vw;height:100vh;padding-top:72px;overflow:hidden}
.fm-window{position:absolute;border-radius:28px;overflow:hidden;min-width:260px;min-height:180px;max-width:calc(100vw - 24px);max-height:calc(100vh - var(--toolbar-h) - var(--dock-h) - 18px);resize:both;touch-action:none;user-select:none}

/* Default: every text element inside a window body is selectable so the user
   can copy chat, names, system messages, attachments — anything that's text. */
.fm-window .window-body,
.fm-window .window-body *,
.chat-main, .chat-main *,
.im-chat-panel, .im-chat-panel *,
.message-attachments, .message-attachments *,
input,
textarea{
  user-select:text!important;
  -webkit-user-select:text!important;
  cursor:auto;
}

/* Opt out: titlebar (needed for dragging) and interactive controls */
.fm-window .titlebar, .fm-window .titlebar *,
.fm-window button, .fm-window button *,
.fm-window [role="button"],
.toolbar-btn, .toolbar-btn *,
.fm-window input[type="range"],
.fm-window input[type="checkbox"],
.fm-window input[type="radio"],
.fm-window select,
.window-actions, .window-actions *{
  user-select:none!important;
  -webkit-user-select:none!important;
  cursor:pointer;
}
/* Override the cursor:pointer above for inputs/sliders that have their own */
.fm-window input[type="range"]{ cursor:pointer; }
.fm-window select{ cursor:pointer; }
/* will-change is applied only during drag/resize by Interact.js */
.fm-window.interact-active{will-change:transform}
.fm-window.hidden,.fm-window.minimized{display:none!important}
.fm-window.active{outline:1px solid rgba(54,180,255,.45);box-shadow:0 32px 90px rgba(0,0,0,.58),0 0 0 1px rgba(86,190,255,.35)}
.fm-window.snapping{transition:left .12s ease,top .12s ease}

.titlebar{height:54px;background:linear-gradient(180deg,rgba(255,255,255,.16),rgba(255,255,255,.055)),var(--title);display:flex;align-items:center;justify-content:space-between;padding:0 22px;font-weight:800;border-bottom:1px solid rgba(255,255,255,.18);cursor:grab}
.titlebar>div:first-child{display:flex;align-items:center;gap:10px}
.titlebar svg,.titlebar i{width:20px;height:20px;font-size:20px}
.window-actions{display:flex;gap:8px}
.window-actions button{width:30px;height:28px;background:transparent;border:0;color:var(--text);font-size:18px;cursor:pointer;border-radius:8px}
.window-actions button:hover{background:rgba(255,255,255,.16)}
.window-body{padding:18px}

input,select,button{font:inherit}
input,select{height:38px;border-radius:12px;border:1px solid rgba(255,255,255,.15);background:var(--panel);color:var(--text);padding:0 12px}
button{border-radius:12px;border:1px solid rgba(255,255,255,.13);background:var(--panel);color:var(--text);height:40px;cursor:pointer}
button:hover{background:var(--panel-strong)}
.primary{background:linear-gradient(180deg,#22a5ff,#0b70dc)!important;color:white!important;border-color:rgba(150,220,255,.55)!important}
.small{font-size:12px;color:var(--muted)}

.chat-body{display:grid;grid-template-columns:1fr 170px;grid-template-rows:1fr 46px 54px;gap:12px}
.chat-main{
  border-radius:22px;background:rgba(255,255,255,.94);color:#273243;
  box-shadow:inset 0 3px 12px rgba(0,0,0,.18),0 8px 24px rgba(0,0,0,.10);
  padding:24px;overflow:auto;border:1px solid rgba(255,255,255,.7)
}
.room-title{text-align:center;margin-bottom:34px;font-size:18px}
.chat-line{display:grid;grid-template-columns:150px 1fr;gap:18px;margin:14px 0;font-size:17px}

/* Discord-style avatars in public chat */
/* Avatar sits INSIDE the name column — same 150px slot, inline left of the name text */
.chat-line.chat-line-with-avatar{
  grid-template-columns:150px 1fr;
  align-items:center;
}
.chat-line-name-wrap{
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
}
.chat-line-name-wrap b{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chat-line-avatar{
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--theme-accent,#5c96e6);
  display:grid;
  place-items:center;
  font-size:8px;
  font-weight:700;
  color:#fff;
  flex-shrink:0;
  overflow:hidden;
}
.chat-line-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  border-radius:50%;
}
.blue{color:var(--blue)}
.red{color:var(--red)}

.people{
  background:linear-gradient(180deg,rgba(255,255,255,.95),rgba(238,247,255,.88));
  color:#1d8ee5;border-radius:22px;padding:0;text-align:center;overflow:hidden;
  box-shadow:inset 0 2px 8px rgba(255,255,255,.55),0 8px 22px rgba(0,0,0,.10);
  border:1px solid rgba(255,255,255,.65)
}
.people h3{margin:0 0 12px;background:linear-gradient(180deg,#22a5ff,#0b7fe0);color:white;padding:8px}
.people button{display:block;width:90%;margin:8px auto;border:0;background:rgba(255,255,255,.72);color:#168ee0;font-weight:800}
.people button:hover{background:#fff}

.formatbar{
  grid-column:1/3;display:flex;gap:12px;align-items:center;
  background:rgba(255,255,255,.10);border-radius:16px;padding:3px 4px;
  box-shadow:inset 0 1px rgba(255,255,255,.20)
}
.formatbar button{min-width:44px;box-shadow:0 3px 10px rgba(0,0,0,.16)}
.color-dot{width:44px!important;border-radius:13px!important;background:#000!important}

.sendbar{
  grid-column:1/3;display:grid;grid-template-columns:44px 1fr 76px;gap:10px;
  background:rgba(255,255,255,.95);border-radius:22px;padding:8px;
  box-shadow:0 10px 26px rgba(0,0,0,.14),inset 0 1px rgba(255,255,255,.65)
}
.sendbar input{background:white;color:#111;border:0}

.im-body{
  height:calc(100% - 54px);position:relative;padding:28px;
  background:linear-gradient(180deg,rgba(213,224,233,.92),rgba(184,195,204,.78));
}
.im-body:before{
  content:"";position:absolute;left:18px;right:18px;top:18px;height:255px;z-index:0;border-radius:22px;background:#fff;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.18),0 10px 26px rgba(0,0,0,.10);
  border:1px solid rgba(255,255,255,.7)
}
.im-body>*{position:relative;z-index:1}
.time{text-align:center;color:#111;font-size:18px}
.im-body .chat-line{margin-left:20px;margin-right:20px;color:#222}
.im-body .formatbar{position:absolute;left:18px;right:18px;bottom:72px}
.im-body .sendbar{position:absolute;left:18px;right:18px;bottom:18px;display:grid}

.buddy-body,.login-body,.panel-body{display:flex;flex-direction:column;gap:14px}
.buddy-body input{background:rgba(255,255,255,.55)}
.buddy-row{
  height:38px;display:flex;align-items:center;justify-content:space-between;
  padding:0 10px;border-radius:10px;background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.08);transition:background .15s ease,transform .15s ease
}
.buddy-row:hover{background:rgba(255,255,255,.24);transform:translateX(1px)}
.buddy-row .away{background:#e6a843}

.player-body{display:grid;grid-template-columns:130px 1fr;gap:18px}
.album{width:130px;height:130px;border-radius:14px;border:1px solid rgba(255,255,255,.2);display:grid;place-items:center;text-align:center;background:radial-gradient(circle,#6a51ff,transparent 45%),#081329;font-weight:900;letter-spacing:.22em}
.player-info p{color:var(--accent)}
.eq-bars{height:92px;display:flex;align-items:end;gap:6px}
.eq-bars i{width:8px;border-radius:3px 3px 0 0;background:linear-gradient(180deg,#ce55ff,#129dff)}
.seek{height:6px;background:rgba(255,255,255,.18);border-radius:99px;margin:16px 0}
.seek:after{content:"";display:block;width:46%;height:100%;background:var(--accent);border-radius:99px}
.player-controls{display:flex;gap:12px}
.player-controls button{width:46px}
.round{border-radius:50%;width:54px!important;height:54px}

.control-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:16px}
.control-grid button{height:72px;display:flex;align-items:center;gap:10px;justify-content:center;text-align:left}
.theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;overflow:auto;padding-right:4px}
.theme-grid button{height:64px;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:0 13px}
.theme-grid button.active-theme{background:linear-gradient(180deg,#22a5ff,#0b70dc)!important;color:white!important}
.debug-box{min-height:120px;border-radius:14px;padding:14px;background:rgba(0,0,0,.22);border:1px solid rgba(255,255,255,.14);color:var(--text);overflow:auto}

.fm-restore-dock{
position:fixed;
left:12px;
right:12px;
bottom:10px;
min-height:42px;
z-index:999;
display:flex;
align-items:center;
gap:8px;
padding:6px;
border-radius:14px;
background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.03)),var(--glass);
border:1px solid var(--stroke);
backdrop-filter:blur(14px) saturate(140%);
-webkit-backdrop-filter:blur(14px) saturate(140%);
box-shadow:var(--shadow);
}
body.theme-light .fm-restore-dock{
position:fixed;
left:12px;
right:12px;
bottom:10px;
min-height:42px;
z-index:999;
display:flex;
align-items:center;
gap:8px;
padding:6px;
border-radius:14px;
background:linear-gradient(180deg,rgba(255,255,255,.10),rgba(255,255,255,.03)),var(--glass);
border:1px solid var(--stroke);
backdrop-filter:blur(14px) saturate(140%);
-webkit-backdrop-filter:blur(14px) saturate(140%);
box-shadow:var(--shadow);
}
.fm-restore-btn{height:32px;min-width:120px;border-radius:10px;border:1px solid rgba(255,255,255,.16);background:var(--panel);color:var(--text);display:flex;align-items:center;justify-content:center;padding:0 12px;font-size:12px}
.fm-window-state-label{position:fixed;right:16px;bottom:62px;z-index:1000;padding:8px 12px;border-radius:10px;font-size:12px;color:var(--text);background:rgba(12,18,28,.56);border:1px solid rgba(255,255,255,.16);backdrop-filter:blur(10px);opacity:0;transform:translateY(8px);transition:.18s ease;pointer-events:none}
.fm-window-state-label.show{opacity:1;transform:translateY(0)}
.resize-hint{position:absolute;right:8px;bottom:6px;width:14px;height:14px;opacity:.28;pointer-events:none}





/* FM_CAPSULE_CONTROLS_V1_START */
.fm-capsule-select{
  min-width:118px!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  text-align:left!important;
  overflow:hidden;
}

.font-capsule{
  min-width:132px!important;
}

.fader-capsule{
  min-width:105px!important;
}

.capsule-label{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
  line-height:1;
}

.capsule-chev{
  font-size:14px;
  opacity:.72;
}

.capsule-open,
.fm-capsule-select.font-selected,
.fm-capsule-select.fader-selected{
  border-color:rgba(40,150,255,.52)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.40),
    0 0 0 1px rgba(40,150,255,.22),
    0 0 18px rgba(40,150,255,.18)!important;
}

.capsule-fx-line{
  width:26px;
  height:4px;
  border-radius:99px;
  background:linear-gradient(90deg,#22a5ff,#c85bff,#22e6a6);
  box-shadow:0 0 8px rgba(68,160,255,.45);
  flex:none;
}

.fm-popover{
  position:fixed;
  z-index:5000;
  width:260px;
  max-height:520px;
  overflow:auto;
  padding:12px;
  border-radius:18px;
  opacity:0;
  transform:translateY(-5px) scale(.985);
  transition:opacity .14s ease, transform .14s ease;
  pointer-events:auto;
  background:
    linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.08)),
    var(--glass);
  border:1px solid rgba(255,255,255,.20);
  box-shadow:
    0 22px 60px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.30);
}

.fm-popover.open{
  opacity:1;
  transform:translateY(0) scale(1);
}

.fm-popover-title{
  font-weight:800;
  font-size:13px;
  margin:2px 4px 10px;
}

.fm-popover-input{
  width:100%;
  height:34px;
  margin-bottom:8px;
  border-radius:11px;
  background:rgba(255,255,255,.22);
}

.fm-popover button{
  width:100%;
  height:36px;
  margin:3px 0;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  padding:0 11px;
  border-radius:11px;
  background:rgba(255,255,255,.13);
  border:1px solid rgba(255,255,255,.10);
}

.fm-popover button:hover{
  background:rgba(34,165,255,.22);
  border-color:rgba(90,170,255,.35);
}

.fm-fx-preview{
  height:42px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 0 9px;
  border-radius:12px;
  background:rgba(0,0,0,.16);
  font-weight:800;
  background-image:linear-gradient(90deg,#22a5ff,#c85bff,#22e6a6);
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent;
}

.fader-combo-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:5px;
}

.fader-combo-grid button{
  min-height:34px;
  height:34px;
  margin:0;
}

body.theme-light .fm-popover{
  background:
    linear-gradient(180deg,rgba(255,255,255,.72),rgba(255,255,255,.40)),
    rgba(240,245,250,.68);
}
/* FM_CAPSULE_CONTROLS_V1_END */



/* FM_FADER_PREVIEW_POLISH_START */
.fm-capsule-select{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  position:relative;
}

.capsule-label{
  display:inline-flex!important;
  align-items:center!important;
  line-height:1!important;
}

.capsule-chev{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  height:100%;
  line-height:1!important;
  transform:none!important;
  margin-left:6px;
  position:relative;
  top:0;
}

.fader-preview{
  font-weight:800;
  letter-spacing:.01em;
}

.fader-preview.combo,
.text-fx-gradient{
  background:linear-gradient(90deg,var(--fx-start),var(--fx-end));
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent!important;
}

.fader-preview.fade{
  background:linear-gradient(90deg,#273243,rgba(39,50,67,.28));
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent;
}

.fader-preview.glow{
  color:#168ee0;
  text-shadow:
    0 0 4px rgba(22,142,224,.55),
    0 0 10px rgba(22,142,224,.35);
}

.fader-preview.rainbow{
  background:linear-gradient(90deg,#ff3b3b,#ff9f1c,#f9f871,#20d67b,#22a5ff,#a855f7);
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent;
}

.fader-preview.pulse{
  color:#8f5cff;
  text-shadow:0 0 8px rgba(143,92,255,.65);
  animation:fmPulsePreview 1.2s ease-in-out infinite alternate;
}

@keyframes fmPulsePreview{
  from{opacity:.62;text-shadow:0 0 3px rgba(143,92,255,.35)}
  to{opacity:1;text-shadow:0 0 12px rgba(143,92,255,.85)}
}

.format-active{
  background:var(--theme-accent-soft)!important;
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.28),
    0 0 14px var(--theme-accent-soft)!important;
}

.formatbar button[data-format-toggle="bold"].format-active{
  font-weight:900!important;
}

.formatbar button[data-format-toggle="italic"].format-active{
  font-style:italic!important;
}

.formatbar button[data-format-toggle="underline"].format-active{
  text-decoration:underline!important;
}
/* FM_FADER_PREVIEW_POLISH_END */







/* FM_FORMATBAR_ALIGNMENT_FIX_START */
.formatbar{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:10px!important;
  min-height:42px!important;
  padding:4px 18px!important;
}

.chat-body .formatbar{
  grid-column:1/3!important;
  justify-content:flex-start!important;
}

.im-body .formatbar{
  left:18px!important;
  right:18px!important;
  justify-content:flex-start!important;
}

.capsule-chev{
  display:none!important;
}

.fm-capsule-select{
  justify-content:center!important;
  gap:8px!important;
}

.font-capsule{
  min-width:132px!important;
}

.fader-capsule{
  min-width:112px!important;
}

.capsule-label{
  text-align:center!important;
}
/* FM_FORMATBAR_ALIGNMENT_FIX_END */



/* FM_GROUP_FORMATBAR_MATCH_IM_START */

/* Make both chat format rows use the same visual rhythm */
.formatbar{
  justify-content:flex-start!important;
  align-items:center!important;
  gap:10px!important;
  min-height:44px!important;
  padding:5px 18px!important;
}

/* Group Chat: match Instant Message control proportions */
.chat-body .formatbar{
  grid-column:1/3!important;
  justify-content:flex-start!important;
  padding-left:26px!important;
  padding-right:26px!important;
}

/* IM keeps its preferred compact balance */
.im-body .formatbar{
  left:18px!important;
  right:18px!important;
  justify-content:flex-start!important;
  padding-left:18px!important;
  padding-right:18px!important;
}

/* Make pills consistent across IM + Group */
.font-capsule{
  min-width:138px!important;
  height:38px!important;
}

.fader-capsule{
  min-width:132px!important;
  height:38px!important;
}

.formatbar button{
  height:38px!important;
}

.color-dot{
  width:44px!important;
  min-width:44px!important;
  height:38px!important;
}

/* Remove old dropdown arrow visual */
.capsule-chev{
  display:none!important;
}

/* Fader line + label spacing */
.fader-capsule{
  justify-content:center!important;
  gap:9px!important;
}

.capsule-fx-line{
  width:28px!important;
  height:4px!important;
}

.capsule-label{
  text-align:center!important;
}

/* Give the format strip a softer panel look like the mockup */
.formatbar{
  background:
    linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.09))!important;
  border:1px solid rgba(255,255,255,.18)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.28),
    0 5px 18px rgba(0,0,0,.10)!important;
}

/* Group chat spacing under the main white panel */
.chat-body{
  grid-template-rows:1fr 48px 58px!important;
}

/* Slightly better vertical breathing */
.chat-body .sendbar{
  margin-top:2px!important;
}

.im-body .sendbar{
  margin-top:2px!important;
}

/* FM_GROUP_FORMATBAR_MATCH_IM_END */



/* FM_THEME_CONSISTENCY_FIX_START */

/* Shared accent/glow tokens per theme */
body.theme-light{
  --theme-accent:#1678d2;
  --theme-accent-soft:rgba(22,120,210,.24);
  --theme-accent-border:rgba(22,120,210,.48);
  --chat-shell:linear-gradient(180deg,rgba(213,224,233,.92),rgba(184,195,204,.78));
}

body.theme-dark{
  --theme-accent:#6aa7ff;
  --theme-accent-soft:rgba(106,167,255,.24);
  --theme-accent-border:rgba(106,167,255,.52);
  --chat-shell:linear-gradient(180deg,rgba(24,28,38,.92),rgba(15,18,25,.82));
}

body.theme-blues{
  --theme-accent:#22a5ff;
  --theme-accent-soft:rgba(34,165,255,.24);
  --theme-accent-border:rgba(34,165,255,.52);
  --chat-shell:linear-gradient(180deg,rgba(31,57,84,.86),rgba(22,39,62,.78));
}

body.theme-coffee{
  --theme-accent:#cf8b43;
  --theme-accent-soft:rgba(207,139,67,.24);
  --theme-accent-border:rgba(207,139,67,.52);
  --chat-shell:linear-gradient(180deg,rgba(90,61,40,.86),rgba(56,39,27,.78));
}

body.theme-aol{
  --theme-accent:#139cff;
  --theme-accent-soft:rgba(19,156,255,.24);
  --theme-accent-border:rgba(19,156,255,.52);
  --chat-shell:linear-gradient(180deg,rgba(18,67,114,.86),rgba(8,37,70,.78));
}

body.theme-forest{
  --theme-accent:#34c878;
  --theme-accent-soft:rgba(52,200,120,.24);
  --theme-accent-border:rgba(52,200,120,.52);
  --chat-shell:linear-gradient(180deg,rgba(29,78,55,.86),rgba(16,48,35,.80));
}
body.theme-neon{
  --theme-accent:#ff4fd8;
  --theme-accent-soft:rgba(255,79,216,.24);
  --theme-accent-border:rgba(255,79,216,.52);
  --chat-shell:linear-gradient(180deg,rgba(70,32,78,.86),rgba(34,18,58,.80));
}
body.theme-sunset{
  --theme-accent:#ff8b4f;
  --theme-accent-soft:rgba(255,139,79,.24);
  --theme-accent-border:rgba(255,139,79,.52);
  --chat-shell:linear-gradient(180deg,rgba(96,50,70,.86),rgba(54,28,48,.80));
}
body.theme-terminal{
  --theme-accent:#42e66f;
  --theme-accent-soft:rgba(66,230,111,.22);
  --theme-accent-border:rgba(66,230,111,.50);
  --chat-shell:linear-gradient(180deg,rgba(18,58,36,.86),rgba(8,32,20,.82));
}
body.theme-violet{
  --theme-accent:#9b7cff;
  --theme-accent-soft:rgba(155,124,255,.24);
  --theme-accent-border:rgba(155,124,255,.52);
  --chat-shell:linear-gradient(180deg,rgba(48,38,88,.86),rgba(28,22,62,.82));
}
body.theme-rose{
  --theme-accent:#ff6f9f;
  --theme-accent-soft:rgba(255,111,159,.24);
  --theme-accent-border:rgba(255,111,159,.52);
  --chat-shell:linear-gradient(180deg,rgba(86,42,58,.86),rgba(48,22,34,.82));
}
body.theme-steel{
  --theme-accent:#8ab4d6;
  --theme-accent-soft:rgba(138,180,214,.24);
  --theme-accent-border:rgba(138,180,214,.52);
  --chat-shell:linear-gradient(180deg,rgba(44,58,74,.86),rgba(26,36,50,.82));
}
body.theme-aol-light{
  --theme-accent:#138ee9;
  --theme-accent-soft:rgba(19,142,233,.22);
  --theme-accent-border:rgba(19,142,233,.48);
  --chat-shell:linear-gradient(180deg,rgba(218,235,248,.92),rgba(185,213,236,.82));
  --list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(229,242,253,.90));
  --list-text:#162437;
  --list-muted:#60758b;
}
body.theme-ice{
  --theme-accent:#4aa6d8;
  --theme-accent-soft:rgba(74,166,216,.20);
  --theme-accent-border:rgba(74,166,216,.44);
  --chat-shell:linear-gradient(180deg,rgba(232,244,252,.92),rgba(203,224,238,.82));
  --list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(232,243,250,.90));
  --list-text:#182837;
  --list-muted:#637889;
}
body.theme-mint{
  --theme-accent:#24a77b;
  --theme-accent-soft:rgba(36,167,123,.20);
  --theme-accent-border:rgba(36,167,123,.44);
  --chat-shell:linear-gradient(180deg,rgba(224,245,237,.92),rgba(194,226,214,.82));
  --list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(228,244,238,.90));
  --list-text:#162b25;
  --list-muted:#617a70;
}
body.theme-pearl{
  --theme-accent:#7b72c9;
  --theme-accent-soft:rgba(123,114,201,.20);
  --theme-accent-border:rgba(123,114,201,.44);
  --chat-shell:linear-gradient(180deg,rgba(236,233,248,.92),rgba(212,207,232,.82));
  --list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(238,235,248,.90));
  --list-text:#262436;
  --list-muted:#706d82;
}
body.theme-midnight-light{
  --theme-accent:#6fb8ff;
  --theme-accent-soft:rgba(111,184,255,.22);
  --theme-accent-border:rgba(111,184,255,.48);
  --chat-shell:linear-gradient(180deg,rgba(42,58,88,.86),rgba(24,34,56,.82));
  --list-surface:linear-gradient(180deg,rgba(246,250,255,.96),rgba(219,232,247,.90));
  --list-text:#182437;
  --list-muted:#62758d;
}
body.theme-lavender-light{
  --theme-accent:#9a72df;
  --theme-accent-soft:rgba(154,114,223,.20);
  --theme-accent-border:rgba(154,114,223,.44);
  --chat-shell:linear-gradient(180deg,rgba(238,231,250,.92),rgba(216,204,238,.82));
  --list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(240,234,250,.90));
  --list-text:#2a223a;
  --list-muted:#746883;
}

/* Make IM shell follow the active theme */
.im-body{
  background:var(--chat-shell)!important;
}

/* Make group/control/panel shells pick up theme glow */
.fm-window.active{
  outline:1px solid var(--theme-accent-border)!important;
  box-shadow:
    0 32px 90px rgba(0,0,0,.58),
    0 0 0 1px var(--theme-accent-border),
    0 0 26px var(--theme-accent-soft)!important;
}

/* Font/Fader selected glow now follows theme */
.capsule-open,
.fm-capsule-select.font-selected,
.fm-capsule-select.fader-selected{
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.40),
    0 0 0 1px var(--theme-accent-soft),
    0 0 18px var(--theme-accent-soft)!important;
}

/* Theme buttons / active theme use current theme accent */
.theme-grid button.active-theme{
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 72%, black))!important;
  color:white!important;
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.35),
    0 0 18px var(--theme-accent-soft)!important;
}

/* Control Center tile hover/selected glow follows theme */
.control-grid button:hover,
.theme-grid button:hover,
.fm-popover button:hover{
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.30),
    0 0 18px var(--theme-accent-soft)!important;
}

/* Fader mini-line follows the current theme but keeps FX color */
.capsule-fx-line{
  box-shadow:0 0 8px var(--theme-accent-soft)!important;
}

/* Popover border/glow follows theme */
.fm-popover{
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    0 22px 60px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.30),
    0 0 22px var(--theme-accent-soft)!important;
}

/* Send buttons stay coherent with current theme */
.primary{
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 70%, black))!important;
  border-color:var(--theme-accent-border)!important;
}

/* People Here header follows theme instead of always blue */
.people h3{
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 72%, black))!important;
}

/* Online/user/action blue accents follow theme */
.people,
.blue{
  color:var(--theme-accent)!important;
}

/* FM_THEME_CONSISTENCY_FIX_END */



/* FM_ATTACHMENT_PASS_A_CSS_START */
.attach-plus{
  color:var(--theme-accent)!important;
  font-size:22px!important;
  font-weight:800!important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.74),rgba(255,255,255,.34))!important;
  border:1px solid var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.55),
    0 0 14px var(--theme-accent-soft)!important;
}

.attach-plus:hover{
  background:
    linear-gradient(180deg,rgba(255,255,255,.90),rgba(255,255,255,.48))!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.65),
    0 0 20px var(--theme-accent-soft)!important;
}

.fm-attachment-menu{
  position:fixed;
  z-index:5200;
  width:260px;
  padding:10px;
  border-radius:18px;
  opacity:0;
  transform:translateY(6px) scale(.985);
  transition:opacity .14s ease, transform .14s ease;
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    0 22px 60px rgba(0,0,0,.34),
    inset 0 1px rgba(255,255,255,.30),
    0 0 22px var(--theme-accent-soft)!important;
}

.fm-attachment-menu.open{
  opacity:1;
  transform:translateY(0) scale(1);
}

.fm-attachment-menu button{
  width:100%;
  min-height:58px;
  height:auto;
  display:flex;
  align-items:center;
  gap:12px;
  padding:9px 11px;
  margin:4px 0;
  text-align:left;
  border-radius:14px;
  background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.12);
}

.fm-attachment-menu button:hover{
  border-color:var(--theme-accent-border)!important;
  background:var(--theme-accent-soft)!important;
}

.attach-icon{
  width:36px;
  height:36px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex:none;
  font-weight:900;
  color:white;
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 70%, black));
  box-shadow:0 0 14px var(--theme-accent-soft);
}

.fm-attachment-menu b{
  display:block;
  font-size:13px;
}

.fm-attachment-menu small{
  display:block;
  color:var(--muted);
  font-size:11px;
  margin-top:2px;
}

.attachment-tray{
  grid-column:1/3;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  padding:4px 8px 0;
}

.attachment-chip{
  display:flex;
  align-items:center;
  gap:7px;
  max-width:240px;
  height:30px;
  padding:0 7px;
  border-radius:10px;
  background:var(--theme-accent-soft);
  border:1px solid var(--theme-accent-border);
  color:var(--text);
  font-size:11px;
}

.attachment-chip b{
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.attachment-chip button{
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  padding:0!important;
  border-radius:7px!important;
}

.message-attachments{
  grid-column:2;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:8px;
}

.message-attachment{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:260px;
  padding:7px;
  border-radius:8px;
  border:1px solid var(--theme-accent-border);
  background:var(--list-surface,rgba(255,255,255,.72));
  color:var(--list-text,var(--text));
  text-decoration:none;
  overflow:hidden;
}

.message-attachment.media-tile{
  width:180px;
  max-width:180px;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
  cursor:zoom-in;
}

.message-attachment.media-tile:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 24px rgba(0,0,0,.18),0 0 0 1px var(--theme-accent-soft);
}

.message-attachment-preview{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:4/3;
  border-radius:10px;
  background:transparent;
  overflow:hidden;
}

.message-attachment-preview::after{
  content:none;
}

.message-attachment.gif-tile .message-attachment-preview::after{
  content:none;
}

.message-attachment-preview img,
.message-attachment-preview video{
  width:100%;
  height:100%;
  border-radius:10px;
  object-fit:contain;
}

.message-attachment audio{
  width:190px;
}

.message-attachment b{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:12px;
}

.message-attachment.media-tile b{
  width:100%;
}

.message-attachment-hint{
  color:var(--muted);
  font-size:10px;
  font-weight:700;
  line-height:1;
}

.message-attachment-icon{
  flex:none;
  border-radius:7px;
  padding:8px 10px;
  background:var(--theme-accent-soft);
  font-weight:800;
  font-size:11px;
}

.attachment-lightbox{
  position:fixed;
  inset:0;
  z-index:7000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:30px;
  background:rgba(0,0,0,.72);
  backdrop-filter:blur(10px);
}

.attachment-lightbox-panel{
  position:relative;
  max-width:min(96vw,1200px);
  max-height:94vh;
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px;
  border-radius:18px;
  background:rgba(18,24,34,.86);
  border:1px solid rgba(255,255,255,.22);
  box-shadow:0 30px 90px rgba(0,0,0,.55);
}

.attachment-lightbox-media{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:260px;
  min-height:180px;
}

.attachment-lightbox-media img,
.attachment-lightbox-media video{
  display:block;
  max-width:calc(96vw - 60px);
  max-height:calc(94vh - 110px);
  width:auto;
  height:auto;
  border-radius:12px;
  object-fit:contain;
}

.attachment-lightbox-title{
  max-width:calc(96vw - 80px);
  color:#fff;
  font-size:13px;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  opacity:.9;
}

.attachment-lightbox-close{
  position:absolute;
  right:10px;
  top:10px;
  width:34px;
  height:34px;
  border-radius:11px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(0,0,0,.36);
  color:#fff;
  font-size:24px;
  line-height:1;
  cursor:pointer;
  z-index:1;
}

.font-color-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

.font-color-grid button{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:8px!important;
}

.font-color-grid span{
  width:18px;
  height:18px;
  border-radius:7px;
  border:1px solid rgba(255,255,255,.45);
  box-shadow:inset 0 1px rgba(255,255,255,.35);
}

.formatbar button.color-dot{
  background:var(--chat-color,#000)!important;
}

.sendbar input.text-fx-gradient{
  background-image:linear-gradient(90deg,var(--fx-start),var(--fx-end))!important;
  background-clip:text!important;
  -webkit-background-clip:text!important;
  color:transparent!important;
}
/* FM_ATTACHMENT_PASS_A_CSS_END */































/* FM_TRUE_IM_REPAIR_START */
#win-im .im-body{
  height:calc(100% - 54px)!important;
  padding:18px!important;
  display:grid!important;
  grid-template-columns:1fr!important;
  grid-template-rows:minmax(170px, 1fr) 48px 58px!important;
  gap:10px!important;
  position:relative!important;
}

#win-im.has-attachments .im-body{
  grid-template-rows:minmax(150px, 1fr) 48px 58px 34px!important;
}

#win-im .im-body:before,
#win-im .im-body:after{
  display:none!important;
  content:none!important;
}

#win-im .im-message-stack{
  grid-row:1!important;
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:#fff!important;
  color:#222!important;
  border:1px solid rgba(255,255,255,.70)!important;
  box-shadow:
    inset 0 3px 10px rgba(0,0,0,.18),
    0 10px 26px rgba(0,0,0,.10)!important;
  padding:8px 30px 20px!important;
}

#win-im .im-message-stack .time{
  display:block!important;
  text-align:center!important;
  margin:0 0 18px!important;
  color:#222!important;
}

#win-im .im-message-stack .chat-line{
  display:grid!important;
  grid-template-columns:150px minmax(0, 1fr)!important;
  gap:18px!important;
  margin:14px 0!important;
  color:#222!important;
  width:100%!important;
}

#win-im .im-message-stack .chat-line b{
  white-space:nowrap!important;
}

#win-im .im-message-stack .chat-line span{
  min-width:0!important;
  white-space:normal!important;
  overflow-wrap:break-word!important;
}

#win-im .formatbar{
  grid-row:2!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  width:100%!important;
  opacity:1!important;
  z-index:2!important;
}

#win-im .sendbar{
  grid-row:3!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  width:100%!important;
  z-index:2!important;
}

#win-im .attachment-tray{
  grid-row:4!important;
  position:relative!important;
  left:auto!important;
  right:auto!important;
  bottom:auto!important;
  display:grid!important;
  grid-template-columns:repeat(3, minmax(72px, 1fr))!important;
  gap:8px!important;
  padding:0 8px!important;
  margin:0!important;
}

#win-im:not(.has-attachments) .attachment-tray{
  display:none!important;
}
/* FM_TRUE_IM_REPAIR_END */










/* FM Online — Font Polish: softer toolbar-style typography */
.titlebar,
.titlebar > div:first-child,
.people,
.people h3,
.people button {
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
}

.titlebar > div:first-child,
.people h3,
.people button {
  font-weight: 500 !important;
}

/* FM Online — Chat/IM scaling repair */
.fm-window{
  display:flex;
  flex-direction:column;
}

.titlebar{
  flex:0 0 54px;
}

.window-body{
  flex:1 1 auto;
  min-height:0;
  overflow:hidden;
}

/* Group Chat must scale with the outer window */
.chat-body{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-columns:minmax(360px, 1fr) 170px;
  grid-template-rows:minmax(0, 1fr) 46px 54px;
  gap:12px;
}

.chat-main{
  height:100%;
  min-height:0;
  overflow:auto;
}

.people{
  height:100%;
  min-height:0;
  overflow:auto;
}

.formatbar{
  min-height:46px;
  overflow:hidden;
}

.sendbar{
  min-height:54px;
}

/* IM window must stop cutting off controls */
.im-body{
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:auto minmax(0, 1fr) 46px 54px;
  gap:12px;
  padding:18px;
  background:#b8c0c9;
}

.im-body:before{
  display:none !important;
}

.im-body .time{
  color:#111;
}

.im-body .chat-line{
  margin:0;
  color:#222;
}

.im-body .formatbar,
.im-body .sendbar{
  position:static !important;
  left:auto !important;
  right:auto !important;
  bottom:auto !important;
}

.im-body .formatbar{
  grid-row:3;
}

.im-body .sendbar{
  grid-row:4;
}

/* Prevent toolbar controls from clipping too aggressively */
.formatbar button{
  white-space:nowrap;
}

.sendbar input{
  min-width:0;
}

/* Make the people buttons fit better */
.people button{
  min-height:34px;
  height:auto;
  padding:7px 8px;
  line-height:1.15;
}


/* FM Online — IM startup clipping fix */
#win-im{
  min-width:560px;
  min-height:560px;
}

#win-im .im-body{
  min-height:0;
  grid-template-rows:auto minmax(220px, 1fr) 46px 58px;
}

#win-im .sendbar{
  min-height:58px;
}

#win-im .formatbar{
  min-height:46px;
}

/* AOL-style Online Host */
.host-name{
  color:#4aa3ff;
  font-weight:600;
  letter-spacing:.02em;
}


/* FM Online — IM chat panel repair */
#win-im .im-body{
  display:grid;
  grid-template-rows:minmax(0, 1fr) 46px 58px;
  gap:12px;
  padding:18px;
  overflow:hidden;
}

#win-im .im-chat-panel{
  min-height:0;
  overflow:auto;
  border-radius:22px;
  background:rgba(255,255,255,.94);
  color:#1e2938;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20);
  padding:18px 22px;
}

#win-im .im-chat-panel .time{
  text-align:center;
  color:#111;
  font-size:18px;
  margin-bottom:18px;
}

#win-im .im-chat-panel .chat-line{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:18px;
  margin:12px 0;
  color:#1e2938;
}

#win-im .im-chat-panel .chat-line span{
  overflow-wrap:anywhere;
}

#win-im .formatbar,
#win-im .sendbar{
  position:static!important;
}

/* FM Online — remove broken IM left strip */
#win-im .im-body > .im-chat-panel:first-child:empty,
#win-im .im-body > div:empty{
  display:none !important;
}

#win-im .im-body{
  grid-template-columns:1fr !important;
}

#win-im .im-chat-panel{
  grid-column:1 / -1 !important;
  width:100% !important;
}


/* FM Online — Login materialize polish */
#win-login{
  animation:loginMaterialize .72s ease-out both;
}

.login-brand-fm{
  font-weight:800;
  color:#f4f9ff;
  text-shadow:
    0 0 8px rgba(120,190,255,.55),
    0 0 22px rgba(60,150,255,.38);
  animation:loginBrandPulse 2.8s ease-in-out infinite;
}

.login-brand-online{
  font-weight:400;
  color:#f4f9ff;
  letter-spacing:.02em;
  text-shadow:
    0 0 6px rgba(120,190,255,.35),
    0 0 16px rgba(60,150,255,.22);
  animation:loginBrandPulse 2.8s ease-in-out infinite;
}

@keyframes loginBrandPulse{
  0%,100%{
    opacity:.82;
    text-shadow:
      0 0 6px rgba(120,190,255,.35),
      0 0 14px rgba(60,150,255,.20);
  }
  50%{
    opacity:1;
    text-shadow:
      0 0 12px rgba(150,215,255,.75),
      0 0 30px rgba(60,150,255,.55);
  }
}

@keyframes loginMaterialize{
  0%{
    opacity:0;
    transform:translateY(18px) scale(.965);
    filter:blur(10px);
  }
  55%{
    opacity:1;
    filter:blur(2px);
  }
  100%{
    opacity:1;
    transform:translateY(0) scale(1);
    filter:blur(0);
  }
}


/* FM Online Login Logo Center Fix */
#win-login .login-logo{
  text-align:center;
  display:flex;
  justify-content:center;
  align-items:center;
  gap:0;
  margin:22px 0 30px;
  font-size:36px;
  line-height:1;
  letter-spacing:.02em;
}

#win-login .login-brand-fm{
  font-weight:800;
}

#win-login .login-brand-online{
  font-weight:400;
}

#win-login .login-brand-fm,
#win-login .login-brand-online{
  color:#f4f9ff;
  animation:loginBrandPulse 2.8s ease-in-out infinite;
}


/* FM Online — Login connect transition */
.login-status{
  margin-top:14px;
  text-align:center;
  font-size:13px;
  color:#bfe4ff;
  min-height:18px;
  opacity:.9;
  letter-spacing:.02em;
}

#win-login.login-connecting{
  box-shadow:
    0 0 0 1px rgba(86,190,255,.55),
    0 0 38px rgba(36,154,255,.32),
    0 28px 90px rgba(0,0,0,.55);
}

#win-login.login-connecting .primary{
  animation:loginConnectPulse 1.1s ease-in-out infinite;
}

#win-login.login-materialize-out{
  animation:loginMaterializeOut .72s ease-in forwards;
  pointer-events:none;
}

body.desktop-awaken .fm-toolbar{
  animation:toolbarAwaken .85s ease-out both;
}

body.desktop-awaken #desktop:before{
  animation:desktopWakeGlow 1.2s ease-out both;
}

@keyframes loginConnectPulse{
  0%,100%{
    box-shadow:0 0 12px rgba(36,154,255,.28);
  }
  50%{
    box-shadow:0 0 28px rgba(80,190,255,.62);
  }
}

@keyframes loginMaterializeOut{
  0%{
    opacity:1;
    transform:scale(1);
    filter:blur(0);
  }
  100%{
    opacity:0;
    transform:scale(.965) translateY(14px);
    filter:blur(12px);
  }
}

@keyframes toolbarAwaken{
  0%{
    filter:brightness(.75) blur(2px);
  }
  100%{
    filter:brightness(1) blur(0);
  }
}

@keyframes desktopWakeGlow{
  0%{
    opacity:0;
  }
  100%{
    opacity:1;
  }
}


/* Profile dropdown menu */
.profile-card{
  position:relative;
  cursor:pointer;
}

.profile-name{
  font-weight:600;
  line-height:1.05;
}

.profile-chevron{
  margin-left:auto;
  width:28px;
  height:28px;
  border:0;
  background:transparent;
  color:var(--text);
  font-size:22px;
}

.profile-menu{
  position:absolute;
  top:56px;
  right:0;
  min-width:180px;
  padding:8px;
  border-radius:14px;
  background:rgba(18,32,52,.92);
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 18px 50px rgba(0,0,0,.38);
  backdrop-filter:blur(12px) saturate(135%);
  -webkit-backdrop-filter:blur(12px) saturate(135%);
  z-index:2000;
}

.profile-menu.hidden{
  display:none;
}

.profile-menu button{
  width:100%;
  height:38px;
  text-align:left;
  padding:0 12px;
  margin:2px 0;
}

body.theme-light .profile-menu{
  background:rgba(238,246,252,.94);
}


/* FM Online Profile Status Final */
.profile-card.is-online .profile-status span{
  background:#30d976!important;
  animation:profileOnlinePulse 1.8s ease-in-out infinite;
}

.profile-card.is-offline .profile-status span{
  background:#b06cff!important;
  opacity:.82;
  animation:profileOfflinePulse 2.4s ease-in-out infinite!important;
  box-shadow:
    0 0 6px rgba(176,108,255,.28),
    0 0 14px rgba(255,110,210,.18)!important;
}

.profile-card.is-offline .profile-status{
  /* Use theme muted so it stays readable on light themes (Hologram, Mint, etc.)
     instead of being near-white on near-white. */
  color:var(--muted);
}

@keyframes profileOnlinePulse{
  0%,100%{
    opacity:.72;
    box-shadow:0 0 4px rgba(48,217,118,.4);
  }
  50%{
    opacity:1;
    box-shadow:
      0 0 8px rgba(48,217,118,.75),
      0 0 18px rgba(48,217,118,.35);
  }
}


/* FM Buddy List AOL Layer Pass */

#win-buddy .buddy-body{
  padding:16px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  background:
    linear-gradient(
      180deg,
      rgba(76,125,195,.20),
      rgba(24,44,82,.22)
    );
}

.buddy-shell{
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:14px;
  height:100%;
}

.buddy-search-wrap{
  background:
    linear-gradient(
      180deg,
      rgba(105,160,240,.22),
      rgba(36,74,126,.30)
    );
  border-radius:18px;
  padding:10px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -8px 18px rgba(0,0,0,.14);
}

.buddy-search{
  width:100%;
}

.buddy-well{
  overflow:auto;
  border-radius:22px;
  padding:14px;
  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,.96),
      rgba(226,236,248,.92)
    );
  box-shadow:
    inset 0 3px 12px rgba(0,0,0,.18),
    0 10px 24px rgba(0,0,0,.12);
}

.buddy-group{
  margin-bottom:18px;
}

.buddy-group-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 12px;
  margin-bottom:8px;
  border-radius:12px;
  font-weight:700;
  color:#eef6ff;
  background:
    linear-gradient(
      180deg,
      rgba(72,118,182,.92),
      rgba(42,74,122,.92)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 4px 10px rgba(0,0,0,.16);
}

.buddy-row{
  display:grid;
  grid-template-columns:12px 44px 1fr;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  margin-bottom:6px;
  border-radius:14px;
  cursor:pointer;
  transition:
    background .18s ease,
    transform .14s ease;
}

.buddy-row:hover{
  background:rgba(110,160,230,.12);
}

.buddy-row.selected{
  background:
    linear-gradient(
      180deg,
      rgba(110,170,255,.22),
      rgba(80,140,225,.18)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.34),
    0 6px 14px rgba(70,120,210,.14);
}

.buddy-avatar{
  width:44px;
  height:44px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:800;
  color:#fff;
  background:
    linear-gradient(
      180deg,
      rgba(88,128,205,.96),
      rgba(50,80,130,.96)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    0 4px 10px rgba(0,0,0,.14);
}

.buddy-name{
  font-weight:700;
  color:#1d2a3a;
}

.buddy-state{
  margin-top:2px;
  font-size:12px;
  opacity:.66;
  color:#304760;
}

.buddy-light{
  width:10px;
  height:10px;
  border-radius:50%;
}

.buddy-row.online .buddy-light{
  background:#38d978;
  animation:profileOnlinePulse 1.8s ease-in-out infinite;
}

.buddy-row.offline .buddy-light{
  background:#b06cff;
  animation:profileOfflinePulse 2.4s ease-in-out infinite;
}

.buddy-actions{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
  padding:12px;
  border-radius:18px;
  background:
    linear-gradient(
      180deg,
      rgba(74,118,186,.28),
      rgba(34,56,92,.34)
    );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -8px 16px rgba(0,0,0,.18);
}

.buddy-actions button:disabled{
  opacity:.42;
  cursor:not-allowed;
}


/* Buddy List Polish Pass 2 — thinner AIM/AOL-style list */
.buddy-pass-2 .buddy-well{
  padding:10px 12px;
}

.buddy-pass-2 .buddy-group{
  margin-bottom:12px;
}

.buddy-pass-2 .buddy-group-header{
  min-height:28px;
  padding:4px 10px;
  margin-bottom:6px;
  border-radius:9px;
  font-size:13px;
  font-weight:700;
  letter-spacing:.01em;
}

.buddy-pass-2 .buddy-row{
  grid-template-columns:14px 28px 1fr;
  gap:8px;
  padding:6px 9px;
  margin-bottom:3px;
  border-radius:9px;
  min-height:34px;
}

.buddy-pass-2 .buddy-avatar{
  display:none!important;
}

.buddy-pass-2 .buddy-name{
  font-size:14px;
  font-weight:650;
}

.buddy-pass-2 .buddy-state{
  font-size:11px;
  margin-top:0;
}

.buddy-pass-2 .buddy-light{
  width:8px;
  height:8px;
}

.buddy-pass-2 .buddy-row.offline{
  opacity:.72;
}

.buddy-pass-2 .buddy-row.away .buddy-light{
  background:#d6a84f!important;
  animation:profileOfflinePulse 2.4s ease-in-out infinite;
}

.buddy-pass-2 .buddy-actions{
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:10px;
}

.buddy-pass-2 .buddy-actions button{
  min-height:34px;
  font-size:12px;
}

.buddy-pass-2 #buddy-away-btn{
  grid-column:1 / -1;
}


/* FM Buddy Actions Windows */
.buddy-modal-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:20px;
}

.buddy-modal-body label{
  font-weight:650;
}

.buddy-modal-body input,
.buddy-modal-body select,
.buddy-modal-body textarea{
  width:100%;
}

.buddy-modal-body textarea{
  min-height:120px;
  resize:vertical;
}

.buddy-modal-actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  margin-top:auto;
}

.away-controls{
  display:grid;
  grid-template-columns:1fr 1fr 1fr;
  gap:10px;
}

.away-controls label{
  font-size:12px;
  display:flex;
  flex-direction:column;
  gap:5px;
}

.away-preview{
  padding:14px;
  border-radius:14px;
  min-height:58px;
  box-shadow:
    inset 0 1px rgba(255,255,255,.24),
    0 8px 22px rgba(0,0,0,.18);
}


/* Buddy List Sorting Collapse Scroll Pass */
.buddy-pass-2 .buddy-well{
  overflow-y:auto;
  overflow-x:hidden;
  scrollbar-width:thin;
}

.buddy-pass-2 .buddy-group-header{
  cursor:pointer;
  user-select:none;
}

.buddy-pass-2 .buddy-group-header:before{
  content:"▾";
  margin-right:6px;
  opacity:.85;
}

.buddy-pass-2 .buddy-group.collapsed .buddy-group-header:before{
  content:"▸";
}

.buddy-pass-2 .buddy-group.collapsed .buddy-group-content{
  display:none;
}

.buddy-pass-2 .buddy-row.online .buddy-name{
  font-weight:750;
  font-style:normal;
}

.buddy-pass-2 .buddy-row.offline .buddy-name{
  font-weight:400;
  font-style:italic;
  opacity:.78;
}

.buddy-pass-2 .buddy-row.offline .buddy-state{
  font-style:italic;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar{
  width:10px;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-track{
  background:rgba(80,105,140,.14);
  border-radius:10px;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb{
  background:rgba(70,115,180,.45);
  border-radius:10px;
  border:2px solid rgba(235,242,250,.7);
}


/* FM Dynamic IM Repair */
.fm-window[id^="win-im"] .im-body{
  display:grid!important;
  grid-template-rows:minmax(0, 1fr) 46px 58px!important;
  gap:12px!important;
  padding:18px!important;
  overflow:hidden!important;
}

.fm-window[id^="win-im"] .im-chat-panel{
  display:block!important;
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.94)!important;
  color:#1e2938!important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20)!important;
  padding:18px 22px!important;
  grid-column:1 / -1!important;
  width:100%!important;
}

.fm-window[id^="win-im"] .im-chat-panel .time{
  text-align:center;
  color:#111!important;
  font-size:18px;
  margin-bottom:18px;
}

.fm-window[id^="win-im"] .im-chat-panel .chat-line{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:18px;
  margin:12px 0;
  color:#1e2938!important;
}

.fm-window[id^="win-im"] .formatbar,
.fm-window[id^="win-im"] .sendbar{
  position:static!important;
}


/* FM Clean Dynamic IM Final */
.fm-window[id^="win-im-"] .im-body{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 46px 58px!important;
  gap:12px!important;
  padding:18px!important;
  overflow:hidden!important;
}

.fm-window[id^="win-im-"] .im-chat-panel{
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.94)!important;
  color:#1e2938!important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20)!important;
  padding:18px 22px!important;
}

.fm-window[id^="win-im-"] .im-chat-panel .time{
  text-align:center;
  color:#111!important;
  font-size:18px;
  margin-bottom:18px;
}

.fm-window[id^="win-im-"] .im-chat-panel .chat-line{
  display:grid;
  grid-template-columns:150px 1fr;
  gap:16px;
  margin:12px 0;
  color:#1e2938!important;
}

.fm-window[id^="win-im-"] .formatbar,
.fm-window[id^="win-im-"] .sendbar{
  position:static!important;
}


/* FM IM Restore — use the original IM window only */
#win-im{
  cursor:default!important;
}

#win-im .im-body{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 46px 58px!important;
  gap:12px!important;
  padding:18px!important;
  overflow:hidden!important;
}

#win-im .im-chat-panel{
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.94)!important;
  color:#1e2938!important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20)!important;
  padding:18px 22px!important;
}

#win-im .formatbar,
#win-im .sendbar{
  position:static!important;
}


/* FM Clean Per User IM Engine */
.fm-im-window .im-body,
#win-im .im-body{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 46px 58px!important;
  gap:12px!important;
  padding:18px!important;
  overflow:hidden!important;
  background:#b8c0c9!important;
}

.fm-im-window .im-chat-panel,
#win-im .im-chat-panel{
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.94)!important;
  color:#1e2938!important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20)!important;
  padding:18px 22px!important;
}

.fm-im-window .im-chat-panel .time,
#win-im .im-chat-panel .time{
  text-align:center!important;
  color:#111!important;
  font-size:18px!important;
  margin-bottom:18px!important;
}

.fm-im-window .im-chat-panel .chat-line,
#win-im .im-chat-panel .chat-line{
  display:grid!important;
  grid-template-columns:150px 1fr!important;
  gap:16px!important;
  margin:12px 0!important;
  color:#1e2938!important;
}

.fm-im-window .formatbar,
.fm-im-window .sendbar,
#win-im .formatbar,
#win-im .sendbar{
  position:static!important;
}


/* FM IM Final Visual/Control Restore
   All per-user IM windows use the same layout as the original IM window.
   No custom drag cursor/behavior here; main window manager controls movement. */

.fm-im-window,
.fm-window[id^="win-im-"]{
  cursor:default !important;
}

.fm-im-window .titlebar,
.fm-window[id^="win-im-"] .titlebar{
  cursor:grab;
}

.fm-im-window .window-body.im-body,
.fm-window[id^="win-im-"] .window-body.im-body{
  display:grid !important;
  grid-template-rows:minmax(0, 1fr) 46px 58px !important;
  grid-template-columns:1fr !important;
  gap:12px !important;
  padding:18px !important;
  overflow:hidden !important;
  background:#b8c0c9 !important;
}

.fm-im-window .im-chat-panel,
.fm-window[id^="win-im-"] .im-chat-panel{
  display:block !important;
  grid-row:1 !important;
  grid-column:1 / -1 !important;
  width:100% !important;
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
  border-radius:22px !important;
  background:rgba(255,255,255,.94) !important;
  color:#1e2938 !important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20) !important;
  padding:18px 22px !important;
}

.fm-im-window .im-chat-panel .time,
.fm-window[id^="win-im-"] .im-chat-panel .time{
  display:block !important;
  text-align:center !important;
  color:#111 !important;
  background:transparent !important;
  box-shadow:none !important;
  border-radius:0 !important;
  font-size:18px !important;
  line-height:1.25 !important;
  margin:0 0 18px 0 !important;
  padding:0 !important;
  width:auto !important;
  height:auto !important;
}

.fm-im-window .im-chat-panel .chat-line,
.fm-window[id^="win-im-"] .im-chat-panel .chat-line{
  display:grid !important;
  grid-template-columns:150px 1fr !important;
  gap:16px !important;
  margin:12px 0 !important;
  color:#1e2938 !important;
  background:transparent !important;
}

.fm-im-window .im-chat-panel .chat-line span,
.fm-window[id^="win-im-"] .im-chat-panel .chat-line span{
  overflow-wrap:anywhere !important;
}

.fm-im-window .formatbar,
.fm-window[id^="win-im-"] .formatbar{
  grid-row:2 !important;
  position:static !important;
  min-height:46px !important;
  width:100% !important;
}

.fm-im-window .sendbar,
.fm-window[id^="win-im-"] .sendbar{
  grid-row:3 !important;
  position:static !important;
  min-height:58px !important;
  width:100% !important;
}

.fm-im-window .sendbar input,
.fm-window[id^="win-im-"] .sendbar input{
  min-width:0 !important;
}


/* FM IM FINAL RESTORE — correct color, no status banner, normal controls */
.fm-im-window,
.fm-window[id^="win-im-"],
#win-im{
  cursor:default!important;
}

.fm-im-window .titlebar,
.fm-window[id^="win-im-"] .titlebar,
#win-im .titlebar{
  cursor:grab!important;
}

.fm-im-window .titlebar:active,
.fm-window[id^="win-im-"] .titlebar:active,
#win-im .titlebar:active{
  cursor:grabbing!important;
}

.fm-im-window .window-body.im-body,
.fm-window[id^="win-im-"] .window-body.im-body,
#win-im .window-body.im-body{
  display:grid!important;
  grid-template-rows:minmax(0,1fr) 46px 58px!important;
  grid-template-columns:1fr!important;
  gap:12px!important;
  padding:18px!important;
  overflow:hidden!important;
  background:rgba(16,42,76,.42)!important;
}

body.theme-light .fm-im-window .window-body.im-body,
body.theme-light .fm-window[id^="win-im-"] .window-body.im-body,
body.theme-light #win-im .window-body.im-body{
  background:rgba(185,198,210,.72)!important;
}

.fm-im-window .im-chat-panel,
.fm-window[id^="win-im-"] .im-chat-panel,
#win-im .im-chat-panel{
  display:block!important;
  grid-row:1!important;
  grid-column:1/-1!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:auto!important;
  border-radius:22px!important;
  background:rgba(255,255,255,.95)!important;
  color:#1e2938!important;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.20)!important;
  padding:18px 22px!important;
}

.fm-im-window .im-chat-panel .time,
.fm-window[id^="win-im-"] .im-chat-panel .time,
#win-im .im-chat-panel .time{
  display:none!important;
}

.fm-im-window .im-chat-panel .chat-line,
.fm-window[id^="win-im-"] .im-chat-panel .chat-line,
#win-im .im-chat-panel .chat-line{
  display:grid!important;
  grid-template-columns:150px 1fr!important;
  gap:16px!important;
  margin:12px 0!important;
  color:#1e2938!important;
  background:transparent!important;
}

.fm-im-window .formatbar,
.fm-window[id^="win-im-"] .formatbar,
#win-im .formatbar{
  grid-row:2!important;
  position:static!important;
  width:100%!important;
  min-height:46px!important;
}

.fm-im-window .sendbar,
.fm-window[id^="win-im-"] .sendbar,
#win-im .sendbar{
  grid-row:3!important;
  position:static!important;
  width:100%!important;
  min-height:58px!important;
}

/* FM IM Control Style Match */
.fm-im-window .sendbar > button:first-child,
.fm-window[id^="win-im-"] .sendbar > button:first-child,
#win-im .sendbar > button:first-child{
  width:46px!important;
  min-width:46px!important;
  height:46px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.92)!important;
  color:#2f95ff!important;
  border:1px solid rgba(85,160,255,.45)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7)!important;
}

.fm-im-window .formatbar button,
.fm-window[id^="win-im-"] .formatbar button,
#win-im .formatbar button{
  height:34px!important;
  min-height:34px!important;
  border-radius:10px!important;
  padding:0 14px!important;
  background:rgba(255,255,255,.18)!important;
  border:1px solid rgba(255,255,255,.22)!important;
  color:#f3f7ff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18)!important;
}

.fm-im-window .formatbar button:first-child,
.fm-window[id^="win-im-"] .formatbar button:first-child,
#win-im .formatbar button:first-child,
.fm-im-window .formatbar button:last-child,
.fm-window[id^="win-im-"] .formatbar button:last-child,
#win-im .formatbar button:last-child{
  min-width:120px!important;
}

body.theme-light .fm-im-window .formatbar button,
body.theme-light .fm-window[id^="win-im-"] .formatbar button,
body.theme-light #win-im .formatbar button{
  background:rgba(255,255,255,.74)!important;
  color:#243246!important;
  border:1px solid rgba(75,105,145,.18)!important;
}

/* FM IM controls final match to Group Chat */
.fm-im-window .formatbar{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:6px 10px!important;
}

.fm-im-window .formatbar button{
  height:32px!important;
  min-height:32px!important;
  border-radius:10px!important;
  padding:0 14px!important;
  background:rgba(255,255,255,.22)!important;
  border:1px solid rgba(255,255,255,.25)!important;
  color:#f4f8ff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18)!important;
  font-size:13px!important;
  line-height:32px!important;
}

.fm-im-window .formatbar button:first-child,
.fm-im-window .formatbar button:last-child{
  min-width:126px!important;
}

.fm-im-window .formatbar .color-dot,
.fm-im-window .formatbar button.color-dot{
  width:34px!important;
  min-width:34px!important;
  max-width:34px!important;
  padding:0!important;
  background:#000!important;
}

.fm-im-window .sendbar > button:first-child{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.96)!important;
  color:#2f95ff!important;
  border:1px solid rgba(85,160,255,.45)!important;
}

/* FM IM controls final match to Group Chat */
.fm-im-window .formatbar{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  padding:6px 10px!important;
}

.fm-im-window .formatbar button{
  height:32px!important;
  min-height:32px!important;
  border-radius:10px!important;
  padding:0 14px!important;
  background:rgba(255,255,255,.22)!important;
  border:1px solid rgba(255,255,255,.25)!important;
  color:#f4f8ff!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18)!important;
  font-size:13px!important;
  line-height:32px!important;
}

.fm-im-window .formatbar button:first-child,
.fm-im-window .formatbar button:last-child{
  min-width:126px!important;
}

.fm-im-window .formatbar .color-dot,
.fm-im-window .formatbar button.color-dot{
  width:34px!important;
  min-width:34px!important;
  max-width:34px!important;
  padding:0!important;
  background:#000!important;
}

.fm-im-window .sendbar > button:first-child{
  width:44px!important;
  min-width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.96)!important;
  color:#2f95ff!important;
  border:1px solid rgba(85,160,255,.45)!important;
}

/* IM Fader button match */
.fm-im-window .formatbar button:last-child,
.fm-window[id^="win-im-"] .formatbar button:last-child,
#win-im .formatbar button:last-child{
  min-width:132px!important;
  height:42px!important;
  border-radius:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:12px!important;
  font-size:16px!important;
  font-weight:500!important;
  color:#f5f8ff!important;
  background:rgba(255,255,255,.16)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -8px 18px rgba(0,0,0,.10)!important;
}

.fm-im-window .formatbar button:last-child::before,
.fm-window[id^="win-im-"] .formatbar button:last-child::before,
#win-im .formatbar button:last-child::before{
  content:"";
  width:38px;
  height:4px;
  border-radius:999px;
  background:linear-gradient(90deg,#4d9dff,#d86cff,#5ee6be);
  box-shadow:0 0 7px rgba(120,180,255,.35);
}

.fm-im-window .formatbar button.fader-capsule::before,
.fm-window[id^="win-im-"] .formatbar button.fader-capsule::before,
#win-im .formatbar button.fader-capsule::before{
  content:none!important;
  display:none!important;
}

/* IM Current Font button match */
.fm-im-window .formatbar button:first-child,
.fm-window[id^="win-im-"] .formatbar button:first-child,
#win-im .formatbar button:first-child{
  min-width:190px!important;
  height:42px!important;
  border-radius:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:10px!important;
  font-size:16px!important;
  font-weight:500!important;
  color:#f5f8ff!important;
  background:rgba(255,255,255,.16)!important;
  border:1px solid rgba(255,255,255,.20)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    inset 0 -8px 18px rgba(0,0,0,.10)!important;
}


/* IM remove dropdown arrows / recenter font + fader */
.fm-im-window .formatbar button:first-child svg,
.fm-window[id^="win-im-"] .formatbar button:first-child svg,
#win-im .formatbar button:first-child svg,
.fm-im-window .formatbar button:last-child svg,
.fm-window[id^="win-im-"] .formatbar button:last-child svg,
#win-im .formatbar button:last-child svg{
  display:none!important;
}

.fm-im-window .formatbar button:first-child,
.fm-window[id^="win-im-"] .formatbar button:first-child,
#win-im .formatbar button:first-child,
.fm-im-window .formatbar button:last-child,
.fm-window[id^="win-im-"] .formatbar button:last-child,
#win-im .formatbar button:last-child{
  justify-content:center!important;
  text-align:center!important;
}

/* Buddy List scrollbar polish */
.buddy-pass-2 .buddy-well{
  scrollbar-width:thin;
  scrollbar-color:rgba(74,116,178,.55) rgba(190,205,224,.22);
  padding-right:10px!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar{
  width:8px!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-track{
  background:rgba(190,205,224,.22)!important;
  border-radius:999px!important;
  margin:14px 0!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb{
  background:linear-gradient(
    180deg,
    rgba(92,139,205,.72),
    rgba(52,86,142,.72)
  )!important;
  border-radius:999px!important;
  border:2px solid rgba(232,240,250,.78)!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb:hover{
  background:linear-gradient(
    180deg,
    rgba(105,158,230,.85),
    rgba(62,100,160,.85)
  )!important;
}

/* Buddy List scrollbar final blend */
.buddy-pass-2 .buddy-well{
  padding-right:16px!important;
  overflow-y:auto!important;
  scrollbar-width:thin;
  scrollbar-color:rgba(70,112,180,.42) transparent;
  clip-path:inset(0 round 22px);
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar{
  width:7px!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-track{
  background:transparent!important;
  border-radius:999px!important;
  margin:22px 0!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb{
  background:rgba(72,118,190,.42)!important;
  border-radius:999px!important;
  border:0!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 0 8px rgba(40,80,140,.18)!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb:hover{
  background:rgba(80,135,215,.60)!important;
}


/* Chat Settings window */
.chat-settings-body{
  padding:18px;
}

.chat-settings-card{
  height:100%;
  border-radius:22px;
  padding:20px;
  background:rgba(255,255,255,.92);
  color:#1e2938;
  box-shadow:inset 0 3px 10px rgba(0,0,0,.18);
}

.chat-settings-card h2{
  margin:0 0 6px;
  font-size:24px;
}

.chat-settings-card p{
  margin:0 0 18px;
  color:#64748b;
}

.chat-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 0;
  border-bottom:1px solid rgba(30,45,70,.10);
}





/* PEOPLE HERE CLEAN SIMPLE FINAL */
#win-public .people{
  padding:8px!important;
  overflow:hidden!important;
}

.people-here-shell{
  height:100%;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  gap:7px;
}

.people-here-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  min-height:30px;
  padding:5px 9px;
  border-radius:10px;
  color:#fff;
  font-size:12px;
  font-weight:750;
  background:linear-gradient(180deg,rgba(68,138,220,.96),rgba(38,98,170,.96));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22);
}

.people-here-list{
  overflow:auto;
  border-radius:15px;
  padding:7px;
  background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(226,236,248,.90));
  box-shadow:inset 0 3px 10px rgba(0,0,0,.16);
}

.people-row{
  display:grid;
  grid-template-columns:9px 1fr;
  gap:7px;
  align-items:center;
  min-height:34px;
  padding:6px 7px;
  margin-bottom:4px;
  border-radius:9px;
  cursor:pointer;
}

.people-row:hover,
.people-row.selected{
  background:rgba(92,150,230,.16);
}

.people-context-menu{
  position:fixed;
  z-index:8200;
  min-width:190px;
  padding:6px;
  border-radius:12px;
  display:flex;
  flex-direction:column;
  gap:4px;
  box-shadow:0 18px 46px rgba(0,0,0,.38), inset 0 1px rgba(255,255,255,.16);
}

.people-context-menu button{
  height:32px;
  border-radius:9px;
  padding:0 11px;
  text-align:left;
  background:transparent;
  border:0;
  color:var(--text);
  font-size:12px;
}

.people-context-menu button:hover{
  background:var(--panel-strong);
}

.people-light{
  width:7px;
  height:7px;
  border-radius:50%;
  background:#38d978;
  animation:profileOnlinePulse 1.8s ease-in-out infinite;
}

.presence-avatar{
  width:26px;
  height:26px;
  border-radius:50%;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:linear-gradient(180deg,rgba(22,36,58,.96),rgba(14,24,40,.96));
  border:1px solid rgba(255,255,255,.42);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
  box-shadow:0 6px 14px rgba(20,32,52,.16);
  padding:0;
}

button.presence-avatar{
  cursor:pointer;
}

.presence-avatar img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.buddy-row .presence-avatar{
  width:28px;
  height:28px;
}

.people-name{
  font-size:12px;
  font-weight:700;
  line-height:1.08;
  color:#1d2a3a;
}

.people-state{
  font-size:10px;
  line-height:1.05;
  margin-top:2px;
  color:#64748b;
}

.people-actions{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:6px!important;
  padding:7px!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,rgba(74,118,186,.28),rgba(34,56,92,.34))!important;
}

.people-actions button{
  width:100%!important;
  min-height:28px!important;
  height:28px!important;
  border-radius:9px!important;
  font-size:10.5px!important;
  font-weight:650!important;
  color:#eef6ff!important;
  background:rgba(255,255,255,.14)!important;
  border:1px solid rgba(255,255,255,.18)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.16)!important;
}

.people-actions button:disabled{
  opacity:.36!important;
  cursor:not-allowed!important;
}

/* Wallpaper picker */
.wallpaper-body{
  gap:12px;
}
.wallpaper-preview{
  height:132px;
  border-radius:18px;
  display:grid;
  place-items:center;
  color:var(--muted);
  background:
    radial-gradient(circle at 24% 30%,var(--theme-accent-soft),transparent 42%),
    linear-gradient(140deg,var(--bg),#050b12);
  border:1px solid var(--theme-accent-border);
  box-shadow:inset 0 2px 10px rgba(0,0,0,.18);
  overflow:hidden;
}
.wallpaper-preview.has-image{
  background-size:cover;
  background-position:center;
}
.wallpaper-actions{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:8px;
}
.wallpaper-actions button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:8px 10px;
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.1px;
  white-space:nowrap;
  line-height:1;
  min-height:36px;
}
.wallpaper-actions button i,
.wallpaper-actions button svg{
  width:14px;
  height:14px;
  flex:0 0 auto;
}
.wallpaper-actions button:disabled{
  opacity:.5;
  cursor:not-allowed;
}
.wallpaper-preview.pending{
  outline:2px dashed var(--theme-accent,#34d399);
  outline-offset:-4px;
}

/* ── Voice chat (Discord × FM Online glass) ───────────────── */
.voice-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px;
  height:100%;
  overflow:hidden;
}
.voice-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  background:linear-gradient(180deg, var(--theme-accent-soft, rgba(255,255,255,.08)), rgba(0,0,0,.12));
  border:1px solid var(--theme-accent-border, var(--stroke));
  border-radius:14px;
  backdrop-filter:blur(8px);
}
.voice-status{
  font-size:12.5px;
  font-weight:600;
  letter-spacing:.2px;
  color:var(--text);
  opacity:.92;
}
.voice-self-controls{
  display:flex;
  gap:6px;
}
.voice-ctrl{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  font-size:11.5px;
  font-weight:700;
  letter-spacing:.2px;
  color:var(--text);
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:11px;
  cursor:pointer;
  transition:background .15s, border-color .15s, transform .12s;
}
.voice-ctrl i, .voice-ctrl svg{ width:14px; height:14px; flex:0 0 auto; }
.voice-ctrl:hover:not(:disabled){ background:rgba(255,255,255,.12); }
.voice-ctrl:active:not(:disabled){ transform:translateY(1px); }
.voice-ctrl:disabled{ opacity:.45; cursor:not-allowed; }
.voice-ctrl.on{
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border-color:color-mix(in srgb, var(--accent) 70%, #fff 0%);
  color:#fff;
}
.voice-ctrl.off{
  background:linear-gradient(180deg, var(--red,#df3f51), #8b1f2c);
  border-color:rgba(255,180,180,.4);
  color:#fff;
}
.voice-ctrl.voice-leave{
  background:linear-gradient(180deg, #8b1f2c, #4a0f17);
  border-color:rgba(255,180,180,.35);
  color:#fff;
}
.voice-ctrl.voice-leave:hover:not(:disabled){
  background:linear-gradient(180deg, #b53146, #6b1620);
}

.voice-channels{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow-y:auto;
  padding-right:4px;
}
.voice-channel-card{
  position:relative;
  padding:12px;
  background:var(--panel);
  border:1px solid var(--stroke);
  border-radius:14px;
  transition:border-color .18s, background .18s, box-shadow .18s;
}
.voice-channel-card.active{
  border-color:var(--accent);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel));
  box-shadow:0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), 0 10px 24px rgba(0,0,0,.25);
}
.voice-channel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.voice-channel-name{
  font-size:14px;
  font-weight:800;
  letter-spacing:.2px;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:6px;
}
.voice-channel-name::before{
  content:"#";
  opacity:.55;
  font-weight:900;
}
.voice-channel-desc{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
}
.voice-join-btn{
  padding:6px 14px;
  font-size:11.5px;
  font-weight:700;
  border-radius:10px;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border:1px solid color-mix(in srgb, var(--accent) 75%, #000);
  transition:transform .12s, filter .15s;
}
.voice-join-btn:hover{ filter:brightness(1.08); }
.voice-join-btn:active{ transform:translateY(1px); }
.voice-channel-card.active .voice-join-btn{
  background:linear-gradient(180deg, #8b1f2c, #4a0f17);
  border-color:rgba(255,180,180,.35);
}

.voice-channel-members{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:6px 4px 0 4px;
  border-top:1px dashed rgba(255,255,255,.08);
}
.voice-channel-empty{
  font-size:11px;
  color:var(--muted);
  font-style:italic;
  padding:6px 4px;
}
.voice-channel-count{
  align-self:flex-end;
  font-size:10.5px;
  font-weight:600;
  color:var(--muted);
  letter-spacing:.4px;
  text-transform:uppercase;
  margin-top:2px;
}
.voice-member{
  display:flex;
  align-items:center;
  gap:8px;
  padding:5px 6px;
  border-radius:8px;
  transition:background .15s;
}
.voice-member:hover{ background:rgba(255,255,255,.05); }
.voice-member-dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:var(--green, #30d976);
  box-shadow:0 0 6px var(--green, #30d976), 0 0 0 2px rgba(48,217,118,.18);
  flex:0 0 auto;
}
.voice-member.muted .voice-member-dot{
  background:var(--muted);
  box-shadow:none;
}
.voice-member-name{
  font-size:12.5px;
  font-weight:600;
  color:var(--text);
  flex:1;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.voice-member-icon{
  width:13px;
  height:13px;
  color:var(--red, #df3f51);
  flex:0 0 auto;
}

.voice-device-row{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:11px;
}
.voice-device-label{
  font-size:11.5px;
  font-weight:700;
  color:var(--muted);
  letter-spacing:.2px;
}
.voice-device-select{
  flex:1;
  font-size:12px;
  padding:5px 8px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  color:var(--text);
}
#voice-audio-sink{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  overflow:hidden;
}

body.theme-light .voice-channel-card{ background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.09); }
body.theme-light .voice-ctrl{ background:rgba(0,0,0,.05); border-color:rgba(0,0,0,.1); color:var(--text); }
body.theme-light .voice-channel-members{ border-top-color:rgba(0,0,0,.08); }
body.theme-light .voice-member:hover{ background:rgba(0,0,0,.05); }

/* ── Voice settings panel (Input/Output/Effects/Test) ───── */
.voice-settings{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:10px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
}
.voice-settings-row{
  display:flex;
  align-items:center;
  gap:8px;
}
.voice-settings .voice-device-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
  color:var(--muted);
  width:54px;
  flex-shrink:0;
}
.voice-settings .voice-device-select{
  flex:1;
  font-size:12px;
  padding:6px 8px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  color:var(--text);
  min-width:0;
}
.voice-mini-btn{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 10px;
  font-size:11px;
  font-weight:700;
  color:var(--text);
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.13);
  border-radius:9px;
  cursor:pointer;
  transition:background .15s, border-color .15s;
  flex-shrink:0;
}
.voice-mini-btn i, .voice-mini-btn svg{ width:12px; height:12px; }
.voice-mini-btn:hover{ background:rgba(255,255,255,.12); }
.voice-mini-btn.recording{
  background:linear-gradient(180deg, var(--red,#df3f51), #8b1f2c);
  border-color:rgba(255,180,180,.4);
  color:#fff;
  animation:voice-pulse 1s ease-in-out infinite;
}
@keyframes voice-pulse{ 0%,100%{ opacity:1 } 50%{ opacity:.75 } }

/* Live mic level meter */
.voice-level-row{ display:flex; padding-left:62px; }
.voice-level-meter{
  flex:1;
  height:6px;
  background:rgba(0,0,0,.3);
  border:1px solid rgba(255,255,255,.08);
  border-radius:4px;
  overflow:hidden;
  position:relative;
}
.voice-level-meter span{
  display:block;
  height:100%;
  width:0%;
  background:linear-gradient(90deg, var(--green,#30d976) 0%, var(--accent,#1598ff) 60%, var(--red,#df3f51) 100%);
  transition:width .08s ease-out;
}

/* Effect toggles row */
.voice-effects-row{
  display:flex;
  flex-wrap:wrap;
  gap:6px 12px;
  padding-left:62px;
}
.voice-effect-toggle{
  display:inline-flex;
  align-items:center;
  gap:5px;
  font-size:11px;
  font-weight:600;
  color:var(--text);
  cursor:pointer;
  user-select:none;
}
.voice-effect-toggle input{
  width:13px;
  height:13px;
  accent-color:var(--accent);
}

/* Per-user volume slider on member rows */
.voice-member{
  position:relative;
}
.voice-member-volume{
  -webkit-appearance:none;
  appearance:none;
  width:80px;
  height:4px;
  background:rgba(255,255,255,.12);
  border-radius:3px;
  flex-shrink:0;
  cursor:pointer;
}
.voice-member-volume::-webkit-slider-thumb{
  -webkit-appearance:none;
  appearance:none;
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--accent);
  border:2px solid rgba(255,255,255,.85);
  cursor:pointer;
  box-shadow:0 0 4px rgba(0,0,0,.3);
}
.voice-member-volume::-moz-range-thumb{
  width:12px;
  height:12px;
  border-radius:50%;
  background:var(--accent);
  border:2px solid rgba(255,255,255,.85);
  cursor:pointer;
}
.voice-self-tag{
  font-size:10px;
  color:var(--muted);
  font-weight:600;
  margin-left:4px;
}

/* Voice activity (talking) ring on member dot */
.voice-member.talking .voice-member-dot{
  box-shadow:
    0 0 0 2px rgba(48,217,118,.5),
    0 0 8px var(--green,#30d976),
    0 0 14px var(--green,#30d976);
  animation:voice-talking 0.9s ease-in-out infinite;
}
@keyframes voice-talking{
  0%,100%{ transform:scale(1) }
  50%{ transform:scale(1.25) }
}

body.theme-light .voice-settings{ background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.09); }
body.theme-light .voice-mini-btn{ background:rgba(0,0,0,.05); border-color:rgba(0,0,0,.1); }
body.theme-light .voice-member-volume{ background:rgba(0,0,0,.15); }

/* ── Toolbar loader bobble (AOL-style throwback) ─────────── */
.fm-toolbar-loader{
  width:48px;
  height:48px;
  flex:0 0 auto;
  margin-right:12px;
  border-radius:50%;
  overflow:hidden;
  pointer-events:none;
  position:relative;
  z-index:1;
}
.fm-toolbar-loader svg{
  width:100%!important;
  height:100%!important;
  display:block;
}
@media (max-width: 900px) {
  .fm-toolbar-loader{ width:38px; height:38px; margin-right:8px; }
}

/* ── Login screen: gradient bobble (Lottie animation) ─────── */
.login-bobble{
  width:140px;
  height:140px;
  margin:6px auto 14px;
  display:block;
  pointer-events:none;
  border-radius:50%;
  overflow:hidden;
}
.login-bobble svg{
  width:100%!important;
  height:100%!important;
  display:block;
}

/* ── Server picker on the login screen ───────────────────── */
.login-server-picker{
  display:flex;
  align-items:center;
  gap:8px;
  margin:0 0 10px;
  padding:8px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}
.login-server-picker-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--muted);
  margin:0;
  flex:0 0 auto;
}
.login-server-select{
  flex:1;
  font-size:12.5px;
  padding:6px 8px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  color:var(--text);
  cursor:pointer;
}

/* ── Admin → Server: Saved Servers manager ───────────────── */
.admin-saved-servers{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:12px;
  margin:8px 0;
  border-radius:12px;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.1);
}
.admin-saved-servers-head{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:4px;
}
.admin-saved-servers-head b{ font-size:13px; color:var(--text); }
.admin-saved-servers-hint{ font-size:11px; color:var(--muted); }
.admin-saved-servers-list{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.admin-saved-srv-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:8px 10px;
  border-radius:10px;
  background:var(--panel);
  border:1px solid var(--stroke);
}
.admin-saved-srv-row.active{
  border-color:var(--accent);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, var(--panel)), var(--panel));
}
.admin-saved-srv-info{ min-width:0; flex:1; }
.admin-saved-srv-name{
  font-size:12.5px;
  font-weight:800;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:6px;
}
.admin-saved-srv-url{
  font-size:11px;
  color:var(--muted);
  margin-top:1px;
  word-break:break-all;
}
.admin-saved-srv-pill{
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
  padding:1px 6px;
  border-radius:99px;
  background:rgba(255,255,255,.1);
  color:var(--muted);
}
.admin-saved-srv-pill-active{
  background:color-mix(in srgb, var(--accent) 30%, transparent);
  color:var(--text);
}
.admin-saved-srv-actions{
  display:flex;
  gap:5px;
  flex:0 0 auto;
}
.admin-saved-srv-set,
.admin-saved-srv-edit,
.admin-saved-srv-delete{
  padding:4px 9px;
  font-size:11px;
  font-weight:700;
  border-radius:7px;
  cursor:pointer;
  color:var(--text);
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.13);
}
.admin-saved-srv-set{
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border-color:color-mix(in srgb, var(--accent) 75%, #000);
  color:#fff;
}
.admin-saved-srv-delete{ color:var(--red, #df3f51); }
.admin-saved-srv-empty{
  font-size:12px;
  color:var(--muted);
  font-style:italic;
  padding:4px;
}
.admin-saved-servers-add{
  display:grid;
  grid-template-columns:1fr 1.4fr auto;
  gap:6px;
  margin-top:4px;
}
.admin-saved-srv-input{
  font-size:12px;
  padding:7px 10px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  color:var(--text);
}

/* Legacy banner CSS retained below — banner element removed from HTML.
   Left in place so light-theme overrides further down don't error. */
.fm-server-banner{
  position:fixed;
  top:calc(var(--toolbar-h) + 6px);
  right:12px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:7px 10px 7px 12px;
  border-radius:13px;
  background:linear-gradient(180deg, var(--theme-accent-soft, rgba(255,255,255,.10)), rgba(0,0,0,.15));
  border:1px solid var(--theme-accent-border, var(--stroke));
  backdrop-filter:blur(10px);
  z-index:200;
  font-size:12px;
  max-width:340px;
  box-shadow:0 6px 22px rgba(0,0,0,.25);
}
.fm-server-banner-info{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.fm-server-banner-icon{
  width:18px;
  height:18px;
  color:var(--accent);
  flex:0 0 auto;
}
.fm-server-banner-label{
  font-weight:800;
  font-size:12px;
  color:var(--text);
  letter-spacing:.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.fm-server-banner-sub{
  font-size:10.5px;
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:200px;
}
.fm-server-banner-switch{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:5px 10px;
  font-size:11px;
  font-weight:700;
  color:#fff;
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border:1px solid color-mix(in srgb, var(--accent) 75%, #000);
  border-radius:9px;
  cursor:pointer;
  flex:0 0 auto;
  transition:filter .15s, transform .12s;
}
.fm-server-banner-switch i, .fm-server-banner-switch svg{ width:13px; height:13px; }
.fm-server-banner-switch:hover{ filter:brightness(1.08); }
.fm-server-banner-switch:active{ transform:translateY(1px); }

/* Picker modal */
.fm-server-picker-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  backdrop-filter:blur(4px);
  z-index:9000;
  display:grid;
  place-items:center;
}
.fm-server-picker{
  width:min(540px, 92vw);
  max-height:80vh;
  display:flex;
  flex-direction:column;
  padding:18px;
  border-radius:18px;
  border:1px solid var(--stroke);
  background:var(--glass);
}
.fm-server-picker-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.fm-server-picker-title{ font-size:16px; font-weight:800; color:var(--text); }
.fm-server-picker-sub{ font-size:12px; color:var(--muted); margin-top:2px; }
.fm-server-picker-close{
  width:28px; height:28px;
  border:none;
  border-radius:50%;
  background:rgba(255,255,255,.1);
  color:var(--text);
  font-size:16px;
  cursor:pointer;
}
.fm-server-picker-close:hover{ background:rgba(255,255,255,.18); }

.fm-server-picker-list{
  flex:1;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-right:4px;
}
.fm-server-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-radius:11px;
  background:var(--panel);
  border:1px solid var(--stroke);
  transition:border-color .15s, background .15s;
}
.fm-server-row.active{
  border-color:var(--accent);
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, var(--panel)), var(--panel));
}
.fm-server-row-info{ min-width:0; flex:1; }
.fm-server-row-name{
  font-size:13px;
  font-weight:800;
  color:var(--text);
  display:flex;
  align-items:center;
  gap:6px;
}
.fm-server-row-url{
  font-size:11px;
  color:var(--muted);
  margin-top:2px;
  word-break:break-all;
}
.fm-server-pill{
  font-size:9.5px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
  padding:1px 6px;
  border-radius:99px;
  background:rgba(255,255,255,.1);
  color:var(--muted);
}
.fm-server-row-actions{
  display:flex;
  align-items:center;
  gap:5px;
  flex:0 0 auto;
}
.fm-server-row-active-tag{
  font-size:11px;
  font-weight:700;
  color:var(--accent);
  letter-spacing:.2px;
}
.fm-server-set-active,
.fm-server-edit-btn,
.fm-server-delete-btn,
.fm-server-add-btn{
  padding:5px 10px;
  font-size:11px;
  font-weight:700;
  border-radius:8px;
  cursor:pointer;
  color:var(--text);
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.13);
  transition:background .15s;
}
.fm-server-set-active{
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border-color:color-mix(in srgb, var(--accent) 75%, #000);
  color:#fff;
}
.fm-server-set-active:hover{ filter:brightness(1.08); }
.fm-server-edit-btn:hover,
.fm-server-delete-btn:hover{ background:rgba(255,255,255,.14); }
.fm-server-delete-btn{ color:var(--red, #df3f51); }

.fm-server-picker-add{
  display:grid;
  grid-template-columns:1fr 1.4fr auto;
  gap:6px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px dashed rgba(255,255,255,.1);
}
.fm-server-input{
  font-size:12px;
  padding:7px 10px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.12);
  border-radius:9px;
  color:var(--text);
}
.fm-server-add-btn{
  background:linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  border-color:color-mix(in srgb, var(--accent) 75%, #000);
  color:#fff;
}

body.theme-light .fm-server-banner,
body.theme-hologram .fm-server-banner,
body.theme-sakura-light .fm-server-banner,
body.theme-jade-light .fm-server-banner,
body.theme-pink-lemonade .fm-server-banner,
body.theme-chrome-blue .fm-server-banner,
body.theme-dream-pop .fm-server-banner{
  background:linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,.4));
  border-color:rgba(0,0,0,.12);
}
body.theme-light .fm-server-row,
body.theme-hologram .fm-server-row{
  background:rgba(0,0,0,.04);
  border-color:rgba(0,0,0,.09);
}

/* ── Theme-integrated Buddy List + People Here final pass ───── */
#win-buddy .buddy-body,
#win-public .people{
  background:
    linear-gradient(180deg,var(--theme-accent-soft),rgba(0,0,0,.16))!important;
  border-color:var(--theme-accent-border)!important;
}

.buddy-search-wrap,
.buddy-pass-2 .buddy-actions,
.people-actions{
  background:
    linear-gradient(180deg,var(--theme-accent-soft),rgba(0,0,0,.20))!important;
  border:1px solid var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 18px var(--theme-accent-soft)!important;
}

.buddy-well,
.buddy-pass-2 .buddy-well,
.people-here-list{
  background:var(--list-surface,linear-gradient(180deg,rgba(255,255,255,.88),rgba(225,232,242,.72)))!important;
  border:1px solid rgba(255,255,255,.40)!important;
}

body:not(.theme-light) .buddy-well,
body:not(.theme-light) .buddy-pass-2 .buddy-well,
body:not(.theme-light) .people-here-list{
  background:var(--list-surface,linear-gradient(180deg,rgba(18,24,38,.72),rgba(10,15,24,.64)))!important;
  color:var(--text)!important;
}

.buddy-group-header,
.people-here-header{
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 68%, black))!important;
  color:#fff!important;
  border:1px solid var(--theme-accent-border)!important;
}

.buddy-avatar{
  background:
    linear-gradient(180deg,var(--theme-accent),color-mix(in srgb,var(--theme-accent) 62%, black))!important;
}

.buddy-row:hover,
.buddy-row.selected,
.people-row:hover,
.people-row.selected{
  background:var(--theme-accent-soft)!important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 14px var(--theme-accent-soft)!important;
}

body:not(.theme-light) .buddy-name,
body:not(.theme-light) .people-name{
  color:var(--list-text,var(--text))!important;
}

body:not(.theme-light) .buddy-state,
body:not(.theme-light) .people-state{
  color:var(--list-muted,var(--muted))!important;
}

.buddy-actions button,
.people-actions button{
  background:rgba(255,255,255,.10)!important;
  border-color:var(--theme-accent-border)!important;
  color:var(--text)!important;
}

.buddy-pass-2 .buddy-well{
  scrollbar-color:var(--theme-accent) transparent!important;
}

.buddy-pass-2 .buddy-well::-webkit-scrollbar-thumb{
  background:var(--theme-accent)!important;
  box-shadow:0 0 8px var(--theme-accent-soft)!important;
}

.sendbar > button:first-child,
.fm-im-window .sendbar > button:first-child,
.fm-window[id^="win-im-"] .sendbar > button:first-child,
#win-im .sendbar > button:first-child{
  color:var(--theme-accent)!important;
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    inset 0 1px rgba(255,255,255,.55),
    0 0 14px var(--theme-accent-soft)!important;
}

.formatbar,
.sendbar{
  border:1px solid var(--theme-accent-border)!important;
}

/* ── Chat control function pass ───────────────────────────── */
.fm-gif-browser{
  position:fixed;
  z-index:5300;
  width:390px;
  max-height:440px;
  padding:12px;
  border-radius:18px;
  opacity:0;
  transform:translateY(6px) scale(.985);
  transition:opacity .14s ease,transform .14s ease;
  border-color:var(--theme-accent-border)!important;
  box-shadow:
    0 24px 70px rgba(0,0,0,.38),
    inset 0 1px rgba(255,255,255,.24),
    0 0 24px var(--theme-accent-soft)!important;
}

.fm-gif-browser.open{
  opacity:1;
  transform:translateY(0) scale(1);
}

.gif-browser-head,
.gif-search-row{
  display:flex;
  align-items:center;
  gap:8px;
}

.gif-browser-head{
  justify-content:space-between;
  margin-bottom:10px;
}

.gif-browser-head button{
  width:30px;
  height:30px;
  border-radius:10px;
}

.gif-search-input{
  flex:1;
}

.gif-key-input{
  width:100%;
  height:32px;
  margin-top:8px;
  font-size:11px;
  border-radius:10px;
  background:rgba(255,255,255,.12);
  border:1px solid var(--theme-accent-border);
}

.gif-results{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  max-height:300px;
  overflow:auto;
  margin-top:10px;
}

.gif-empty{
  grid-column:1/-1;
  padding:16px;
  color:var(--muted);
  text-align:center;
}

.gif-result{
  height:94px;
  padding:0;
  overflow:hidden;
  border-radius:12px;
  position:relative;
  background:rgba(255,255,255,.10);
  border:1px solid var(--theme-accent-border);
}

.gif-result img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.gif-result span{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:4px 6px;
  font-size:10px;
  color:#fff;
  background:rgba(0,0,0,.52);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.gif-chip{
  min-height:58px;
}

.chip-gif-preview{
  width:48px;
  height:42px;
  border-radius:8px;
  object-fit:cover;
  flex:none;
}

.text-fx-fade{
  opacity:.78;
}

.text-fx-glow{
  color:var(--theme-accent)!important;
  text-shadow:0 0 8px var(--theme-accent-soft),0 0 16px var(--theme-accent-soft);
}

.text-fx-rainbow{
  background:linear-gradient(90deg,#ff5c7a,#ffbf47,#59e088,#4da3ff,#c56cff);
  background-clip:text;
  -webkit-background-clip:text;
  color:transparent!important;
  font-weight:800;
}

.text-fx-pulse{
  animation:textFxPulse 1.6s ease-in-out infinite;
}

@keyframes textFxPulse{
  0%,100%{opacity:.72}
  50%{opacity:1;text-shadow:0 0 10px var(--theme-accent-soft)}
}

/* ── Login screen layout fix ─────────────────────────────── */
#login-mode-signin,
#login-mode-register{display:flex;flex-direction:column;gap:8px;width:100%;}
#login-mode-signin label,
#login-mode-register label{font-size:12px;font-weight:600;color:var(--muted);margin-bottom:-2px;}
#login-mode-signin input,
#login-mode-register input{width:100%;box-sizing:border-box;}
#login-mode-signin button,
#login-mode-register button{width:100%;box-sizing:border-box;}
#login-mode-signin #login-error,
#login-mode-register #register-error{margin:0;}
.login-body{padding:22px 28px 28px!important;align-items:stretch!important;}
.login-logo{text-align:center;margin-bottom:8px;}

/* ── Admin Panel ─────────────────────────────────────────── */
.admin-tabs{display:flex;gap:2px;padding:10px 14px 0;border-bottom:1px solid rgba(255,255,255,.10);}
.admin-tab{height:34px;padding:0 18px;border-radius:10px 10px 0 0;border:0;background:transparent;color:var(--muted);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,color .15s;}
.admin-tab.active{background:rgba(255,255,255,.12);color:var(--text);}
.admin-tab:hover:not(.active){background:rgba(255,255,255,.07);}
.admin-tab-panel{flex:1;overflow-y:auto;padding:14px;}
.admin-tab-panel.hidden{display:none;}
.admin-security-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:12px;}
.admin-toggle-row{display:flex;gap:10px;align-items:flex-start;padding:12px;border-radius:14px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);cursor:pointer;}
.admin-toggle-row input{width:16px;height:16px;margin-top:2px;flex:0 0 auto;}
.admin-toggle-row span{display:flex;flex-direction:column;gap:3px;min-width:0;}
.admin-toggle-row b{font-size:13px;color:var(--text);}
.admin-toggle-row small{font-size:11px;line-height:1.3;color:var(--muted);}
.admin-toolbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px;}
.admin-user-list{display:flex;flex-direction:column;gap:8px;}
.admin-user-row{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-radius:14px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.08);}
.admin-user-info{flex:1;min-width:0;}
.admin-user-name{font-weight:700;font-size:14px;}
.admin-user-meta{font-size:11px;color:var(--muted);margin-top:2px;}
.admin-user-actions{display:flex;gap:6px;flex-shrink:0;margin-left:12px;}
.admin-action-btn{height:26px;padding:0 10px;font-size:11px;font-weight:600;border-radius:8px;cursor:pointer;border:1px solid rgba(255,255,255,.13);background:rgba(255,255,255,.10);color:var(--text);}
.admin-action-btn:hover{background:rgba(255,255,255,.20);}
.admin-action-btn.danger{background:rgba(223,63,81,.18);border-color:rgba(223,63,81,.35);color:#ff8090;}
.admin-action-btn.danger:hover{background:rgba(223,63,81,.32);}
.admin-loading{color:var(--muted);font-size:13px;text-align:center;padding:24px 0;}
.admin-server-body{display:flex;flex-direction:column;gap:16px;padding:4px 0;}
.admin-server-row{display:flex;align-items:center;gap:14px;}
.admin-server-label{font-size:12px;font-weight:600;color:var(--muted);width:120px;flex-shrink:0;}
.admin-server-value{font-size:13px;color:var(--text);}

/* ── Bot Manager ── */
.admin-bot-list{display:flex;flex-direction:column;gap:8px;overflow-y:auto;max-height:calc(100% - 90px);padding:0 2px;}
.admin-bot-row{display:flex;align-items:center;gap:12px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:12px;padding:10px 12px;}
.admin-bot-row.builtin{opacity:.7;}
.admin-bot-row.bot-disabled{opacity:.45;}
.admin-bot-icon{font-size:22px;flex-shrink:0;width:28px;height:28px;text-align:center;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:rgba(255,255,255,.09);}
.admin-bot-icon img{width:100%;height:100%;object-fit:cover;display:block;}
.admin-bot-info{flex:1;min-width:0;}
.admin-bot-name{font-size:13px;font-weight:600;color:var(--text);display:flex;align-items:center;gap:6px;}
.admin-bot-desc{font-size:11px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.admin-bot-actions{display:flex;gap:6px;flex-shrink:0;}
.admin-bot-badge{font-size:9px;font-weight:700;padding:2px 7px;border-radius:20px;letter-spacing:.04em;text-transform:uppercase;background:rgba(255,255,255,.1);color:var(--muted);}
.admin-bot-badge.badge-on{background:rgba(76,175,80,.22);color:#81c784;}
.admin-bot-badge.badge-off{background:rgba(255,255,255,.07);color:var(--muted);}

/* Bot create/edit form */
.admin-bot-form{display:flex;flex-direction:column;gap:8px;padding:12px;margin-bottom:10px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.13);border-radius:14px;}
.admin-bot-form-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:2px;}
.admin-bot-form-title span{color:var(--accent);}
.admin-bot-form-engine{font-size:11px;font-weight:600;letter-spacing:.2px;color:var(--theme-accent,#34d399);opacity:.85;margin:-4px 0 6px;}

/* Per-bot chat color picker */
.abf-color-row{
  display:flex;
  align-items:center;
  gap:8px;
  margin:6px 0;
}
.abf-color-row .abf-label{
  font-size:11px;
  font-weight:700;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:var(--muted);
  margin:0;
  flex:0 0 90px;
}
.abf-color-picker{
  -webkit-appearance:none;
  appearance:none;
  width:36px;
  height:28px;
  padding:0;
  border:1px solid rgba(255,255,255,.18);
  border-radius:8px;
  background:transparent;
  cursor:pointer;
}
.abf-color-picker::-webkit-color-swatch-wrapper{ padding:2px; border-radius:6px; }
.abf-color-picker::-webkit-color-swatch{ border:none; border-radius:5px; }
.abf-color-text{
  flex:1;
  font-family:"Cascadia Mono", "Consolas", monospace;
  font-size:12px;
  padding:6px 8px;
}
.abf-color-row .admin-action-btn{ flex:0 0 auto; padding:5px 10px; font-size:11px; }
.admin-bot-avatar-editor{display:flex;align-items:center;gap:12px;padding:10px;border-radius:13px;background:rgba(255,255,255,.055);border:1px solid rgba(255,255,255,.1);}
.admin-bot-avatar-preview{width:58px;height:58px;border-radius:50%;display:grid;place-items:center;overflow:hidden;padding:0;flex-shrink:0;font-weight:800;font-size:15px;background:linear-gradient(180deg,var(--theme-accent,#1598ff),rgba(18,34,58,.88));}
.admin-bot-avatar-preview img{width:100%;height:100%;object-fit:cover;display:block;}
.admin-bot-avatar-copy{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1;}
.admin-bot-avatar-copy b{font-size:12px;}
.admin-bot-avatar-copy span{font-size:11px;color:var(--muted);}
.admin-bot-avatar-actions{display:flex;gap:6px;margin-top:3px;}
.abf-field{background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.12);border-radius:8px;color:var(--text);font-size:12px;padding:6px 10px;width:100%;box-sizing:border-box;}
.abf-personality{min-height:72px;resize:vertical;font-family:inherit;line-height:1.5;}
.abf-row{display:flex;gap:12px;}
.abf-col{flex:1;display:flex;flex-direction:column;gap:4px;}
.abf-label{font-size:11px;color:var(--muted);}
.abf-inline{display:flex;align-items:center;gap:6px;}
.abf-short{width:64px !important;}
.abf-unit{font-size:11px;color:var(--muted);}
.abf-actions{display:flex;gap:8px;margin-top:4px;}
.abf-field:disabled{opacity:.45;cursor:not-allowed;}
body.theme-light .admin-bot-row{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.09);}
body.theme-light .admin-bot-form{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.09);}
body.theme-light .abf-field{background:rgba(255,255,255,.7);border-color:rgba(0,0,0,.12);color:var(--text);}

/* ── Cloudflare Tunnel block ── */
.admin-tunnel-block{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.13);border-radius:14px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;}
.admin-tunnel-header{display:flex;align-items:center;justify-content:space-between;font-size:13px;font-weight:600;color:var(--text);}
.admin-tunnel-hint{font-size:11.5px;color:var(--muted);margin:0;line-height:1.5;}
.admin-tunnel-url-row{display:flex;align-items:center;gap:8px;}
.admin-tunnel-url-input{flex:1;font-size:12px;height:30px;background:rgba(0,0,0,.18);border:1px solid rgba(255,255,255,.12);border-radius:8px;color:var(--text);padding:0 10px;}
.admin-tunnel-actions{display:flex;gap:8px;}
.admin-tunnel-msg{font-size:11.5px;color:var(--muted);min-height:16px;}
.tunnel-badge{font-size:10px;font-weight:700;padding:2px 8px;border-radius:20px;letter-spacing:.04em;text-transform:uppercase;}
.tunnel-badge-off{background:rgba(255,255,255,.1);color:var(--muted);}
.tunnel-badge-on{background:rgba(76,175,80,.25);border:1px solid rgba(76,175,80,.4);color:#81c784;}

/* ── Migration block ── */
.admin-migrate-block{background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.09);border-radius:14px;padding:14px 16px;font-size:12px;line-height:1.6;color:var(--muted);}
.admin-migrate-block b{color:var(--text);}
.admin-migrate-block p{margin:4px 0 0;}

body.theme-light .admin-tab.active{background:rgba(0,0,0,.07);}
body.theme-light .admin-user-row{background:rgba(255,255,255,.55);border-color:rgba(0,0,0,.08);}
body.theme-light .admin-action-btn{background:rgba(0,0,0,.07);border-color:rgba(0,0,0,.12);color:var(--text);}
body.theme-light .admin-tunnel-block{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.1);}
body.theme-light .admin-tunnel-url-input{background:rgba(0,0,0,.05);border-color:rgba(0,0,0,.1);color:var(--text);}
body.theme-light .admin-migrate-block{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.08);}

.avatar-cropper-modal{
  position:fixed;
  inset:0;
  z-index:7600;
  display:flex;
  align-items:center;
  justify-content:center;
  background:rgba(0,0,0,.68);
  backdrop-filter:blur(10px);
}

.avatar-cropper-panel{
  width:390px;
  padding:16px;
  border-radius:20px;
  background:rgba(20,27,38,.94);
  border:1px solid rgba(255,255,255,.20);
  box-shadow:0 28px 90px rgba(0,0,0,.55);
  color:#fff;
}

.avatar-cropper-head,
.avatar-cropper-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.avatar-cropper-head button{
  width:32px;
  height:32px;
  border-radius:10px;
  font-size:20px;
}

.avatar-cropper-stage{
  display:grid;
  place-items:center;
  padding:18px 0;
}

.avatar-cropper-stage canvas{
  width:256px;
  height:256px;
  border-radius:50%;
  box-shadow:0 0 0 1px rgba(255,255,255,.30),0 18px 46px rgba(0,0,0,.35);
}

.avatar-cropper-controls{
  display:flex;
  flex-direction:column;
  gap:9px;
  margin-bottom:14px;
}

.avatar-cropper-controls label{
  display:grid;
  grid-template-columns:48px 1fr;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:rgba(255,255,255,.78);
}

.avatar-cropper-controls input{
  width:100%;
  height:28px;
}

.welcome-body{
  display:grid;
  place-items:center;
}
.welcome-card{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;
  width:100%;
  min-height:100%;
  text-align:left;
}
.welcome-copy{
  display:flex;
  flex-direction:column;
  gap:18px;
  min-width:0;
}
.welcome-copy h2{
  margin:0;
  font-size:34px;
  line-height:1.05;
}
.welcome-copy h2 span{
  color:var(--accent);
}
.welcome-clock{
  display:flex;
  align-items:baseline;
  gap:14px;
  padding:12px 16px;
  border-radius:16px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.13);
}
#welcome-clock-time{
  font-size:30px;
  font-weight:800;
  letter-spacing:0;
}
#welcome-clock-date{
  font-size:13px;
  color:var(--muted);
  white-space:nowrap;
}

/* Final chat formatting preview overrides */
.formatbar button.color-dot,
.fm-im-window .formatbar button.color-dot,
.fm-window[id^="win-im-"] .formatbar button.color-dot,
#win-im .formatbar button.color-dot{
  background:var(--chat-color,#000)!important;
}

.sendbar input.text-fx-gradient{
  background-image:linear-gradient(90deg,var(--fx-start),var(--fx-end))!important;
  background-clip:text!important;
  -webkit-background-clip:text!important;
  color:transparent!important;
}


/* FM_EXPANDED_THEMES_40_START */
body.theme-aurora-noir{--bg:#07111f;--glass:rgba(19,31,52,.78);--panel:rgba(85,214,255,0.13);--panel-strong:rgba(85,214,255,0.22);--title:#12324f;--text:#eaf7ff;--muted:#9fb4c8;--stroke:rgba(85,214,255,0.34);--accent:#55d6ff;--theme-accent:#55d6ff;--theme-accent-soft:rgba(85,214,255,0.22);--theme-accent-border:rgba(85,214,255,0.5);--chat-shell:linear-gradient(135deg,rgba(85,214,255,0.32),rgba(19,31,52,.78)),linear-gradient(180deg,#12324f,#07111f);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#55d6ff,#5ef2c2);}
body.theme-nebula-glass{--bg:#160927;--glass:rgba(43,24,72,.74);--panel:rgba(217,70,239,0.13);--panel-strong:rgba(217,70,239,0.22);--title:#3b1e61;--text:#fff4ff;--muted:#c9addf;--stroke:rgba(217,70,239,0.34);--accent:#d946ef;--theme-accent:#d946ef;--theme-accent-soft:rgba(217,70,239,0.22);--theme-accent-border:rgba(217,70,239,0.5);--chat-shell:linear-gradient(135deg,rgba(217,70,239,0.32),rgba(43,24,72,.74)),linear-gradient(180deg,#3b1e61,#160927);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#d946ef,#22d3ee);}
body.theme-cyber-lagoon{--bg:#031a22;--glass:rgba(10,55,68,.74);--panel:rgba(0,229,255,0.13);--panel-strong:rgba(0,229,255,0.22);--title:#06485a;--text:#e9ffff;--muted:#9bd5dc;--stroke:rgba(0,229,255,0.34);--accent:#00e5ff;--theme-accent:#00e5ff;--theme-accent-soft:rgba(0,229,255,0.22);--theme-accent-border:rgba(0,229,255,0.5);--chat-shell:linear-gradient(135deg,rgba(0,229,255,0.32),rgba(10,55,68,.74)),linear-gradient(180deg,#06485a,#031a22);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#00e5ff,#39ffb6);}
body.theme-plasma-dusk{--bg:#22081e;--glass:rgba(70,20,58,.74);--panel:rgba(255,61,129,0.13);--panel-strong:rgba(255,61,129,0.22);--title:#5b174c;--text:#fff1fb;--muted:#e7aacd;--stroke:rgba(255,61,129,0.34);--accent:#ff3d81;--theme-accent:#ff3d81;--theme-accent-soft:rgba(255,61,129,0.22);--theme-accent-border:rgba(255,61,129,0.5);--chat-shell:linear-gradient(135deg,rgba(255,61,129,0.32),rgba(70,20,58,.74)),linear-gradient(180deg,#5b174c,#22081e);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#ff3d81,#8b5cf6);}
body.theme-obsidian-gold{--bg:#080706;--glass:rgba(31,27,18,.82);--panel:rgba(251,191,36,0.13);--panel-strong:rgba(251,191,36,0.22);--title:#2a2111;--text:#fff7e3;--muted:#cbb98e;--stroke:rgba(251,191,36,0.34);--accent:#fbbf24;--theme-accent:#fbbf24;--theme-accent-soft:rgba(251,191,36,0.22);--theme-accent-border:rgba(251,191,36,0.5);--chat-shell:linear-gradient(135deg,rgba(251,191,36,0.32),rgba(31,27,18,.82)),linear-gradient(180deg,#2a2111,#080706);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#fbbf24,#f97316);}
body.theme-arctic-night{--bg:#06101f;--glass:rgba(18,35,58,.78);--panel:rgba(125,211,252,0.13);--panel-strong:rgba(125,211,252,0.22);--title:#142a45;--text:#f1f8ff;--muted:#a8bdd2;--stroke:rgba(125,211,252,0.34);--accent:#7dd3fc;--theme-accent:#7dd3fc;--theme-accent-soft:rgba(125,211,252,0.22);--theme-accent-border:rgba(125,211,252,0.5);--chat-shell:linear-gradient(135deg,rgba(125,211,252,0.32),rgba(18,35,58,.78)),linear-gradient(180deg,#142a45,#06101f);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#7dd3fc,#c4b5fd);}
body.theme-black-cherry{--bg:#1b0710;--glass:rgba(53,18,31,.78);--panel:rgba(251,84,119,0.13);--panel-strong:rgba(251,84,119,0.22);--title:#4c1728;--text:#fff0f4;--muted:#dba5b3;--stroke:rgba(251,84,119,0.34);--accent:#fb5477;--theme-accent:#fb5477;--theme-accent-soft:rgba(251,84,119,0.22);--theme-accent-border:rgba(251,84,119,0.5);--chat-shell:linear-gradient(135deg,rgba(251,84,119,0.32),rgba(53,18,31,.78)),linear-gradient(180deg,#4c1728,#1b0710);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#fb5477,#f43f5e);}
body.theme-deep-space{--bg:#050713;--glass:rgba(16,20,43,.82);--panel:rgba(129,140,248,0.13);--panel-strong:rgba(129,140,248,0.22);--title:#111633;--text:#eef2ff;--muted:#aeb8d5;--stroke:rgba(129,140,248,0.34);--accent:#818cf8;--theme-accent:#818cf8;--theme-accent-soft:rgba(129,140,248,0.22);--theme-accent-border:rgba(129,140,248,0.5);--chat-shell:linear-gradient(135deg,rgba(129,140,248,0.32),rgba(16,20,43,.82)),linear-gradient(180deg,#111633,#050713);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#818cf8,#22d3ee);}
body.theme-toxic-grid{--bg:#071406;--glass:rgba(20,44,18,.78);--panel:rgba(163,255,18,0.13);--panel-strong:rgba(163,255,18,0.22);--title:#173815;--text:#f0ffe8;--muted:#a6ce9b;--stroke:rgba(163,255,18,0.34);--accent:#a3ff12;--theme-accent:#a3ff12;--theme-accent-soft:rgba(163,255,18,0.22);--theme-accent-border:rgba(163,255,18,0.5);--chat-shell:linear-gradient(135deg,rgba(163,255,18,0.32),rgba(20,44,18,.78)),linear-gradient(180deg,#173815,#071406);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#a3ff12,#00e676);}
body.theme-midnight-ruby{--bg:#0b0814;--glass:rgba(34,22,45,.80);--panel:rgba(225,29,72,0.13);--panel-strong:rgba(225,29,72,0.22);--title:#3b1735;--text:#fff1f6;--muted:#c9adbf;--stroke:rgba(225,29,72,0.34);--accent:#e11d48;--theme-accent:#e11d48;--theme-accent-soft:rgba(225,29,72,0.22);--theme-accent-border:rgba(225,29,72,0.5);--chat-shell:linear-gradient(135deg,rgba(225,29,72,0.32),rgba(34,22,45,.80)),linear-gradient(180deg,#3b1735,#0b0814);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#e11d48,#a855f7);}
body.theme-ocean-depths{--bg:#03131f;--glass:rgba(10,39,61,.78);--panel:rgba(14,165,233,0.13);--panel-strong:rgba(14,165,233,0.22);--title:#073b5d;--text:#edfaff;--muted:#9fc5d7;--stroke:rgba(14,165,233,0.34);--accent:#0ea5e9;--theme-accent:#0ea5e9;--theme-accent-soft:rgba(14,165,233,0.22);--theme-accent-border:rgba(14,165,233,0.5);--chat-shell:linear-gradient(135deg,rgba(14,165,233,0.32),rgba(10,39,61,.78)),linear-gradient(180deg,#073b5d,#03131f);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#0ea5e9,#14b8a6);}
body.theme-storm-violet{--bg:#111322;--glass:rgba(35,38,62,.78);--panel:rgba(167,139,250,0.13);--panel-strong:rgba(167,139,250,0.22);--title:#292c4a;--text:#f3f0ff;--muted:#b8b5d0;--stroke:rgba(167,139,250,0.34);--accent:#a78bfa;--theme-accent:#a78bfa;--theme-accent-soft:rgba(167,139,250,0.22);--theme-accent-border:rgba(167,139,250,0.5);--chat-shell:linear-gradient(135deg,rgba(167,139,250,0.32),rgba(35,38,62,.78)),linear-gradient(180deg,#292c4a,#111322);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#a78bfa,#60a5fa);}
body.theme-matrix-purple{--bg:#080b12;--glass:rgba(22,30,42,.82);--panel:rgba(53,255,154,0.13);--panel-strong:rgba(53,255,154,0.22);--title:#171f2e;--text:#edfff8;--muted:#9bcab5;--stroke:rgba(53,255,154,0.34);--accent:#35ff9a;--theme-accent:#35ff9a;--theme-accent-soft:rgba(53,255,154,0.22);--theme-accent-border:rgba(53,255,154,0.5);--chat-shell:linear-gradient(135deg,rgba(53,255,154,0.32),rgba(22,30,42,.82)),linear-gradient(180deg,#171f2e,#080b12);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#35ff9a,#a855f7);}
body.theme-blood-moon{--bg:#190607;--glass:rgba(55,17,18,.80);--panel:rgba(239,68,68,0.13);--panel-strong:rgba(239,68,68,0.22);--title:#4a1012;--text:#fff2ed;--muted:#d7a89c;--stroke:rgba(239,68,68,0.34);--accent:#ef4444;--theme-accent:#ef4444;--theme-accent-soft:rgba(239,68,68,0.22);--theme-accent-border:rgba(239,68,68,0.5);--chat-shell:linear-gradient(135deg,rgba(239,68,68,0.32),rgba(55,17,18,.80)),linear-gradient(180deg,#4a1012,#190607);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#ef4444,#f97316);}
body.theme-laserwave{--bg:#11051b;--glass:rgba(38,14,61,.78);--panel:rgba(255,43,214,0.13);--panel-strong:rgba(255,43,214,0.22);--title:#32124f;--text:#fff5ff;--muted:#d0abe1;--stroke:rgba(255,43,214,0.34);--accent:#ff2bd6;--theme-accent:#ff2bd6;--theme-accent-soft:rgba(255,43,214,0.22);--theme-accent-border:rgba(255,43,214,0.5);--chat-shell:linear-gradient(135deg,rgba(255,43,214,0.32),rgba(38,14,61,.78)),linear-gradient(180deg,#32124f,#11051b);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#ff2bd6,#38bdf8);}
body.theme-glacier-rose{--bg:#edf7fb;--glass:rgba(248,252,255,.76);--panel:rgba(56,189,248,0.13);--panel-strong:rgba(56,189,248,0.22);--title:#cce1ec;--text:#182735;--muted:#627687;--stroke:rgba(56,189,248,0.34);--accent:#38bdf8;--theme-accent:#38bdf8;--theme-accent-soft:rgba(56,189,248,0.22);--theme-accent-border:rgba(56,189,248,0.5);--chat-shell:linear-gradient(135deg,rgba(56,189,248,0.32),rgba(248,252,255,.76)),linear-gradient(180deg,#cce1ec,#edf7fb);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#38bdf8,#fb7185);}
body.theme-solar-flare{--bg:#281006;--glass:rgba(78,35,16,.76);--panel:rgba(255,138,0,0.13);--panel-strong:rgba(255,138,0,0.22);--title:#793916;--text:#fff6e8;--muted:#e0b990;--stroke:rgba(255,138,0,0.34);--accent:#ff8a00;--theme-accent:#ff8a00;--theme-accent-soft:rgba(255,138,0,0.22);--theme-accent-border:rgba(255,138,0,0.5);--chat-shell:linear-gradient(135deg,rgba(255,138,0,0.32),rgba(78,35,16,.76)),linear-gradient(180deg,#793916,#281006);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#ff8a00,#facc15);}
body.theme-emerald-city{--bg:#06150f;--glass:rgba(18,57,39,.78);--panel:rgba(16,185,129,0.13);--panel-strong:rgba(16,185,129,0.22);--title:#0d4a35;--text:#effff6;--muted:#9bcab3;--stroke:rgba(16,185,129,0.34);--accent:#10b981;--theme-accent:#10b981;--theme-accent-soft:rgba(16,185,129,0.22);--theme-accent-border:rgba(16,185,129,0.5);--chat-shell:linear-gradient(135deg,rgba(16,185,129,0.32),rgba(18,57,39,.78)),linear-gradient(180deg,#0d4a35,#06150f);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#10b981,#84cc16);}
body.theme-amethyst-rain{--bg:#120b22;--glass:rgba(34,26,59,.78);--panel:rgba(192,132,252,0.13);--panel-strong:rgba(192,132,252,0.22);--title:#2b1e50;--text:#f7f2ff;--muted:#b9acd5;--stroke:rgba(192,132,252,0.34);--accent:#c084fc;--theme-accent:#c084fc;--theme-accent-soft:rgba(192,132,252,0.22);--theme-accent-border:rgba(192,132,252,0.5);--chat-shell:linear-gradient(135deg,rgba(192,132,252,0.32),rgba(34,26,59,.78)),linear-gradient(180deg,#2b1e50,#120b22);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#c084fc,#60a5fa);}
body.theme-cobalt-ice{--bg:#08182d;--glass:rgba(20,48,84,.76);--panel:rgba(59,130,246,0.13);--panel-strong:rgba(59,130,246,0.22);--title:#16406e;--text:#eff8ff;--muted:#a9c8de;--stroke:rgba(59,130,246,0.34);--accent:#3b82f6;--theme-accent:#3b82f6;--theme-accent-soft:rgba(59,130,246,0.22);--theme-accent-border:rgba(59,130,246,0.5);--chat-shell:linear-gradient(135deg,rgba(59,130,246,0.32),rgba(20,48,84,.76)),linear-gradient(180deg,#16406e,#08182d);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#3b82f6,#67e8f9);}
body.theme-carbon-fiber{--bg:#090b0f;--glass:rgba(22,25,31,.84);--panel:rgba(148,163,184,0.13);--panel-strong:rgba(148,163,184,0.22);--title:#171c24;--text:#f1f5f9;--muted:#9aa7b5;--stroke:rgba(148,163,184,0.34);--accent:#94a3b8;--theme-accent:#94a3b8;--theme-accent-soft:rgba(148,163,184,0.22);--theme-accent-border:rgba(148,163,184,0.5);--chat-shell:linear-gradient(135deg,rgba(148,163,184,0.32),rgba(22,25,31,.84)),linear-gradient(180deg,#171c24,#090b0f);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#94a3b8,#38bdf8);}
body.theme-hologram{--bg:#dff8ff;--glass:rgba(239,252,255,.72);--panel:rgba(6,182,212,0.13);--panel-strong:rgba(6,182,212,0.22);--title:#aee9f3;--text:#102733;--muted:#5b7d87;--stroke:rgba(6,182,212,0.34);--accent:#06b6d4;--theme-accent:#06b6d4;--theme-accent-soft:rgba(6,182,212,0.22);--theme-accent-border:rgba(6,182,212,0.5);--chat-shell:linear-gradient(135deg,rgba(6,182,212,0.32),rgba(239,252,255,.72)),linear-gradient(180deg,#aee9f3,#dff8ff);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#06b6d4,#a78bfa);}
body.theme-dream-pop{--bg:#f6e8ff;--glass:rgba(255,247,255,.74);--panel:rgba(244,114,182,0.13);--panel-strong:rgba(244,114,182,0.22);--title:#e4c7f3;--text:#2d1d37;--muted:#80648d;--stroke:rgba(244,114,182,0.34);--accent:#f472b6;--theme-accent:#f472b6;--theme-accent-soft:rgba(244,114,182,0.22);--theme-accent-border:rgba(244,114,182,0.5);--chat-shell:linear-gradient(135deg,rgba(244,114,182,0.32),rgba(255,247,255,.74)),linear-gradient(180deg,#e4c7f3,#f6e8ff);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#f472b6,#8b5cf6);}
body.theme-night-owl{--bg:#070b16;--glass:rgba(18,24,43,.82);--panel:rgba(96,165,250,0.13);--panel-strong:rgba(96,165,250,0.22);--title:#151d33;--text:#eef4ff;--muted:#a4b0ca;--stroke:rgba(96,165,250,0.34);--accent:#60a5fa;--theme-accent:#60a5fa;--theme-accent-soft:rgba(96,165,250,0.22);--theme-accent-border:rgba(96,165,250,0.5);--chat-shell:linear-gradient(135deg,rgba(96,165,250,0.32),rgba(18,24,43,.82)),linear-gradient(180deg,#151d33,#070b16);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#60a5fa,#fbbf24);}
body.theme-lava-lamp{--bg:#210713;--glass:rgba(67,20,35,.78);--panel:rgba(251,113,133,0.13);--panel-strong:rgba(251,113,133,0.22);--title:#5a1930;--text:#fff1ee;--muted:#d8a8a0;--stroke:rgba(251,113,133,0.34);--accent:#fb7185;--theme-accent:#fb7185;--theme-accent-soft:rgba(251,113,133,0.22);--theme-accent-border:rgba(251,113,133,0.5);--chat-shell:linear-gradient(135deg,rgba(251,113,133,0.32),rgba(67,20,35,.78)),linear-gradient(180deg,#5a1930,#210713);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#fb7185,#fb923c);}
body.theme-rainforest{--bg:#04140c;--glass:rgba(12,49,31,.78);--panel:rgba(34,197,94,0.13);--panel-strong:rgba(34,197,94,0.22);--title:#0b3f29;--text:#edfff5;--muted:#96c7ad;--stroke:rgba(34,197,94,0.34);--accent:#22c55e;--theme-accent:#22c55e;--theme-accent-soft:rgba(34,197,94,0.22);--theme-accent-border:rgba(34,197,94,0.5);--chat-shell:linear-gradient(135deg,rgba(34,197,94,0.32),rgba(12,49,31,.78)),linear-gradient(180deg,#0b3f29,#04140c);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#22c55e,#06b6d4);}
body.theme-blueprint{--bg:#06162a;--glass:rgba(15,43,78,.78);--panel:rgba(56,189,248,0.13);--panel-strong:rgba(56,189,248,0.22);--title:#0d3767;--text:#f0f7ff;--muted:#9ebbd7;--stroke:rgba(56,189,248,0.34);--accent:#38bdf8;--theme-accent:#38bdf8;--theme-accent-soft:rgba(56,189,248,0.22);--theme-accent-border:rgba(56,189,248,0.5);--chat-shell:linear-gradient(135deg,rgba(56,189,248,0.32),rgba(15,43,78,.78)),linear-gradient(180deg,#0d3767,#06162a);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#38bdf8,#2563eb);}
body.theme-candy-noir{--bg:#170817;--glass:rgba(46,18,50,.78);--panel:rgba(255,102,196,0.13);--panel-strong:rgba(255,102,196,0.22);--title:#3f1746;--text:#fff0fd;--muted:#d8acd5;--stroke:rgba(255,102,196,0.34);--accent:#ff66c4;--theme-accent:#ff66c4;--theme-accent-soft:rgba(255,102,196,0.22);--theme-accent-border:rgba(255,102,196,0.5);--chat-shell:linear-gradient(135deg,rgba(255,102,196,0.32),rgba(46,18,50,.78)),linear-gradient(180deg,#3f1746,#170817);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#ff66c4,#5eead4);}
body.theme-mono-luxe{--bg:#111111;--glass:rgba(31,31,31,.82);--panel:rgba(229,231,235,0.13);--panel-strong:rgba(229,231,235,0.22);--title:#242424;--text:#f7f7f7;--muted:#b7b7b7;--stroke:rgba(229,231,235,0.34);--accent:#e5e7eb;--theme-accent:#e5e7eb;--theme-accent-soft:rgba(229,231,235,0.22);--theme-accent-border:rgba(229,231,235,0.5);--chat-shell:linear-gradient(135deg,rgba(229,231,235,0.32),rgba(31,31,31,.82)),linear-gradient(180deg,#242424,#111111);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#e5e7eb,#a3a3a3);}
body.theme-desert-night{--bg:#17100a;--glass:rgba(46,32,21,.78);--panel:rgba(245,158,11,0.13);--panel-strong:rgba(245,158,11,0.22);--title:#3d2a18;--text:#fff4e6;--muted:#cdb28d;--stroke:rgba(245,158,11,0.34);--accent:#f59e0b;--theme-accent:#f59e0b;--theme-accent-soft:rgba(245,158,11,0.22);--theme-accent-border:rgba(245,158,11,0.5);--chat-shell:linear-gradient(135deg,rgba(245,158,11,0.32),rgba(46,32,21,.78)),linear-gradient(180deg,#3d2a18,#17100a);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#f59e0b,#ef4444);}
body.theme-sakura-light{--bg:#fff0f5;--glass:rgba(255,248,251,.76);--panel:rgba(251,113,133,0.13);--panel-strong:rgba(251,113,133,0.22);--title:#f2c8d8;--text:#2b1d25;--muted:#7c6570;--stroke:rgba(251,113,133,0.34);--accent:#fb7185;--theme-accent:#fb7185;--theme-accent-soft:rgba(251,113,133,0.22);--theme-accent-border:rgba(251,113,133,0.5);--chat-shell:linear-gradient(135deg,rgba(251,113,133,0.32),rgba(255,248,251,.76)),linear-gradient(180deg,#f2c8d8,#fff0f5);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#fb7185,#c084fc);}
body.theme-jade-light{--bg:#e9fbf3;--glass:rgba(248,255,252,.76);--panel:rgba(16,185,129,0.13);--panel-strong:rgba(16,185,129,0.22);--title:#bfead7;--text:#162d25;--muted:#61786f;--stroke:rgba(16,185,129,0.34);--accent:#10b981;--theme-accent:#10b981;--theme-accent-soft:rgba(16,185,129,0.22);--theme-accent-border:rgba(16,185,129,0.5);--chat-shell:linear-gradient(135deg,rgba(16,185,129,0.32),rgba(248,255,252,.76)),linear-gradient(180deg,#bfead7,#e9fbf3);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#10b981,#22c55e);}
body.theme-royal-gradient{--bg:#100a24;--glass:rgba(34,25,70,.78);--panel:rgba(139,92,246,0.13);--panel-strong:rgba(139,92,246,0.22);--title:#291d58;--text:#f6f1ff;--muted:#b8aad8;--stroke:rgba(139,92,246,0.34);--accent:#8b5cf6;--theme-accent:#8b5cf6;--theme-accent-soft:rgba(139,92,246,0.22);--theme-accent-border:rgba(139,92,246,0.5);--chat-shell:linear-gradient(135deg,rgba(139,92,246,0.32),rgba(34,25,70,.78)),linear-gradient(180deg,#291d58,#100a24);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#8b5cf6,#f472b6);}
body.theme-electric-mint{--bg:#041817;--glass:rgba(11,55,52,.78);--panel:rgba(45,212,191,0.13);--panel-strong:rgba(45,212,191,0.22);--title:#0b4440;--text:#edfffc;--muted:#9cccca;--stroke:rgba(45,212,191,0.34);--accent:#2dd4bf;--theme-accent:#2dd4bf;--theme-accent-soft:rgba(45,212,191,0.22);--theme-accent-border:rgba(45,212,191,0.5);--chat-shell:linear-gradient(135deg,rgba(45,212,191,0.32),rgba(11,55,52,.78)),linear-gradient(180deg,#0b4440,#041817);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#2dd4bf,#a3e635);}
body.theme-crimson-frost{--bg:#180814;--glass:rgba(49,22,45,.78);--panel:rgba(244,63,94,0.13);--panel-strong:rgba(244,63,94,0.22);--title:#431a3c;--text:#fff3fb;--muted:#d7b1ce;--stroke:rgba(244,63,94,0.34);--accent:#f43f5e;--theme-accent:#f43f5e;--theme-accent-soft:rgba(244,63,94,0.22);--theme-accent-border:rgba(244,63,94,0.5);--chat-shell:linear-gradient(135deg,rgba(244,63,94,0.32),rgba(49,22,45,.78)),linear-gradient(180deg,#431a3c,#180814);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#f43f5e,#93c5fd);}
body.theme-ultraviolet{--bg:#0e0620;--glass:rgba(31,16,64,.80);--panel:rgba(124,58,237,0.13);--panel-strong:rgba(124,58,237,0.22);--title:#24104f;--text:#f6edff;--muted:#b7a4d9;--stroke:rgba(124,58,237,0.34);--accent:#7c3aed;--theme-accent:#7c3aed;--theme-accent-soft:rgba(124,58,237,0.22);--theme-accent-border:rgba(124,58,237,0.5);--chat-shell:linear-gradient(135deg,rgba(124,58,237,0.32),rgba(31,16,64,.80)),linear-gradient(180deg,#24104f,#0e0620);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#7c3aed,#22d3ee);}
body.theme-teal-sunset{--bg:#062022;--glass:rgba(18,64,65,.76);--panel:rgba(20,184,166,0.13);--panel-strong:rgba(20,184,166,0.22);--title:#125056;--text:#efffff;--muted:#a2d0cd;--stroke:rgba(20,184,166,0.34);--accent:#14b8a6;--theme-accent:#14b8a6;--theme-accent-soft:rgba(20,184,166,0.22);--theme-accent-border:rgba(20,184,166,0.5);--chat-shell:linear-gradient(135deg,rgba(20,184,166,0.32),rgba(18,64,65,.76)),linear-gradient(180deg,#125056,#062022);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#14b8a6,#fb923c);}
body.theme-pink-lemonade{--bg:#fff2f5;--glass:rgba(255,249,245,.76);--panel:rgba(251,113,133,0.13);--panel-strong:rgba(251,113,133,0.22);--title:#f6cbd5;--text:#302126;--muted:#80666b;--stroke:rgba(251,113,133,0.34);--accent:#fb7185;--theme-accent:#fb7185;--theme-accent-soft:rgba(251,113,133,0.22);--theme-accent-border:rgba(251,113,133,0.5);--chat-shell:linear-gradient(135deg,rgba(251,113,133,0.32),rgba(255,249,245,.76)),linear-gradient(180deg,#f6cbd5,#fff2f5);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#fb7185,#facc15);}
body.theme-galaxy-core{--bg:#070418;--glass:rgba(26,17,54,.80);--panel:rgba(99,102,241,0.13);--panel-strong:rgba(99,102,241,0.22);--title:#25164f;--text:#f5efff;--muted:#b6a8d6;--stroke:rgba(99,102,241,0.34);--accent:#6366f1;--theme-accent:#6366f1;--theme-accent-soft:rgba(99,102,241,0.22);--theme-accent-border:rgba(99,102,241,0.5);--chat-shell:linear-gradient(135deg,rgba(99,102,241,0.32),rgba(26,17,54,.80)),linear-gradient(180deg,#25164f,#070418);--list-surface:linear-gradient(180deg,rgba(255,255,255,.92),rgba(235,241,248,.86));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#6366f1,#ec4899);}
body.theme-chrome-blue{--bg:#dfe9f4;--glass:rgba(241,247,253,.76);--panel:rgba(59,130,246,0.13);--panel-strong:rgba(59,130,246,0.22);--title:#b8cee2;--text:#15263a;--muted:#60758a;--stroke:rgba(59,130,246,0.34);--accent:#3b82f6;--theme-accent:#3b82f6;--theme-accent-soft:rgba(59,130,246,0.22);--theme-accent-border:rgba(59,130,246,0.5);--chat-shell:linear-gradient(135deg,rgba(59,130,246,0.32),rgba(241,247,253,.76)),linear-gradient(180deg,#b8cee2,#dfe9f4);--list-surface:linear-gradient(180deg,rgba(255,255,255,.96),rgba(236,244,250,.90));--list-text:#17202b;--list-muted:#657487;--theme-gradient:linear-gradient(135deg,#3b82f6,#94a3b8);}
body[class*="theme-"] .theme-grid button.active-theme{background:var(--theme-gradient,linear-gradient(180deg,#22a5ff,#0b70dc))!important;}
.font-demo-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;max-height:320px;overflow:auto;padding-right:3px;}
.font-demo-grid button{justify-content:flex-start!important;text-align:left!important;min-height:34px;height:auto!important;padding:8px 10px!important;line-height:1.15!important;}
/* FM_EXPANDED_THEMES_40_END */

/* FM_EXPANDED_THEME_BACKGROUNDS_START */
body.theme-aurora-noir:not(.has-wallpaper),
body.theme-nebula-glass:not(.has-wallpaper),
body.theme-cyber-lagoon:not(.has-wallpaper),
body.theme-plasma-dusk:not(.has-wallpaper),
body.theme-obsidian-gold:not(.has-wallpaper),
body.theme-arctic-night:not(.has-wallpaper),
body.theme-black-cherry:not(.has-wallpaper),
body.theme-deep-space:not(.has-wallpaper),
body.theme-toxic-grid:not(.has-wallpaper),
body.theme-midnight-ruby:not(.has-wallpaper),
body.theme-ocean-depths:not(.has-wallpaper),
body.theme-storm-violet:not(.has-wallpaper),
body.theme-matrix-purple:not(.has-wallpaper),
body.theme-blood-moon:not(.has-wallpaper),
body.theme-laserwave:not(.has-wallpaper),
body.theme-glacier-rose:not(.has-wallpaper),
body.theme-solar-flare:not(.has-wallpaper),
body.theme-emerald-city:not(.has-wallpaper),
body.theme-amethyst-rain:not(.has-wallpaper),
body.theme-cobalt-ice:not(.has-wallpaper),
body.theme-carbon-fiber:not(.has-wallpaper),
body.theme-hologram:not(.has-wallpaper),
body.theme-dream-pop:not(.has-wallpaper),
body.theme-night-owl:not(.has-wallpaper),
body.theme-lava-lamp:not(.has-wallpaper),
body.theme-rainforest:not(.has-wallpaper),
body.theme-blueprint:not(.has-wallpaper),
body.theme-candy-noir:not(.has-wallpaper),
body.theme-mono-luxe:not(.has-wallpaper),
body.theme-desert-night:not(.has-wallpaper),
body.theme-sakura-light:not(.has-wallpaper),
body.theme-jade-light:not(.has-wallpaper),
body.theme-royal-gradient:not(.has-wallpaper),
body.theme-electric-mint:not(.has-wallpaper),
body.theme-crimson-frost:not(.has-wallpaper),
body.theme-ultraviolet:not(.has-wallpaper),
body.theme-teal-sunset:not(.has-wallpaper),
body.theme-pink-lemonade:not(.has-wallpaper),
body.theme-galaxy-core:not(.has-wallpaper),
body.theme-chrome-blue:not(.has-wallpaper){
  background:
    radial-gradient(circle at 18% 18%,var(--theme-accent-soft),transparent 34%),
    radial-gradient(circle at 78% 24%,rgba(255,255,255,.12),transparent 32%),
    radial-gradient(circle at 48% 82%,var(--theme-accent-border),transparent 40%),
    var(--theme-gradient),
    linear-gradient(140deg,var(--bg),#050b12);
}
/* FM_EXPANDED_THEME_BACKGROUNDS_END */

/* ══════════════════════════════════════════════════════════
   FM PLAYER  — Apple Music-inspired layout
   ══════════════════════════════════════════════════════════ */

/* ── Window body grid ────────────────────────────────────── */
#win-player .window-body.fmp-body {
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: 1fr 88px;
  height: calc(100% - 38px);
  overflow: hidden;
  padding: 0;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.fmp-sidebar {
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid rgba(255,255,255,.08);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 0 16px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.12) transparent;
}
.fmp-sidebar-section {
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fmp-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  padding: 8px 6px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fmp-sidebar-label-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.4);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  transition: color .15s, background .15s;
}
.fmp-sidebar-label-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.fmp-sidebar-label-btn i { width: 13px; height: 13px; display: block; }

.fmp-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background .12s, color .12s;
  width: 100%;
  line-height: 1.2;
}
.fmp-nav i { width: 15px; height: 15px; flex-shrink: 0; opacity: .7; }
.fmp-nav:hover { background: rgba(255,255,255,.08); color: #fff; }
.fmp-nav.active { background: rgba(255,255,255,.13); color: #fff; }
.fmp-nav.active i { opacity: 1; }
.fmp-nav-hidden { display: none !important; }

/* Playlist item with delete btn */
.fmp-pl-item { position: relative; padding-right: 28px; }
.fmp-pl-delete {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: rgba(255,255,255,.35);
  cursor: pointer; font-size: 14px; line-height: 1; padding: 0 3px;
  opacity: 0; transition: opacity .12s;
}
.fmp-pl-item:hover .fmp-pl-delete { opacity: 1; }
.fmp-pl-delete:hover { color: #ff5f57; }

/* Live active state for Go Live / Tune In buttons */
.fmp-nav.fmp-live-active { background: rgba(255,60,60,.18); color: #ff6060; }
.fmp-nav.fmp-live-active i { opacity: 1; }
.fmp-nav.fmp-live-active:hover { background: rgba(255,60,60,.26); }

/* DJ status text */
.fmp-dj-status-text {
  font-size: 11px;
  color: #ff8c8c;
  padding: 4px 10px 0;
  min-height: 16px;
}

/* ── Main content ─────────────────────────────────────────── */
.fmp-content {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.fmp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.fmp-view-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
}
.fmp-add-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background .15s, color .15s;
}
.fmp-add-btn i { width: 14px; height: 14px; }
.fmp-add-btn:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Views */
.fmp-view { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.fmp-view-hidden { display: none !important; }

/* ── Song table ───────────────────────────────────────────── */
.fmp-song-table { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.fmp-song-header, .fmp-song-row {
  display: grid;
  grid-template-columns: 38px 1fr 140px 140px 52px;
  align-items: center;
  gap: 0;
  padding: 0 16px;
}
.fmp-song-header {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  padding-top: 4px;
  padding-bottom: 6px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.fmp-song-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.fmp-song-row {
  height: 40px;
  cursor: default;
  border-radius: 6px;
  margin: 1px 6px;
  padding: 0 10px;
  transition: background .1s;
  user-select: none;
}
.fmp-song-row:hover { background: rgba(255,255,255,.07); }
.fmp-song-row.fmp-row-active { background: rgba(var(--theme-accent-rgb, 92,150,230),.18) !important; }
.fmp-song-row.fmp-row-active .fmp-col-title { color: var(--theme-accent, #5c96e6); font-weight: 600; }

.fmp-col-num  { color: rgba(255,255,255,.35); font-size: 12px; text-align: right; padding-right: 12px; }
.fmp-col-title{ font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmp-col-artist,.fmp-col-album { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 8px; }
.fmp-col-dur  { font-size: 12px; text-align: right; }
.fmp-muted    { color: rgba(255,255,255,.45); }
.fmp-now-icon { width: 14px; height: 14px; color: var(--theme-accent, #5c96e6); }
.fmp-row-num  { display: inline-block; }

/* Empty state */
.fmp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  color: rgba(255,255,255,.3);
  text-align: center;
  font-size: 13px;
}
.fmp-empty i { width: 36px; height: 36px; opacity: .3; }
.fmp-empty b { color: rgba(255,255,255,.6); }

/* ── Artist / Album grid ─────────────────────────────────── */
.fmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}
.fmp-grid-card {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border-radius: 10px;
  padding: 10px;
  transition: background .12s;
}
.fmp-grid-card:hover { background: rgba(255,255,255,.07); }
.fmp-grid-art {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 800;
  color: rgba(255,255,255,.7);
  overflow: hidden;
}
.fmp-artist-art {
  background: linear-gradient(135deg, var(--theme-accent, #5c96e6), rgba(0,0,0,.4));
  border-radius: 50%;
}
.fmp-album-art {
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,0,0,.3));
  border: 1px solid rgba(255,255,255,.1);
}
.fmp-album-art i { width: 36px; height: 36px; opacity: .5; }
.fmp-grid-name { font-size: 12px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fmp-grid-sub  { font-size: 11px; color: rgba(255,255,255,.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Now Playing Bar ─────────────────────────────────────── */
.fmp-now-playing-bar {
  grid-column: 1 / 3;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border-top: 1px solid rgba(255,255,255,.09);
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
}

/* Left: art + info + badge */
.fmp-np-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.fmp-np-art {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.1), rgba(0,0,0,.3));
  border: 1px solid rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.fmp-np-art i { width: 20px; height: 20px; opacity: .4; }
.fmp-np-info { min-width: 0; }
.fmp-np-title  { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.fmp-np-artist { font-size: 11px; color: rgba(255,255,255,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }

.fmp-live-badge {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #ff5f5f;
  background: rgba(255,60,60,.15);
  border: 1px solid rgba(255,60,60,.3);
  border-radius: 6px;
  padding: 3px 7px;
  white-space: nowrap;
  animation: fmp-pulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
.fmp-badge-hidden { display: none !important; }
@keyframes fmp-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}

/* Center: transport + seek */
.fmp-np-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 320px;
  max-width: 460px;
}
.fmp-transport {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fmp-icon-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  padding: 5px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: color .12s, background .12s;
}
.fmp-icon-btn i { width: 17px; height: 17px; }
.fmp-icon-btn:hover { color: #fff; background: rgba(255,255,255,.1); }
.fmp-icon-btn.fmp-transport-active { color: var(--theme-accent, #5c96e6); }

.fmp-play-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #111;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .12s, transform .1s;
  flex-shrink: 0;
}
.fmp-play-btn i { width: 16px; height: 16px; }
.fmp-play-btn:hover { background: rgba(255,255,255,.88); transform: scale(1.06); }
.fmp-play-btn:active { transform: scale(.95); }

/* Seek / Volume ranges */
.fmp-seek-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.fmp-time { font-size: 10px; color: rgba(255,255,255,.35); width: 30px; flex-shrink: 0; }
.fmp-time:last-child { text-align: right; }

.fmp-range {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 99px;
  background: rgba(255,255,255,.18);
  outline: none;
  cursor: pointer;
  flex: 1;
  transition: height .12s;
}
.fmp-range:hover { height: 5px; }
.fmp-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform .1s;
}
.fmp-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* Right: volume */
.fmp-np-right {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}
.fmp-vol-bar { max-width: 90px; }

/* ── Context menu ────────────────────────────────────────── */
.fmp-context-menu {
  min-width: 190px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  backdrop-filter: blur(12px);
  background: rgba(20,28,48,.85);
}
.fmp-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .1s;
}
.fmp-ctx-item i { width: 14px; height: 14px; opacity: .6; }
.fmp-ctx-item:hover { background: rgba(255,255,255,.1); color: #fff; }
.fmp-ctx-danger { color: #ff6b6b; }
.fmp-ctx-danger:hover { background: rgba(255,60,60,.15); color: #ff4444; }
.fmp-ctx-disabled { padding: 8px 10px; font-size: 12px; color: rgba(255,255,255,.3); cursor: default; }
.fmp-ctx-sep { height: 1px; background: rgba(255,255,255,.08); margin: 4px 0; }

/* ── Sidebar radio section ───────────────────────────────── */
.fmp-sidebar-radio { margin-top: auto; border-top: 1px solid rgba(255,255,255,.07); padding-top: 10px; }

/* ── Inline "new playlist" form ──────────────────────────── */
.fmp-pl-new-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 6px 6px 4px;
}
.fmp-pl-input {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 6px;
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
}
.fmp-pl-input::placeholder { color: rgba(255,255,255,.35); }
.fmp-pl-input:focus { border-color: var(--theme-accent, #5c96e6); }
.fmp-pl-form-btns {
  display: flex;
  gap: 4px;
}
.fmp-pl-btn-ok {
  flex: 1;
  background: var(--theme-accent, #5c96e6);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 0;
  cursor: pointer;
  transition: opacity .12s;
}
.fmp-pl-btn-ok:hover { opacity: .85; }
.fmp-pl-btn-cancel {
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.6);
  font-size: 11px;
  padding: 5px 8px;
  cursor: pointer;
  transition: background .12s;
}
.fmp-pl-btn-cancel:hover { background: rgba(255,255,255,.18); color: #fff; }


/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME OVERRIDES — FM Player + Admin
   Targets all light themes: light, aol-light, ice, mint, pearl, lavender-light
   Fixes all hardcoded rgba(255,255,255,...) / #fff that break on light bg
   ═══════════════════════════════════════════════════════════════ */

body.theme-light,
body.theme-aol-light,
body.theme-ice,
body.theme-mint,
body.theme-pearl,
body.theme-lavender-light,
body.theme-hologram,
body.theme-dream-pop,
body.theme-sakura-light,
body.theme-jade-light,
body.theme-pink-lemonade,
body.theme-chrome-blue {

  /* ── Sidebar ──────────────────────────────────────────── */
  .fmp-sidebar {
    border-right-color: rgba(0,0,0,.09);
    scrollbar-color: rgba(0,0,0,.12) transparent;
  }
  .fmp-sidebar-label { color: var(--muted); }
  .fmp-sidebar-label-btn { color: var(--muted); }
  .fmp-sidebar-label-btn:hover { color: var(--text); background: rgba(0,0,0,.06); }

  .fmp-nav { color: var(--text); }
  .fmp-nav i { opacity: .55; }
  .fmp-nav:hover { background: rgba(0,0,0,.06); color: var(--text); }
  .fmp-nav.active { background: rgba(0,0,0,.09); color: var(--text); }
  .fmp-nav.active i { opacity: .9; }
  .fmp-nav.fmp-live-active { background: rgba(255,60,60,.12); color: #cc2222; }
  .fmp-nav.fmp-live-active:hover { background: rgba(255,60,60,.2); }
  .fmp-pl-delete { color: var(--muted); }
  .fmp-dj-status-text { color: #c0392b; }
  .fmp-sidebar-radio { border-top-color: rgba(0,0,0,.09); }

  /* ── Toolbar / content ────────────────────────────────── */
  .fmp-toolbar { border-bottom-color: rgba(0,0,0,.07); }
  .fmp-view-title { color: var(--text); }
  .fmp-add-btn {
    border-color: rgba(0,0,0,.14);
    background: rgba(0,0,0,.05);
    color: var(--text);
  }
  .fmp-add-btn:hover { background: rgba(0,0,0,.1); color: var(--text); }

  /* ── Song table ───────────────────────────────────────── */
  .fmp-song-header { color: var(--muted); border-bottom-color: rgba(0,0,0,.07); }
  .fmp-song-row:hover { background: rgba(0,0,0,.04); }
  .fmp-song-row.fmp-row-active { background: rgba(var(--theme-accent-rgb, 22,120,210),.1) !important; }
  .fmp-col-num  { color: var(--muted); }
  .fmp-col-title { color: var(--text); }
  .fmp-muted    { color: var(--muted); }
  .fmp-now-icon { color: var(--accent); }

  /* ── Empty state ──────────────────────────────────────── */
  .fmp-empty { color: var(--muted); }
  .fmp-empty b { color: var(--text); }

  /* ── Artist / Album grid ──────────────────────────────── */
  .fmp-grid { scrollbar-color: rgba(0,0,0,.1) transparent; }
  .fmp-grid-card:hover { background: rgba(0,0,0,.05); }
  .fmp-grid-name { color: var(--text); }
  .fmp-grid-sub  { color: var(--muted); }
  .fmp-album-art { border-color: rgba(0,0,0,.1); background: linear-gradient(135deg, rgba(0,0,0,.07), rgba(0,0,0,.02)); }
  .fmp-album-art i { opacity: .35; }

  /* ── Now Playing Bar ──────────────────────────────────── */
  .fmp-now-playing-bar {
    background: rgba(255,255,255,.72);
    border-top-color: rgba(0,0,0,.08);
  }
  .fmp-np-art {
    background: linear-gradient(135deg, rgba(0,0,0,.08), rgba(0,0,0,.02));
    border-color: rgba(0,0,0,.1);
  }
  .fmp-np-art i { opacity: .3; }
  .fmp-np-title  { color: var(--text); }
  .fmp-np-artist { color: var(--muted); }

  /* Transport buttons */
  .fmp-icon-btn { color: var(--muted); }
  .fmp-icon-btn:hover { color: var(--text); background: rgba(0,0,0,.07); }
  .fmp-icon-btn.fmp-transport-active { color: var(--accent); }
  .fmp-play-btn { background: var(--text); color: #fff; }
  .fmp-play-btn:hover { background: color-mix(in srgb, var(--text) 85%, transparent); }

  /* Seek / volume */
  .fmp-time { color: var(--muted); }
  .fmp-range { background: rgba(0,0,0,.12); }
  .fmp-range::-webkit-slider-thumb { background: var(--text); }

  /* Volume icon */
  .fmp-np-right .fmp-icon-btn { color: var(--muted); }

  /* ── Live badge stays red ─────────────────────────────── */
  .fmp-live-badge { color: #c0392b; background: rgba(192,57,43,.1); border-color: rgba(192,57,43,.25); }

  /* ── Inline playlist form ─────────────────────────────── */
  .fmp-pl-input {
    background: rgba(255,255,255,.85);
    border-color: rgba(0,0,0,.15);
    color: var(--text);
  }
  .fmp-pl-input::placeholder { color: var(--muted); }
  .fmp-pl-btn-cancel { background: rgba(0,0,0,.07); color: var(--text); }
  .fmp-pl-btn-cancel:hover { background: rgba(0,0,0,.12); color: var(--text); }
}

/* ── Admin panel extra light-theme fixes (all light themes) ── */
body.theme-aol-light .admin-bot-row,
body.theme-ice .admin-bot-row,
body.theme-mint .admin-bot-row,
body.theme-pearl .admin-bot-row,
body.theme-lavender-light .admin-bot-row { background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.09); }

body.theme-aol-light .admin-bot-form,
body.theme-ice .admin-bot-form,
body.theme-mint .admin-bot-form,
body.theme-pearl .admin-bot-form,
body.theme-lavender-light .admin-bot-form { background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.09); }

body.theme-aol-light .abf-field,
body.theme-ice .abf-field,
body.theme-mint .abf-field,
body.theme-pearl .abf-field,
body.theme-lavender-light .abf-field { background:rgba(255,255,255,.7); border-color:rgba(0,0,0,.12); color:var(--text); }

body.theme-aol-light .admin-tab.active,
body.theme-ice .admin-tab.active,
body.theme-mint .admin-tab.active,
body.theme-pearl .admin-tab.active,
body.theme-lavender-light .admin-tab.active { background:rgba(0,0,0,.07); }

body.theme-aol-light .admin-user-row,
body.theme-ice .admin-user-row,
body.theme-mint .admin-user-row,
body.theme-pearl .admin-user-row,
body.theme-lavender-light .admin-user-row { background:rgba(255,255,255,.55); border-color:rgba(0,0,0,.08); }

body.theme-aol-light .admin-action-btn,
body.theme-ice .admin-action-btn,
body.theme-mint .admin-action-btn,
body.theme-pearl .admin-action-btn,
body.theme-lavender-light .admin-action-btn { background:rgba(0,0,0,.07); border-color:rgba(0,0,0,.12); color:var(--text); }

body.theme-aol-light .admin-tunnel-block,
body.theme-ice .admin-tunnel-block,
body.theme-mint .admin-tunnel-block,
body.theme-pearl .admin-tunnel-block,
body.theme-lavender-light .admin-tunnel-block { background:rgba(0,0,0,.05); border-color:rgba(0,0,0,.1); }

body.theme-aol-light .admin-tunnel-url-input,
body.theme-ice .admin-tunnel-url-input,
body.theme-mint .admin-tunnel-url-input,
body.theme-pearl .admin-tunnel-url-input,
body.theme-lavender-light .admin-tunnel-url-input { background:rgba(0,0,0,.05); border-color:rgba(0,0,0,.1); color:var(--text); }

body.theme-aol-light .admin-migrate-block,
body.theme-ice .admin-migrate-block,
body.theme-mint .admin-migrate-block,
body.theme-pearl .admin-migrate-block,
body.theme-lavender-light .admin-migrate-block { background:rgba(0,0,0,.04); border-color:rgba(0,0,0,.08); }


/* ═══════════════════════════════════════════════════════════════
   FM PLAYER — VISUALIZER
   ═══════════════════════════════════════════════════════════════ */

/* ── Visualizer view layout ─────────────────────────────────── */
#fmp-view-visualizer {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  background: transparent;
}

/* ── Mode switcher toolbar ──────────────────────────────────── */
.fmp-viz-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px 8px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.fmp-viz-mode-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background .13s, color .13s, border-color .13s;
  white-space: nowrap;
}
.fmp-viz-mode-btn i { width: 13px; height: 13px; flex-shrink: 0; }
.fmp-viz-mode-btn:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.2);
}
.fmp-viz-mode-btn.fmp-viz-mode-active {
  background: var(--accent, #5c96e6);
  color: #fff;
  border-color: transparent;
}

/* ── Canvas container ───────────────────────────────────────── */
.fmp-viz-canvas-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  background: rgba(0,0,0,.18);
}

#fmp-viz-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

/* ── Idle state overlay ─────────────────────────────────────── */
.fmp-viz-idle {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255,255,255,.25);
  font-size: 13px;
  pointer-events: none;
  user-select: none;
}
.fmp-viz-idle i { width: 40px; height: 40px; opacity: .2; }
.fmp-viz-idle b { color: rgba(255,255,255,.45); font-size: 14px; }
.fmp-viz-idle span { font-size: 12px; color: rgba(255,255,255,.2); }

/* ── Light-theme overrides for visualizer ───────────────────── */
body.theme-light,
body.theme-aol-light,
body.theme-ice,
body.theme-mint,
body.theme-pearl,
body.theme-lavender-light,
body.theme-hologram,
body.theme-dream-pop,
body.theme-sakura-light,
body.theme-jade-light,
body.theme-pink-lemonade,
body.theme-chrome-blue {
  .fmp-viz-toolbar { border-bottom-color: rgba(0,0,0,.07); }
  .fmp-viz-mode-btn {
    border-color: rgba(0,0,0,.12);
    background: rgba(0,0,0,.05);
    color: var(--muted);
  }
  .fmp-viz-mode-btn:hover {
    background: rgba(0,0,0,.1);
    color: var(--text);
    border-color: rgba(0,0,0,.18);
  }
  .fmp-viz-mode-btn.fmp-viz-mode-active {
    background: var(--accent, #1678d2);
    color: #fff;
    border-color: transparent;
  }
  .fmp-viz-canvas-wrap { background: rgba(0,0,0,.04); }
  .fmp-viz-idle { color: var(--muted); }
  .fmp-viz-idle b { color: var(--text); }
  .fmp-viz-idle span { color: var(--muted); }
}


/* ═══════════════════════════════════════════════════════════════
   ALBUM ART — Now Playing bar + Album grid cards
   ═══════════════════════════════════════════════════════════════ */

/* Now-playing bar art box */
.fmp-np-art .fmp-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
  display: block;
}

/* Album grid card art box */
.fmp-album-art .fmp-art-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* Smooth fade-in when image loads */
.fmp-art-img {
  animation: fmp-art-fadein .3s ease;
}
@keyframes fmp-art-fadein {
  from { opacity: 0; transform: scale(1.04); }
  to   { opacity: 1; transform: scale(1); }
}


/* ═══════════════════════════════════════════════════════════════
   FM PLAYER — 10-BAND EQUALIZER
   ═══════════════════════════════════════════════════════════════ */

#fmp-view-eq {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
  padding: 0;
}

/* ── Presets bar ────────────────────────────────────────────── */
.fmp-eq-presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}

.fmp-eq-preset {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.6);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
  white-space: nowrap;
}
.fmp-eq-preset:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-color: rgba(255,255,255,.22);
}
.fmp-eq-preset.fmp-eq-preset-active {
  background: var(--accent, #5c96e6);
  color: #fff;
  border-color: transparent;
}

.fmp-eq-reset-btn {
  padding: 4px 11px;
  border-radius: 20px;
  border: 1px solid rgba(255,80,80,.25);
  background: rgba(255,80,80,.08);
  color: rgba(255,120,120,.8);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s, color .12s;
  margin-left: auto;
}
.fmp-eq-reset-btn:hover {
  background: rgba(255,80,80,.18);
  color: #ff7070;
}

/* ── Bands grid ─────────────────────────────────────────────── */
.fmp-eq-bands {
  display: flex;
  flex: 1;
  align-items: stretch;
  gap: 0;
  padding: 16px 12px 0;
  overflow: hidden;
}

.fmp-eq-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 6px;
  min-width: 0;
}

/* dB readout above slider */
.fmp-eq-db {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent, #5c96e6);
  text-align: center;
  min-height: 14px;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* Slider track wrapper (needed for vertical orientation) */
.fmp-eq-track {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

/* Vertical range slider via writing-mode (Chrome/Electron) */
.fmp-eq-slider {
  -webkit-appearance: slider-vertical;
  writing-mode: vertical-lr;
  direction: rtl;
  width: 22px;
  height: 100%;
  cursor: pointer;
  outline: none;
  background: transparent;
  flex-shrink: 0;
}

/* Webkit track */
.fmp-eq-slider::-webkit-slider-runnable-track {
  width: 4px;
  background: rgba(255,255,255,.14);
  border-radius: 99px;
}
/* Thumb */
.fmp-eq-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent, #5c96e6);
  border: 2px solid rgba(255,255,255,.35);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  cursor: pointer;
  transition: transform .1s, background .12s;
  margin-left: -6px; /* center on track */
}
.fmp-eq-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  background: color-mix(in srgb, var(--accent, #5c96e6) 80%, #fff);
}
.fmp-eq-slider:active::-webkit-slider-thumb { transform: scale(1.15); }

/* Frequency label below slider */
.fmp-eq-freq {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-align: center;
  padding-bottom: 8px;
  white-space: nowrap;
}

/* 0 dB reference line label */
.fmp-eq-zero-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 4px 14px 10px;
  flex-shrink: 0;
}
.fmp-eq-zero-label {
  font-size: 10px;
  color: rgba(255,255,255,.2);
  font-weight: 600;
  letter-spacing: .05em;
}

/* ── Light-theme overrides ──────────────────────────────────── */
body.theme-light,
body.theme-aol-light,
body.theme-ice,
body.theme-mint,
body.theme-pearl,
body.theme-lavender-light,
body.theme-hologram,
body.theme-dream-pop,
body.theme-sakura-light,
body.theme-jade-light,
body.theme-pink-lemonade,
body.theme-chrome-blue {
  .fmp-eq-presets-bar { border-bottom-color: rgba(0,0,0,.07); }
  .fmp-eq-preset {
    border-color: rgba(0,0,0,.12);
    background: rgba(0,0,0,.05);
    color: var(--muted);
  }
  .fmp-eq-preset:hover {
    background: rgba(0,0,0,.1);
    color: var(--text);
    border-color: rgba(0,0,0,.18);
  }
  .fmp-eq-preset.fmp-eq-preset-active { background: var(--accent); color: #fff; border-color: transparent; }
  .fmp-eq-reset-btn { border-color: rgba(180,40,40,.25); background: rgba(200,50,50,.07); color: #b03030; }
  .fmp-eq-reset-btn:hover { background: rgba(200,50,50,.15); color: #8a1a1a; }
  .fmp-eq-db { color: var(--accent); }
  .fmp-eq-slider::-webkit-slider-runnable-track { background: rgba(0,0,0,.12); }
  .fmp-eq-slider::-webkit-slider-thumb { border-color: rgba(0,0,0,.2); box-shadow: 0 2px 6px rgba(0,0,0,.2); }
  .fmp-eq-freq { color: var(--muted); }
  .fmp-eq-zero-label { color: rgba(0,0,0,.2); }
}

/* ── Performance: layout containment ─────────────────────────────────────────
   contain:layout style prevents internal DOM changes from forcing a full-page
   reflow. Applied to the sections that update frequently (chat messages,
   buddy list, IM panels). Scroll containers get contain:strict for extra gain.
   ──────────────────────────────────────────────────────────────────────────── */
.chat-main {
  contain: layout style;
}
.buddy-body {
  contain: layout style;
}
#win-im .im-chat-panel,
.fm-im-window .im-chat-panel,
.fm-window[id^="win-im-"] .im-chat-panel {
  contain: layout style;
}
.fmp-content,
.fmp-song-list,
.fmp-grid {
  contain: layout style;
}
/* People Here list */
.people {
  contain: layout style;
}
