:root {
  --bg: #0b0813;
  --a1: #a97bff;           /* main accent */
  --a2: #5b2fd1;           /* deep accent */
  --a3: #d36bff;           /* highlight */
  --ink: #f2eeff;
  --dim: #a99fc9;
  --faint: #7a7099;
  --glass: rgba(24, 18, 44, .42);
  --glass-strong: rgba(20, 15, 38, .66);
  --line: rgba(255, 255, 255, .09);
  --glow: .6;
  --blur: 28px;
  --r: 20px;
  --good: #5fe3a1;
  --warn: #ffc65c;
  --bad: #ff6b81;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg); color: var(--ink);
  font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  user-select: none;
}
input, textarea { user-select: text; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: 2px solid var(--a1); outline-offset: 2px; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ------------------------------------------------ animated sky */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.sky canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#bgGlow { filter: blur(28px) saturate(1.15); transform: scale(1.08); }
.vignette { position: absolute; inset: 0; background:
  radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(0,0,0,.6) 100%),
  linear-gradient(180deg, rgba(0,0,0,.15), transparent 30%); }

/* ------------------------------------------------ liquid glass */
.glass {
  position: relative; border-radius: var(--r);
  background:
    linear-gradient(150deg, rgba(255,255,255,.10), rgba(255,255,255,.02) 38%, rgba(255,255,255,.0) 60%, rgba(255,255,255,.04)),
    var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(170%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.16),
    inset 0 -1px 0 rgba(0,0,0,.25),
    0 18px 50px rgba(0,0,0,.35);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(255,255,255,.38), rgba(255,255,255,.05) 35%, rgba(255,255,255,.02) 65%,
    color-mix(in srgb, var(--a1) calc(var(--glow) * 70%), transparent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ------------------------------------------------ title bar */
.titlebar { position: relative; z-index: 3; height: 42px; display: flex; align-items: center; justify-content: space-between;
  padding-left: 18px; -webkit-app-region: drag; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; letter-spacing: .02em; }
.brand .logo { width: 22px; height: 22px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--a1) 70%, transparent)); }
.wc { display: flex; -webkit-app-region: no-drag; }
.wc button { width: 46px; height: 42px; color: var(--dim); display: grid; place-items: center; }
.wc svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.2; }
.wc button:hover { background: rgba(255,255,255,.07); color: var(--ink); }
.wc .close:hover { background: #d33246; color: #fff; }

/* ------------------------------------------------ layout */
.shell { position: relative; z-index: 1; display: flex; height: calc(100% - 42px); padding: 0 18px 18px; gap: 18px; }
.side { width: 220px; flex: none; display: flex; flex-direction: column; padding: 14px; gap: 4px; }
.side .nav { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 14px; color: var(--dim);
  font-weight: 550; transition: background .18s, color .18s, box-shadow .18s; position: relative; }
.side .nav:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.side .nav.on { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 30%, transparent), color-mix(in srgb, var(--a2) 22%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px calc(24px * var(--glow)) color-mix(in srgb, var(--a1) 35%, transparent); }
.side .nav.on::after { content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--a1);
  box-shadow: 0 0 12px var(--a1); }
.side .label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 8px 14px 6px; }
.side .push { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 16px; background: rgba(0,0,0,.18);
  border: 1px solid var(--line); text-align: left; width: 100%; }
.me:hover { background: rgba(255,255,255,.06); }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .who small { color: var(--dim); font-size: 12px; }

