/* Emerald+ — единый слой поверх emerald.css: чат, настройки, формы, кнопки, чекбоксы, таблицы, админка, приложения.
 * Подключается в layout после emerald.css. Только body.emd, поэтому остальные страницы не затрагиваются. */

body.emd {
  --emd-grad: linear-gradient(135deg, #9dffbf 0%, #2dff78 42%, #10b84f 100%);
  --emd-panel: linear-gradient(180deg, rgba(18, 31, 24, .78), rgba(8, 14, 11, .82));
  --emd-shadow: 0 0 0 1px rgba(45, 255, 120, .18), 0 18px 60px rgba(0, 0, 0, .55), 0 0 70px rgba(45, 255, 120, .07);
  --emd-red: #ff5d6c;
  --emd-soft: rgba(214, 235, 222, .62);
  scrollbar-color: rgba(45, 255, 120, .38) transparent;
}
body.emd * { scrollbar-width: thin; scrollbar-color: rgba(45, 255, 120, .34) transparent; }
body.emd ::-webkit-scrollbar { width: 8px; height: 8px; }
body.emd ::-webkit-scrollbar-thumb { background: rgba(45, 255, 120, .28); border-radius: 8px; }
body.emd ::-webkit-scrollbar-thumb:hover { background: rgba(45, 255, 120, .5); }
body.emd ::selection { background: rgba(45, 255, 120, .35); color: #fff; }
body.emd :focus-visible { outline: 2px solid rgba(45, 255, 120, .75); outline-offset: 2px; }

@keyframes emdPop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes emdBubble { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes emdPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(45, 255, 120, .55); } 60% { box-shadow: 0 0 0 7px rgba(45, 255, 120, 0); } }

/* ── Кнопки ─────────────────────────────────────────── */
body.emd .btn { transition: transform .18s var(--emd-ease), box-shadow .2s, background .2s, border-color .2s, color .2s; }
body.emd .btn:active { transform: translateY(1px) scale(.985); }
body.emd .btn-primary {
  background: var(--emd-grad);
  color: var(--emd-ink);
  border: 0;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(45, 255, 120, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
}
body.emd .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(45, 255, 120, .42), inset 0 1px 0 rgba(255, 255, 255, .55); }
body.emd .btn-ghost {
  background: rgba(255, 255, 255, .035);
  color: #e9f6ee;
  border: 1px solid rgba(190, 255, 214, .24);
}
body.emd .btn-ghost:hover { border-color: rgba(45, 255, 120, .6); color: var(--emd); background: rgba(45, 255, 120, .08); }
body.emd .btn[disabled], body.emd .btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Поля форм ──────────────────────────────────────── */
body.emd .field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--emd-soft); margin-bottom: 6px; }
body.emd .field input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
body.emd .field select,
body.emd .field textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(190, 255, 214, .2);
  border-radius: 12px;
  color: #fff;
  padding: 11px 14px;
  font: inherit;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
body.emd .field textarea { resize: vertical; min-height: 84px; }
body.emd .field input::placeholder, body.emd .field textarea::placeholder { color: rgba(214, 235, 222, .32); }
body.emd .field input:focus, body.emd .field select:focus, body.emd .field textarea:focus {
  outline: none;
  border-color: rgba(45, 255, 120, .6);
  background: rgba(45, 255, 120, .05);
  box-shadow: 0 0 0 4px rgba(45, 255, 120, .14);
}
body.emd select { color-scheme: dark; }

/* Чекбоксы и радио */
body.emd input[type="checkbox"], body.emd input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 21px;
  height: 21px;
  flex: none;
  display: inline-grid;
  place-content: center;
  vertical-align: middle;
  margin: 0 8px 0 0;
  border: 1.5px solid rgba(190, 255, 214, .4);
  background: rgba(6, 12, 9, .7);
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s;
}
body.emd input[type="checkbox"] { border-radius: 7px; }
body.emd input[type="radio"] { border-radius: 50%; }
body.emd input[type="checkbox"]::after {
  content: "";
  width: 10px;
  height: 5px;
  border-left: 2.5px solid var(--emd-ink);
  border-bottom: 2.5px solid var(--emd-ink);
  transform: rotate(-45deg) scale(0);
  margin-top: -2px;
  transition: transform .16s var(--emd-ease);
}
body.emd input[type="radio"]::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--emd-ink); transform: scale(0); transition: transform .16s var(--emd-ease); }
body.emd input[type="checkbox"]:checked, body.emd input[type="radio"]:checked { background: var(--emd-grad); border-color: transparent; box-shadow: 0 0 14px rgba(45, 255, 120, .45); }
body.emd input[type="checkbox"]:checked::after { transform: rotate(-45deg) scale(1); }
body.emd input[type="radio"]:checked::after { transform: scale(1); }

/* ── Таблицы и карточки админки / приложений ────────── */
body.emd table { width: 100%; border-collapse: collapse; }
body.emd th { font: 700 11px var(--emd-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--emd); text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(190, 255, 214, .22); }
body.emd td { padding: 11px 12px; border-bottom: 1px solid rgba(190, 255, 214, .08); }
body.emd tbody tr { transition: background .15s; }
body.emd tbody tr:hover { background: rgba(45, 255, 120, .06); }

