/* ════════════════════════════════════════════════════════════════
   SESSION TESTS — тема GLYPH: интерфейс и эффекты из символов Unicode.
   Фон и эффекты рисует scripts/glyph.js (canvas). Здесь — палитра,
   шрифт и «рамки из символов» (border-image из SVG с ╭─╮│╰─╯).
   Текст вопросов, ответов и сообщений остаётся обычным — читаемым.
   ════════════════════════════════════════════════════════════════ */

[data-theme="glyph"] {
  --g-cyan: #7cf6ff;
  --g-violet: #b49bff;
  --g-pink: #ff7ad9;
  --g-dim: #3b4a63;
  --ig-body-bg: radial-gradient(ellipse at 50% -10%, #0d1424 0%, #05070d 60%, #020306 100%);
  --ig-surface: rgba(9, 13, 22, 0.86);
  --ig-surface-raised: rgba(13, 18, 30, 0.9);
  --ig-surface-input: #070a12;
  --ig-surface-hover: #111a2b;
  --ig-surface-btn: #0b1120;
  --ig-border: #1d2a42;
  --ig-border-light: #1d2a42;
  --ig-border-input: #22324f;
  --ig-border-focus: #7cf6ff;
  --ig-divider: #16213a;
  --ig-divider-strong: #0e172a;
  --ig-text: #e6f1ff;
  --ig-text-secondary: #a9bcd9;
  --ig-text-muted: #7385a3;
  --ig-text-dim: #56677f;
  --ig-text-faint: #3b4a63;
  --ig-text-btn: #e6f1ff;
  --ig-text-btn-muted: #7385a3;
  --ig-accent: #7cf6ff;
  --ig-accent2: #b49bff;
  --accent: #7cf6ff;
  --text-dim: #7385a3;
  --ig-accent-gradient: linear-gradient(135deg, #7cf6ff, #b49bff);
  --ig-accent-bg: rgba(124, 246, 255, 0.06);
  --ig-focus-ring: 0 0 0 3px rgba(124, 246, 255, 0.25);
  --ig-shadow: 0 0 60px rgba(124, 246, 255, 0.05), 0 0 120px rgba(0, 0, 0, 0.5);
  --ig-shadow-sm: 0 1px 16px rgba(0, 0, 0, 0.5);
  --ig-shadow-lg: 0 6px 60px rgba(0, 0, 0, 0.6), 0 0 120px rgba(124, 246, 255, 0.06);
  --ig-avatar-border: #22324f;
  --ig-avatar-placeholder: linear-gradient(135deg, #0f1a30, #1b1440);
  --ig-cover-bg: linear-gradient(135deg, #0a1020, #160f30);
  --ig-badge-bg: #0d1424;
  --ig-badge-border: #22324f;
  --ig-success: #6dffb3;
  --ig-success-bg: rgba(109, 255, 179, 0.07);
  --ig-error: #ff6b8b;
  --ig-error-bg: rgba(255, 107, 139, 0.07);
  --st-font-display: 'JetBrains Mono', 'Share Tech Mono', monospace;
}

body[data-theme="glyph"] { background: var(--ig-body-bg); color: var(--ig-text); }
body[data-theme="glyph"] #abstract-canvas,
body[data-theme="glyph"] #matrix-bg,
body[data-theme="glyph"] #aura-bg { display: none !important; }

/* Холст частиц — под интерфейсом */
#glyph-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; display: none; }
body[data-theme="glyph"] #glyph-bg { display: block; }
/* Контент — над холстом частиц. Шапку НЕ опускаем: её меню аватарки должно быть
   поверх страницы (раньше z-index: 1 прятал меню под контент — оно не нажималось). */
body[data-theme="glyph"] .st-main { position: relative; z-index: 1; }
body[data-theme="glyph"] .st-tabbar { position: fixed; z-index: 50; }

/* Заголовки — моноширинные, «терминальные» */
body[data-theme="glyph"] .st-logo-text,
body[data-theme="glyph"] .st-section-title,
body[data-theme="glyph"] .ig-header h1,
body[data-theme="glyph"] .ig-card-title,
body[data-theme="glyph"] h1, body[data-theme="glyph"] h2 {
  font-family: 'JetBrains Mono', 'Share Tech Mono', monospace !important;
  letter-spacing: .02em;
}
body[data-theme="glyph"] .st-logo-text { color: var(--g-cyan); text-shadow: 0 0 12px rgba(124, 246, 255, .45); }
body[data-theme="glyph"] .st-logo-cursor { background: var(--g-violet); }
body[data-theme="glyph"] .st-section-title::before { content: "▸ "; color: var(--g-cyan); }

/* ── Рамки из символов: ╭─╮ │ │ ╰─╯ ──
   SVG 30×30, 9 клеток по 10px; border-image растягивает края. */
body[data-theme="glyph"] .ig-card,
body[data-theme="glyph"] .st-hero,
body[data-theme="glyph"] .st-settings-summary,
body[data-theme="glyph"] .room-card,
body[data-theme="glyph"] #question,
body[data-theme="glyph"] .mx-hero,
body[data-theme="glyph"] .st-modal-card,
body[data-theme="glyph"] #resultModal .modal-content {
  border: 10px solid transparent !important;
  border-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' font-family='monospace' font-size='12' fill='%237cf6ff' fill-opacity='.55'%3E%3Ctext x='0' y='10'%3E%E2%95%AD%3C/text%3E%3Ctext x='10' y='10'%3E%E2%94%80%3C/text%3E%3Ctext x='20' y='10'%3E%E2%95%AE%3C/text%3E%3Ctext x='0' y='19'%3E%E2%94%82%3C/text%3E%3Ctext x='20' y='19'%3E%E2%94%82%3C/text%3E%3Ctext x='0' y='28'%3E%E2%95%B0%3C/text%3E%3Ctext x='10' y='28'%3E%E2%94%80%3C/text%3E%3Ctext x='20' y='28'%3E%E2%95%AF%3C/text%3E%3C/svg%3E") 10 round !important;
  border-radius: 0 !important;
  background-clip: padding-box;
  box-shadow: 0 0 40px rgba(124, 246, 255, .04);
}

/* Кнопки — [ текст ] в скобках из символов */
body[data-theme="glyph"] .st-btn,
body[data-theme="glyph"] .btn-pill,
body[data-theme="glyph"] .mx-btn,
body[data-theme="glyph"] .tb-btn,
body[data-theme="glyph"] #quiz .controls button {
  border-radius: 4px !important;
  font-family: 'JetBrains Mono', monospace !important;
}
body[data-theme="glyph"] .st-btn::before, body[data-theme="glyph"] #quiz .controls button::before { content: "[ "; opacity: .6; }
body[data-theme="glyph"] .st-btn::after, body[data-theme="glyph"] #quiz .controls button::after { content: " ]"; opacity: .6; }

/* Варианты ответа — с маркером ◇, правильный ◆ */
body[data-theme="glyph"] #answers button { border-radius: 4px !important; font-family: 'JetBrains Mono', monospace; }
body[data-theme="glyph"] #answers button.correct { box-shadow: inset 3px 0 0 var(--ig-success), 0 0 18px rgba(109, 255, 179, .18); }
body[data-theme="glyph"] #answers button.wrong { box-shadow: inset 3px 0 0 var(--ig-error); }

/* ── Прогресс из блоков ▏▎▍▌▋▊▉█ ── */
body[data-theme="glyph"] .st-quiz-progress { height: 14px !important; background: transparent !important; overflow: hidden; position: relative; }
body[data-theme="glyph"] .st-quiz-progress::before {
  content: "░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░";
  position: absolute; inset: 0; font: 12px/14px monospace; color: var(--g-dim); white-space: nowrap; overflow: hidden;
}
body[data-theme="glyph"] .st-quiz-progress-fill { position: relative; background: none !important; overflow: hidden; height: 14px !important; }
body[data-theme="glyph"] .st-quiz-progress-fill::before {
  content: "████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████";
  position: absolute; left: 0; top: 0; font: 12px/14px monospace; color: var(--g-cyan); white-space: nowrap; text-shadow: 0 0 8px rgba(124, 246, 255, .6);
}
body[data-theme="glyph"] .room-opt-bar { background: repeating-linear-gradient(90deg, rgba(124, 246, 255, .22) 0 6px, transparent 6px 8px) !important; }

/* Спиннер из шрифта Брайля (scripts/glyph.js меняет кадры) */
.st-gspin { display: inline-block; width: 1.2em; text-align: center; font-family: monospace; color: var(--g-cyan, #7cf6ff); }
body[data-theme="glyph"] .mx-spin, body[data-theme="glyph"] .room-voice-spin { border: 0 !important; animation: none !important; width: auto !important; height: auto !important; }

/* Скелетоны — ░▒▓ вместо серых плашек */
body[data-theme="glyph"] .st-skel { background: none !important; position: relative; overflow: hidden; color: var(--g-dim); }
body[data-theme="glyph"] .st-skel::after {
  content: "░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░░▒▓▒░";
  position: absolute; inset: 0; font: 11px/1 monospace; white-space: nowrap; animation: gSkel 1.6s linear infinite;
}
@keyframes gSkel { from { transform: translateX(-30%); } to { transform: translateX(0); } }

/* Текст «расшифровывается» — символы на время эффекта */
.g-scramble { color: var(--g-cyan); }

/* Нижнее меню и шапка */
body[data-theme="glyph"] .st-tabbar a.is-active { color: var(--g-cyan); }
body[data-theme="glyph"] .st-tabbar a::after { background: var(--g-cyan); box-shadow: 0 0 8px var(--g-cyan); }

@media (prefers-reduced-motion: reduce) {
  body[data-theme="glyph"] .st-skel::after { animation: none; }
}

/* ════════ GLYPH 2: символами становится всё оформление (scripts/glyphify.js) ════════ */

/* Весь текст — моноширинный (Cyrillic и казахские буквы есть в JetBrains Mono) */
body[data-theme="glyph"], body[data-theme="glyph"] * { font-family: 'JetBrains Mono', 'Share Tech Mono', ui-monospace, monospace !important; }
body[data-theme="glyph"] { letter-spacing: .01em; }

/* Иконки: SVG прячем, показываем символ */
.g-ico { display: none; }
body[data-theme="glyph"] .g-ico { display: inline-flex; align-items: center; justify-content: center; min-width: 1.1em; line-height: 1; font-weight: 700; font-style: normal; color: currentColor; text-shadow: 0 0 6px rgba(124, 246, 255, .35); }
body[data-theme="glyph"] svg.g-hide { display: none !important; }
body[data-theme="glyph"] .st-tab-icon .g-ico { font-size: 20px; }
body[data-theme="glyph"] .st-tabbar a.is-active .g-ico { color: var(--g-cyan); text-shadow: 0 0 10px var(--g-cyan); }
body[data-theme="glyph"] .st-tab-spotify .g-ico, body[data-theme="glyph"] .st-nav-spotify .g-ico, body[data-theme="glyph"] .room-np-open .g-ico { color: #1ed760; }

/* Фон-текстура из точек · у поверхностей */
body[data-theme="glyph"] .ig-card, body[data-theme="glyph"] .st-hero, body[data-theme="glyph"] .st-modal-card, body[data-theme="glyph"] #profileModal .modal-content, body[data-theme="glyph"] .mx-hero,
body[data-theme="glyph"] .room-card, body[data-theme="glyph"] .chat-view, body[data-theme="glyph"] #chatView, body[data-theme="glyph"] .ig-search-overlay, body[data-theme="glyph"] .st-dropdown, body[data-theme="glyph"] .mx-menu, body[data-theme="glyph"] .mx-devices {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='14'%20height='14'%20font-family='monospace'%20font-size='10'%20fill='%237cf6ff'%20fill-opacity='.08'%3E%3Ctext%20x='3'%20y='10'%3E%C2%B7%3C/text%3E%3C/svg%3E") !important;
  background-color: rgba(7, 10, 18, .92) !important;
}

/* ── Рамки из символов у всего интерактивного (тонкие, 6px) ── */
body[data-theme="glyph"] button:not(.st-tabbar *):not(.g-plain):not(.mx-more):not(.chat-msg *):not(.ig-react-pill):not(.mx-alert-x):not(.st-inapp-x),
body[data-theme="glyph"] .st-btn, body[data-theme="glyph"] a.mx-btn, body[data-theme="glyph"] .st-train-chip, body[data-theme="glyph"] .mx-tab, body[data-theme="glyph"] .tc-chip, body[data-theme="glyph"] .filter-btn,
body[data-theme="glyph"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]), body[data-theme="glyph"] textarea, body[data-theme="glyph"] select,
body[data-theme="glyph"] .mx-device, body[data-theme="glyph"] .st-settings-summary, body[data-theme="glyph"] .st-setting-row, body[data-theme="glyph"] .search-result-item, body[data-theme="glyph"] .chat-preview, body[data-theme="glyph"] .mx-card,
body[data-theme="glyph"] .room-member.has-np, body[data-theme="glyph"] .st-room-pill, body[data-theme="glyph"] .st-push-banner, body[data-theme="glyph"] .mx-search, body[data-theme="glyph"] .tb-q, body[data-theme="glyph"] .room-voice-status {
  border: 6px solid transparent !important;
  border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20font-family='monospace'%20font-size='12'%20fill='%237cf6ff'%20fill-opacity='.55'%3E%3Ctext%20x='0'%20y='10'%3E%E2%94%8C%3C/text%3E%3Ctext%20x='10'%20y='10'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='10'%3E%E2%94%90%3C/text%3E%3Ctext%20x='0'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='20'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='0'%20y='28'%3E%E2%94%94%3C/text%3E%3Ctext%20x='10'%20y='28'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='28'%3E%E2%94%98%3C/text%3E%3C/svg%3E") 10 round !important;
  border-radius: 0 !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}
/* Главные действия — двойная рамка ╔═╗ */
body[data-theme="glyph"] #resumeSessionBtn, body[data-theme="glyph"] .st-btn-accent, body[data-theme="glyph"] .mx-btn-green, body[data-theme="glyph"] .tb-primary, body[data-theme="glyph"] .st-add-test-btn, body[data-theme="glyph"] .st-add-test-fab, body[data-theme="glyph"] #next, body[data-theme="glyph"] .room-voice-join,
body[data-theme="glyph"] .st-auth .st-btn-accent, body[data-theme="glyph"] .music-hero-connect {
  border: 6px solid transparent !important;
  border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20font-family='monospace'%20font-size='12'%20fill='%237cf6ff'%20fill-opacity='.9'%3E%3Ctext%20x='0'%20y='10'%3E%E2%95%94%3C/text%3E%3Ctext%20x='10'%20y='10'%3E%E2%95%90%3C/text%3E%3Ctext%20x='20'%20y='10'%3E%E2%95%97%3C/text%3E%3Ctext%20x='0'%20y='19'%3E%E2%95%91%3C/text%3E%3Ctext%20x='20'%20y='19'%3E%E2%95%91%3C/text%3E%3Ctext%20x='0'%20y='28'%3E%E2%95%9A%3C/text%3E%3Ctext%20x='10'%20y='28'%3E%E2%95%90%3C/text%3E%3Ctext%20x='20'%20y='28'%3E%E2%95%9D%3C/text%3E%3C/svg%3E") 10 round !important;
  border-radius: 0 !important;
  background: rgba(124, 246, 255, .12) !important;
  color: var(--g-cyan) !important;
  box-shadow: 0 0 18px rgba(124, 246, 255, .18) !important;
}
body[data-theme="glyph"] .mx-btn-green { color: #6dffb3 !important; }

/* Активная вкладка/чип — подсветка, без заливки-«таблетки» */
body[data-theme="glyph"] .mx-tab.is-active, body[data-theme="glyph"] .tc-chip.is-active, body[data-theme="glyph"] .filter-btn.is-active { background: rgba(124, 246, 255, .14) !important; color: var(--g-cyan) !important; }

/* Пузыри сообщений — свои рамки: мои ╭─╮ фиолетовые, чужие ┌─┐ голубые */
body[data-theme="glyph"] .chat-msg {
  border: 7px solid transparent !important;
  border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20font-family='monospace'%20font-size='12'%20fill='%237cf6ff'%20fill-opacity='.55'%3E%3Ctext%20x='0'%20y='10'%3E%E2%94%8C%3C/text%3E%3Ctext%20x='10'%20y='10'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='10'%3E%E2%94%90%3C/text%3E%3Ctext%20x='0'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='20'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='0'%20y='28'%3E%E2%94%94%3C/text%3E%3Ctext%20x='10'%20y='28'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='28'%3E%E2%94%98%3C/text%3E%3C/svg%3E") 10 round !important;
  border-radius: 0 !important;
  background: rgba(124, 246, 255, .05) !important;
  background-clip: padding-box !important;
  box-shadow: none !important;
}
body[data-theme="glyph"] .chat-msg.is-me { border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20font-family='monospace'%20font-size='12'%20fill='%23b49bff'%20fill-opacity='.7'%3E%3Ctext%20x='0'%20y='10'%3E%E2%95%AD%3C/text%3E%3Ctext%20x='10'%20y='10'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='10'%3E%E2%95%AE%3C/text%3E%3Ctext%20x='0'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='20'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='0'%20y='28'%3E%E2%95%B0%3C/text%3E%3Ctext%20x='10'%20y='28'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='28'%3E%E2%95%AF%3C/text%3E%3C/svg%3E") 10 round !important; background: rgba(180, 155, 255, .1) !important; }
body[data-theme="glyph"] .chat-msg-time::before { content: "⌚ "; opacity: .6; }
body[data-theme="glyph"] .chat-check { font-weight: 700; }

/* Аватарки — квадратные «экраны» с рамкой */
body[data-theme="glyph"] .chat-preview-avatar, body[data-theme="glyph"] .chat-preview-avatar-placeholder, body[data-theme="glyph"] .room-ava, body[data-theme="glyph"] .room-ava img, body[data-theme="glyph"] .story-ring-inner,
body[data-theme="glyph"] .story-ring-inner img, body[data-theme="glyph"] .pf-avatar, body[data-theme="glyph"] .header-avatar, body[data-theme="glyph"] .mx-avatar, body[data-theme="glyph"] .grp-friend-ava {
  border-radius: 2px !important;
  image-rendering: auto;
}
body[data-theme="glyph"] .story-ring { border-radius: 2px !important; background: none !important; border: 5px solid transparent !important; border-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='30'%20height='30'%20font-family='monospace'%20font-size='12'%20fill='%23b49bff'%20fill-opacity='.7'%3E%3Ctext%20x='0'%20y='10'%3E%E2%95%AD%3C/text%3E%3Ctext%20x='10'%20y='10'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='10'%3E%E2%95%AE%3C/text%3E%3Ctext%20x='0'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='20'%20y='19'%3E%E2%94%82%3C/text%3E%3Ctext%20x='0'%20y='28'%3E%E2%95%B0%3C/text%3E%3Ctext%20x='10'%20y='28'%3E%E2%94%80%3C/text%3E%3Ctext%20x='20'%20y='28'%3E%E2%95%AF%3C/text%3E%3C/svg%3E") 10 round !important; }
body[data-theme="glyph"] .chat-preview-avatar-placeholder, body[data-theme="glyph"] .room-ava { font-weight: 800; color: var(--g-cyan); background: rgba(124, 246, 255, .08) !important; }
body[data-theme="glyph"] .chat-preview-avatar-placeholder::before, body[data-theme="glyph"] .room-ava:not(:has(img))::before { content: "◖"; opacity: .5; }
body[data-theme="glyph"] .chat-preview-avatar-placeholder::after, body[data-theme="glyph"] .room-ava:not(:has(img))::after { content: "◗"; opacity: .5; }
body[data-theme="glyph"] .mx-card-img, body[data-theme="glyph"] .mx-track-img, body[data-theme="glyph"] .mx-detail-img, body[data-theme="glyph"] .music-sdk-art { border-radius: 2px !important; background-color: #05070d !important; }

/* Переключатели: [○───] → [───●] */
body[data-theme="glyph"] .st-switch-track { background: none !important; border: 0 !important; box-shadow: none !important; width: auto !important; min-width: 64px; height: auto !important; }
body[data-theme="glyph"] .st-switch-track::before, body[data-theme="glyph"] .st-switch-track::after { all: unset; }
body[data-theme="glyph"] .st-switch-track::after { content: "[○───]"; font: 700 14px/1 'JetBrains Mono', monospace; color: var(--g-dim); letter-spacing: -.02em; }
body[data-theme="glyph"] .st-switch input:checked + .st-switch-track::after { content: "[───●]"; color: var(--g-cyan); text-shadow: 0 0 8px var(--g-cyan); }
body[data-theme="glyph"] .st-switch input:disabled + .st-switch-track::after { content: "[─/──]"; opacity: .5; }

/* Чекбоксы и радио: ☐ ☑ ○ ◉ */
body[data-theme="glyph"] input[type="checkbox"], body[data-theme="glyph"] input[type="radio"] { appearance: none; -webkit-appearance: none; width: auto; height: auto; margin: 0 6px 0 0; border: 0; background: none; }
body[data-theme="glyph"] input[type="checkbox"]::before { content: "☐"; font-size: 18px; color: var(--g-dim); }
body[data-theme="glyph"] input[type="checkbox"]:checked::before { content: "☑"; color: var(--g-cyan); }
body[data-theme="glyph"] input[type="radio"]::before { content: "○"; font-size: 18px; color: var(--g-dim); }
body[data-theme="glyph"] input[type="radio"]:checked::before { content: "◉"; color: var(--g-cyan); }

/* Счётчики и метки: ⟨3⟩ */
body[data-theme="glyph"] .st-train-count, body[data-theme="glyph"] .chat-preview-unread, body[data-theme="glyph"] .tc-chip-count:not(:empty), body[data-theme="glyph"] .mx-badge, body[data-theme="glyph"] .room-tag, body[data-theme="glyph"] .ppl-pin {
  background: none !important; border: 0 !important; color: var(--g-cyan) !important; padding: 0 !important; min-width: 0 !important; box-shadow: none !important;
}
body[data-theme="glyph"] .st-train-count::before, body[data-theme="glyph"] .chat-preview-unread::before, body[data-theme="glyph"] .tc-chip-count:not(:empty)::before, body[data-theme="glyph"] .mx-badge::before, body[data-theme="glyph"] .room-tag::before { content: "⟨"; opacity: .6; }
body[data-theme="glyph"] .st-train-count::after, body[data-theme="glyph"] .chat-preview-unread::after, body[data-theme="glyph"] .tc-chip-count:not(:empty)::after, body[data-theme="glyph"] .mx-badge::after, body[data-theme="glyph"] .room-tag::after { content: "⟩"; opacity: .6; }

/* Разделители — строка ─ ─ ─ */
body[data-theme="glyph"] hr, body[data-theme="glyph"] .ig-divider, body[data-theme="glyph"] .qz-auth-divider span { border: 0 !important; height: 1em !important; background: none !important; overflow: hidden; position: relative; }
body[data-theme="glyph"] hr::after, body[data-theme="glyph"] .ig-divider::after, body[data-theme="glyph"] .qz-auth-divider span::after { content: "─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─"; position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--g-dim); }

/* Ползунки громкости и прогресс в плеере — из символов */
body[data-theme="glyph"] .music-sdk-bar, body[data-theme="glyph"] .st-player-vol-bar { background: none !important; height: 12px !important; position: relative; overflow: hidden; }
body[data-theme="glyph"] .music-sdk-bar::before, body[data-theme="glyph"] .st-player-vol-bar::before { content: "┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄"; position: absolute; inset: 0; font: 11px/12px monospace; color: var(--g-dim); white-space: nowrap; }
body[data-theme="glyph"] #musicFill, body[data-theme="glyph"] .st-player-vol-fill { background: none !important; height: 12px !important; position: relative; overflow: hidden; }
body[data-theme="glyph"] #musicFill::before, body[data-theme="glyph"] .st-player-vol-fill::before { content: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"; position: absolute; left: 0; top: 0; font: 11px/12px monospace; color: #6dffb3; white-space: nowrap; text-shadow: 0 0 6px #6dffb3; }

/* Курсор-каретка ▌ в полях ввода */
body[data-theme="glyph"] input, body[data-theme="glyph"] textarea { caret-color: var(--g-cyan); }
body[data-theme="glyph"] ::placeholder { color: var(--g-dim) !important; }
body[data-theme="glyph"] ::selection { background: rgba(124, 246, 255, .3); color: #fff; }

/* Шапка и нижнее меню — строки из символов по краю */
body[data-theme="glyph"] .st-header::after { content: "═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════"; position: absolute; left: 0; right: 0; bottom: -7px; overflow: hidden; white-space: nowrap; font: 10px/1 monospace; color: rgba(124, 246, 255, .35); pointer-events: none; }
body[data-theme="glyph"] .st-tabbar { border-top: 0 !important; background: rgba(5, 7, 13, .92) !important; }
body[data-theme="glyph"] .st-tabbar::before { content: "═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════"; position: absolute; left: 0; right: 0; top: -6px; overflow: hidden; white-space: nowrap; font: 10px/1 monospace; color: rgba(124, 246, 255, .35); pointer-events: none; }

/* Единый вид кнопок: тёмный фон, светлый текст (никаких светлых заливок) */
body[data-theme="glyph"] button:not(.st-tabbar *):not(.mx-more):not(.chat-msg *):not(.ig-react-pill),
body[data-theme="glyph"] .st-btn, body[data-theme="glyph"] a.mx-btn { background-color: rgba(124, 246, 255, .06) !important; background-image: none !important; color: var(--ig-text) !important; }
body[data-theme="glyph"] #resumeSessionBtn, body[data-theme="glyph"] .st-btn-accent, body[data-theme="glyph"] .mx-btn-green, body[data-theme="glyph"] .tb-primary, body[data-theme="glyph"] .st-add-test-btn, body[data-theme="glyph"] .st-add-test-fab, body[data-theme="glyph"] #next,
body[data-theme="glyph"] .room-voice-join, body[data-theme="glyph"] .auth-required-overlay button, body[data-theme="glyph"] .qz-auth-submit, body[data-theme="glyph"] .music-nowbar-play {
  background-color: rgba(124, 246, 255, .14) !important; color: var(--g-cyan) !important; text-shadow: 0 0 8px rgba(124, 246, 255, .5);
}
body[data-theme="glyph"] .auth-required-overlay button, body[data-theme="glyph"] .qz-auth-submit { border: 6px solid transparent !important; }
body[data-theme="glyph"] .st-tab-icon { font-size: 0; }
body[data-theme="glyph"] .st-tab-icon .g-ico { font-size: 22px !important; }
body[data-theme="glyph"] .ig-search-btn .g-ico, body[data-theme="glyph"] .chat-view-header .g-ico, body[data-theme="glyph"] .mx-icon-btn .g-ico { font-size: 18px; }
/* glyph-header-anchor: линия ═══ под шапкой привязана к шапке (без своего слоя — меню остаётся сверху) */
@media (min-width: 768px) { body[data-theme="glyph"] .st-header { position: relative; } }
/* glyph-no-overflow: рамка из символов не должна раздвигать элементы за край экрана */
body[data-theme="glyph"] *, body[data-theme="glyph"] *::before, body[data-theme="glyph"] *::after { box-sizing: border-box; }
body[data-theme="glyph"] .chat-preview, body[data-theme="glyph"] .search-result-item, body[data-theme="glyph"] .mx-card,
body[data-theme="glyph"] .st-setting-row, body[data-theme="glyph"] .tab-btn, body[data-theme="glyph"] .ig-tabs button { max-width: 100%; min-width: 0; }
body[data-theme="glyph"] .chat-preview-body, body[data-theme="glyph"] .chat-preview-msg { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
body[data-theme="glyph"] .ig-tabs { gap: 6px; }
body[data-theme="glyph"] .ig-tabs > * { flex: 1 1 0; min-width: 0; }

/* ── Существа из символов (scripts/glyph-life.js) ── */
/* Существа летают поверх страницы (как в живых обоях), но клики проходят насквозь */
#glyph-life { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; display: none; opacity: .9; }
.st-life { position: fixed; z-index: 955; left: 14px; bottom: calc(var(--st-tabbar-h, 60px) + 14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 6px; font-family: 'JetBrains Mono', monospace; }
.st-life button { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 16px !important; border: 1px solid rgba(124,246,255,.25) !important; border-image: none !important; background: rgba(8, 11, 20, .82) !important; color: #c8d6ee !important; font: 600 12px 'JetBrains Mono', monospace !important; cursor: pointer; backdrop-filter: blur(8px); }
.st-life button i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.st-life .st-life-list { display: none; flex-wrap: wrap; gap: 6px; max-width: min(360px, calc(100vw - 28px)); }
.st-life.is-open .st-life-list { display: flex; }
.st-life .st-life-list button.is-on { color: #fff !important; border-color: rgba(124,246,255,.7) !important; background: rgba(124,246,255,.14) !important; }
body:has(#stRoomPill) .st-life { bottom: calc(var(--st-tabbar-h, 60px) + 70px + env(safe-area-inset-bottom)); }
body.st-chat-open .st-life { display: none; }
