/* ==========================================================================
   КОНТРЛВЕ — панель бота (прототип, без логіки бота)
   1. Змінні та база      5. Форми й перемикачі
   2. Каркас і меню       6. Таблиці та списки
   3. Шапка сторінки      7. Discord-превʼю
   4. Картки й сітки      8. Панель «Зберегти», тост, адаптив
   ========================================================================== */

/* 1. Змінні та база ------------------------------------------------------- */
:root {
  --bg: #160730;
  --side: #120524;
  --card: #1E0B3D;
  --card-2: #2B1055;
  --line: #3A1A6E;
  --line-2: #4A2A80;
  --line-dim: #2E1458;
  --lime: #C8FF4D;
  --lime-soft: #E4FFA3;
  --pink: #FF8AD8;
  --pink-hot: #FF3DB5;
  --gold: #F1C40F;
  --green: #2ECC71;
  --blue: #4DB8FF;
  --twitch: #9146FF;
  --text: #F4EDFF;
  --muted: #CDBDEB;
  --dim: #8E7CB3;
  --font-display: 'Unbounded', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --r-lg: 22px;
  --r-md: 14px;
  --spring: cubic-bezier(.3, 1.6, .5, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px; }
h1, h2, h3, p { margin: 0; }
a { color: var(--lime); }
a:hover { color: var(--lime-soft); }
button { font: inherit; color: inherit; }
::selection { background: var(--lime); color: var(--bg); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 12px; }
.hint { font-size: 12px; color: var(--dim); line-height: 1.45; }

/* 2. Каркас і меню -------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; width: 264px; flex: none; padding: 22px 16px; overflow-y: auto;
  background: var(--side); border-right: 1px solid var(--line-dim); display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand svg { width: 38px; height: 38px; transition: transform .4s var(--spring); }
.brand:hover svg { transform: rotate(-10deg) scale(1.1); }
.brand b { display: block; font: 800 15px var(--font-display); letter-spacing: .5px; }
.brand small { font: 500 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); }
.status { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-dim); }
.status b { display: block; font-size: 13px; }
.status small { font-size: 12px; color: var(--dim); }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); flex: none; animation: live 1.8s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(200,255,77,.6) } 70% { box-shadow: 0 0 0 8px rgba(200,255,77,0) } 100% { box-shadow: 0 0 0 0 rgba(200,255,77,0) } }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav__label { padding: 0 12px 6px; font: 500 11px var(--font-mono); letter-spacing: 2px; color: var(--dim); }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px;
  color: #D9CCF2; text-decoration: none; font-weight: 600; transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a span { flex-grow: 1; }
.nav a:hover { background: var(--card); color: var(--text); transform: translateX(3px); }
.nav a[aria-current="page"] { background: var(--lime); color: var(--bg); }
.nav a[aria-disabled="true"] { opacity: .45; }
.nav em { padding: 2px 8px; border-radius: 999px; background: var(--pink); color: var(--bg); font: 700 11px var(--font-body); font-style: normal; }
.migr { margin-top: auto; padding: 14px; border-radius: 16px; background: var(--card); border: 1px dashed var(--line-2); display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.migr b { font-size: 13px; color: var(--text); }
.migr__bar { height: 6px; border-radius: 6px; background: var(--line-dim); overflow: hidden; margin-top: 4px; }
.migr__bar i { display: block; height: 100%; width: 25%; border-radius: inherit; background: var(--lime); transition: width .6s ease; }
.me { display: flex; align-items: center; gap: 10px; padding: 4px 8px; }
.me__ava { width: 36px; height: 36px; border-radius: 50%; background: var(--lime); color: var(--bg); display: grid; place-items: center; font: 800 13px var(--font-display); flex: none; }
.me b { display: block; font-size: 14px; }
.me small { font-size: 12px; color: var(--dim); }
.me a { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; color: var(--dim); }
.me a:hover { background: var(--card); color: var(--pink); }

.main { flex-grow: 1; min-width: 0; padding: 28px 40px 120px; display: flex; flex-direction: column; gap: 24px; }
.burger { display: none; }

/* 3. Шапка сторінки ------------------------------------------------------- */
.top { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.top__titles { flex-grow: 1; display: flex; flex-direction: column; gap: 4px; }
.eyebrow { font: 500 12px var(--font-mono); letter-spacing: 2px; color: var(--lime); }
.eyebrow--pink { color: var(--pink); }
.h1 { font: 800 32px/1.15 var(--font-display); letter-spacing: -.5px; }
.h2 { font: 800 18px var(--font-display); }
.h3 { font: 800 16px var(--font-display); }
.search {
  display: flex; align-items: center; gap: 10px; height: 46px; width: 320px; max-width: 100%; padding: 0 16px;
  border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--muted);
}
.search:focus-within { border-color: var(--lime); }
.search input { flex-grow: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 500 14px var(--font-body); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid transparent; font: 700 14px var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--spring), background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; }
.btn--lime { background: var(--lime); color: var(--bg); }
.btn--lime:hover { background: var(--lime-soft); color: var(--bg); }
.btn--ghost { border-color: var(--line-2); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--lime); color: var(--lime); }
.btn--pink { border-color: var(--pink); color: var(--pink); background: transparent; }
.btn--pink:hover { background: var(--pink); color: var(--bg); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 13px; }
.btn--block { width: 100%; min-height: 52px; font-size: 16px; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; transition: all .2s ease;
}
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn--lime { color: var(--lime); } .icon-btn--lime:hover { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.icon-btn--pink { color: var(--pink); } .icon-btn--pink:hover { background: var(--pink); color: var(--bg); border-color: var(--pink); }

/* 4. Картки й сітки ------------------------------------------------------- */
.card { padding: 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.card--flush { padding: 0; gap: 0; overflow: hidden; }
.card--accent { background: var(--card-2); border-color: var(--lime); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card--flush .card__head { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 24px; align-items: start; }
.grid--side { grid-template-columns: minmax(0, 1fr) 380px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; }

.server { display: flex; align-items: center; gap: 22px; padding: 22px 26px; border-radius: 26px; background: var(--card-2); border: 1px solid var(--line-2); flex-wrap: wrap; }
.server__logo { width: 72px; height: 72px; padding: 8px; border-radius: 22px; background: var(--card); flex: none; }
.server__name { font: 800 20px var(--font-display); }
.server__info { flex-grow: 1; min-width: 260px; display: flex; flex-direction: column; gap: 6px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; flex-grow: 1; min-width: 480px; }
.stat { padding: 12px 14px; border-radius: 16px; background: var(--card); display: flex; flex-direction: column; gap: 2px; transition: transform .25s var(--spring); }
.stat:hover { transform: translateY(-3px); }
.stat b { font: 800 22px var(--font-display); }
.stat span { font-size: 12px; color: var(--dim); }

/* Модулі */
.mods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mod { padding: 20px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; transition: border-color .25s ease, transform .25s ease, opacity .25s ease; }
.mod:hover { transform: translateY(-3px); border-color: var(--lime); }
.mod.is-off { border-color: var(--line-dim); }
.mod.is-off .mod__icon { background: var(--line-2); color: var(--muted); }
.mod.is-off .mod__desc { opacity: .6; }
.mod__top { display: flex; align-items: center; gap: 12px; }
.mod__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--lime); color: var(--bg); transition: background .25s ease; }
.mod--new .mod__icon { background: var(--pink); }
.mod__icon svg { width: 22px; height: 22px; }
.mod__name { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mod__name b { font-size: 16px; }
.mod__name small { font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--muted); }
.mod--new .mod__name small { color: var(--pink); }
.mod__desc { font-size: 14px; line-height: 1.5; color: var(--muted); transition: opacity .25s ease; }
.mod__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mod__foot a { font-weight: 700; text-decoration: none; font-size: 14px; }

.tier { padding: 18px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; transition: transform .25s var(--spring); }
.tier:hover { transform: translateY(-4px); }
.tier b { font-size: 15px; }
.tier strong { font: 800 clamp(17px, 1.6vw, 22px) var(--font-display); }
.tier span { font-size: 13px; color: var(--dim); }

/* Бейджі */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge--lime { background: var(--lime); color: var(--bg); }
.badge--pink { background: var(--pink); color: var(--bg); }
.badge--hot { background: var(--pink-hot); color: #fff; }
.badge--line { border: 1px solid var(--line-2); color: var(--muted); }
.badge--ok { background: rgba(200,255,77,.16); color: var(--lime); }
.badge--warn { background: rgba(255,61,181,.18); color: var(--pink); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 13px; }
.chip button { width: 18px; height: 18px; border: 0; padding: 0; background: none; color: var(--dim); cursor: pointer; display: grid; place-items: center; border-radius: 50%; }
.chip button:hover { color: var(--pink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.var { padding: 4px 10px; border-radius: 8px; background: var(--card-2); border: 0; font: 500 12px var(--font-mono); color: var(--lime); cursor: pointer; }
.var:hover { background: var(--lime); color: var(--bg); }

/* 5. Форми й перемикачі --------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; font-weight: 500; color: var(--text); }
.input, .select, .textarea {
  min-height: 44px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--card-2);
  color: var(--text); font: 500 15px var(--font-body); outline: none; transition: border-color .2s ease, box-shadow .2s ease;
}
.textarea { padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select { padding: 0 10px; cursor: pointer; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,77,.12); }
.input--mono { font-family: var(--font-mono); font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--lime); cursor: pointer; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 20px; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.dropzone { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; border-radius: var(--r-md); border: 2px dashed var(--line-2); color: var(--dim); font-weight: 600; cursor: pointer; transition: border-color .2s ease, color .2s ease; }
.dropzone:hover, .dropzone.is-over { border-color: var(--lime); color: var(--lime); }
.dropzone svg { width: 20px; height: 20px; }
.dropzone input { display: none; }

/* Перемикач */
.switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--line); transition: background .25s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--dim); transition: transform .3s var(--spring), background .25s ease; }
.switch[aria-pressed="true"] { background: var(--lime); }
.switch[aria-pressed="true"]::after { transform: translateX(22px); background: var(--bg); }

/* Сегменти (вибір одного з кількох) */
.seg { display: grid; gap: 8px; }
.seg--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg button {
  min-height: 44px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line-2); background: transparent;
  color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .2s ease; text-align: center;
}
.seg button:hover { border-color: var(--c, var(--lime)); }
.seg button[aria-pressed="true"] { border-color: var(--c, var(--lime)); color: var(--c, var(--lime)); background: var(--card); }
.seg--fill button[aria-pressed="true"] { background: var(--lime); color: var(--bg); border-color: var(--lime); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; cursor: pointer; transition: all .2s ease; }
.pills button:hover { border-color: var(--lime); color: var(--text); }
.pills button[aria-pressed="true"], .pills button[aria-selected="true"] { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); }
.tabs button { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; transition: all .2s ease; }
.tabs button[aria-selected="true"] { background: var(--lime); color: var(--bg); }
.swatches { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; transition: transform .2s var(--spring); }
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { border-color: var(--text); }