body.emd .section .card {
  background: var(--emd-panel);
  border: 1px solid rgba(190, 255, 214, .16);
  border-radius: 20px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .35);
  transition: border-color .2s, box-shadow .25s, transform .25s var(--emd-ease);
}
body.emd .section .card:hover { border-color: rgba(45, 255, 120, .38); box-shadow: 0 14px 44px rgba(0, 0, 0, .45), 0 0 34px rgba(45, 255, 120, .08); }
body.emd .grid-4 > .card .mono { text-shadow: 0 0 22px rgba(45, 255, 120, .35); }

body.emd .admin-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
body.emd .admin-page-head h1, body.emd .admin-page-head h2 { margin: 0; letter-spacing: -.01em; }
body.emd .admin-subnav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
body.emd .admin-subnav .btn { padding: 8px 15px; font-size: 13px; }
body.emd .admin-search-wrap input { border-radius: 999px; }
body.emd .support-thread-item { border-radius: 14px; border: 1px solid transparent; transition: background .18s, border-color .18s; }
body.emd .support-thread-item:hover, body.emd .support-thread-item.active { background: rgba(45, 255, 120, .09); border-color: rgba(45, 255, 120, .35); }

body.emd .feature-card { border-radius: 22px; }
body.emd .feature-card .btn-primary { font-size: 13px; }
body.emd .product-badge { background: rgba(45, 255, 120, .14); color: var(--emd); border: 1px solid rgba(45, 255, 120, .4); border-radius: 999px; padding: 3px 10px; font: 700 11px var(--emd-mono); letter-spacing: .08em; }
body.emd .emd-rest .grid > p { padding: 34px 20px; border: 1px dashed rgba(190, 255, 214, .22); border-radius: 22px; background: rgba(255, 255, 255, .02); }

/* ── Модальные окна ─────────────────────────────────── */
body.emd .modal-overlay { background: radial-gradient(900px 520px at 50% 0%, rgba(45, 255, 120, .09), transparent 62%), rgba(2, 6, 4, .78); backdrop-filter: blur(10px); }
body.emd .modal-box { border-radius: 24px; background: var(--emd-panel) !important; border: 1px solid rgba(190, 255, 214, .2); box-shadow: var(--emd-shadow); animation: emdPop .28s var(--emd-ease) both; }
body.emd .chat-close-btn {
  width: 36px;
  height: 36px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(190, 255, 214, .22);
  background: rgba(255, 255, 255, .04);
  color: #dff5e8;
  cursor: pointer;
  transition: transform .25s var(--emd-ease), background .18s, border-color .18s, color .18s;
}
body.emd .chat-close-btn:hover { transform: rotate(90deg); border-color: rgba(45, 255, 120, .6); color: var(--emd); background: rgba(45, 255, 120, .1); }
body.emd .chat-close-btn.pm-back-btn:hover { transform: translateX(-2px); }