.avatar { width: 36px; height: 36px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 700; overflow: hidden;
  background: linear-gradient(135deg, var(--a1), var(--a2)); image-rendering: pixelated; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.avatar img { width: 100%; height: 100%; display: block; }
.avatar.lg { width: 56px; height: 56px; border-radius: 14px; font-size: 20px; }
.avatar.ghost { background: rgba(255,255,255,.08); color: var(--dim); }

main { flex: 1; min-width: 0; overflow-y: auto; padding-right: 4px; }
main > section { padding-bottom: 6px; }
body.anim main > section { animation: rise .32s cubic-bezier(.2,.8,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.995); } }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 2px 18px; }
h1 { font-size: 28px; font-weight: 650; letter-spacing: -.01em; }
.sub { color: var(--dim); margin-top: 2px; }
h2 { font-size: 15px; font-weight: 620; }
h3 { font-size: 13px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.muted { color: var(--dim); }
.card { padding: 22px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ------------------------------------------------ buttons & inputs */
.btn { height: 40px; padding: 0 16px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.08);
  font-weight: 560; transition: background .15s, transform .12s, box-shadow .15s; white-space: nowrap; }
.btn:hover { background: rgba(255,255,255,.12); }
.btn:active { transform: translateY(1px); }
.btn.primary { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px calc(22px * var(--glow)) color-mix(in srgb, var(--a1) 45%, transparent); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #ffd2d9; }
.btn.danger:hover { background: rgba(255,80,110,.2); }
.btn.sm { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 13px; }
.btn.icon { width: 36px; padding: 0; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.ms { width: 16px; height: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5px; }
.ms i:nth-child(1) { background: #f25022; } .ms i:nth-child(2) { background: #7fba00; }
.ms i:nth-child(3) { background: #00a4ef; } .ms i:nth-child(4) { background: #ffb900; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; color: var(--dim); font-weight: 560; }
.input, textarea.input, select.input { height: 42px; padding: 0 14px; border-radius: 12px; border: 0; width: 100%;
  background: rgba(5,3,14,.42); box-shadow: inset 0 0 0 1px var(--line), inset 0 2px 6px rgba(0,0,0,.25); transition: box-shadow .15s; }
textarea.input { height: 84px; padding: 10px 14px; resize: none; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--a1), 0 0 0 4px color-mix(in srgb, var(--a1) 18%, transparent); }
.input::placeholder { color: var(--faint); }
select.input option { background: #171129; }

.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: rgba(5,3,14,.42); box-shadow: inset 0 0 0 1px var(--line); gap: 2px; }
.seg button { height: 34px; padding: 0 16px; border-radius: 10px; color: var(--dim); font-weight: 560; display: inline-flex; align-items: center; gap: 8px; }
.seg button:hover { color: var(--ink); }
.seg button.on { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 55%, transparent), color-mix(in srgb, var(--a2) 55%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.chip.accent { background: color-mix(in srgb, var(--a1) 22%, transparent); color: #fff; }
.chip.good { background: rgba(95,227,161,.14); color: var(--good); }
.chip.warn { background: rgba(255,198,92,.14); color: var(--warn); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.switch { width: 48px; height: 28px; border-radius: 14px; position: relative; flex: none;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35); transition: transform .22s cubic-bezier(.3,1.4,.5,1); }
.switch.on { background: linear-gradient(135deg, var(--a1), var(--a2)); }
.switch.on::after { transform: translateX(20px); }

input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; background: transparent; --p: 50%; cursor: pointer; }
input[type=range]::-webkit-slider-runnable-track { height: 8px; border-radius: 8px;
  background: linear-gradient(90deg, var(--a2), var(--a1) var(--p), rgba(255,255,255,.1) var(--p)); box-shadow: inset 0 0 0 1px var(--line); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; margin-top: -7px; background: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--a1) 35%, transparent), 0 4px 12px rgba(0,0,0,.4); transition: box-shadow .15s; }
input[type=range]:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px color-mix(in srgb, var(--a1) 40%, transparent), 0 4px 12px rgba(0,0,0,.4); }

/* ------------------------------------------------ home */
.home { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 18px; }
.hero { min-height: 360px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; grid-row: span 2; }
.hero .art { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.hero .art i { position: absolute; border-radius: 50%; filter: blur(2px); }
.hero .art .orb { width: 260px; height: 260px; right: -40px; top: -50px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.55), color-mix(in srgb, var(--a1) 60%, transparent) 30%, color-mix(in srgb, var(--a2) 40%, transparent) 65%, transparent 72%);
  box-shadow: inset -20px -30px 60px rgba(0,0,0,.25); }
.hero .art .orb2 { width: 120px; height: 120px; right: 210px; top: 120px; opacity: .7;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.5), color-mix(in srgb, var(--a3) 55%, transparent) 35%, transparent 70%); }
body.anim .hero .art .orb { animation: float 9s ease-in-out infinite alternate; }
body.anim .hero .art .orb2 { animation: float 7s ease-in-out infinite alternate-reverse; }
@keyframes float { to { transform: translate(-14px, 18px); } }
.hero .top { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.hero .title { position: relative; }
.hero .kicker { color: var(--dim); font-weight: 560; margin-bottom: 4px; }
.hero .name { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--a1) 35%, #fff)); -webkit-background-clip: text; color: transparent; word-break: break-word; }
.hero .meta { color: var(--dim); margin-top: 8px; }
.launchbar { position: relative; display: flex; gap: 12px; align-items: stretch; }
.picker { flex: none; width: 240px; height: 64px; border-radius: 18px; padding: 0 14px; display: flex; align-items: center; gap: 12px; text-align: left;
  background: rgba(5,3,14,.42); box-shadow: inset 0 0 0 1px var(--line); }
.picker:hover { background: rgba(255,255,255,.07); }
.picker .tile { width: 38px; height: 38px; border-radius: 11px; }
.picker .txt { flex: 1; min-width: 0; }
.picker .txt b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker .txt small { color: var(--dim); }
.play { position: relative; flex: 1; height: 64px; border-radius: 18px; overflow: hidden; color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .02em;
  background: linear-gradient(135deg, var(--a3), var(--a1) 40%, var(--a2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.18), 0 12px calc(40px * var(--glow)) color-mix(in srgb, var(--a1) 55%, transparent);
  transition: transform .15s, filter .2s; }
.play::before { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%); }
body.anim .play:hover::before { animation: sheen 1.1s ease; }
@keyframes sheen { to { transform: translateX(120%); } }
.play:hover { filter: brightness(1.08); transform: translateY(-1px); }
.play .fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(255,255,255,.22); transition: width .25s; }
.play .lbl { position: relative; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.play .lbl small { font-size: 12px; font-weight: 550; opacity: .85; letter-spacing: 0; max-width: 90%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.play.busy { cursor: default; filter: saturate(.85); }
.play.busy:hover { transform: none; }
.play.busy .fill.indet { width: 35%; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { from { left: -35%; } to { left: 100%; } }
.play.live { background: linear-gradient(135deg, #47d79a, #1f9e78); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 34px rgba(71,215,154,.35); }

.acct { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.acct .grow { flex: 1; min-width: 0; }
.acct b { display: block; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem { display: flex; flex-direction: column; gap: 10px; }
.mem .big { font-size: 30px; font-weight: 700; letter-spacing: -.01em; }
.mem .big small { font-size: 14px; color: var(--dim); font-weight: 560; margin-left: 4px; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--a2), var(--a1)); box-shadow: 0 0 12px var(--a1); }
#recentCard, .log { margin-top: 18px; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); flex-direction: column; gap: 8px; }
.recent button { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; text-align: left; }
.recent button:hover { background: rgba(255,255,255,.06); }
.recent .tile { width: 34px; height: 34px; border-radius: 10px; font-size: 12px; }
.recent .t { flex: 1; min-width: 0; }
.recent .t b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 580; }
.recent .t small { color: var(--dim); }

.log { padding: 0; overflow: hidden; }
.log summary { list-style: none; padding: 14px 20px; display: flex; justify-content: space-between; cursor: pointer; font-weight: 600; }
.log summary::-webkit-details-marker { display: none; }
.log pre { max-height: 220px; overflow: auto; padding: 0 20px 16px; font: 12px/1.5 ui-monospace, Consolas, monospace; color: #cfc6ee; white-space: pre-wrap; user-select: text; }

/* ------------------------------------------------ instance tiles */
.tile { display: grid; place-items: center; font-weight: 750; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.3); flex: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 0 0 1px rgba(255,255,255,.12); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.inst { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: transform .2s; }
body.anim .inst:hover { transform: translateY(-2px); }
.inst.sel::before { background: linear-gradient(140deg, var(--a1), rgba(255,255,255,.1) 40%, var(--a2)); }
.inst .top { display: flex; gap: 14px; align-items: center; }
.inst .tile { width: 54px; height: 54px; border-radius: 15px; font-size: 18px; }
.inst .t { min-width: 0; flex: 1; }
.inst .t b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inst .t small { color: var(--dim); }
.inst .acts { display: flex; gap: 8px; }
.inst .acts .btn.primary { flex: 1; }
.newcard { min-height: 152px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--dim);
  border-radius: var(--r); border: 1.5px dashed rgba(255,255,255,.16); transition: border-color .2s, color .2s, background .2s; }
.newcard:hover { border-color: var(--a1); color: #fff; background: color-mix(in srgb, var(--a1) 8%, transparent); }
.newcard .plus { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.07); }
.empty { text-align: center; padding: 48px 16px; color: var(--dim); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ------------------------------------------------ accounts */
.acc-list { display: flex; flex-direction: column; gap: 12px; }
.acc { display: flex; align-items: center; gap: 16px; padding: 16px 18px; }
.acc .grow { flex: 1; min-width: 0; }
.acc b { font-size: 16px; }
.note { display: flex; gap: 12px; padding: 16px 18px; color: var(--dim); font-size: 13px; }
.note svg { color: var(--a1); margin-top: 1px; }

/* ------------------------------------------------ settings */
.tabs { margin-bottom: 18px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; padding-top: 4px; }
.setting .l { min-width: 0; }
.setting .l b { display: block; font-weight: 600; }
.setting .l small { color: var(--dim); }
.setting .r { flex: none; display: flex; align-items: center; gap: 10px; }
.setting .r.w { width: 300px; }

.ram { display: grid; grid-template-columns: 1fr; gap: 16px; }
.ram .readout { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.ram .val { font-size: 52px; font-weight: 750; letter-spacing: -.03em; line-height: 1;
  background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--a1) 40%, #fff)); -webkit-background-clip: text; color: transparent; }
.ram .val small { font-size: 20px; font-weight: 600; -webkit-text-fill-color: var(--dim); margin-left: 6px; }
.ram .ticks { display: flex; justify-content: space-between; color: var(--faint); font-size: 11.5px; margin-top: -6px; padding: 0 2px; }
.ram .zone { height: 6px; border-radius: 6px; display: flex; overflow: hidden; gap: 2px; }
.ram .zone i { display: block; height: 100%; }
.ram .zone .z1 { background: rgba(95,227,161,.6); } .ram .zone .z2 { background: rgba(255,198,92,.6); } .ram .zone .z3 { background: rgba(255,107,129,.6); }
.presets { display: flex; gap: 8px; flex-wrap: wrap; }
.presets button { height: 34px; padding: 0 14px; border-radius: 10px; background: rgba(255,255,255,.06); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: 13px; }
.presets button:hover { background: rgba(255,255,255,.12); }
.presets button.on { background: color-mix(in srgb, var(--a1) 30%, transparent); box-shadow: inset 0 0 0 1px var(--a1); color: #fff; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt { text-align: left; padding: 16px; border-radius: 16px; background: rgba(5,3,14,.32); box-shadow: inset 0 0 0 1px var(--line); display: flex; gap: 12px; align-items: flex-start; }
.opt:hover { background: rgba(255,255,255,.06); }
.opt.on { background: color-mix(in srgb, var(--a1) 14%, transparent); box-shadow: inset 0 0 0 1.5px var(--a1); }
.opt .radio { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--faint); flex: none; margin-top: 2px; }
.opt.on .radio { box-shadow: inset 0 0 0 5px var(--a1); background: #fff; }
.opt b { display: block; }
.opt small { color: var(--dim); }

.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 12px; }
.theme { padding: 12px; border-radius: 16px; background: rgba(5,3,14,.32); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; position: relative; }
.theme:hover { background: rgba(255,255,255,.06); }
.theme.on { box-shadow: inset 0 0 0 1.5px var(--a1), 0 0 calc(20px * var(--glow)) color-mix(in srgb, var(--a1) 30%, transparent); }
.theme .sw { display: block; width: 100%; height: 54px; border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.theme span { font-weight: 600; font-size: 13px; }
.theme input[type=color] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.bgs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bgopt { padding: 10px; border-radius: 16px; background: rgba(5,3,14,.32); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 8px; }
.bgopt:hover { background: rgba(255,255,255,.06); }
.bgopt.on { box-shadow: inset 0 0 0 1.5px var(--a1); }
.bgopt .pv { display: block; width: 100%; height: 64px; border-radius: 11px; position: relative; overflow: hidden; background: var(--bg); }
.bgopt .pv i { position: absolute; border-radius: 50%; filter: blur(10px); }
.bgopt span { font-weight: 600; font-size: 13px; text-align: left; }
.pv.aurora i:nth-child(1) { width: 70%; height: 40%; left: -5%; top: 10%; background: var(--a1); opacity: .7; border-radius: 40%; }
.pv.aurora i:nth-child(2) { width: 60%; height: 30%; right: -10%; top: 35%; background: var(--a3); opacity: .6; border-radius: 40%; }
.pv.nebula i:nth-child(1) { width: 60%; height: 80%; left: 5%; top: 10%; background: var(--a2); opacity: .8; }
.pv.nebula i:nth-child(2) { width: 40%; height: 60%; right: 5%; top: 30%; background: var(--a3); opacity: .6; }
.pv.liquid i:nth-child(1) { width: 140%; height: 70%; left: -20%; top: 55%; background: var(--a1); opacity: .7; border-radius: 45%; }
.pv.liquid i:nth-child(2) { width: 120%; height: 60%; left: -10%; top: 72%; background: var(--a2); opacity: .9; border-radius: 45%; }
.pv.off i:nth-child(1) { width: 60%; height: 60%; left: 20%; top: 20%; background: var(--a2); opacity: .45; }
.pv.nebula::after { content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent),
  radial-gradient(1px 1px at 50% 70%, #fff, transparent), radial-gradient(1px 1px at 85% 60%, #fff, transparent), radial-gradient(1px 1px at 35% 85%, #fff, transparent); }

.res { display: flex; align-items: center; gap: 8px; }
.res .input { width: 90px; text-align: center; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; }
.kv dt { color: var(--dim); }
.kv dd { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; user-select: text; }

/* ------------------------------------------------ modal */
.modal-root { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 40px; }
.modal-root.show { display: flex; }
.modal-root .scrim { position: absolute; inset: 0; background: rgba(4,2,10,.55); backdrop-filter: blur(6px); }
body.anim .modal-root.show .scrim { animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.dlg { position: relative; width: min(640px, 100%); max-height: 100%; display: flex; flex-direction: column; background:
  linear-gradient(150deg, rgba(255,255,255,.12), rgba(255,255,255,.02) 40%), var(--glass-strong); }
body.anim .modal-root.show .dlg { animation: pop .28s cubic-bezier(.2,1.2,.4,1); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97); } }
.dlg.sm { width: min(440px, 100%); }
.dlg header { padding: 22px 24px 4px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.dlg header h2 { font-size: 20px; }
.dlg .body { padding: 16px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.dlg footer { padding: 14px 24px 22px; display: flex; justify-content: flex-end; gap: 10px; }
.vfilters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vfilters .input { flex: 1; min-width: 160px; }
.vlist { height: 260px; overflow-y: auto; border-radius: 14px; background: rgba(5,3,14,.36); box-shadow: inset 0 0 0 1px var(--line); padding: 6px; }
.vlist button { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; border-radius: 10px; text-align: left; }
.vlist button:hover { background: rgba(255,255,255,.06); }
.vlist button.on { background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 40%, transparent), color-mix(in srgb, var(--a2) 35%, transparent)); color: #fff; }
.vlist b { font-weight: 600; }
.vlist small { color: var(--dim); }
.vlist button.on small { color: rgba(255,255,255,.8); }
.vlist .tag { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.08); margin-left: 8px; color: var(--dim); }
.vlist .msg { padding: 30px; text-align: center; color: var(--dim); }
.check { display: flex; align-items: center; gap: 10px; color: var(--dim); }

/* popover menu */
.pop { position: fixed; z-index: 30; min-width: 240px; max-height: 320px; overflow-y: auto; padding: 6px; border-radius: 16px; background:
  linear-gradient(150deg, rgba(255,255,255,.12), rgba(255,255,255,.02)), var(--glass-strong); }
body.anim .pop { animation: pop .18s ease-out; }
.pop button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; }
.pop button:hover { background: rgba(255,255,255,.08); }
.pop button.on { background: color-mix(in srgb, var(--a1) 25%, transparent); }
.pop .tile { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.pop small { color: var(--dim); display: block; }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 40;
  padding: 12px 18px; border-radius: 14px; max-width: 520px; display: flex; gap: 10px; align-items: center;
  background: linear-gradient(150deg, rgba(255,255,255,.12), rgba(255,255,255,.02)), var(--glass-strong); backdrop-filter: blur(24px);
  box-shadow: inset 0 0 0 1px var(--line), 0 14px 40px rgba(0,0,0,.4); transition: opacity .2s, transform .25s cubic-bezier(.2,1.3,.4,1); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err .dot { color: var(--bad); }
.toast.ok .dot { color: var(--good); }
.toast .dot { color: var(--a1); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.24); }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------ mods */
.target { display: flex; align-items: center; gap: 10px; }
.target span { color: var(--dim); font-size: 13px; white-space: nowrap; }
.target select { width: 260px; }
.mtabs { margin-bottom: 14px; }
.seg .count { margin-left: 2px; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgba(255,255,255,.12); }
.mbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; }
.msearch { flex: 1; position: relative; }
.msearch svg { position: absolute; left: 14px; top: 12px; color: var(--faint); }
.msearch .input { padding-left: 42px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.mod { padding: 16px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s; }
body.anim .mod:hover { transform: translateY(-2px); }
.mtop { display: flex; gap: 12px; align-items: center; }
.mtop .t { min-width: 0; flex: 1; }
.mtop b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mtop small { color: var(--dim); font-size: 12px; }
.micon { width: 46px; height: 46px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; font-weight: 700;
  background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); }
.micon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.micon.gs { color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.mod p { color: var(--dim); font-size: 13px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 38px; }
.mtags { display: flex; gap: 6px; flex-wrap: wrap; }
.mtags .chip { height: 22px; font-size: 11px; text-transform: capitalize; background: rgba(255,255,255,.07); color: var(--dim); }
.mtags .chip.accent { color: #fff; background: color-mix(in srgb, var(--a1) 30%, transparent); }
.mfoot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.mfoot .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.mfoot .muted svg { width: 15px; height: 15px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 18px 0 4px; }
.mlist { display: flex; flex-direction: column; gap: 10px; }
.mrow { display: flex; align-items: center; gap: 14px; padding: 12px 16px; }
.mrow .micon { width: 40px; height: 40px; border-radius: 11px; }
.mrow .grow { flex: 1; min-width: 0; }
.mrow .grow b { font-weight: 600; margin-right: 8px; }
.mrow .grow .chip { height: 20px; font-size: 11px; }
.mrow .grow small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow.off { opacity: .55; }
.mods-empty .row.center { justify-content: center; margin-top: 18px; }
.preset { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.preset[hidden], .vlist[hidden], .field[hidden] { display: none; }

/* ---------- mod updates */
.upbar { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 16%, transparent), color-mix(in srgb, var(--a2) 8%, transparent)); }
.upbar .grow { flex: 1; min-width: 0; }
.upbar b { display: block; font-weight: 640; }
.upbar small { color: var(--dim); font-size: 12px; }
.mrow.has-up { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 55%, transparent), 0 0 22px -8px var(--a1); }
.upto { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; color: var(--good); font-weight: 600; }
.upto svg { width: 12px; height: 12px; }

/* ---------- skins */
.skwrap { display: grid; grid-template-columns: minmax(300px, 360px) 1fr; gap: 16px; align-items: start; }
.skstage { padding: 16px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; }
.sktop { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sktop b { display: block; font-size: 16px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sktop small { color: var(--dim); font-size: 12px; }
.seg.sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }
.skview { height: 350px; border-radius: 16px; overflow: hidden; cursor: grab;
  background: radial-gradient(ellipse at 50% 85%, color-mix(in srgb, var(--a1) 30%, transparent), transparent 60%), rgba(5,3,14,.35);
  box-shadow: inset 0 0 0 1px var(--line); }
.skview:active { cursor: grabbing; }
.skcanvas { display: block; }
.skanim { align-self: center; }
.skacts { display: flex; gap: 8px; }
.skacts .btn.primary { flex: 1; }
.skcapes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.skcapes .chip { cursor: pointer; }
.skerr { color: var(--bad, #ff8a9b); font-size: 13px; }
.small { font-size: 12.5px; }
.skside { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.skbar { display: flex; align-items: center; justify-content: space-between; }
.skgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; }
.skcard { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px 10px; cursor: pointer; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; }
.skcard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.skcard.on { box-shadow: inset 0 0 0 1.5px var(--a1), 0 0 26px -6px var(--a1); }
.skcard canvas { width: 48px; height: 96px; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.skcard canvas.bad { opacity: .2; }
.skname { font-size: 12px; color: var(--dim); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skx { position: absolute; top: 6px; right: 8px; width: 20px; height: 20px; line-height: 18px; border-radius: 50%; color: var(--dim); font-size: 15px; }
.skx:hover { background: rgba(255,80,110,.25); color: #fff; }
.skcopy { display: flex; flex-direction: column; gap: 10px; }
.skcopy .row .input { flex: 1; min-width: 160px; }
@media (max-width: 980px) { .skwrap { grid-template-columns: 1fr; } .skstage { position: static; } }

@media (max-width: 1100px) { .home { grid-template-columns: 1fr; } .hero { grid-row: auto; } .bgs { grid-template-columns: repeat(2, 1fr); } }
body:not(.anim) *, body:not(.anim) *::before, body:not(.anim) *::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
#sktabs button { white-space: nowrap; }
/* capes: account capes + Cosmetica client capes */
.skcapebox { display: flex; flex-direction: column; gap: 12px; }
.skcapebox .skbar { gap: 12px; flex-wrap: wrap; }
.skcapebox .skbar a { color: var(--a1); text-decoration: none; }
.skcapegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.skcape { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 6px 10px; cursor: pointer; color: var(--ink);
  transition: transform .15s ease, box-shadow .15s ease; }
.skcape:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.22); }
.skcape.on { box-shadow: inset 0 0 0 1.5px var(--a1), 0 0 26px -6px var(--a1); }
.skcape canvas { width: 40px; height: 64px; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.skcape img { width: 64px; height: 72px; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.skcape canvas.bad { opacity: .2; }
.skcape .nocape { width: 40px; height: 64px; display: grid; place-items: center; border-radius: 8px; border: 1px dashed rgba(255,255,255,.22); color: var(--dim); }
.skby { font-size: 11px; color: var(--dim); opacity: .8; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.skbadge { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--a1) 35%, transparent); color: #fff; }
.skcurcz { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.skcurcz > span { flex: 1; min-width: 160px; }
.skcapeline { display: flex; align-items: center; gap: 8px; }
.skcapeline > span { flex: 1; }
.skcapeline svg { width: 14px; height: 14px; }
.skcape .skname { white-space: normal; text-align: center; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; min-height: 30px; }

/* one-time pin hint after setup */
.pin-hint{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:60;display:flex;align-items:center;gap:14px;
  padding:12px 14px 12px 18px;border-radius:16px;max-width:620px;color:#f2eaff;
  background:linear-gradient(135deg,rgba(185,140,255,.22),rgba(70,40,140,.32));border:1px solid rgba(210,180,255,.38);
  backdrop-filter:blur(18px) saturate(140%);box-shadow:inset 0 1px 0 rgba(255,255,255,.18),0 14px 40px rgba(10,4,30,.55);
  animation:pinIn .35s ease;transition:opacity .3s,transform .3s}
.pin-hint b{white-space:nowrap}
.pin-hint span{opacity:.8;font-size:13px}
.pin-hint em{font-style:normal;color:#d9c4ff;font-weight:600}
.pin-hint.out{opacity:0;transform:translate(-50%,8px)}
@keyframes pinIn{from{opacity:0;transform:translate(-50%,10px)}to{opacity:1;transform:translate(-50%,0)}}

/* premium */
.premium .row .input { flex: 1; }
.input.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.perks { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--dim); }
.mcchat { font-family: ui-monospace, Consolas, monospace; font-size: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,.45);
  text-shadow: 2px 2px 0 rgba(0,0,0,.6); white-space: pre-wrap; line-height: 20px; }
.mcbadge { width: 16px; height: 16px; margin: 0 6px 0 0; border-radius: 4px; vertical-align: -3px; }
.cpick { width: 44px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; margin-right: 12px; }
.cpick:disabled { opacity: .35; cursor: default; }
.setting .r input.input#pmName { width: 240px; }
/* cosmetic fit sliders (Capes tab) */
.skfit .seg { align-self: flex-start; flex-wrap: wrap; }
.skfitrow { display: grid; grid-template-columns: 70px 1fr 54px; align-items: center; gap: 10px; font-size: 13px; }
.skfitrow input[type=range] { width: 100%; accent-color: var(--a1); }
.skfitrow b { text-align: right; font-variant-numeric: tabular-nums; color: var(--a1); }
.skfit .skacts { align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------ messages (sidebar page + its own window) */
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center;
  font: 700 11px/1 inherit; font-style: normal; color: #fff; background: linear-gradient(135deg, #ff6fb5, #d1366b); box-shadow: 0 0 12px rgba(255,111,181,.45); }
.msgpage { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.msgpage .m-host { flex: 1; min-height: 460px; overflow: hidden; border-radius: var(--r); }
.m-host { position: relative; }
.m-app { position: relative; display: flex; height: 100%; min-height: 0; container-type: inline-size; }
.m-side { width: 290px; flex: none; display: flex; flex-direction: column; gap: 12px; padding: 16px 12px 12px 16px; border-right: 1px solid var(--line); min-height: 0; }
.m-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.m-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 600; display: block; margin-bottom: 6px; }
.m-label small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.m-addrow { display: flex; gap: 8px; }
.m-addrow .input { flex: 1; min-width: 0; height: 36px; }
.m-addrow .btn { height: 36px; }
.m-search { position: relative; }
.m-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.m-search .input { width: 100%; height: 36px; padding-left: 36px; }
.m-lists { flex: 1; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; display: flex; flex-direction: column; gap: 2px; }
.m-sec { display: flex; align-items: center; gap: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 600; padding: 12px 6px 6px; }
.m-sec span { color: var(--dim); background: rgba(255,255,255,.07); border-radius: 8px; padding: 1px 7px; letter-spacing: 0; }
.m-sec .m-ico { margin-left: auto; }
.m-pro { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-style: normal; letter-spacing: 0; text-transform: none; color: var(--warn); }
.m-pro svg { width: 13px; height: 13px; }
.m-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: 12px; text-align: left; color: var(--ink); transition: background .15s; }
button.m-row:hover, label.m-row:hover { background: rgba(255,255,255,.06); }
.m-row.on { background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 28%, transparent), color-mix(in srgb, var(--a2) 18%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14); }
.m-row.off { opacity: .55; }
.m-who { flex: 1; min-width: 0; }
.m-who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-who small { display: block; color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-avwrap { position: relative; flex: none; }
.m-av { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; flex: none; font-weight: 700;
  background: linear-gradient(135deg, var(--a1), var(--a2)); color: #fff; image-rendering: pixelated; }
.m-av img { width: 100%; height: 100%; display: block; }
.m-av.sm { width: 30px; height: 30px; border-radius: 9px; }
.m-av.group { border-radius: 50%; font-size: 12px; letter-spacing: .02em; background: linear-gradient(135deg, var(--a3), var(--a2)); }
.m-av.group svg { width: 18px; height: 18px; }
.m-dot { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #5d566f; border: 2.5px solid #17112a; }
.m-dot.on { background: var(--good); box-shadow: 0 0 8px rgba(95,227,161,.6); }
.m-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #ff6fb5, #d1366b); }
.m-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--dim); flex: none; transition: background .15s, color .15s; }
.m-ico svg { width: 16px; height: 16px; }
.m-ico:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.m-ico.good:hover { background: rgba(95,227,161,.18); color: var(--good); }
.m-ico.danger:hover { background: rgba(255,80,110,.2); color: #ffd2d9; }
.m-ico.sm { width: 22px; height: 22px; border-radius: 7px; }
.m-ico.sm svg { width: 14px; height: 14px; }
.m-upsell { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 2px 4px 4px; padding: 12px; border-radius: 12px; font-size: 13px; color: var(--dim);
  background: color-mix(in srgb, var(--warn) 8%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 22%, transparent); }
.m-upsell > svg { width: 16px; height: 16px; color: var(--warn); }
.m-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--dim); padding: 24px 12px; flex: 1; }
.m-empty b { color: var(--ink); font-weight: 600; }
.m-empty.small { flex: none; padding: 8px 8px 10px; font-size: 13px; align-items: flex-start; text-align: left; }
.m-empty.bad b { color: #ffd2d9; }
.m-empty .btn { margin-top: 6px; }
.m-spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.15); border-top-color: var(--a1); animation: mspin .8s linear infinite; }
@keyframes mspin { to { transform: rotate(360deg); } }
.m-me { display: flex; align-items: center; gap: 10px; padding: 10px 8px 2px; border-top: 1px solid var(--line); }
.m-me:empty { display: none; }
.m-blank { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--dim); padding: 30px; height: 100%; }
.m-blank > svg { width: 44px; height: 44px; color: var(--a1); opacity: .8; stroke-width: 1.4; }
.m-blank b { color: var(--ink); font-size: 17px; font-weight: 620; }
.m-blank span { max-width: 340px; }
.m-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.m-head .m-who b { font-size: 15px; }
.m-back { display: none; }
.m-body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px 8px; display: flex; flex-direction: column; gap: 2px; user-select: text; }
.m-day { align-self: center; margin: 14px 0 8px; font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.m-msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 78%; margin-top: 8px; }
.m-msg.grp { margin-top: 2px; }
.m-msg.mine { align-self: flex-end; align-items: flex-end; }
.m-from { font-size: 12px; font-weight: 600; color: var(--a1); margin: 0 4px 3px; }
.m-bub { padding: 8px 13px; border-radius: 16px 16px 16px 6px; background: rgba(255,255,255,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  white-space: pre-wrap; word-break: break-word; line-height: 1.4; }
.m-msg.mine .m-bub { border-radius: 16px 16px 6px 16px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 85%, #000), var(--a2)); }
.m-msg time { font-size: 11px; color: var(--faint); margin: 3px 6px 0; }
.m-compose { display: flex; gap: 8px; padding: 12px 16px 16px; }
.m-compose .input { flex: 1; min-width: 0; }
.m-compose .btn { width: 46px; padding: 0; justify-content: center; }
.m-panel { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.m-panel > .input { width: 100%; }
.m-panel > .btn { align-self: flex-start; margin-top: 4px; }
.m-pick { display: flex; flex-direction: column; gap: 2px; }
.m-row.pick { cursor: pointer; }
.m-row.pick input { position: absolute; opacity: 0; pointer-events: none; }
.m-row.pick.off { cursor: default; }
.m-tick { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.25); color: transparent; flex: none; }
.m-tick svg { width: 14px; height: 14px; stroke-width: 2.6; }
.m-row.pick:has(input:checked) .m-tick { background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: none; color: #fff; }
.m-row.pick:has(input:focus-visible) { outline: 2px solid var(--a1); outline-offset: -2px; }
.m-note { position: absolute; left: 50%; bottom: 76px; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; z-index: 5; max-width: 80%;
  padding: 9px 16px; border-radius: 12px; background: var(--glass-strong); backdrop-filter: blur(18px); box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px var(--line);
  transition: opacity .2s, transform .2s; font-size: 13px; }
.m-note.show { opacity: 1; transform: translate(-50%, 0); }
.m-note.bad { color: #ffd2d9; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,107,129,.35); }
/* narrow (small Messages window): show the list or the chat, like a phone */
@container (max-width: 640px) {
  .m-side { width: 100%; border-right: 0; padding-right: 16px; }
  .m-chat { display: none; }
  .m-app.has-open .m-side { display: none; }
  .m-app.has-open .m-chat { display: flex; }
  .m-back { display: grid; }
}
/* its own window */
body.msgwin .shell.solo { padding: 0 12px 12px; }
body.msgwin .m-host { flex: 1; border-radius: var(--r); overflow: hidden; position: relative;
  background: linear-gradient(150deg, rgba(255,255,255,.08), rgba(255,255,255,.02) 40%, rgba(255,255,255,.03)), var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(170%); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 18px 50px rgba(0,0,0,.35), inset 0 0 0 1px var(--line); }
.wc #wpin.on { color: var(--a1); background: color-mix(in srgb, var(--a1) 16%, transparent); }
.wc #wpin svg path { fill: none; }
.wc #wpin.on svg path:first-child { fill: currentColor; }
.unread-pill { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, #ff6fb5, #d1366b); }

/* ---------------------------------------------------------------- voice + video calls (Messages window) */
.m-me .m-ico.sm { margin-left: auto; }
.call-btn { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--ink); flex: none;
  background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1); transition: background .15s, transform .1s, filter .15s; }
.call-btn svg, .call-corner svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.call-btn:hover { background: rgba(255,255,255,.18); }
.call-btn:active { transform: scale(.95); }
.call-btn.off { background: #f2eeff; color: #1a1230; }
.call-btn.red { background: #e5484d; color: #fff; box-shadow: none; }
.call-btn.red:hover { filter: brightness(1.12); }
.call-btn.green { background: #2fb36d; color: #fff; box-shadow: none; }
.call-btn.green:hover { filter: brightness(1.12); }
.call-btn.wide { width: 64px; border-radius: 23px; }
.call-btn.sm { width: 34px; height: 34px; }
.call-btn.sm svg { width: 16px; height: 16px; }
.call-av { width: 96px; height: 96px; border-radius: 22px; image-rendering: pixelated; box-shadow: 0 10px 40px rgba(0,0,0,.45); }

/* incoming call card */
.call-ring { position: fixed; top: 56px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 12px; border-radius: 20px; background: rgba(18,13,34,.94); backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,.55), inset 0 0 0 1px color-mix(in srgb, var(--a1) 45%, transparent); animation: callIn .25s ease-out; }
.call-ring .call-av { width: 48px; height: 48px; border-radius: 12px; animation: callPulse 1.4s ease-in-out infinite; }
.call-ring-txt { display: flex; flex-direction: column; min-width: 120px; margin-right: 6px; }
.call-ring-txt b { font-size: 15px; } .call-ring-txt span { font-size: 12px; color: var(--dim); }
@keyframes callIn { from { opacity: 0; transform: translate(-50%, -10px); } }
@keyframes callPulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--a1) 35%, transparent); } }

/* full call view (covers the Messages window under the title bar) */
.call-full { position: fixed; inset: 42px 0 0 0; z-index: 50; display: flex; flex-direction: column; background: rgba(8,5,16,.96); }
.call-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.call-stage > video#callRemoteV { width: 100%; height: 100%; object-fit: contain; background: #000; }
.call-who { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.call-who b { font-size: 20px; } .call-who span { color: var(--dim); font-variant-numeric: tabular-nums; }
.call-who em, .call-tag svg { display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-size: 12px; color: #ffd2d9; }
.call-who em svg, .call-tag svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.call-tag { position: absolute; left: 14px; top: 12px; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.5); font-size: 13px; font-variant-numeric: tabular-nums; }
.call-tag span { color: var(--dim); }
.call-self { position: absolute; right: 14px; bottom: 14px; width: min(28%, 240px); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px;
  background: #000; box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.15); }
.call-self.mirror, .call-prev.mirror { transform: scaleX(-1); }
.call-corner { position: absolute; right: 12px; top: 12px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: var(--ink); background: rgba(0,0,0,.45); }
.call-corner:hover { background: rgba(255,255,255,.15); }
.call-bar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-top: 1px solid var(--line); }
.call-meter { width: 60px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; margin-right: 6px; }
.call-meter i { display: block; height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #2fb36d, #c6f26b); transition: width .06s; }
.call-meter.big { width: 100%; height: 8px; margin: 0; }

/* shrunk call: floats over the chat so you can keep typing */
.call-mini { position: fixed; right: 16px; bottom: 84px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 8px;
  border-radius: 16px; background: rgba(18,13,34,.94); backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px rgba(0,0,0,.5), inset 0 0 0 1px color-mix(in srgb, var(--a1) 40%, transparent); }
.call-mini .call-av { width: 34px; height: 34px; border-radius: 9px; box-shadow: none; }
.call-mini video { width: 96px; height: 54px; border-radius: 8px; object-fit: cover; background: #000; }
.call-mini-info { display: flex; flex-direction: column; text-align: left; padding: 0 6px; min-width: 70px; color: var(--ink); }
.call-mini-info b { font-size: 13px; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-mini-info span { font-size: 11px; color: var(--good, #5fe3a1); font-variant-numeric: tabular-nums; }

.call-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 10px); opacity: 0; pointer-events: none; z-index: 70; max-width: 80%;
  padding: 10px 16px; border-radius: 12px; background: rgba(18,13,34,.96); font-size: 13px; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px var(--line); transition: opacity .2s, transform .2s; }
.call-toast.show { opacity: 1; transform: translate(-50%, 0); }
.call-toast.bad { color: #ffd2d9; box-shadow: 0 10px 30px rgba(0,0,0,.4), inset 0 0 0 1px rgba(255,107,129,.35); }

/* call settings */
.call-set-back { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(4,2,10,.6); backdrop-filter: blur(4px); }
.call-set { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 70px); display: flex; flex-direction: column; border-radius: 18px;
  background: rgba(20,15,38,.98); box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 0 0 1px var(--line); }
.call-set header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.call-set header b { font-size: 16px; }
.call-set header svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.call-set-body { overflow-y: auto; padding: 4px 16px 16px; }
.call-set section { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.call-set section:last-child { border-bottom: 0; }
.call-set h4 { display: flex; align-items: center; gap: 8px; margin: 4px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); }
.call-set h4 svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.call-f { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); }
.call-f > span:first-child { display: flex; justify-content: space-between; }
.call-f em { font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; }
.call-f .input { height: 38px; color: var(--ink); }
.call-f input[type=range] { width: 100%; accent-color: var(--a1); }
.call-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.call-sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
.call-sw span { display: flex; flex-direction: column; } .call-sw small { color: var(--faint); font-size: 12px; }
.call-prev { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; background: #000; object-fit: cover; }
.call-note { margin: 0; font-size: 12px; color: var(--faint); line-height: 1.5; }


/* ---------------------------------------------------------------- messages polish (v0.9.8) */
.m-side { gap: 10px; }
.m-sidebody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.m-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: rgba(5,3,14,.38); box-shadow: inset 0 0 0 1px var(--line); }
.m-tabs button { flex: 1; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  color: var(--dim); font-weight: 600; font-size: 13px; transition: background .15s, color .15s; }
.m-tabs button svg { width: 16px; height: 16px; }
.m-tabs button:hover { color: var(--ink); background: rgba(255,255,255,.05); }
.m-tabs button.on { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 34%, transparent), color-mix(in srgb, var(--a2) 26%, transparent));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.m-tabs em { font-style: normal; font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, #ff6fb5, #d1366b); color: #fff; }
.m-tabs em:empty { display: none; }
.m-tabs [data-tab="lfg"] em { background: rgba(255,255,255,.14); }
.m-add .m-addrow .btn { padding: 0 12px; }
.m-add .m-addrow .btn svg, .m-addrow .btn svg { width: 15px; height: 15px; }
.m-row { position: relative; }
.m-who b { display: flex; align-items: center; gap: 6px; }
.m-who b > .rk { flex: none; }
.m-who small.hot { color: var(--ink); font-weight: 560; }
.m-badge.soft { background: rgba(255,255,255,.12); color: var(--dim); }
.m-av.cat { background: rgba(255,255,255,.08); color: var(--a1); box-shadow: inset 0 0 0 1px var(--line); }
.m-av.cat svg { width: 18px; height: 18px; }
.m-av.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.m-av.big { width: 64px; height: 64px; border-radius: 18px; margin-bottom: 6px; font-size: 22px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.m-avgap { width: 26px; flex: none; }
.c-dungeons { color: #ff8a8a !important; } .c-kuudra { color: #ffb067 !important; } .c-dragons { color: #c79bff !important; }
.c-slayers { color: #ff6f9c !important; } .c-diana { color: #7fe0a8 !important; } .c-fishing { color: #6fd0ff !important; }
.c-mining { color: #ffd166 !important; } .c-other { color: var(--dim) !important; }
.m-me { padding: 10px 6px 0; gap: 8px; }
.m-me .m-who small { overflow: visible; }
.m-me .m-ico.sm { margin-left: 0; width: 30px; height: 30px; border-radius: 9px; }
.m-me .m-ico.sm svg { width: 17px; height: 17px; }
.m-me .m-ico.on { color: var(--a1); background: color-mix(in srgb, var(--a1) 16%, transparent); }
.m-me .m-who { margin-right: auto; }
.m-ico.on { color: var(--a1); }
.m-head { min-height: 64px; }
.m-head .m-who b { gap: 8px; }
.m-head .m-ico { width: 34px; height: 34px; border-radius: 10px; }
.m-head .m-ico svg { width: 18px; height: 18px; }
.m-msg.withav { flex-direction: row; align-items: flex-end; gap: 8px; }
.m-msg .m-col { display: flex; flex-direction: column; align-items: inherit; min-width: 0; }
.m-msg.withav .m-col { align-items: flex-start; }
.m-msg.mine .m-col { align-items: flex-end; }
.m-msg.grp .m-bub { border-radius: 16px; }
.m-msg.mine.grp .m-bub { border-radius: 16px 6px 6px 16px; }
.m-msg:not(.mine).grp .m-bub { border-radius: 6px 16px 16px 6px; }
.m-msg.mine.tail .m-bub { border-bottom-right-radius: 6px; }
.m-bub a { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.m-msg:not(.mine) .m-bub a { color: var(--a1); }
.m-day { display: flex; align-items: center; gap: 12px; align-self: stretch; }
.m-day::before, .m-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.m-compose { align-items: center; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.m-composebox { position: relative; flex: 1; min-width: 0; }
.m-composebox .input { width: 100%; height: 44px; border-radius: 14px; padding-right: 44px; }
.m-count { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--warn); font-variant-numeric: tabular-nums; pointer-events: none; }
.m-compose .btn { width: 44px; height: 44px; border-radius: 14px; }
.m-compose .btn svg { width: 18px; height: 18px; }
.m-blank .m-addrow.center { justify-content: center; margin-top: 6px; }
.m-chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 600; color: var(--dim);
  background: rgba(255,255,255,.07); white-space: nowrap; }
.m-chip em { font-style: normal; color: var(--ink); }
.btn-chip { height: 30px; padding: 0 12px; border-radius: 10px; font-size: 12.5px; cursor: pointer; transition: background .15s, color .15s; box-shadow: inset 0 0 0 1px var(--line); }
.btn-chip:hover { color: var(--ink); background: rgba(255,255,255,.1); }
.btn-chip.on { color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--a1) 40%, transparent), color-mix(in srgb, var(--a2) 30%, transparent)); box-shadow: inset 0 1px 0 rgba(255,255,255,.16); }
.m-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.m-subs { display: flex; gap: 6px; padding: 10px 16px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.m-panel select.input { appearance: auto; }
.m-voicepick { padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); margin: 4px 0; }
.m-panel .m-addrow .btn { height: 40px; }

/* LFG */
.m-lfgme { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 14px; font-size: 13px; color: var(--dim);
  background: linear-gradient(150deg, color-mix(in srgb, var(--a1) 14%, transparent), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 22%, transparent); }
.m-lfgme > b { color: var(--ink); font-size: 14px; }
.m-lfgme > .btn { align-self: flex-start; }
.m-lfgme.live { background: linear-gradient(150deg, rgba(95,227,161,.12), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px rgba(95,227,161,.28); }
.m-lfglive { display: flex; align-items: center; gap: 10px; }
.m-lfglive span { display: flex; flex-direction: column; min-width: 0; }
.m-lfglive b { color: var(--good); }
.m-lfglive small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--good); flex: none; box-shadow: 0 0 0 0 rgba(95,227,161,.6); animation: mpulse 1.8s ease-out infinite; }
@keyframes mpulse { 70% { box-shadow: 0 0 0 8px rgba(95,227,161,0); } 100% { box-shadow: 0 0 0 0 rgba(95,227,161,0); } }
.m-lfgme .m-addrow .btn { flex: 1; }
.m-row.cat .m-av { font-size: 14px; }
.m-lfglist { gap: 8px; }
.m-lfgcard { display: flex; align-items: flex-start; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px var(--line); transition: background .15s; }
.m-lfgcard:hover { background: rgba(255,255,255,.07); }
.m-lfgcard.me { box-shadow: inset 0 0 0 1px rgba(95,227,161,.3); background: rgba(95,227,161,.06); }
.m-lfgcard .m-avwrap { margin-top: 2px; }
.m-lfgcard .m-av { width: 40px; height: 40px; border-radius: 11px; }
.m-lfgcard .m-who small { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; white-space: normal; overflow: visible; }
.m-lfgcard .m-who p { margin: 7px 0 0; color: var(--ink); font-size: 13px; line-height: 1.4; word-break: break-word; }
.m-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 11px; font-weight: 650; background: rgba(255,255,255,.07); color: var(--dim); }
.m-tag svg { width: 12px; height: 12px; }
.m-tag.vc { color: var(--good); background: rgba(95,227,161,.1); }
.m-ago { font-size: 11px; color: var(--faint); align-self: center; }
.m-lfgacts { display: flex; gap: 4px; flex: none; align-self: center; }
.m-lfgacts .m-ico { width: 34px; height: 34px; background: rgba(255,255,255,.06); }

/* settings */
.m-settings { gap: 12px; }
.m-card { padding: 16px; border-radius: 16px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.m-card h4 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; }
.m-card h4 svg { width: 17px; height: 17px; color: var(--a1); }
.m-card p { margin: 0; color: var(--dim); font-size: 13px; line-height: 1.5; }
.m-card .m-addrow { width: 100%; max-width: 420px; }
.m-card .btn svg { width: 15px; height: 15px; }
.m-rankline { display: flex; align-items: baseline; gap: 10px; }
.m-rankline b { font-size: 26px; font-weight: 720; font-variant-numeric: tabular-nums; }
.m-rankline small { color: var(--faint); }
.m-spin.sm { width: 16px; height: 16px; border-width: 2px; display: inline-block; }
.btn.ghost { background: transparent; }
.input.mono { font-family: ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }

/* rank badges: colored diamond + rank name */
.rk { display: inline-flex; align-items: center; gap: 5px; height: 18px; padding: 0 7px 0 6px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  letter-spacing: .02em; font-style: normal; color: var(--rk); background: color-mix(in srgb, var(--rk) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rk) 30%, transparent); white-space: nowrap; vertical-align: middle; }
.rk i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--rk); border-radius: 1.5px; box-shadow: 0 0 6px var(--rk); flex: none; }
.rk em { font-style: normal; color: var(--ink); opacity: .85; font-variant-numeric: tabular-nums; }
.t1 { --rk: #e0975a; } .t2 { --rk: #c4cddb; } .t3 { --rk: #ffc83d; } .t4 { --rk: #2fe08a; }
.t5 { --rk: #5c9dff; } .t6 { --rk: #b97cff; } .t7 { --rk: #6df0ff; } .t8 { --rk: #ff4040; }
.rk.t8 { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rk) 50%, transparent), 0 0 12px rgba(255,42,42,.35); }
.tc { color: var(--rk); }

/* ---------------------------------------------------------------- leaderboard */
.lbpage .head { margin-bottom: 14px; }
.lb { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.lb .glass { border-radius: var(--r); }
.lb-me { display: grid; grid-template-columns: auto minmax(200px, 280px) 1fr; gap: 20px; align-items: center; padding: 18px 22px; }
.lb-me.empty { display: flex; justify-content: space-between; gap: 16px; padding: 18px 22px; }
.lb-me.empty div { display: flex; flex-direction: column; gap: 4px; }
.lb-me.empty span { color: var(--dim); font-size: 13px; max-width: 640px; line-height: 1.5; }
.lb-logo { display: block; flex: none; }
.lb-logo.big { width: 120px; height: 120px; }
.lb-mewho { display: flex; flex-direction: column; gap: 6px; }
.lb-mewho > small { color: var(--faint); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 600; }
.lb-mewho > b { font-size: 30px; font-weight: 750; font-variant-numeric: tabular-nums; }
.lb-mewho > b span { font-size: 14px; color: var(--dim); font-weight: 500; }
.lb-meline { display: flex; align-items: center; gap: 10px; }
.lb-meline em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-meline em small { color: var(--faint); font-weight: 500; }
.lb-next { color: var(--dim); font-size: 12.5px; }
.lb-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.lb-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--a2), var(--a1)); }
.lb-bar.big { height: 8px; }
.lb-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 18px; }
.lb-part { display: grid; grid-template-columns: 112px 1fr 84px; align-items: center; gap: 10px; font-size: 12.5px; }
.lb-part span { color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-part b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.lb-part b small { color: var(--faint); font-weight: 500; }
.lb-tiers { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.lb-t { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px 12px; border-radius: 16px; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rk) 10%, transparent), rgba(255,255,255,.02)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rk) 20%, transparent); }
.lb-t canvas { width: 64px; height: 64px; }
.lb-t b { font-size: 13px; } .lb-t small { color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.lb-table { padding: 6px 8px 8px; }
.lb-tools { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; }
.lb-search { position: relative; width: 260px; }
.lb-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.lb-search .input { height: 36px; padding-left: 36px; }
.lb-count { color: var(--dim); font-size: 13px; margin-right: auto; }
.lb-tools .btn svg { width: 15px; height: 15px; }
.lb-head, .lb-line { display: grid; grid-template-columns: 52px minmax(0, 1fr) 200px 200px 30px; align-items: center; gap: 12px; }
.lb-head { padding: 0 12px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); font-weight: 600; border-bottom: 1px solid var(--line); }
.lb-row { border-radius: 14px; transition: background .15s; }
.lb-row + .lb-row { margin-top: 2px; }
.lb-row:hover, .lb-row.open { background: rgba(255,255,255,.05); }
.lb-row.mine { background: color-mix(in srgb, var(--a1) 12%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a1) 28%, transparent); }
.lb-line { width: 100%; padding: 8px 12px; text-align: left; color: var(--ink); }
.lb-pos { font-weight: 750; font-size: 16px; color: var(--dim); font-variant-numeric: tabular-nums; text-align: center; }
.lb-row.top1 .lb-pos { color: #ffd75e; } .lb-row.top2 .lb-pos { color: #d7dee9; } .lb-row.top3 .lb-pos { color: #e0975a; }
.lb-row.top .lb-pos { font-size: 19px; }
.lb-av { position: relative; width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, var(--a1), var(--a2)); image-rendering: pixelated; }
.lb-av img { width: 100%; height: 100%; border-radius: 10px; display: block; }
.lb-on { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--good); border: 2px solid #17112a; }
.lb-nm { min-width: 0; }
.lb-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lb-name b { display: block; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-name small { display: block; color: var(--faint); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-tier { display: flex; align-items: center; gap: 8px; }
.lb-tier canvas { width: 40px; height: 40px; }
.lb-score { display: flex; flex-direction: column; gap: 5px; }
.lb-score b { font-variant-numeric: tabular-nums; font-weight: 700; }
.lb-chev { color: var(--faint); display: grid; place-items: center; transition: transform .2s; }
.lb-chev svg { width: 16px; height: 16px; }
.lb-row.open .lb-chev { transform: rotate(180deg); }
.lb-row > .lb-parts { padding: 4px 54px 14px 76px; }
.lb-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 30px; color: var(--dim); text-align: center; }
.lb-empty.bad b { color: #ffd2d9; }
.lb-how { padding: 14px 20px; }
.lb-how summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; list-style: none; }
.lb-how summary::-webkit-details-marker { display: none; }
.lb-how summary svg { width: 17px; height: 17px; color: var(--a1); }
.lb-how p { color: var(--dim); font-size: 13px; line-height: 1.5; margin: 10px 0; }
.lb-howgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.lb-howgrid div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); box-shadow: inset 0 0 0 1px var(--line); }
.lb-howgrid span { color: var(--dim); font-size: 12px; } .lb-howgrid em { font-style: normal; color: var(--a1); font-size: 12px; font-weight: 650; margin-top: 4px; }
@media (max-width: 1150px) {
  .lb-me { grid-template-columns: auto 1fr; } .lb-me .lb-parts { grid-column: 1 / -1; }
  .lb-tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lb-head, .lb-line { grid-template-columns: 44px minmax(0, 1fr) 160px 150px 24px; }
}
.m-lfgme #mLfgEdit { color: var(--ink); }