/* 6. Таблиці та списки ---------------------------------------------------- */
.table { width: 100%; }
.tr { display: grid; grid-template-columns: minmax(120px, 1.3fr) minmax(0, 1.1fr) 76px minmax(0, 1.1fr) 120px 92px; gap: 12px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-dim); font-size: 14px; transition: background .2s ease; }
.tr:hover { background: rgba(43,16,85,.5); }
.tr--head { border-top: 0; padding-block: 12px; font: 500 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); }
.tr--head:hover { background: none; }
.tr.is-gone { opacity: 0; transform: translateX(30px); transition: all .35s ease; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ava { width: 32px; height: 32px; border-radius: 50%; flex: none; }
.who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.left { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bar { height: 6px; border-radius: 6px; background: var(--line-dim); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.bar--hot i { background: var(--pink-hot); }
.acts { display: flex; gap: 6px; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); border-top: 1px solid var(--line-dim); }

.list { display: flex; flex-direction: column; gap: 10px; }
.item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card-2); }
.item__txt { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.item__txt b { font-size: 14px; }
.item__txt small { font-size: 12px; color: var(--dim); }
.feed { display: flex; flex-direction: column; gap: 12px; font-size: 13px; line-height: 1.45; }
.feed div { display: flex; gap: 10px; }
.feed i { width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; flex: none; background: var(--lime); }
.migr-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; font-size: 14px; }
.migr-list small { color: var(--dim); font-size: 13px; }

.reward { display: grid; grid-template-columns: 90px minmax(0, 1fr) 130px 40px; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--card-2); }
.reward strong { font: 800 16px var(--font-display); color: var(--lime); }
.reward .input { min-height: 40px; background: var(--card); }

.source { display: grid; grid-template-columns: 44px minmax(0, 1.6fr) minmax(0, 1fr) 120px 56px; gap: 14px; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line-dim); }
.source__icon { width: 44px; height: 44px; border-radius: 14px; background: #2AABEE; color: #fff; display: grid; place-items: center; }
.source__icon svg { width: 20px; height: 20px; }
.source__name { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.source__name small { font: 500 12px var(--font-mono); color: var(--dim); }
.add-row { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid var(--line-dim); flex-wrap: wrap; }
.prefix { flex-grow: 1; display: flex; align-items: center; gap: 4px; min-width: 240px; min-height: 46px; padding: 0 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--card-2); }
.prefix:focus-within { border-color: var(--lime); }
.prefix span { font: 500 13px var(--font-mono); color: var(--dim); }
.prefix input { flex-grow: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 600 14px var(--font-mono); }

.streamers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.streamer { padding: 14px; border-radius: 16px; background: var(--card-2); display: flex; align-items: center; gap: 10px; }
.streamer i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-2); flex: none; }
.streamer.is-live i { background: var(--pink-hot); box-shadow: 0 0 0 4px rgba(255,61,181,.2); }
.add-tile { min-height: 64px; border-radius: 16px; border: 2px dashed var(--line-2); background: transparent; color: var(--lime); font-weight: 700; cursor: pointer; transition: border-color .2s ease; }
.add-tile:hover { border-color: var(--lime); }

.room { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--card-2); }