/* ═══════════════ ЧАТ ═══════════════ */
body.emd .chat-overlay { padding: 18px !important; }
body.emd .chat-shell {
  position: relative;
  width: 100%;
  max-width: min(620px, 100%);
  height: min(780px, 92vh);
  height: min(780px, 92dvh);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 25, 19, .97), rgba(6, 11, 8, .985)) !important;
  border: 1px solid rgba(190, 255, 214, .2);
  box-shadow: var(--emd-shadow);
}
body.emd .chat-shell::before { /* тонкая светящаяся окантовка */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(45, 255, 120, .6), transparent 32%, transparent 68%, rgba(45, 255, 120, .28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}
body.emd .chat-header { position: relative; z-index: 2; padding: 14px 18px; gap: 14px; background: linear-gradient(180deg, rgba(45, 255, 120, .08), transparent); border-bottom: 1px solid rgba(190, 255, 214, .13); }
body.emd .chat-header-av { width: 46px; height: 46px; border: 2px solid rgba(45, 255, 120, .6); box-shadow: 0 0 0 4px rgba(45, 255, 120, .1), 0 0 24px rgba(45, 255, 120, .3); }
body.emd .chat-header-name { font-size: 16px; font-weight: 700; letter-spacing: .01em; }
body.emd .chat-header-status { font: 600 11px var(--emd-mono); letter-spacing: .04em; color: var(--emd-soft); display: flex; align-items: center; gap: 6px; }
body.emd .chat-header-status.is-online { color: var(--emd); }
body.emd .chat-header-status.is-online::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--emd); animation: emdPulse 2s infinite; }
body.emd .chat-hme-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font: 700 10px var(--emd-mono); letter-spacing: .08em; }
body.emd .chat-hme-badge::before { content: ""; width: 10px; height: 10px; background: currentColor; -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat; mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>") center/contain no-repeat; }

body.emd .chat-pinned, body.emd .chat-reply-bar {
  margin: 8px 12px 0;
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(45, 255, 120, .07);
  border: 1px solid rgba(45, 255, 120, .22);
  gap: 10px;
}
body.emd .chat-pinned-label, body.emd .chat-reply-label { font: 700 10px var(--emd-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--emd); }
body.emd .chat-pinned-text, body.emd .chat-reply-text { color: rgba(240, 250, 244, .85); font-size: 13px; }
body.emd .chat-reply-accent { width: 3px; align-self: stretch; border-radius: 3px; background: var(--emd-grad); }
body.emd .chat-reply-close { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .07); color: #fff; cursor: pointer; }

body.emd .chat-messages {
  padding: 18px clamp(12px, 4vw, 26px);
  gap: 5px;
  background:
    radial-gradient(640px 280px at 50% 0%, rgba(45, 255, 120, .07), transparent 70%),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(45, 255, 120, .02) 31px 32px);
}
body.emd .chat-bubble {
  max-width: min(80%, 460px);
  padding: 9px 13px 7px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .3);
  animation: emdBubble .28s var(--emd-ease) both;
}
body.emd .chat-bubble.mine {
  background: var(--emd-grad);
  color: var(--emd-ink);
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 26px rgba(45, 255, 120, .22), inset 0 1px 0 rgba(255, 255, 255, .4);
}
body.emd .chat-bubble.theirs {
  background: linear-gradient(180deg, rgba(30, 48, 38, .82), rgba(17, 28, 22, .82));
  border: 1px solid rgba(190, 255, 214, .16);
  border-bottom-left-radius: 6px;
  color: #f3f8f5;
}
body.emd .chat-bubble.pinned { border-color: rgba(45, 255, 120, .7); box-shadow: 0 0 0 1px rgba(45, 255, 120, .25), 0 8px 26px rgba(45, 255, 120, .2); }
body.emd .chat-bubble.pending { opacity: .62; }
body.emd .chat-bubble .bubble-time { font: 600 10px var(--emd-mono); letter-spacing: .02em; opacity: .62; margin-top: 3px; }
body.emd .chat-bubble.mine .read-tick { color: rgba(4, 40, 18, .55); }
body.emd .chat-bubble.mine .read-tick-read { color: #043d19; opacity: 1; }
body.emd .chat-bubble .reply-preview {
  margin: 0 0 7px;
  padding: 6px 9px;
  border-left: 3px solid var(--emd);
  border-radius: 10px;
  background: rgba(0, 0, 0, .18);
  opacity: 1;
  cursor: pointer;
  transition: background .18s;
}
body.emd .chat-bubble .reply-preview:hover { background: rgba(0, 0, 0, .28); }
body.emd .chat-bubble.mine .reply-preview { border-left-color: #06341a; background: rgba(4, 40, 18, .14); }
body.emd .reply-preview-label { font: 700 9.5px var(--emd-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--emd); }
body.emd .chat-bubble.mine .reply-preview-label { color: #06341a; }
body.emd .reply-preview-text { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.emd .bubble-flash { outline: 2px solid var(--emd); outline-offset: 3px; border-radius: 20px; }

/* Фото в сообщениях */
body.emd .bubble-media { margin: -2px -5px 6px; border-radius: 15px; overflow: hidden; background: rgba(0, 0, 0, .25); max-width: 100%; }
body.emd .bubble-media .bubble-img { display: block; width: 100%; max-height: 340px; object-fit: cover; cursor: zoom-in; border-radius: 0; margin: 0; transition: transform .4s var(--emd-ease); }
body.emd .bubble-media:hover .bubble-img { transform: scale(1.035); }
body.emd .bubble-media.is-error { padding: 18px; font-size: 12px; color: var(--emd-soft); text-align: center; }
body.emd .bubble-reactions { margin-top: 6px; gap: 5px; }
body.emd .bubble-react-pill { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; padding: 2px 8px; }
body.emd .chat-bubble.mine .bubble-react-pill { background: rgba(4, 40, 18, .18); border-color: rgba(4, 40, 18, .25); }
body.emd .chat-bubble-actions { border-radius: 50%; background: rgba(6, 12, 9, .85); border: 1px solid rgba(190, 255, 214, .22); color: #fff; }

/* Ввод сообщения */
body.emd .chat-attach-preview { padding: 10px 16px; gap: 12px; background: rgba(45, 255, 120, .06); border-top: 1px solid rgba(45, 255, 120, .2); }
body.emd .chat-attach-preview img { width: 58px; height: 58px; border-radius: 14px; border: 1px solid rgba(45, 255, 120, .5); box-shadow: 0 0 18px rgba(45, 255, 120, .2); }
body.emd .chat-attach-clear { border-color: rgba(255, 93, 108, .5); color: var(--emd-red); transition: background .18s; }
body.emd .chat-attach-clear:hover { background: rgba(255, 93, 108, .14); }
body.emd .chat-input-area {
  padding: 12px 14px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 10px;
  background: linear-gradient(180deg, rgba(6, 12, 9, .7), rgba(4, 8, 6, .95));
  border-top: 1px solid rgba(190, 255, 214, .13);
}
body.emd .chat-textarea {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 23px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(190, 255, 214, .2);
  color: #fff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
body.emd .chat-textarea::placeholder { color: rgba(214, 235, 222, .35); }
body.emd .chat-textarea:focus { outline: none; border-color: rgba(45, 255, 120, .6); background: rgba(45, 255, 120, .05); box-shadow: 0 0 0 4px rgba(45, 255, 120, .13); }
body.emd .chat-attach-btn { width: 46px; height: 46px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1px solid rgba(190, 255, 214, .22); background: rgba(255, 255, 255, .04); color: #dff5e8; cursor: pointer; transition: transform .2s var(--emd-ease), border-color .18s, color .18s, background .18s; }
body.emd .chat-attach-btn:hover { border-color: rgba(45, 255, 120, .65); color: var(--emd); background: rgba(45, 255, 120, .1); transform: rotate(-12deg); }
body.emd .chat-send-btn { width: 46px; height: 46px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: var(--emd-grad); color: var(--emd-ink); cursor: pointer; box-shadow: 0 8px 22px rgba(45, 255, 120, .38), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .2s var(--emd-ease), box-shadow .2s; }
body.emd .chat-send-btn:hover { transform: scale(1.08) rotate(-6deg); box-shadow: 0 12px 30px rgba(45, 255, 120, .55); }
body.emd .chat-send-btn:active { transform: scale(.94); }

/* Контекстное меню и реакции */
body.emd .chat-ctx, body.emd .chat-react-picker { border-radius: 18px; padding: 6px; background: rgba(9, 15, 12, .97); border: 1px solid rgba(190, 255, 214, .22); box-shadow: 0 18px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(45, 255, 120, .08); animation: emdPop .18s var(--emd-ease) both; }
body.emd .ctx-item { border-radius: 12px; padding: 10px 14px; font-size: 13.5px; }
body.emd .chat-react-picker button { border-radius: 12px; transition: transform .16s var(--emd-ease), background .16s; }
body.emd .chat-react-picker button:hover { transform: scale(1.25) translateY(-2px); background: rgba(45, 255, 120, .12); }

/* ═══════════════ НАСТРОЙКИ ═══════════════ */
body.emd .settings-modal-box {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(14, 25, 19, .97), rgba(6, 11, 8, .985)) !important;
  border: 1px solid rgba(190, 255, 214, .2);
  box-shadow: var(--emd-shadow);
}
body.emd .settings-modal-head { padding: 20px 26px 12px; }
body.emd .settings-modal-head h3 { font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
body.emd .settings-modal-body { padding: 4px 26px 26px; }

body.emd .settings-tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-bottom-width: 1px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  color: var(--emd-soft);
  background: transparent;
  transition: color .18s, background .18s, border-color .18s;
}
body.emd .settings-tab-btn::before { content: ""; width: 20px; height: 20px; flex: none; background: currentColor; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
body.emd .settings-tab-btn:hover { color: #fff; background: rgba(255, 255, 255, .05); }
body.emd .settings-tab-btn.active { color: var(--emd); background: linear-gradient(90deg, rgba(45, 255, 120, .17), rgba(45, 255, 120, .03)); border-color: rgba(45, 255, 120, .32); box-shadow: inset 3px 0 0 var(--emd); }
body.emd .settings-tab-btn[data-tab="main"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/></svg>"); }
body.emd .settings-tab-btn[data-tab="privacy"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/></svg>"); }
body.emd .settings-tab-btn[data-tab="music"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M9 18V5l12-2v13'/><circle cx='6' cy='18' r='3'/><circle cx='18' cy='16' r='3'/></svg>"); }
body.emd .settings-tab-btn[data-tab="security"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='11' width='16' height='10' rx='2'/><path d='M8 11V7a4 4 0 0 1 8 0v4'/></svg>"); }
body.emd .settings-tab-btn[data-tab="sessions"] { --ico: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='14' height='11' rx='2'/><path d='M8 19h4M10 15v4'/><rect x='17' y='9' width='4' height='10' rx='1'/></svg>"); }

body.emd .settings-block { margin: 0 0 14px; padding: 18px 20px; border: 1px solid rgba(190, 255, 214, .13); border-radius: 18px; background: var(--emd-panel); }
body.emd .settings-block-title { font: 700 11px var(--emd-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--emd); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
body.emd .settings-block p { line-height: 1.5; }
body.emd .settings-block .btn-ghost.btn-sm { border-color: rgba(45, 255, 120, .4); color: var(--emd); }
body.emd .settings-block .btn-ghost.btn-sm:hover { background: rgba(45, 255, 120, .14); border-color: var(--emd); color: #fff; }
body.emd .settings-msg { padding: 9px 13px; border-radius: 12px; font-size: 13px; background: rgba(45, 255, 120, .1); border: 1px solid rgba(45, 255, 120, .32); }
body.emd .avatar-change-area { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
body.emd .avatar-change-area .profile-avatar { width: 84px !important; height: 84px !important; border: 2px solid rgba(45, 255, 120, .55); box-shadow: 0 0 0 5px rgba(45, 255, 120, .1), 0 0 30px rgba(45, 255, 120, .25); }
body.emd .avatar-change-btns { display: flex; gap: 8px; flex-wrap: wrap; }
body.emd .privacy-options, body.emd .twofa-options { display: grid; gap: 8px; }
body.emd .privacy-option { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; cursor: pointer; transition: border-color .18s, background .18s, transform .18s var(--emd-ease); }
body.emd .privacy-option:hover { transform: translateX(3px); border-color: rgba(45, 255, 120, .4); }
body.emd .notify-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
body.emd .code-input { letter-spacing: .4em; text-align: center; font: 700 20px var(--emd-mono); }
body.emd .music-settings-cover, body.emd .music-cover-preview { border-radius: 16px; border: 1px solid rgba(190, 255, 214, .2); }

/* ПК: настройки в две колонки — меню слева, содержимое справа */
@media (min-width: 769px) {
  body.emd .settings-modal-box { width: min(940px, 96vw); max-width: none; height: min(740px, 92dvh); max-height: min(740px, 92dvh); }
  body.emd .settings-modal-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); column-gap: 26px; align-content: start; }
  body.emd .settings-tabs { grid-column: 1; grid-row: 1 / span 12; align-self: start; position: sticky; top: 0; flex-direction: column; gap: 6px; margin: 0; padding: 4px 0 0; border: 0; background: transparent; overflow: visible; }
  body.emd .settings-tab-panel { grid-column: 2; min-width: 0; animation: emdPop .26s var(--emd-ease) both; }
}

/* Телефон: окна на весь экран */
@media (max-width: 768px) {
  body.emd .chat-overlay { padding: 0 !important; }
  body.emd .chat-shell { max-width: none; height: 100vh; height: 100dvh; border-radius: 0; border: 0; }
  body.emd .chat-shell::before { display: none; }
  body.emd .chat-bubble { max-width: 86%; }
  body.emd .settings-modal-box { width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; border: 0; }
  body.emd .settings-modal-head { padding: 16px 16px 8px; }
  body.emd .settings-modal-body { padding: 4px 14px 22px; }
  body.emd .settings-tabs { gap: 6px; padding-bottom: 12px; margin-bottom: 8px; border-bottom: 0; background: transparent; overflow-x: auto; flex-wrap: nowrap; }
  body.emd .settings-tab-btn { padding: 9px 13px; border-radius: 999px; font-size: 13px; }
  body.emd .settings-block { padding: 16px; border-radius: 16px; }

  /* Отдельная страница /settings: меню разделов карточками со стрелкой */
  body.emd.pm-settings.pm-menu .settings-tabs { flex-direction: column; gap: 10px; overflow: visible; padding-bottom: 0; }
  body.emd.pm-settings.pm-menu .settings-tab-btn { padding: 16px; border-radius: 18px; font-size: 16px; background: var(--emd-panel); border: 1px solid rgba(190, 255, 214, .16); box-shadow: none; }
  body.emd.pm-settings.pm-menu .settings-tab-btn::after { content: "›"; margin-left: auto; font-size: 24px; line-height: 1; color: var(--emd); opacity: .8; }
  body.emd.pm-settings.pm-menu .settings-tab-btn.active { color: var(--emd-soft); box-shadow: none; }
  body.emd.pm-settings .settings-modal-head { position: sticky; top: 0; z-index: 3; background: rgba(6, 11, 8, .82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(190, 255, 214, .1); }
  body.emd.pm-settings .settings-modal-body { padding-top: 14px; }
  /* страницы чата и настроек: фирменный изумрудно-чёрный фон вместо серо-синего */
  body.emd.pm-chat #chatModal,
  body.emd.pm-settings #settingsModal { background: radial-gradient(760px 420px at 50% -6%, rgba(45, 255, 120, .11), transparent 62%), #040705 !important; }
  body.emd.pm-chat #chatModal .chat-shell,
  body.emd.pm-settings #settingsModal .settings-modal-box { background: transparent !important; box-shadow: none; }
  body.emd.pm-settings #supportFab, body.emd.pm-settings #supportPanel { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.emd .chat-bubble, body.emd .modal-box, body.emd .chat-ctx, body.emd .chat-react-picker, body.emd .settings-tab-panel { animation: none; }
  body.emd .chat-header-status.is-online::before { animation: none; }
}

/* ═══ Материал кнопок по макету дизайнера (2026-10-03) ═══
   Почти плоские, без внешнего свечения, тонкие трещины «битого стекла» только у краёв (центр чистый).
   Один материал на все кнопки: .emd-btn (герои), .btn-primary / .btn-ghost (весь сайт).
   Круглые кнопки шапки (лого, Войти, аватар, меню) — стеклянный круг с трещинами у кромки, как лого в макете. */
body.emd {
  --xb-cracks-p: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23eaffee' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='12.6,21.8 29.0,20.2 46.0,26.8 60.2,33.3 68.0,40.1' stroke-width='0.8' stroke-opacity='0.24'/%3E%3Cline x1='29.0' y1='20.2' x2='41.0' y2='21.2' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='20.9,14.4 34.7,2.8 51.5,1.0' stroke-width='0.6' stroke-opacity='0.23'/%3E%3Cpolyline points='10.7,24.8 15.3,41.0 12.4,52.9 0.8,61.8' stroke-width='0.6' stroke-opacity='0.11'/%3E%3Cline x1='15.3' y1='41.0' x2='14.7' y2='53.0' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='8.2,69.3 23.4,75.6 35.3,82.0 42.6,95.6' stroke-width='0.8' stroke-opacity='0.26'/%3E%3Cline x1='23.4' y1='75.6' x2='14.9' y2='84.1' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='5.7,69.2 23.6,82.4 43.2,87.9 64.0,95.8 76.9,94.1' stroke-width='0.8' stroke-opacity='0.27'/%3E%3Cline x1='23.6' y1='82.4' x2='30.0' y2='72.2' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='18.4,14.3 25.4,18.5 30.6,24.3' stroke-width='0.6' stroke-opacity='0.19'/%3E%3Cpolyline points='8.7,25.7 15.9,20.9 19.6,14.7' stroke-width='0.6' stroke-opacity='0.15'/%3E%3Cline x1='15.9' y1='20.9' x2='7.8' y2='12.0' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='6.0,32.0 20.7,30.4 34.6,34.9 54.5,32.0' stroke-width='0.8' stroke-opacity='0.14'/%3E%3Cpolyline points='11.2,73.7 28.5,73.1 36.6,72.1 49.0,61.1' stroke-width='0.8' stroke-opacity='0.20'/%3E%3Cline x1='28.5' y1='73.1' x2='40.5' y2='73.6' stroke-width='.5' stroke-opacity='0.16'/%3E%3C/g%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 100' preserveAspectRatio='none'%3E%3Cg transform='translate(140 0) scale(-1 1)' fill='none' stroke='%23eaffee' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='15.0,20.7 18.4,14.2 27.1,1.0 23.2,1.0 16.5,1.0' stroke-width='0.8' stroke-opacity='0.13'/%3E%3Cpolyline points='23.8,10.0 34.6,1.0 55.0,1.0 63.2,1.0' stroke-width='0.5' stroke-opacity='0.16'/%3E%3Cpolyline points='21.4,11.2 37.7,7.6 61.7,4.6' stroke-width='0.5' stroke-opacity='0.20'/%3E%3Cpolyline points='31.0,7.0 45.1,1.0 59.7,1.0 79.7,1.0 89.7,1.0' stroke-width='0.8' stroke-opacity='0.22'/%3E%3Cpolyline points='30.3,92.3 43.6,90.2 56.7,90.5' stroke-width='0.8' stroke-opacity='0.25'/%3E%3Cpolyline points='8.0,32.5 19.4,27.8 34.2,27.7' stroke-width='0.6' stroke-opacity='0.13'/%3E%3Cline x1='19.4' y1='27.8' x2='24.1' y2='16.8' stroke-width='.5' stroke-opacity='0.16'/%3E%3Cpolyline points='17.6,85.9 30.8,87.7 52.5,86.8' stroke-width='0.5' stroke-opacity='0.19'/%3E%3Cpolyline points='20.5,13.4 37.2,6.8 42.0,1.0' stroke-width='0.5' stroke-opacity='0.23'/%3E%3Cpolyline points='20.7,14.5 41.4,2.4 44.9,1.0' stroke-width='0.6' stroke-opacity='0.21'/%3E%3Cline x1='41.4' y1='2.4' x2='52.8' y2='-1.4' stroke-width='.5' stroke-opacity='0.16'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat;
  --xb-cracks-g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 100' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%237dff9a' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6.1,64.0 22.7,72.5 35.9,87.7 47.7,90.9 58.4,92.2' stroke-width='0.5' stroke-opacity='0.18'/%3E%3Cline x1='22.7' y1='72.5' x2='33.5' y2='67.2' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='13.0,19.8 17.3,27.8 19.8,36.0 28.1,40.8' stroke-width='0.5' stroke-opacity='0.15'/%3E%3Cline x1='17.3' y1='27.8' x2='27.9' y2='22.1' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='11.0,26.7 28.9,21.1 46.6,6.5 61.1,1.0 65.1,1.0' stroke-width='0.5' stroke-opacity='0.16'/%3E%3Cline x1='28.9' y1='21.1' x2='23.5' y2='10.4' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='7.2,72.9 21.7,66.3 37.9,63.3 46.1,66.3' stroke-width='0.5' stroke-opacity='0.29'/%3E%3Cline x1='21.7' y1='66.3' x2='27.7' y2='76.7' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='13.7,80.6 28.4,86.0 37.6,99.0' stroke-width='0.5' stroke-opacity='0.25'/%3E%3Cpolyline points='27.5,91.9 39.4,88.8 57.9,90.0 72.2,87.6 86.4,93.3' stroke-width='0.5' stroke-opacity='0.17'/%3E%3Cpolyline points='25.0,90.5 30.0,97.1 31.8,99.0 28.3,99.0 26.2,99.0' stroke-width='0.8' stroke-opacity='0.11'/%3E%3Cpolyline points='2.8,53.9 12.4,45.5 17.4,30.3 28.4,11.8 33.2,1.0' stroke-width='0.5' stroke-opacity='0.13'/%3E%3Cpolyline points='29.4,92.3 39.8,95.3 48.6,96.9' stroke-width='0.5' stroke-opacity='0.19'/%3E%3C/g%3E%3C/svg%3E") left center / auto 100% no-repeat, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 140 100' preserveAspectRatio='none'%3E%3Cg transform='translate(140 0) scale(-1 1)' fill='none' stroke='%237dff9a' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3.7,47.1 11.8,57.0 17.9,69.5' stroke-width='0.6' stroke-opacity='0.24'/%3E%3Cpolyline points='4.1,56.7 13.6,47.8 22.2,41.3 30.8,35.1' stroke-width='0.6' stroke-opacity='0.24'/%3E%3Cpolyline points='26.8,9.9 44.0,9.9 64.8,22.0 73.5,26.0 83.6,28.1' stroke-width='0.8' stroke-opacity='0.21'/%3E%3Cpolyline points='22.7,88.3 37.9,87.1 56.4,85.1' stroke-width='0.6' stroke-opacity='0.21'/%3E%3Cpolyline points='24.4,9.6 38.0,13.3 55.2,22.1 65.1,23.6' stroke-width='0.6' stroke-opacity='0.18'/%3E%3Cpolyline points='11.3,78.5 16.8,73.2 17.9,57.1 20.2,48.0' stroke-width='0.8' stroke-opacity='0.15'/%3E%3Cline x1='16.8' y1='73.2' x2='25.6' y2='65.1' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='9.3,25.5 26.5,26.3 40.6,26.3' stroke-width='0.8' stroke-opacity='0.29'/%3E%3Cline x1='26.5' y1='26.3' x2='34.2' y2='17.1' stroke-width='.5' stroke-opacity='0.18'/%3E%3Cpolyline points='2.1,55.6 25.9,51.5 38.6,53.2' stroke-width='0.6' stroke-opacity='0.14'/%3E%3Cpolyline points='2.0,50.2 22.1,37.0 27.1,31.6 46.9,23.5' stroke-width='0.8' stroke-opacity='0.13'/%3E%3C/g%3E%3C/svg%3E") right center / auto 100% no-repeat;
  --xb-circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M14 30 L42 8 L36 34 Z' fill='%23bfffd0' fill-opacity='.05'/%3E%3Cpath d='M60 90 L88 66 L70 62 Z' fill='%23bfffd0' fill-opacity='.035'/%3E%3Cpath d='M8 58 L22 80 L30 60 Z' fill='%23000' fill-opacity='.12'/%3E%3Cg fill='none' stroke='%238dffa8' stroke-linecap='round'%3E%3Cpolyline points='75.1,92.4 70.6,85.4 68.5,75.1 66.8,66.6' stroke-width='0.5' stroke-opacity='0.39'/%3E%3Cpolyline points='99.1,54.4 96.8,49.4 92.2,44.6 91.4,39.4' stroke-width='0.7' stroke-opacity='0.39'/%3E%3Cpolyline points='8.9,77.3 16.8,73.5 26.4,74.2 31.2,76.1' stroke-width='0.5' stroke-opacity='0.22'/%3E%3Cpolyline points='94.3,28.4 89.8,34.8 84.4,42.8 83.6,53.5' stroke-width='0.5' stroke-opacity='0.23'/%3E%3Cpolyline points='98.4,40.4 93.0,38.1 82.2,37.6' stroke-width='0.5' stroke-opacity='0.42'/%3E%3Cpolyline points='8.4,76.5 13.0,69.3 15.4,61.3 14.1,50.5' stroke-width='0.7' stroke-opacity='0.45'/%3E%3Cpolyline points='0.7,51.2 9.4,49.0 18.3,41.1' stroke-width='0.7' stroke-opacity='0.23'/%3E%3Cpolyline points='21.5,90.2 31.5,92.7 38.1,91.7 47.9,85.8' stroke-width='0.6' stroke-opacity='0.28'/%3E%3Cpolyline points='30.0,5.0 26.5,12.0 20.3,22.0' stroke-width='0.6' stroke-opacity='0.31'/%3E%3Cpolyline points='15.0,84.7 14.2,78.7 16.3,68.2' stroke-width='0.6' stroke-opacity='0.20'/%3E%3Cpolyline points='38.3,97.9 40.9,93.3 47.2,88.8 51.9,80.5' stroke-width='0.5' stroke-opacity='0.38'/%3E%3C/g%3E%3C/svg%3E") center / 100% 100% no-repeat;
  --xb-p-fill:
    radial-gradient(120% 90% at 50% -10%, rgba(255,255,255,.14), transparent 60%),
    linear-gradient(90deg, rgba(0,45,12,.26), transparent 20%, transparent 80%, rgba(0,45,12,.26)),
    linear-gradient(180deg, #49c557, #37ad48 50%, #26903a);
  --xb-g-fill:
    linear-gradient(90deg, rgba(60,170,90,.16), transparent 22%, transparent 78%, rgba(60,170,90,.16)),
    linear-gradient(180deg, #0f1d1a, #09120f);
}

/* Зелёная */
body.emd .btn.btn-primary,
body.emd #friendActionArea .btn.btn-primary,
body.emd .emd-btn-primary,
body.emd .feed-comment-send {
  color: #0b1f0e;
  background: var(--xb-cracks-p), var(--xb-p-fill);
  border: 1px solid rgba(160, 245, 170, .6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,40,10,.25);
  text-shadow: none;
}
body.emd .btn.btn-primary:hover,
body.emd #friendActionArea .btn.btn-primary:hover,
body.emd .emd-btn-primary:hover,
body.emd .feed-comment-send:hover {
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 -1px 0 rgba(0,40,10,.25), 0 8px 24px rgba(40,170,70,.22);
}

/* Тёмная */
body.emd .btn.btn-ghost,
body.emd .emd-btn-ghost {
  color: #f2f5f3;
  background: var(--xb-cracks-g), var(--xb-g-fill);
  border: 1px solid rgba(110, 215, 130, .5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: none;
}
body.emd .btn.btn-ghost:hover,
body.emd .emd-btn-ghost:hover {
  color: #fff;
  border-color: rgba(120, 235, 145, .75);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 24px rgba(40,170,70,.12);
}

/* Общее: пилюля, средняя жирность, без «прыжков» с масштабом */
body.emd .btn.btn-primary,
body.emd .btn.btn-ghost { border-radius: 999px; font-weight: 600; }
body.emd .btn.btn-primary:hover,
body.emd .btn.btn-ghost:hover { transform: translateY(-1px); }
body.emd .btn.btn-primary:disabled, body.emd .btn.btn-primary[disabled],
body.emd .btn.btn-ghost:disabled, body.emd .btn.btn-ghost[disabled] { filter: none; transform: none; box-shadow: none; }

/* Большие кнопки героев */
body.emd .emd-btn {
  min-height: 60px;
  min-width: 240px;
  padding: 0 40px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
body.emd .emd-btn:hover { transform: translateY(-2px); }
body.emd .emd-btn:active { transform: translateY(0) scale(.99); }
body.emd .emd-btn.emd-crystal::after { display: none; }
@media (max-width: 640px) {
  body.emd .emd-btn { min-width: 0; min-height: 54px; padding: 0 28px; font-size: 16px; }
}

/* Круги шапки: как лого в макете — тёмное стекло, зелёная кромка, трещины у края, без ореола */
body.emd .emd-logo,
body.emd .emd-orb,
body.emd .emd-nav .menu-toggle {
  background: var(--xb-circle), radial-gradient(circle at 38% 30%, #172a22, #0b1512 62%, #08100e);
  border: 1px solid rgba(110, 210, 130, .55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), inset 0 0 14px rgba(0,0,0,.35);
  backdrop-filter: none;
}
body.emd .emd-logo { animation: emdPop .55s var(--emd-ease) both; }
body.emd .emd-logo.emd-crystal::after,
body.emd .emd-orb.emd-crystal::after { display: none; }
body.emd .emd-logo:hover,
body.emd .emd-orb:hover,
body.emd .emd-nav .menu-toggle:hover {
  border-color: rgba(130, 235, 150, .8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 14px rgba(0,0,0,.35), 0 0 18px rgba(60,200,100,.18);
}
body.emd .emd-logo:hover { transform: scale(1.05); }
/* X: та же форма из logo_banner.png, но светлый зелёный с объёмом, как в макете */
body.emd .emd-logo img { opacity: 0; }
body.emd .emd-logo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg, #6fe57a 0%, #49cf57 45%, #2fae41 100%);
  -webkit-mask: url("/images/logo_banner.png") center / 58% 58% no-repeat;
          mask: url("/images/logo_banner.png") center / 58% 58% no-repeat;
}
body.emd .emd-avatar { background: #0b1512; }
body.emd.menu-open .emd-nav .menu-toggle {
  border-color: rgba(130, 235, 150, .85);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px rgba(60,200,100,.22);
}

/* ═══ Вкладки (профиль, инвентарь, друзья, магазин, X-Creator) — сегментный переключатель ═══
   Общая тёмная стеклянная «дорожка» с трещинами у краёв, неактивные — просто текст,
   активная — зелёная капсула из материала кнопок. :not(#x) — перебить старые !important из emerald.css. */
body.emd:not(#x) .emd-cat-tabs,
body.emd:not(#x) .friend-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  padding: 5px !important;
  border-radius: 26px;
  background: var(--xb-cracks-g), linear-gradient(180deg, #0f1d1a, #09120f) !important;
  border: 1px solid rgba(110, 215, 130, .4) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 0 18px rgba(0,0,0,.3);
}
body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab,
body.emd:not(#x) .friend-tabs > .friend-tab {
  margin: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font: 600 14px/1.15 var(--emd-font);
  color: rgba(232, 244, 236, .74) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  text-shadow: none;
  transform: none;
  transition: color .2s, background .2s, border-color .2s;
}
body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab:hover,
body.emd:not(#x) .friend-tabs > .friend-tab:hover {
  color: #fff !important;
  background: rgba(110, 215, 130, .08) !important;
  transform: none;
}
body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab.is-on,
body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab.active,
body.emd:not(#x) .friend-tabs > .friend-tab.active {
  color: #0b1f0e !important;
  background: var(--xb-cracks-p), var(--xb-p-fill) !important;
  border-color: rgba(160, 245, 170, .6) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,40,10,.25) !important;
}
body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab:focus-visible,
body.emd:not(#x) .friend-tabs > .friend-tab:focus-visible { outline: 2px solid rgba(120,235,145,.7); outline-offset: 1px; }
body.emd .emd-cat-tab.is-on .tab-badge,
body.emd .emd-cat-tab.active .tab-badge,
body.emd .emd-cat-tab.is-on .tab-msg-badge,
body.emd .emd-cat-tab.active .tab-msg-badge,
body.emd .friend-tab.active .tab-badge { background: #0b1f0e; color: #6fe57a; }
@media (max-width: 860px) {
  body.emd:not(#x) .emd-profile-body .tabs,
  body.emd:not(#x) .inv-tabs,
  body.emd:not(#x) .friend-tabs { flex-wrap: nowrap; width: auto; }
  body.emd:not(#x) .emd-cat-tabs > .emd-cat-tab,
  body.emd:not(#x) .friend-tabs > .friend-tab { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
}

/* Боковое меню настроек: активный пункт — тот же стеклянный материал */
body.emd .settings-tab-btn.active {
  color: #7ee08a;
  background: var(--xb-cracks-g), linear-gradient(90deg, rgba(55,173,72,.22), rgba(15,29,26,.55));
  border-color: rgba(110, 215, 130, .5);
  box-shadow: inset 3px 0 0 #49c557;
}