/* ---------------------------------------------------------------- notification bell (v0.9.9) */
.tb-right { display: flex; align-items: center; height: 100%; }
.nb { position: relative; -webkit-app-region: no-drag; display: flex; align-items: center; margin-right: 6px; }
.nb-btn { position: relative; width: 38px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--dim);
  transition: background .15s, color .15s; }
.nb-btn svg { width: 18px; height: 18px; }
.nb-btn:hover, .nb.open .nb-btn { background: rgba(255,255,255,.08); color: var(--ink); }
.nb-btn:focus-visible { outline: 2px solid var(--a1); outline-offset: 1px; }
.nb-dot { position: absolute; top: 2px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; font-weight: 700; line-height: 16px;
  font-style: normal; text-align: center; color: #fff; background: linear-gradient(135deg, #ff5d7a, #e0306a); box-shadow: 0 0 0 2px #1a1230, 0 0 10px rgba(255,80,120,.55);
  transform: scale(0); transition: transform .18s; pointer-events: none; }
.nb-dot.on { transform: scale(1); }
.nb-pop { position: absolute; top: calc(100% + 8px); right: -4px; width: 372px; max-height: min(520px, calc(100vh - 80px)); display: flex; flex-direction: column;
  z-index: 60; border-radius: 18px; background: rgba(22, 16, 42, .92); box-shadow: 0 18px 50px rgba(0,0,0,.5), inset 0 0 0 1px var(--line);
  backdrop-filter: blur(22px) saturate(1.3); overflow: hidden; animation: nbIn .16s ease-out; }