/* Ранг-картка / вітальна картка */
.rank { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--r-lg); background: var(--card-2); }
.rank__bg { position: absolute; right: -30px; top: -30px; width: 160px; height: 160px; opacity: .12; }
.rank__ava { width: 88px; height: 88px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--rc, var(--lime)); color: var(--bg); font: 900 30px var(--font-display); box-shadow: 0 0 0 5px var(--card), 0 0 0 8px var(--rc, var(--lime)); transition: background .3s ease, box-shadow .3s ease; }
.rank__body { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.rank__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.rank__nick { font: 800 20px var(--font-display); }
.rank__bar { height: 14px; border-radius: 999px; background: var(--card); overflow: hidden; }
.rank__bar i { display: block; width: 32%; height: 100%; border-radius: inherit; background: var(--rc, var(--lime)); transition: background .3s ease; }

/* 7. Discord-превʼю ------------------------------------------------------- */
.dc { padding: 16px; border-radius: 16px; background: #313338; display: flex; gap: 12px; font-family: var(--font-body); }
.dc__ava { width: 40px; height: 40px; flex: none; border-radius: 50%; background: var(--card); padding: 6px; }
.dc__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex-grow: 1; }
.dc__name { font-size: 15px; font-weight: 700; color: var(--lime); }
.dc__bot { padding: 1px 5px; border-radius: 4px; background: #5865F2; color: #fff; font-size: 10px; vertical-align: middle; }
.dc__text { font-size: 15px; color: #DBDEE1; line-height: 1.45; white-space: pre-line; }
.dc__mention { padding: 0 3px; border-radius: 4px; background: rgba(88,101,242,.3); color: #C9CDFB; }
.dc__ch { color: #C9CDFB; }
.dc__embed { padding: 12px 14px; border-radius: 6px; background: #2B2D31; border-left: 4px solid var(--lime); display: flex; flex-direction: column; gap: 8px; }
.dc__embed--twitch { border-left-color: var(--twitch); }
.dc__src { font-size: 12px; color: #B5BAC1; }
.dc__title { font-size: 15px; font-weight: 700; color: #00A8FC; line-height: 1.35; }
.dc__img { height: 150px; border-radius: 8px; background: var(--line); display: grid; place-items: center; color: var(--dim); font-size: 13px; }
.dc__btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dc__btns button { min-height: 40px; border-radius: 6px; border: 0; background: #4E5058; color: #fff; font-weight: 600; font-size: 14px; cursor: pointer; transition: opacity .2s ease, transform .2s ease; }
.dc__btns button:hover { transform: translateY(-2px); }
.dc__btns button[data-kind="ok"] { background: #248046; }
.dc__btns button[data-kind="danger"] { background: #DA373C; }
.dc__btns button[aria-pressed="false"] { opacity: .3; }
.welcome-card { position: relative; height: 190px; border-radius: 12px; background: var(--card); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.welcome-card__bg { position: absolute; left: -40px; bottom: -70px; width: 200px; height: 200px; opacity: .14; }
.welcome-card__ava { width: 70px; height: 70px; border-radius: 50%; background: var(--lime); color: var(--bg); display: grid; place-items: center; font: 900 24px var(--font-display); box-shadow: 0 0 0 4px var(--card), 0 0 0 7px var(--lime); }
.welcome-card b { font: 800 18px var(--font-display); color: var(--text); }
.welcome-card small { font: 500 12px var(--font-mono); letter-spacing: 2px; color: var(--lime); }

/* 8. Панель «Зберегти», тост, вхід, адаптив ------------------------------- */
.savebar {
  position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translate(-50%, 140%); opacity: 0;
  display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 20px; border-radius: 999px;
  background: var(--card-2); border: 1px solid var(--lime); box-shadow: 0 20px 50px -10px rgba(0,0,0,.6);
  transition: transform .45s var(--spring), opacity .25s ease; width: max-content; max-width: calc(100vw - 32px);
}
.savebar.is-on { transform: translate(-50%, 0); opacity: 1; }
.savebar span { font-weight: 600; font-size: 14px; }
.savebar.is-shake { animation: shake .4s ease; }
@keyframes shake { 20%, 60% { margin-left: -6px } 40%, 80% { margin-left: 6px } }
.toast {
  position: fixed; right: 24px; top: 24px; z-index: 60; transform: translateY(-20px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 14px; background: var(--lime); color: var(--bg); font-weight: 700; box-shadow: 0 20px 50px -10px rgba(0,0,0,.5);
  transition: all .35s var(--spring);
}
.toast.is-on { transform: none; opacity: 1; }

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(circle at 20% 20%, rgba(200,255,77,.08), transparent 40%), radial-gradient(circle at 80% 80%, rgba(255,138,216,.1), transparent 40%), var(--bg); }
.login__box { width: 100%; max-width: 420px; padding: 40px 32px; border-radius: 32px; background: var(--card); border: 1px solid var(--line-2); display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.login__box svg.logo { width: 96px; height: 96px; animation: float 3s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg) } 50% { transform: translateY(-10px) rotate(4deg) } }
.btn--discord { background: #5865F2; color: #fff; width: 100%; min-height: 54px; font-size: 16px; }
.btn--discord:hover { background: #4752C4; color: #fff; }

.reveal { opacity: 0; transform: translateY(16px); animation: rise .5s ease forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (max-width: 1180px) {
  .grid--side { grid-template-columns: minmax(0, 1fr); }
  .stats { min-width: 0; }
}
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .35s ease; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .side.is-open { transform: none; }
  .burger { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--card); color: var(--text); cursor: pointer; }
  .main { padding: 20px 16px 120px; }
  .mods, .grid--2, .checks { grid-template-columns: minmax(0, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tier { padding: 14px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h1 { font-size: 26px; }
  .tr { grid-template-columns: minmax(0, 1fr) auto; }
  .tr > :nth-child(3), .tr > :nth-child(5) { display: none; }
  .tr > :nth-child(2) { grid-column: 1; }
  .tr > :nth-child(4) { grid-column: 1 / -1; }
  .tr--head { display: none; }
  .source { grid-template-columns: 44px minmax(0, 1fr) 56px; }
  .source > :nth-child(3), .source > :nth-child(4) { display: none; }
  .streamers { grid-template-columns: minmax(0, 1fr); }
  .reward { grid-template-columns: 70px minmax(0, 1fr) 40px; }
  .reward > :nth-child(3) { display: none; }
  .search { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   9. Каталог плагінів і сторінка плагіна
   ========================================================================== */
.catalog { display: flex; flex-direction: column; gap: 36px; }
.pcat { display: flex; flex-direction: column; gap: 16px; }
.pcat__head { display: flex; align-items: baseline; gap: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.pcat__head .h2 { position: relative; }
.pcat__head .h2::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 2px; background: var(--lime); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.pcard {
  position: relative; padding: 22px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--spring), border-color .25s ease, box-shadow .25s ease;
}
.pcard:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: 0 18px 40px -20px rgba(0,0,0,.6); }
.pcard.is-on { border-color: var(--line-2); }
.pcard.is-pop { animation: pop .45s var(--spring); }
@keyframes pop { 40% { transform: scale(1.03); } }
.pcard__icon {
  --pc: var(--lime);
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--pc) 16%, var(--card-2)); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent);
  transition: transform .4s var(--spring);
}
.pcard:hover .pcard__icon { transform: rotate(-8deg) scale(1.08); }
.pcard__name { font: 700 16px/1.3 var(--font-body); margin-top: 4px; }
.pcard__name a { color: var(--text); text-decoration: none; }
.pcard__name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.pcard__name a:focus-visible { outline: none; }
.pcard:focus-within { outline: 2px solid var(--lime); outline-offset: 2px; }
.pcard__desc { font-size: 13px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex-grow: 1; }
.pcard__tag { position: absolute; top: 16px; right: 16px; padding: 3px 10px; border-radius: 999px; background: rgba(46,204,113,.18); color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: .5px; }
.pcard__tag--ours { background: var(--pink); color: var(--bg); }
.pbtn {
  position: relative; z-index: 1; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px;
  border-radius: 12px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all .2s ease;
}
.pbtn:hover { border-color: var(--lime); color: var(--lime); }
.pbtn[aria-pressed="true"] { background: rgba(200,255,77,.12); border-color: rgba(200,255,77,.35); color: var(--lime); }
.pbtn[aria-pressed="true"]:hover { background: rgba(255,61,181,.14); border-color: var(--pink); color: var(--pink); }

.back { display: inline-block; margin-bottom: 10px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--lime); }
.phead { display: flex; align-items: center; gap: 18px; }
.phead .pcard__icon { width: 64px; height: 64px; border-radius: 20px; }
.phead p { margin-top: 6px; max-width: 620px; }
.ptoggle { display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 18px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.switch--lg { width: 60px; height: 34px; }
.switch--lg::after { width: 28px; height: 28px; }
.switch--lg[aria-pressed="true"]::after { transform: translateX(26px); }
.poff { padding: 14px 18px; border-radius: var(--r-md); background: rgba(255,61,181,.12); border: 1px solid rgba(255,61,181,.35); color: var(--muted); font-size: 14px; }
.poff b { color: var(--pink); }
.psections { columns: 2 420px; column-gap: 24px; transition: opacity .3s ease, filter .3s ease; }
.psections > .card { break-inside: avoid; margin-bottom: 24px; }
.psections.is-off { opacity: .45; filter: grayscale(.4); }
.pnote { padding: 12px 14px; border-radius: var(--r-md); background: var(--card-2); font-size: 14px; line-height: 1.5; color: var(--muted); }
.num { display: inline-flex; align-items: center; gap: 8px; }
.num .input { width: 96px; }
.num em { font-style: normal; font-size: 13px; color: var(--dim); }
.prows { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.prow { display: grid; gap: 8px; align-items: center; transition: opacity .25s ease, transform .25s ease; }
.prow .input { min-height: 40px; font-size: 14px; }
.prow--head { font: 500 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); text-transform: uppercase; }
.add-chip { border-style: dashed !important; color: var(--lime) !important; }
.cmds { display: flex; flex-direction: column; gap: 8px; }
.cmd { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--card-2); }
.cmd code { font: 700 14px var(--font-mono); color: var(--lime); }
.cmd span { font-size: 14px; color: var(--muted); }
.color-pick { position: relative; width: 32px; height: 32px; border-radius: 50%; border: 2px dashed var(--line-2); cursor: pointer; overflow: hidden; background: conic-gradient(#C8FF4D, #FF8AD8, #4DB8FF, #F1C40F, #C8FF4D); }
.color-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.psections .card .field--row > span { font-weight: 500; }
@media (max-width: 900px) {
  .phead { align-items: flex-start; }
  .phead .pcard__icon { width: 52px; height: 52px; }
  .ptoggle { width: 100%; justify-content: space-between; }
  .cmd { grid-template-columns: minmax(0, 1fr) auto; }
  .cmd span { grid-column: 1; grid-row: 2; }
  .pgrid { grid-template-columns: minmax(0, 1fr); }
}
.field .check, .field .chip, .field .prow .input { font-weight: 500; color: var(--text); }
/* анімація «pop» не повинна скидати появу картки */
.pcard.is-pop { opacity: 1; transform: none; animation: pop .45s var(--spring); }

/* ==========================================================================
   10. Версія 2: компоненти панелі
   ========================================================================== */
body.menu-open { overflow: hidden; }
.botcard { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card); border: 1px solid var(--line-dim); color: var(--text); text-decoration: none; transition: border-color .2s ease; }
.botcard:hover { border-color: var(--lime); color: var(--text); }
.botcard > svg { color: var(--dim); flex: none; }
.botcard__ava { position: relative; width: 38px; height: 38px; flex: none; }
.botcard__ava img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.botcard__txt { display: flex; flex-direction: column; min-width: 0; flex-grow: 1; }
.botcard__txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.botcard__txt small { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st { position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--card); background: #23A55A; }
.st--idle { background: #F0B232; } .st--dnd { background: #F23F43; } .st--invisible { background: #80848E; }
.nav__label { margin-top: 10px; }
.side { scrollbar-width: thin; scrollbar-color: var(--line) transparent; }

.btn--danger { background: #E5484D; color: #fff; }
.btn--danger:hover { background: #F2555A; color: #fff; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* Шапка плагіна */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; font-size: 14px; font-weight: 700; text-decoration: none; color: var(--muted); }
.back:hover { color: var(--lime); }
.picon {
  --pc: var(--lime);
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; flex: none;
  background: color-mix(in srgb, var(--pc) 16%, var(--card-2)); color: var(--pc); border: 1px solid color-mix(in srgb, var(--pc) 30%, transparent);
}
.phead-wrap { align-items: center; }
.ptabs { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.ptabs button[role="tab"] { position: relative; min-height: 48px; padding: 0 18px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap; transition: color .2s ease; }
.ptabs button[role="tab"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--lime); transform: scaleX(0); transition: transform .25s ease; }
.ptabs button[role="tab"]:hover { color: var(--text); }
.ptabs button[aria-selected="true"] { color: var(--text); }
.ptabs button[aria-selected="true"]::after { transform: scaleX(1); }
.ptabs__reset { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--dim); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.ptabs__reset:hover { color: var(--pink); background: var(--card); }
.ptabs--single { border-bottom: 0; }
.poff { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.poff span { flex-grow: 1; min-width: 200px; }
.ppanel { display: flex; flex-direction: column; gap: 18px; max-width: 1080px; transition: opacity .3s ease, filter .3s ease; }
.ppanel.is-off { opacity: .5; filter: grayscale(.5); }

/* Секції-акордеони */
.psec { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); overflow: hidden; }
.psec__head { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; }
.psec__head b { display: block; font: 800 18px var(--font-display); }
.psec__head small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.psec__head svg { color: var(--dim); transition: transform .25s ease; flex: none; }
.psec__head[aria-expanded="false"] svg { transform: rotate(-90deg); }
.psec__head:hover svg { color: var(--lime); }
.psec__body { padding: 4px 24px 24px; display: flex; flex-direction: column; gap: 20px; border-top: 1px solid var(--line-dim); padding-top: 20px; }

/* Поле */
.fld { display: flex; flex-direction: column; gap: 8px; }
.fld__label { font-size: 13px; font-weight: 700; color: var(--muted); }
.fld__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.fld__text { font-size: 15px; font-weight: 600; flex: 1 1 220px; }
.fld__hint { display: block; margin-top: 3px; font-size: 12px; font-weight: 500; color: var(--dim); }
.inp-wrap { position: relative; }
.inp-wrap .input, .inp-wrap .textarea { width: 100%; }
.inp-wrap .input { padding-right: 76px; }
.counter { position: absolute; right: 12px; bottom: 10px; font: 500 11px var(--font-mono); color: var(--dim); pointer-events: none; }
.inp-wrap .input + .counter { top: 50%; bottom: auto; transform: translateY(-50%); }
.textarea + .counter { bottom: 8px; }
.input, .select, .textarea { width: auto; }
.fld > .input, .fld > .textarea { width: 100%; }
.select { min-width: 200px; background-image: none; }

/* Вибір каналу / ролі */
.picker {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; min-width: 220px; max-width: 100%; padding: 0 12px 0 14px;
  border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left;
  transition: border-color .2s ease;
}
.picker:hover, .picker:focus-visible { border-color: var(--lime); outline: none; }
.picker > span:last-of-type { flex-grow: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker > svg { color: var(--dim); flex: none; }
.pick__pre { color: var(--dim); font-weight: 700; flex: none; }
.pick__dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pick {
  position: fixed; z-index: 200; max-height: 340px; display: flex; flex-direction: column; border-radius: 16px; background: #1A0A33;
  border: 1px solid var(--line-2); box-shadow: 0 24px 60px -12px rgba(0,0,0,.7); overflow: hidden; animation: pickIn .16s ease;
}
@keyframes pickIn { from { opacity: 0; transform: translateY(-6px); } }
.pick__search { display: flex; align-items: center; gap: 8px; margin: 10px; padding: 0 12px; min-height: 40px; border-radius: 10px; background: var(--card-2); color: var(--dim); }
.pick__search input { flex-grow: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font: 500 14px var(--font-body); }
.pick__list { overflow-y: auto; padding: 0 6px 8px; }
.pick__group { padding: 10px 10px 4px; font: 700 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); }
.pick__item { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--text); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.pick__item:hover, .pick__item:focus { background: var(--card-2); outline: none; }
.pick__item small { margin-left: auto; color: var(--dim); font-size: 12px; font-weight: 500; }
.pick__item--none { color: var(--dim); font-style: italic; }
.pick__ava { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--bg); font: 800 11px var(--font-display); flex: none; }
.pick__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick__empty { padding: 18px; text-align: center; color: var(--dim); font-size: 14px; }

/* Теги (кілька каналів/ролей) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; min-height: 52px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--card-2); align-items: center; }
.tag { --tc: var(--muted); display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 6px 0 10px; border-radius: 8px; background: var(--card); color: var(--text); font-size: 13px; font-weight: 600; animation: rise .25s ease; }
.tag i { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); }
.tag button { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--dim); cursor: pointer; }
.tag button:hover { background: rgba(255,61,181,.18); color: var(--pink); }
.tag-add { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed var(--line-2); background: none; color: var(--lime); font-size: 13px; font-weight: 700; cursor: pointer; }
.tag-add:hover { border-color: var(--lime); }

/* Число з кнопками */
.stepper { display: inline-flex; align-items: center; gap: 6px; }
.stepper button { width: 36px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; }
.stepper button:hover { border-color: var(--lime); color: var(--lime); }
.stepper .input { width: 84px; min-height: 40px; text-align: center; padding: 0 6px; -moz-appearance: textfield; }
.stepper .input::-webkit-outer-spin-button, .stepper .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper em { font-style: normal; font-size: 13px; color: var(--dim); margin-left: 4px; }

/* Повзунок */
.range { width: 100%; height: 6px; -webkit-appearance: none; appearance: none; border-radius: 6px; background: var(--line); outline: none; cursor: pointer; accent-color: var(--lime); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--lime); }
.range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 4px solid var(--bg); }
.range-v { font: 700 14px var(--font-mono); color: var(--lime); }
.time { width: 130px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.days button { width: 46px; height: 42px; border-radius: 12px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-weight: 700; cursor: pointer; }
.days button[aria-pressed="true"] { background: var(--lime); color: var(--bg); border-color: var(--lime); }

/* Колір */
.swatches .swatch { width: 30px; height: 30px; }
.swatches .color-pick { width: 30px; height: 30px; border: 2px solid var(--line-2); }
.hexv { margin-left: 4px; font-size: 12px; }

/* Картинка */
.drop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 110px; border-radius: var(--r-md); border: 2px dashed var(--line-2); background: var(--card-2); cursor: pointer; overflow: hidden; transition: border-color .2s ease; }
.drop:hover, .drop.is-over { border-color: var(--lime); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop__ph { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); text-align: center; padding: 16px; pointer-events: none; }
.drop__ph b { color: var(--muted); font-size: 14px; }
.drop__ph small { font-size: 12px; }
.drop img ~ .drop__ph { display: none; }
.drop-clear { align-self: flex-start; }
.pnote { display: flex; gap: 10px; align-items: flex-start; }
.pnote svg { flex: none; color: var(--lime); margin-top: 1px; }

/* Команди */
.cmd { padding: 0; background: var(--card-2); border-radius: var(--r-md); display: block; }
.cmd__top { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; }
.cmd__top code { font: 700 14px var(--font-mono); color: var(--lime); }
.cmd__top span { font-size: 14px; color: var(--muted); }
.cmd__gear { width: 36px; height: 36px; color: var(--dim); }
.cmd__gear[aria-expanded="true"] { color: var(--lime); border-color: var(--lime); }
.cmd__more { display: flex; flex-direction: column; gap: 10px; padding: 4px 12px 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.cmd__more .tags { background: var(--card); }

/* Таблиці рядків */
.prows { display: flex; flex-direction: column; gap: 8px; }
.prow { display: grid; grid-template-columns: var(--cols); gap: 8px; align-items: center; transition: opacity .2s ease, transform .2s ease; }
.prow .input, .prow .select, .prow .picker { width: 100%; min-width: 0; min-height: 42px; font-size: 14px; }
.prow .picker { padding-left: 10px; }
.prow--head { font: 500 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); text-transform: uppercase; }
.prow.is-gone { opacity: 0; transform: translateX(20px); }
.prows__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.prows__foot .btn { border-style: dashed; color: var(--lime); }

/* Повідомлення з превʼю */
.msgf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.msgf__edit { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.msgf__preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.msgf__preview .fld__label { display: inline-flex; align-items: center; gap: 6px; }
.msgf__embed { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: rgba(43,16,85,.45); }
.msgf__embedtoggle { padding: 10px 12px; border-radius: var(--r-md); background: var(--card-2); }
.fmtbar { display: flex; gap: 4px; flex-wrap: wrap; }
.fmt { min-width: 34px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card-2); color: var(--muted); font: 800 13px var(--font-mono); cursor: pointer; }
.fmt:nth-child(2) { font-style: italic; } .fmt:nth-child(3) { text-decoration: underline; } .fmt:nth-child(4) { text-decoration: line-through; }
.fmt:hover { border-color: var(--lime); color: var(--lime); }
.varbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12px; }
.varbar .dim { margin-right: 2px; }

/* Discord: повідомлення */
.dprev { padding: 16px; border-radius: 16px; background: #313338; min-height: 80px; }
.dmsg { display: flex; gap: 14px; font-family: 'gg sans', var(--font-body); color: #DBDEE1; }
.dmsg__ava { width: 40px; height: 40px; border-radius: 50%; flex: none; object-fit: cover; background: var(--lime); }
.dmsg__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex-grow: 1; }
.dmsg__head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dmsg__name { font-weight: 700; font-size: 15px; }
.dmsg__bot { display: inline-flex; align-items: center; gap: 2px; padding: 1px 5px; border-radius: 4px; background: #5865F2; color: #fff; font-size: 10px; font-weight: 700; }
.dmsg__time { font-size: 12px; color: #949BA4; }
.dmsg__text { font-size: 15px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.dmsg__empty { color: #949BA4; font-style: italic; font-size: 14px; }
.dmd-mention { padding: 0 2px; border-radius: 3px; background: rgba(88,101,242,.3); color: #C9CDFB; font-weight: 500; }
.dmd-role { padding: 0 2px; border-radius: 3px; font-weight: 500; }
.dmd-link { color: #00A8FC; text-decoration: none; }
.dmd-link:hover { text-decoration: underline; color: #00A8FC; }
.dmd-code { padding: 1px 4px; border-radius: 4px; background: #2B2D31; font-family: var(--font-mono); font-size: 13px; }
.dmd-pre { margin: 4px 0; padding: 8px 10px; border-radius: 4px; background: #2B2D31; border: 1px solid #1E1F22; font-family: var(--font-mono); font-size: 13px; white-space: pre-wrap; }
.dmd-spoiler { padding: 0 2px; border-radius: 3px; background: #1E1F22; color: transparent; cursor: pointer; }
.dmd-spoiler.is-open { color: inherit; background: rgba(255,255,255,.08); }
.dmd-h1 { display: block; font-size: 22px; font-weight: 800; margin: 4px 0; }
.dmd-h2 { display: block; font-size: 19px; font-weight: 800; margin: 4px 0; }
.dmd-h3 { display: block; font-size: 16px; font-weight: 800; margin: 4px 0; }
.dmd-quote { display: block; padding-left: 10px; border-left: 4px solid #4E5058; }
.dmd-li { display: block; padding-left: 14px; position: relative; }
.dmd-li::before { content: "•"; position: absolute; left: 2px; }
.dem { margin-top: 4px; max-width: 520px; display: grid; grid-template-columns: 1fr; gap: 0; padding: 10px 16px 14px 14px; border-radius: 4px; background: #2B2D31; border-left: 4px solid var(--ec, #1E1F22); }
.dem-body { display: flex; gap: 16px; }
.dem-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex-grow: 1; padding-top: 4px; }
.dem-author { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #F2F3F5; }
.dem-author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dem-author a { color: #F2F3F5; }
.dem-title { font-size: 16px; font-weight: 700; color: #F2F3F5; line-height: 1.3; }
.dem-title a { color: #00A8FC; text-decoration: none; }
.dem-desc { font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.dem-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
.dem-field { grid-column: 1 / -1; min-width: 0; }
.dem-field.is-inline { grid-column: auto; }
.dem-fname { font-size: 14px; font-weight: 700; color: #F2F3F5; margin-bottom: 2px; }
.dem-fval { font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-wrap: break-word; }
.dem-thumb { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; flex: none; margin-top: 4px; }
.dem-image { display: block; width: 100%; max-height: 300px; margin-top: 12px; border-radius: 6px; object-fit: cover; }
.dem-image--ph { height: 140px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: #1E1F22; color: #949BA4; font-size: 13px; }
.dem-footer { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12px; color: #B5BAC1; }
.dem-footer img { width: 20px; height: 20px; border-radius: 50%; }
.dmsg__btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.dbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 14px; border-radius: 4px; background: #4E5058; color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; }
.dbtn:hover { background: #6D6F78; color: #fff; }
.dbtn svg { opacity: .8; }
.dcard { position: relative; margin-top: 6px; max-width: 460px; height: 200px; border-radius: 10px; background: #1E0B3D; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.dcard__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(.55); }
.dcard__shape { position: absolute; left: -40px; bottom: -70px; width: 200px; height: 200px; opacity: .14; }
.dcard__ava { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--rc); color: #1E0B3D; display: grid; place-items: center; font: 900 24px var(--font-display); box-shadow: 0 0 0 4px #1E0B3D, 0 0 0 7px var(--rc); }
.dcard b { position: relative; font: 800 18px var(--font-display); color: #F4EDFF; }
.dcard small { position: relative; font: 500 12px var(--font-mono); letter-spacing: 2px; color: var(--rc); text-transform: uppercase; }
.dcard .dmd-mention { background: none; color: inherit; }
.dprev--rank { padding: 16px; }
.rank { color: var(--rc); }
.rank__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rank:has(.rank__img)::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,var(--dim)); z-index: 0; }
.rank > * { position: relative; }
.rank__bg { position: absolute; color: var(--rc); }
.rank__ava { background: var(--rc); box-shadow: 0 0 0 5px var(--card), 0 0 0 8px var(--rc); }
.rank__meta { font: 500 13px var(--font-mono); color: #CDBDEB; }
.rank__meta b { color: #F4EDFF; } .rank__meta .rank__lvl { color: var(--rc); }
.rank__nick { color: #F4EDFF; }
.rank__bar i { background: var(--rc); }
.rank__xp { font: 500 12px var(--font-mono); color: #CDBDEB; }

/* Діалог */
.dlg { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 16px; background: rgba(8,2,20,.7); backdrop-filter: blur(4px); animation: fadeIn .18s ease; }
.dlg.is-out { opacity: 0; transition: opacity .18s ease; }
.dlg__box { width: 100%; max-width: 480px; padding: 26px; border-radius: 24px; background: var(--card); border: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.7); animation: pop .3s var(--spring); }
.dlg__btns { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@keyframes fadeIn { from { opacity: 0; } }

.toast--warn { background: var(--pink); }
.savebar span { display: inline-flex; align-items: center; gap: 8px; }
.savebar span svg { color: var(--lime); }

@media (max-width: 1100px) {
  .msgf { grid-template-columns: minmax(0, 1fr); }
  .msgf__preview { position: static; }
}
@media (max-width: 900px) {
  .psec__head { padding: 16px 18px; }
  .psec__body { padding: 16px 18px 20px; }
  .picker, .select { min-width: 0; width: 100%; }
  .fld__row > .picker, .fld__row > .select { flex: 1 1 100%; }
  .prow { grid-template-columns: minmax(0, 1fr) 40px; }
  .prow > :not(.del-row) { grid-column: 1; }
  .prow > .del-row { grid-column: 2; grid-row: 1; }
  .prow { padding: 10px; border-radius: var(--r-md); background: var(--card-2); }
  .prow .input, .prow .select, .prow .picker { background: var(--card); }
  .prow--head { display: none; }
  .cmd__top { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cmd__top span { grid-column: 1 / -1; grid-row: 2; }
  .ptabs__reset span, .ptabs__reset { font-size: 12px; }
  .dem-fields { grid-template-columns: minmax(0, 1fr); }
  .dem-field.is-inline { grid-column: 1 / -1; }
  .phead .picon { width: 52px; height: 52px; border-radius: 16px; }
}

/* ==========================================================================
   11. Сторінки: огляд, каталог, повідомлення, бот, донати
   ========================================================================== */
.psec__head--static { cursor: default; }
.picon--sm { width: 40px; height: 40px; border-radius: 12px; }
.linkbtn { align-self: flex-start; padding: 0; border: 0; background: none; color: var(--lime); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--lime-soft); }
.dashed { border-style: dashed !important; color: var(--lime) !important; }
.empty-state { align-items: center; text-align: center; padding: 36px; }
.counter.is-warn { color: var(--pink); }
.input.is-bad { border-color: var(--pink); }
.ava { display: grid; place-items: center; color: var(--bg); font: 800 13px var(--font-display); }
.migr__bar { display: block; height: 6px; border-radius: 6px; background: var(--line-dim); overflow: hidden; }
.migr__bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--lime); transition: width .8s ease; }

/* Огляд */
.ovbot { padding: 0; gap: 0; overflow: hidden; }
.ovbot__banner { height: 110px; overflow: hidden; }
.ovbot__banner img { width: 100%; height: 100%; object-fit: cover; }
.ovbot__row { display: flex; align-items: center; gap: 14px; padding: 0 22px 20px; flex-wrap: wrap; }
.ovbot__ava { width: 72px; height: 72px; margin-top: -30px; }
.ovbot__ava img { border: 5px solid var(--card); }
.ovbot__ava .st { width: 20px; height: 20px; right: 2px; bottom: 2px; border-width: 4px; }
.ovbot .botcard__txt b { font: 800 18px var(--font-display); }
.qa { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.qa__item { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: transform .25s var(--spring), border-color .2s ease; }
.qa__item .picon { grid-row: 1 / 3; }
.qa__item b { font-size: 15px; }
.qa__item small { font-size: 12px; color: var(--dim); }
.qa__item:hover { transform: translateY(-3px); border-color: var(--lime); color: var(--text); }
.ovplugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ovplug { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--card-2); }
.ovplug a { flex-grow: 1; min-width: 0; color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ovplug a:hover { color: var(--lime); }

/* Каталог */
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard__cfg { position: relative; z-index: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: var(--dim); }
.pcard__cfg:hover { color: var(--lime); background: var(--card-2); }
.pcard .picon { width: 56px; height: 56px; border-radius: 16px; }

/* Повідомлення: список */
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.tpl { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); color: var(--text); text-align: left; cursor: pointer; transition: transform .25s var(--spring), border-color .2s ease; }
.tpl:hover { transform: translateY(-3px); border-color: var(--lime); }
.tpl .picon { width: 44px; height: 44px; border-radius: 14px; }
.tpl b { font-size: 15px; }
.tpl small { font-size: 12px; color: var(--dim); }
.elist { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ecard { position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: transform .25s var(--spring), border-color .2s ease; }
.ecard:hover { transform: translateY(-4px); border-color: var(--line-2); }
.ecard__prev { height: 190px; overflow: hidden; background: #313338; position: relative; pointer-events: none; }
.ecard__prev::after { content: ""; position: absolute; inset: auto 0 0 0; height: 50px; background: linear-gradient(transparent, #313338); }
.ecard__scale { width: 200%; transform: scale(.5); transform-origin: 0 0; padding: 24px; }
.ecard__info { padding: 14px 16px 4px; display: flex; flex-direction: column; gap: 4px; }
.ecard__info h3 { font-size: 16px; }
.ecard__info a { color: var(--text); text-decoration: none; }
.ecard__info a:hover { color: var(--lime); }
.ecard__foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px 14px; }

/* Повідомлення: редактор */
.etop { align-items: center; }
.etop__acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.egrid-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 24px; align-items: start; }
.eedit { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.epreview { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
.epreview__head { display: flex; align-items: center; justify-content: space-between; }
.epreview .dprev { min-height: 200px; }
.egrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.egrid__full { grid-column: 1 / -1; }
.ebox { border-radius: var(--r-lg); background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--ec); overflow: hidden; }
.ebox__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 10px 8px; }
.ebox__toggle { display: flex; align-items: center; gap: 10px; flex-grow: 1; min-width: 0; min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--text); cursor: pointer; text-align: left; }
.ebox__toggle b { font: 800 16px var(--font-display); white-space: nowrap; }
.ebox__toggle .dim { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ebox__toggle svg { color: var(--dim); transition: transform .2s ease; flex: none; }
.ebox__toggle[aria-expanded="false"] svg { transform: rotate(-90deg); }
.ebox .acts .icon-btn { width: 36px; height: 36px; }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.ebox__body { padding: 6px 20px 20px; display: flex; flex-direction: column; gap: 18px; border-top: 1px solid var(--line-dim); padding-top: 18px; }
.egroup { display: flex; flex-direction: column; gap: 8px; }
details.egroup summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 6px; }
details.egroup summary::-webkit-details-marker { display: none; }
details.egroup summary::before { content: "▸"; color: var(--dim); transition: transform .2s ease; }
details.egroup[open] summary::before { transform: rotate(90deg); }
details.egroup[open] summary { margin-bottom: 8px; }
.efields { display: flex; flex-direction: column; gap: 10px; }
.efield { padding: 12px; border-radius: var(--r-md); background: var(--card-2); }
.efield .input, .efield .textarea { background: var(--card); }
.efield__ctl { display: flex; align-items: flex-end; gap: 6px; justify-content: flex-end; }
.efield__ctl .check { margin-right: auto; min-height: 44px; }
.quick { display: flex; gap: 10px; font-size: 12px; }
.ebox__total { font-size: 12px; color: var(--dim); text-align: right; }
.ebox__total.is-over { color: var(--pink); font-weight: 700; }
.eadd { align-self: flex-start; }
.ebtn { display: grid; grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1.3fr) 40px; gap: 10px; align-items: end; }
.ebtn .icon-btn { margin-bottom: 2px; }

/* Бот */
.bgrid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.bprev { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 10px; }
.bimgs { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; }
.drop--ava { width: 120px; height: 120px; min-height: 0; border-radius: 50%; }
.drop--banner { min-height: 120px; }
.drop--ava .drop__ph, .drop--banner .drop__ph { position: absolute; inset: 0; display: flex; justify-content: center; background: rgba(8,2,20,.6); color: var(--text); opacity: 0; transition: opacity .2s ease; }
.drop--ava:hover .drop__ph, .drop--banner:hover .drop__ph { opacity: 1; }
.drop--ava img ~ .drop__ph, .drop--banner img ~ .drop__ph { display: flex; }
.bstatus button { display: inline-flex; align-items: center; gap: 8px; }
.sdot { position: static; width: 10px; height: 10px; border: 0; border-radius: 50%; display: inline-block; background: #23A55A; }
.ai { padding: 1px 6px; border-radius: 6px; background: linear-gradient(90deg, var(--pink), var(--lime)); color: var(--bg); font-size: 10px; font-weight: 800; vertical-align: middle; }
.dlist { padding: 14px; border-radius: 16px; background: #2B2D31; }
.dlist__cat { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; color: #949BA4; letter-spacing: .3px; }
.dlist__item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; background: #35373C; }
.dlist__item .st { border-color: #35373C; }
.dlist__item .botcard__txt b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.dlist__item .botcard__txt small { color: #B5BAC1; }
.dprof { position: relative; border-radius: 16px; background: #232428; overflow: hidden; color: #DBDEE1; }
.dprof__banner { height: 110px; background: var(--card-2); }
.dprof__banner img { width: 100%; height: 100%; object-fit: cover; }
.dprof__ava { position: absolute; left: 16px; top: 62px; width: 88px; height: 88px; }
.dprof__ava img { width: 100%; height: 100%; border-radius: 50%; border: 6px solid #232428; object-fit: cover; background: #232428; }
.dprof__ava .st { width: 24px; height: 24px; right: 4px; bottom: 4px; border: 5px solid #232428; }
.dprof__bubble { position: absolute; left: 112px; top: 120px; max-width: calc(100% - 128px); padding: 6px 12px; border-radius: 14px; background: #383A40; font-size: 13px; color: #F2F3F5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dprof__body { padding: 60px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.dprof__name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; color: #F2F3F5; }
.dprof__tag { font-size: 13px; color: #B5BAC1; }
.dprof__sec { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #1E1F22; }
.dprof__sec small { font-size: 11px; font-weight: 800; color: #B5BAC1; letter-spacing: .5px; }
.dprof__sec p { margin-top: 4px; font-size: 14px; line-height: 1.4; white-space: pre-wrap; }

/* Донати */
.search--sm { width: 220px; height: 40px; }
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.drop--sm { min-height: 70px; }
.drop--sm .drop__ph { flex-direction: row; gap: 10px; }
.give-sum { padding: 12px 14px; border-radius: 14px; background: var(--card); font-size: 13px; line-height: 1.5; }
.give-sum b { color: var(--text); }
#give .stepper .input { width: 120px; }

@media (max-width: 1240px) {
  .egrid-main, .bgrid { grid-template-columns: minmax(0, 1fr); }
  .epreview, .bprev { position: static; max-height: none; }
}
@media (max-width: 900px) {
  .qa, .ovplugs, .egrid { grid-template-columns: minmax(0, 1fr); }
  .ebtn { grid-template-columns: 70px minmax(0, 1fr) 40px; }
  .ebtn > :nth-child(3) { grid-column: 1 / 3; }
  .ebtn > .icon-btn { grid-column: 3; grid-row: 1; }
  .bimgs { grid-template-columns: minmax(0, 1fr); }
  .etop__acts { width: 100%; }
  .etop__acts [data-publish] { flex-grow: 1; }
  .search--sm { width: 100%; }
  .ecard__prev { height: 160px; }
}
.ovbot__row { align-items: flex-end; }
.ovbot__ava { margin-top: -36px; }
.ovbot .botcard__txt { padding-bottom: 4px; }
.ovbot .btn { margin-left: auto; }
.sdot.st--idle { background: #F0B232; } .sdot.st--dnd { background: #F23F43; } .sdot.st--invisible { background: #80848E; }
.tr--d { grid-template-columns: minmax(150px, 1.6fr) 72px minmax(0, 1.3fr) 118px 92px; }
.who__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who__txt b, .who__txt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who__txt small { font-size: 12px; font-weight: 700; }
.card .fld__text { flex: 1 1 140px; }
.card .fld__row > .select, .card .fld__row > .picker { min-width: 170px; }
.seg button { overflow-wrap: anywhere; line-height: 1.2; }
.seg--4 button { font-size: 12px; padding: 6px; }
.dprev--rank { background: transparent; padding: 0; }
@media (max-width: 900px) {
  .tr--d { grid-template-columns: minmax(0, 1fr) auto; }
  .tr--d > :nth-child(2), .tr--d > :nth-child(4) { display: none; }
  .tr--d > :nth-child(3) { display: flex; grid-column: 1 / -1; grid-row: 2; }
  .tr--d > :nth-child(5) { display: flex; grid-column: 2; grid-row: 1; }
}

/* 12. Сервер: статистика, лідери, журнал, картка учасника ------------------ */
.pick { z-index: 400; }
.ta-r { text-align: right; justify-self: end; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--lime); font-weight: 700; cursor: pointer; text-decoration: underline; }
.pills--sm button { min-height: 32px; padding: 0 12px; font-size: 12px; }
.select--sm { min-width: 0; height: 40px; font-size: 13px; }

/* учасник-посилання */
.mlink { display: inline-flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; color: var(--text); text-decoration: none; font-weight: 600; }
.mlink > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.mlink:hover { color: var(--lime); }
a.mlink:hover > span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.mlink--gone { color: var(--dim); }
.mlink--gone > span:last-child { text-decoration: line-through; }
.ava--xs { width: 24px; height: 24px; font-size: 11px; }

/* діалог із заголовком */
.dlg__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dlg__head .icon-btn { width: 34px; height: 34px; }
.dlg__body { display: flex; flex-direction: column; gap: 16px; }
.dlg__box--wide { max-width: 620px; }
.dlg__box { max-height: calc(100vh - 32px); overflow-y: auto; }
.qchips { display: flex; flex-wrap: wrap; gap: 6px; }
.qchips button { min-height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; }
.qchips button:hover { border-color: var(--lime); color: var(--text); }
.picker.is-bad { border-color: var(--pink); }

/* тип покарання */
.ctype { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--card-2); color: var(--text); font-size: 12px; font-weight: 700; white-space: nowrap; }
.ctype::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

/* плитки-цифри */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpi { padding: 16px 18px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kpi__l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi__v { font: 800 clamp(22px, 2.2vw, 30px)/1.1 var(--font-display); }
.kpi__v small { font: 600 14px var(--font-body); color: var(--dim); }
.kpi__d { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 12px; color: var(--dim); }
.delta { display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 4px; border-radius: 999px; font-weight: 700; color: var(--muted); background: var(--card-2); }
.delta--up { color: var(--lime); background: rgba(200,255,77,.12); }
.delta--down { color: var(--pink); background: rgba(255,138,216,.14); }

/* картки з графіками */
.ccard { min-width: 0; }
.ccard .card__head { align-items: flex-start; }
.ccard__titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 220px; }
.ccard__titles b { color: var(--text); }
.ccard__tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vtoggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: none; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.vtoggle:hover, .vtoggle[aria-pressed="true"] { border-color: var(--lime); color: var(--text); }
.table-box { display: none; }
.ccard.is-table .table-box { display: block; }
.ccard.is-table .chart-box { display: none; }
.chart { position: relative; width: 100%; min-width: 0; }
.chart svg { display: block; max-width: 100%; height: auto; overflow: visible; }
.c-grid { stroke: var(--line-dim); stroke-width: 1; }
.c-base { stroke: var(--line-2); }
.c-ytick, .c-xtick { fill: var(--dim); font: 500 11px var(--font-mono); }
.c-bar { fill: var(--lime); transition: opacity .15s ease; }
.c-bar.is-dim { opacity: .4; }
.c-hit { fill: transparent; cursor: crosshair; }
.c-line { fill: none; stroke: var(--lime); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-end { fill: var(--lime); stroke: var(--card); stroke-width: 2; }
.c-cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; pointer-events: none; }
.c-dot { fill: var(--lime); stroke: var(--card); stroke-width: 2; pointer-events: none; opacity: 0; }
.c-dot.is-on { opacity: 1; }
.ctip { position: absolute; z-index: 5; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: #0E0420; border: 1px solid var(--line-2); box-shadow: 0 10px 30px -8px rgba(0,0,0,.7); display: flex; flex-direction: column; gap: 2px; white-space: nowrap; opacity: 0; transform: translateY(4px); transition: opacity .12s ease, transform .12s ease; }
.ctip.is-on { opacity: 1; transform: none; }
.ctip b { font: 700 14px var(--font-display); color: var(--text); }
.ctip span { font-size: 12px; color: var(--muted); }

/* горизонтальні стовпчики */
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) minmax(0, 1fr) 64px; align-items: center; gap: 12px; font-size: 14px; }
.hbar__l { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hbar__t { height: 12px; border-radius: 0 4px 4px 0; background: var(--line-dim); overflow: hidden; }
.hbar__t i { display: block; height: 100%; background: var(--lime); border-radius: 0 4px 4px 0; transition: width .5s ease; }
.hbar__v { font: 700 13px var(--font-mono); text-align: right; }

/* теплова карта */
.heat__grid { display: grid; grid-template-columns: 30px repeat(var(--cols), minmax(0, 1fr)); gap: 3px; align-items: center; }
.heat__grid i { display: block; height: 22px; border-radius: 4px; cursor: crosshair; outline: 2px solid transparent; outline-offset: 1px; transition: outline-color .1s ease; }
.heat__grid i.is-on { outline-color: var(--text); }
.heat__row { font: 500 11px var(--font-mono); color: var(--dim); }
.heat__col { font: 500 10px var(--font-mono); color: var(--dim); text-align: left; padding-top: 4px; }
.heat__legend { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--dim); }
.heat__scale { width: 120px; height: 10px; border-radius: 4px; background: linear-gradient(90deg, rgba(200,255,77,.06), rgba(200,255,77,1)); }

/* таблиця даних */
.dtable-wrap { max-height: 320px; overflow: auto; border-radius: 12px; border: 1px solid var(--line-dim); }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th { position: sticky; top: 0; background: var(--card-2); text-align: left; padding: 8px 12px; font: 500 11px var(--font-mono); letter-spacing: 1px; color: var(--dim); white-space: nowrap; }
.dtable td { padding: 7px 12px; border-top: 1px solid var(--line-dim); white-space: nowrap; }
.dtable td.mono { text-align: right; }
.dtable th + th { text-align: right; }

/* таблиця лідерів */
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; max-width: 820px; width: 100%; margin-inline: auto; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 14px 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); color: var(--text); text-decoration: none; text-align: center; transition: transform .25s var(--spring), border-color .2s ease; min-width: 0; }
.pod:hover { transform: translateY(-5px); border-color: var(--lime); color: var(--text); }
.pod--1 { padding-top: 40px; padding-bottom: 28px; background: var(--card-2); border-color: var(--lime); }
.pod__place { position: absolute; top: -14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--font-display); background: var(--card-2); border: 1px solid var(--line-2); color: var(--muted); }
.pod--1 .pod__place { background: var(--lime); border-color: var(--lime); color: var(--bg); width: 36px; height: 36px; top: -18px; font-size: 16px; }
.pod__ava { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font: 800 22px var(--font-display); color: var(--bg); }
.pod--1 .pod__ava { width: 72px; height: 72px; font-size: 28px; box-shadow: 0 0 0 4px var(--card-2), 0 0 0 6px var(--lime); }
.pod__name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.pod__lvl { font-size: 12px; color: var(--dim); }
.pod__v { font: 800 18px var(--font-display); }
.pod--1 .pod__v { font-size: 22px; color: var(--lime); }
a.tr { color: var(--text); text-decoration: none; }
a.tr:hover { color: var(--text); }
a.tr:focus-visible { outline: 2px solid var(--lime); outline-offset: -2px; }
.tr--lb { grid-template-columns: 40px minmax(0, 1.6fr) 64px minmax(0, 1.2fr) 112px; }
.lb-rank { font: 800 15px var(--font-display); color: var(--dim); }
.lb-rank--top { color: var(--lime); }
.lb-prog { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lb-prog small { font-size: 11px; }
.who__txt small.dim { font-weight: 500; }
.rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rewards li { display: flex; align-items: center; gap: 10px; }
.rewards__lvl { flex: none; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; background: var(--card-2); font: 800 13px var(--font-display); }
.rewards__role, .rolepill { --tc: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; flex-grow: 1; min-width: 0; }
.rewards__role i, .rolepill i { width: 9px; height: 9px; border-radius: 50%; background: var(--tc); flex: none; }
.rolepill { flex-grow: 0; padding: 2px 10px; border-radius: 999px; background: var(--card-2); color: var(--text); font-size: 13px; }
.howto { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.howto b { color: var(--text); }

/* журнал */
.cs-head { gap: 12px 16px; }
.cs-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.tr--case { grid-template-columns: 46px 132px minmax(110px, 1fr) minmax(0, 1.6fr) 100px 104px 80px; cursor: pointer; }
.tr--case.tr--head { cursor: default; }
.tr--case.is-revoked .cs-reason > span:first-child { text-decoration: line-through; color: var(--dim); }
.cs-reason { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cs-reason > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts { display: flex; gap: 6px; justify-content: flex-end; }
.kvs { display: flex; flex-direction: column; }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-top: 1px solid var(--line-dim); font-size: 14px; align-items: center; }
.kv:first-child { border-top: 0; }
.kv > span:first-child { color: var(--dim); font-size: 13px; }
.kv > span:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }

/* картка учасника */
.crumbs a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--lime); }
.prof { --mc: var(--lime); position: relative; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 24px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(120deg, color-mix(in srgb, var(--mc) 22%, var(--card)) 0%, var(--card) 55%); overflow: hidden; }
.prof__ava { width: 88px; height: 88px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--mc); color: var(--bg); font: 800 36px var(--font-display); box-shadow: 0 0 0 5px var(--card); }
.prof__txt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.prof__txt .h1 { overflow-wrap: anywhere; }
.prof__title { color: var(--lime); font-size: 12px; letter-spacing: 1px; }
.prof__warn { color: var(--pink); font-weight: 700; }
.prof__acts { display: flex; gap: 8px; flex-wrap: wrap; }
.prof .burger { position: absolute; top: 14px; right: 14px; }
.bar--lg { height: 12px; border-radius: 6px; }
.mem-next { font-size: 14px; line-height: 1.6; }
.tags--plain { background: none; border: 0; padding: 0; min-height: 0; }
.tags--plain .tag { background: var(--card-2); }
.clist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.clist li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-dim); }
.clist li:first-child { border-top: 0; }
.clist li.is-revoked .clist__r b { text-decoration: line-through; color: var(--dim); }
.clist__r { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.clist__r b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.big-emoji { font-size: 48px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 1240px) {
  .kpis--6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tr--case { grid-template-columns: 40px 120px minmax(100px, 1fr) minmax(0, 1.4fr) 92px 80px; }
  .tr--case > :nth-child(6) { display: none; }
}
@media (max-width: 900px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpis--6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 14px; }
  .podium { gap: 8px; }
  .pod { padding: 22px 8px 14px; border-radius: 18px; }
  .pod--1 { padding-top: 32px; }
  .pod__ava { width: 44px; height: 44px; font-size: 18px; }
  .pod--1 .pod__ava { width: 56px; height: 56px; font-size: 22px; }
  .pod__name { font-size: 13px; }
  .pod__v, .pod--1 .pod__v { font-size: 14px; }
  .tr--lb { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .tr--lb > :nth-child(3), .tr--lb > :nth-child(4) { display: none; }
  .tr--lb > :nth-child(2) { grid-column: 2; }
  .tr--lb > :nth-child(5) { display: block; grid-column: 3; }
  .tr--case { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 10px; }
  .tr--case > :nth-child(1) { grid-row: 1; grid-column: 1; }
  .tr--case > :nth-child(2) { display: block; grid-row: 1; grid-column: 2; }
  .tr--case > :nth-child(3) { display: flex; grid-row: 2; grid-column: 1 / 3; }
  .tr--case > :nth-child(4) { display: flex; grid-row: 3; grid-column: 1 / -1; }
  .tr--case > :nth-child(5) { display: block; grid-row: 1; grid-column: 3; text-align: right; }
  .tr--case > :nth-child(6) { display: none; }
  .tr--case > :nth-child(7) { display: flex; grid-row: 2; grid-column: 3; }
  .cs-tools { margin-left: 0; width: 100%; }
  .cs-tools .search--sm { width: 100%; }
  .cs-tools .select--sm { flex: 1 1 140px; }
  .hbar { grid-template-columns: minmax(70px, 110px) minmax(0, 1fr) 52px; gap: 8px; font-size: 13px; }
  .heat__grid { gap: 2px; grid-template-columns: 24px repeat(var(--cols), minmax(0, 1fr)); }
  .heat__grid i { height: 14px; border-radius: 2px; }
  .heat__col { font-size: 9px; }
  .prof { padding: 18px; gap: 14px; }
  .prof__ava { width: 64px; height: 64px; font-size: 26px; }
  .prof__acts { width: 100%; }
  .prof__acts .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .card--flush .card__head .search--sm { flex: 1 1 160px; width: auto; }
}

/* 13. Живий режим: аватарки з Discord, підказки «що вже працює» -------------- */
.ava, .pod__ava, .prof__ava, .me__ava { position: relative; overflow: hidden; }
.ava img, .pod__ava img, .prof__ava img, .me__ava img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.login__err { padding: 10px 14px; border-radius: 12px; background: rgba(255,61,181,.16); color: var(--pink); font-weight: 600; font-size: 14px; }
.livebar { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--card); font-size: 14px; line-height: 1.5; color: var(--muted); }
.livebar b { color: var(--text); }
.livebar--on { border-color: rgba(200,255,77,.5); }
.livebar__dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--dim); }
.livebar--on .livebar__dot { background: var(--lime); box-shadow: 0 0 0 4px rgba(200,255,77,.15); }
.livebar ul { margin: 6px 0 0; padding-left: 18px; }
.pcard__tag--live { background: var(--lime); color: var(--bg); }

/* 14. Логи бота --------------------------------------------------------------- */
.kpi--btn { text-align: left; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s ease, transform .2s var(--spring); }
.kpi--btn:hover { border-color: var(--lime); transform: translateY(-2px); }
.lg-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.lg-auto { font-size: 13px; color: var(--muted); }
.lg-list { display: flex; flex-direction: column; }
.lg-row { display: grid; grid-template-columns: 128px 96px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 20px; border-top: 1px solid var(--line-dim); }
.lg-row--error { background: rgba(255,61,181,.06); }
.lg-time { font-size: 12px; color: var(--dim); padding-top: 2px; }
.lg-badge { --c: var(--muted); justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 999px; background: var(--card-2); font-size: 11px; font-weight: 700; white-space: nowrap; }
.lg-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.lg-text { margin: 0; font: 500 13px/1.5 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); max-height: 220px; overflow: auto; }
.lg-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line-dim); }
.lg-clear { color: var(--pink); font-size: 13px; }
@media (max-width: 900px) {
  .lg-row { grid-template-columns: auto minmax(0, 1fr); padding: 10px 14px; gap: 6px 10px; }
  .lg-text { grid-column: 1 / -1; font-size: 12px; }
}