.nb-pop[hidden] { display: none; }
@keyframes nbIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.nb-pop header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.nb-pop header b { font-size: 15px; }
.nb-pop header > span { display: flex; gap: 4px; }
.nb-act { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--dim); }
.nb-act svg { width: 14px; height: 14px; }
.nb-act:hover { background: rgba(255,255,255,.08); color: var(--ink); }
.nb-act[disabled] { opacity: .4; pointer-events: none; }
.nb-list { overflow-y: auto; padding: 6px; }
.nb-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 12px; cursor: pointer; position: relative; }
.nb-row:hover, .nb-row:focus-visible { background: rgba(255,255,255,.06); outline: none; }
.nb-row.new::before { content: ""; position: absolute; left: 3px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--a1); box-shadow: 0 0 8px var(--a1); }
.nb-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: color-mix(in srgb, var(--a1) 40%, transparent); }
.nb-ic svg { width: 17px; height: 17px; }
.nb-ic.k-friend { background: rgba(72, 196, 140, .32); color: #b9f5d8; }
.nb-ic.k-call { background: rgba(255, 92, 120, .3); color: #ffc9d3; }
.nb-ic.k-mods { background: rgba(90, 160, 255, .3); color: #cfe2ff; }
.nb-ic.k-update { background: rgba(255, 190, 80, .28); color: #ffe6b8; }
.nb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nb-txt b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nb-txt b i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: rgba(255,255,255,.12); margin-left: 4px; }
.nb-row:not(.new) .nb-txt b { color: var(--dim); font-weight: 550; }
.nb-txt small { font-size: 12.5px; color: var(--dim); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.nb-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.nb-side time { font-size: 11px; color: var(--faint); }
.nb-x { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--faint); opacity: 0; transition: opacity .12s; }
.nb-x svg { width: 13px; height: 13px; }
.nb-row:hover .nb-x, .nb-row:focus-within .nb-x { opacity: 1; }
.nb-x:hover { background: rgba(255,255,255,.1); color: var(--ink); }
.nb-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 26px 38px; color: var(--dim); font-size: 13px; }
.nb-empty svg { width: 30px; height: 30px; color: var(--faint); margin-bottom: 4px; }
.nb-empty b { color: var(--ink); font-size: 14px; }
/* call settings: test buttons */
.call-row2 .btn svg { width: 16px; height: 16px; flex: none; }
