/* ================= TAVERN: тема по макетам ================= */
:root {
  --bg: #0a0e24;
  --bg-2: #0d1130;
  --panel: rgb(20 18 58 / .78);
  --panel-solid: #141238;
  --panel-2: #1c1850;
  --hover: #26206a;
  --line: rgb(139 61 255 / .22);
  --line-2: rgb(139 61 255 / .4);
  --text: #f6f8ff;
  --muted: #a7a3d6;
  --dim: #8a85c0; /* контраст не ниже 4.5:1 на фоне панелей */
  --accent: #8b3dff;
  --accent-2: #a76bff;
  --pink: #ff2fd6;
  --cyan: #00e5ff;
  --glow: rgb(139 61 255 / .45);
  --speak: #22e07a;
  --danger: #ff4d6d;
  --gold: #ffc23d;
  --r: 16px;
  --r-sm: 10px;
  --font-h: Onest, system-ui, sans-serif;
  --font-d: Unbounded, Onest, system-ui, sans-serif; /* крупные заголовки */
  --font: Onest, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  color: var(--text); font: 14px/1.45 var(--font); overflow: hidden;
  background:
    radial-gradient(700px 400px at -5% 105%, rgb(139 61 255 / .35), transparent 60%),
    radial-gradient(600px 380px at 105% 100%, rgb(0 229 255 / .18), transparent 60%),
    radial-gradient(800px 420px at 100% -10%, rgb(255 47 214 / .14), transparent 60%),
    var(--bg);
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; text-align: inherit; }
input, textarea, select { font: inherit; color: var(--text); }
a { color: var(--accent-2); }
h1, h2, h3, .wordmark, .tab, .side-title, .card-head, .page-head h2 { font-family: var(--font-h); }
.i { width: 20px; height: 20px; flex: none; display: block; }
[data-i] { display: inline-flex; }
ul, ol { list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }
.muted { color: var(--muted); margin: 4px 0 10px; font-size: 13px; }
.push { margin-left: auto; }
kbd { font: 600 11px var(--font); padding: 2px 7px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }

/* ---------- кнопки ---------- */
.btn-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #a259ff, var(--accent) 60%, #6a2bff); box-shadow: 0 0 0 1px rgb(255 255 255 / .08) inset, 0 6px 22px var(--glow); white-space: nowrap; }
.btn-primary:hover { filter: brightness(1.12); }
.btn-primary:disabled { opacity: .6; }
.btn-primary.sm { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn-primary.lg { padding: 14px 24px; font-size: 16px; }
.btn-primary.wide, .btn-ghost.wide { width: 100%; }
.btn-primary .i, .btn-ghost .i { width: 17px; height: 17px; }
.btn-ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(139 61 255 / .08); font-weight: 600; white-space: nowrap; }
.btn-ghost:hover { background: rgb(139 61 255 / .18); }
.btn-ghost.sm { padding: 6px 12px; font-size: 13px; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--panel-2); color: var(--text); }
.icon-btn.boxed { border: 1px solid var(--line); background: var(--panel-2); }
.icon-btn.accent { background: var(--accent); color: #fff; box-shadow: 0 0 14px var(--glow); }
.icon-btn[aria-pressed="true"] { color: var(--danger); background: rgb(255 77 109 / .14); }
.link { color: var(--accent-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-left: auto; }
.link .i { width: 14px; height: 14px; transform: rotate(-90deg); }
.soon-pill { font: 700 10px var(--font); text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; border-radius: 99px; background: rgb(255 47 214 / .14); color: #ff8be9; border: 1px solid rgb(255 47 214 / .3); vertical-align: middle; white-space: nowrap; }
.is-soon { cursor: not-allowed; }
.dot-on { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--speak); box-shadow: 0 0 8px var(--speak); flex: none; }
.dot-on.warn { background: var(--gold); box-shadow: 0 0 8px var(--gold); }

/* ---------- логотип ---------- */
.logo-mark { width: 56px; height: 56px; border-radius: 16px; display: grid !important; place-items: center; color: #fff;
  background: linear-gradient(140deg, rgb(255 47 214 / .35), rgb(139 61 255 / .35) 50%, rgb(0 229 255 / .3)); box-shadow: 0 0 0 2px rgb(255 47 214 / .55) inset, 0 0 24px rgb(139 61 255 / .6); }
.logo-mark .i { width: 60%; height: 60%; }
.logo-mark.sm { width: 38px; height: 38px; border-radius: 11px; }
.wordmark { font-weight: 800; letter-spacing: .06em; background: linear-gradient(90deg, #fff 0 30%, var(--pink) 45%, var(--cyan) 60%, #fff 75%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ================= 01. Вход ================= */
.login-screen { position: fixed; inset: 0; display: grid; grid-template-columns: 1.2fr minmax(380px, 520px); gap: 40px; align-items: center; padding: 40px 6vw; overflow: auto;
  background:
    radial-gradient(500px 500px at 58% 30%, rgb(255 160 80 / .16), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgb(139 61 255 / .45), transparent 60%),
    linear-gradient(180deg, #120c38 0%, #0a0e24 70%); }
.login-screen::before { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: radial-gradient(60% 100% at 45% 100%, #1a1250 0 40%, transparent 41%), radial-gradient(40% 70% at 20% 100%, #140e40 0 50%, transparent 51%), radial-gradient(40% 60% at 75% 100%, #170f46 0 50%, transparent 51%); opacity: .9; }
.login-screen::after { content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%; left: 55%; top: 8%; background: radial-gradient(circle at 35% 35%, #e9e2ff, #8f7cd8 60%, #4b3a96); box-shadow: 0 0 80px rgb(200 180 255 / .45); opacity: .7; pointer-events: none; }
.login-hero { position: relative; z-index: 1; max-width: 640px; }
.brand-big { display: flex; align-items: center; gap: 22px; }
.brand-big .logo-mark { width: 120px; height: 120px; border-radius: 30px; }
.brand-big .wordmark { font-size: clamp(48px, 7vw, 92px); line-height: 1; }
.login-hero h1 { font-size: clamp(26px, 2.8vw, 38px); line-height: 1.15; margin: 36px 0 14px; }
.login-hero > p { color: #cfcaf3; font-size: 17px; max-width: 520px; margin: 0 0 26px; }
.features { display: grid; gap: 16px; }
.features li { display: flex; gap: 16px; align-items: center; }
.features .f-ic { width: 52px; height: 52px; border-radius: 14px; display: grid !important; place-items: center; background: rgb(139 61 255 / .14); border: 1px solid var(--line-2); color: #d8c4ff; box-shadow: 0 0 18px rgb(139 61 255 / .25); }
.features b { display: block; font: 700 17px var(--font-h); }
.features small { color: var(--muted); font-size: 14px; }
.login-card { position: relative; z-index: 1; padding: 28px; border-radius: 26px; background: rgb(18 14 52 / .72); backdrop-filter: blur(18px); border: 1px solid rgb(167 107 255 / .55);
  box-shadow: 0 0 0 1px rgb(255 255 255 / .04) inset, 0 0 60px rgb(139 61 255 / .35); display: flex; flex-direction: column; gap: 14px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 16px; background: rgb(10 8 30 / .6); border: 1px solid var(--line); }
.seg-btn { padding: 11px; border-radius: 12px; text-align: center; font: 700 17px var(--font-h); color: var(--muted); }
.seg-btn.active { color: #fff; background: linear-gradient(135deg, #a259ff, var(--accent)); box-shadow: 0 4px 18px var(--glow); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.socials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.socials button { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font-weight: 600; }
.socials button:hover { background: rgb(255 255 255 / .09); }
.soc { width: 24px; height: 24px; border-radius: 7px; display: grid !important; place-items: center; font: 800 12px var(--font); color: #fff; }
.soc .i { width: 15px; height: 15px; }
.soc.g { background: conic-gradient(#ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0); }
.soc.tg { background: #2aa3e0; }
.soc.vk { background: #2787f5; }
.input-ic { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 54px; border-radius: 14px; background: rgb(10 8 30 / .55); border: 1px solid var(--line-2); color: var(--muted); }
.input-ic:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgb(139 61 255 / .25); }
.input-ic input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; }
.input-ic.is-soon { opacity: .55; }
.login-row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.login-card .btn-primary.wide { padding: 15px; font-size: 18px; border-radius: 14px; }
.legal { margin: 0; text-align: center; color: var(--muted); font-size: 12.5px; }
.lang { align-self: center; display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); color: var(--muted); }
.lang .i { width: 17px; height: 17px; }

/* ================= Каркас приложения ================= */
.app { display: grid; height: 100dvh; gap: 12px; padding: 10px 12px 12px;
  grid-template-columns: 76px 290px minmax(0, 1fr) 330px;
  grid-template-rows: 56px minmax(0, 1fr);
  grid-template-areas: "top top top top" "rail side main right"; }
.rail { grid-area: rail; }
.topbar { grid-area: top; }
.side-col { grid-area: side; }
.view { display: contents; }
.view > .main { grid-area: main; }
.view > .right { grid-area: right; }
.view[data-view="profile"] > .main { grid-area: main / main / main / right; }
body.hide-right .view[data-view="chat"] > .right { display: none; }
body.hide-right .view[data-view="chat"] > .main { grid-area: main / main / main / right; }

.panel, .side-col, .main, .rail { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; backdrop-filter: blur(10px); min-height: 0; }

/* ---------- рейка ---------- */
.rail { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0; overflow-y: auto; }
.rail-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; width: 62px; padding: 8px 0; border-radius: 14px; color: var(--muted); font-size: 11px; }
.rail-item:hover { color: var(--text); background: var(--panel-2); }
.rail-item.active { color: #fff; background: rgb(139 61 255 / .22); box-shadow: 0 0 0 1px var(--line-2) inset, 0 0 18px var(--glow); }
.badge-dot { position: absolute; top: 6px; right: 14px; width: 9px; height: 9px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.rail-sep { width: 36px; height: 1px; background: var(--line-2); }
.rail-btn { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--panel-2); color: var(--muted); position: relative; transition: transform .15s; flex: none; }
.rail-btn:hover { transform: translateY(-1px); color: var(--text); }
.rail-btn.server.active.current { box-shadow: 0 0 0 2px var(--cyan), 0 0 18px rgb(0 229 255 / .45); }
.rail-btn.ghost { opacity: .6; }
.rail-btn.add { color: var(--accent-2); border: 1px dashed var(--line-2); background: none; }
.server-icon { width: 100%; height: 100%; border-radius: inherit; display: grid !important; place-items: center; font: 800 20px var(--font-h); color: #fff; background: linear-gradient(135deg, #2c55ff, #8b3dff 55%, #ff2fd6); }
.server-icon.s2 { background: linear-gradient(135deg, #3a3fcf, #7b5cff); }
.server-icon.s2 .i { width: 28px; height: 28px; }
.server-icon.s3 { background: linear-gradient(135deg, #ff4d4d, #8a1230); }
.server-icon.s4 { background: linear-gradient(135deg, #ffcc4d, #7a4b00); }
.server-icon.big { width: 48px; height: 48px; border-radius: 14px; }
.server-icon.xs { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; }

/* ---------- верхнее меню ---------- */
.topbar { display: flex; align-items: center; gap: 14px; padding: 0 6px; min-width: 0; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 26px; flex: none; margin-right: 8px; }
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); margin: 0 auto; }
.tab { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 12px; color: #d4d0f5; font-weight: 700; white-space: nowrap; }
.tab .i { width: 18px; height: 18px; }
.tab:hover { background: var(--panel-2); color: #fff; }
.tab.active { color: #fff; background: linear-gradient(135deg, rgb(162 89 255 / .55), rgb(139 61 255 / .45)); box-shadow: 0 0 0 1px var(--accent-2) inset, 0 0 18px var(--glow); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 42px; width: 290px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); flex: none; }
.search:hover { border-color: var(--line-2); }
.search-ph { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.top-me { border-radius: 50%; flex: none; }
.top-me .avatar { box-shadow: 0 0 0 2px var(--accent); }

/* ---------- сайдбар ---------- */
.side-col { display: flex; flex-direction: column; overflow: hidden; }
.sidebar { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.side-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; min-height: 0; }
.server-head { position: relative; margin: 10px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); flex: none; }
.server-banner { height: 132px; background:
  radial-gradient(2px 2px at 20% 25%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 15%, #fffa, transparent), radial-gradient(1.5px 1.5px at 45% 35%, #fff8, transparent), radial-gradient(2px 2px at 88% 30%, #fff8, transparent),
  radial-gradient(60px 30px at 50% 78%, rgb(255 170 80 / .55), transparent), radial-gradient(180px 60px at 50% 100%, #2b1c72, transparent),
  linear-gradient(180deg, #1c1458 0%, #3c2393 60%, #1a1240 100%); }
.server-meta { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgb(10 8 30 / .95) 45%); }
.server-meta h1 { margin: 0; font-size: 22px; display: flex; align-items: center; gap: 6px; }
.server-meta > small { display: block; color: #c6c1ec; font-size: 12.5px; line-height: 1.3; }
.verified { width: 20px; height: 20px; border-radius: 50%; background: var(--accent); align-items: center; justify-content: center; box-shadow: 0 0 10px var(--glow); }
.verified .i { width: 13px; height: 13px; stroke-width: 3; }
.online-line { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.side-title { display: flex; align-items: center; gap: 10px; padding: 18px 16px 10px; font-size: 19px; font-weight: 800; }
.side-title.big { font-size: 22px; }
.side-title.big .i { width: 26px; height: 26px; color: var(--accent-2); }
.side-title div { display: flex; flex-direction: column; line-height: 1.2; }
.side-title small { font: 500 12px var(--font); color: var(--muted); }
.side-nav { padding: 2px 10px; }
.side-nav button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; color: #dcd8f8; font-weight: 500; }
.side-nav.roomy button { padding: 11px 14px; font-size: 15px; }
.side-nav button:hover { background: var(--panel-2); }
.side-nav button.active { background: linear-gradient(135deg, rgb(162 89 255 / .65), rgb(139 61 255 / .55)); color: #fff; box-shadow: 0 0 18px var(--glow); }
.side-nav .i { color: var(--muted); }
.side-nav button.active .i { color: #fff; }
.side-nav .is-soon { opacity: .72; }
.group-head { display: flex; align-items: center; gap: 4px; margin: 16px 4px 6px; font: 700 12px var(--font-h); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.mini { color: var(--muted); display: grid; place-items: center; margin-left: auto; }
.mini:hover { color: var(--text); }
.mini .i { width: 18px; height: 18px; }
.channel > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; color: #cfcaf0; }
.channel > button:hover { background: var(--panel-2); color: var(--text); }
.channel.active > button { background: linear-gradient(135deg, rgb(162 89 255 / .65), rgb(139 61 255 / .55)); color: #fff; box-shadow: 0 0 18px var(--glow); }
.channel.unread > button { color: #fff; font-weight: 700; }
.channel.unread > button::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.i.dim { width: 18px; height: 18px; opacity: .85; }
.ch-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: rgb(255 255 255 / .06); color: var(--muted); }
.count .i { width: 12px; height: 12px; }
.channel.voice.active > button { background: rgb(34 224 122 / .12); color: var(--speak); box-shadow: inset 0 0 0 1px rgb(34 224 122 / .4); }
.vmembers { padding: 2px 0 4px 34px; }
.vmember { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 8px; font-size: 13.5px; color: var(--muted); }
.vmember.speaking { color: var(--text); }
.member-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flags .i, .i.off { width: 15px; height: 15px; color: var(--danger); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.chip b { font-size: 11px; padding: 1px 7px; border-radius: 99px; background: rgb(255 255 255 / .1); }
.chip.active { background: linear-gradient(135deg, rgb(162 89 255 / .7), rgb(139 61 255 / .6)); border-color: var(--accent-2); }
.side-search { display: flex; align-items: center; gap: 8px; margin: 0 14px 4px; padding: 0 12px; height: 40px; border-radius: 12px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); color: var(--muted); }
.side-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; }
.people li, .members li, .vc-list li { list-style: none; }
.prow, .mrow { position: relative; display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 12px; cursor: pointer; }
.prow:hover, .mrow:hover { background: var(--panel-2); }
.prow.active { background: linear-gradient(135deg, rgb(162 89 255 / .5), rgb(139 61 255 / .4)); box-shadow: 0 0 0 1px var(--line-2) inset; }
.prow.offline { opacity: .55; }
.mtext { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.mtext b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mtext small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.you { color: var(--muted); font-weight: 500; }
.dm-time { font-size: 11px; color: var(--dim); align-self: flex-start; margin-top: 3px; }
.unread-badge { position: absolute; right: 10px; bottom: 8px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--accent); font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 10px var(--glow); }
.empty { color: var(--muted); font-size: 13px; padding: 10px 12px; border-radius: 12px; background: rgb(255 255 255 / .03); border: 1px dashed var(--line); }

.balance { display: flex; align-items: center; gap: 12px; margin: 14px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .04); border-top: 1px solid var(--line); }
.balance div { display: flex; flex-direction: column; line-height: 1.2; }
.balance small { color: var(--muted); font-size: 12px; }
.balance b { font: 800 20px var(--font-h); }
.coin { width: 26px; height: 26px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe48a, #f5a623 60%, #b36b00); box-shadow: 0 0 10px rgb(255 190 60 / .5); display: inline-block; flex: none; }
.plus-card { margin: 0 14px 14px; padding: 16px; border-radius: 16px; border: 1px solid var(--line-2); background: radial-gradient(240px 120px at 80% 0, rgb(255 47 214 / .25), transparent), rgb(139 61 255 / .12); }
.plus-card b { display: flex; align-items: center; gap: 8px; font: 800 20px var(--font-h); }
.plus-card b .i { color: var(--pink); }
.plus-card p { color: #d9d4f7; margin: 6px 0 12px; }
.hub-head { position: relative; }
.hub-banner { height: 110px; margin: 10px 10px 0; border-radius: 16px; background: radial-gradient(60px 30px at 50% 80%, rgb(255 170 80 / .5), transparent), linear-gradient(180deg, #24186a, #4c2aa6 70%, #1a1240); border: 1px solid var(--line); }
.toggles { padding: 0 14px; }
.toggles li { display: flex; justify-content: space-between; align-items: center; padding: 9px 4px; color: #dcd8f8; }
.tgl { width: 40px; height: 22px; border-radius: 99px; background: rgb(255 255 255 / .12); position: relative; display: inline-block; flex: none; }
.tgl::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfcaf0; transition: left .15s; }
.tgl.on { background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.tgl.on::after { left: 21px; background: #fff; }

/* голосовая панель и «я» */
.voice-panel { margin: 0 10px 8px; padding: 10px 12px; border-radius: 14px; background: rgb(34 224 122 / .06); border: 1px solid rgb(34 224 122 / .3); flex: none; }
.vp-top { display: flex; justify-content: space-between; align-items: center; }
.vp-status { display: flex; align-items: center; gap: 6px; color: var(--speak); font-weight: 700; }
.vp-status .i { width: 16px; height: 16px; }
.vp-where { font-size: 12px; color: var(--muted); }
.vp-open .i { color: var(--speak); width: 24px; height: 24px; }
.level { height: 4px; border-radius: 4px; background: rgb(255 255 255 / .08); overflow: hidden; margin-top: 8px; }
.level-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--speak), var(--cyan)); transition: width .08s linear; }
.mic-warn, .ptt-hint { margin-top: 8px; font-size: 12px; color: var(--gold); }
.ptt-hint { color: var(--muted); }
.mic-warn button { color: var(--accent-2); text-decoration: underline; font-size: 12px; }
.vp-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.vp-actions button { display: grid; place-items: center; height: 34px; border-radius: 10px; background: rgb(255 255 255 / .06); color: var(--muted); }
.vp-actions button:hover { color: var(--text); background: var(--hover); }
.vp-actions .is-soon { opacity: .55; }
.vp-actions .danger { color: #fff; background: rgb(255 77 109 / .85); }
.me { display: flex; align-items: center; gap: 4px; padding: 10px 10px 10px 12px; border-top: 1px solid var(--line); flex: none; }
.me-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px; border-radius: 12px; }
.me-who:hover { background: var(--panel-2); }
.me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.me-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text small { color: var(--muted); font-size: 12px; }

/* аватары */
.avatar { --hue: 260; --size: 32px; flex: none; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; font: 800 calc(var(--size) * .42) var(--font-h); color: #fff;
  background: linear-gradient(135deg, hsl(var(--hue) 80% 60%), hsl(calc(var(--hue) + 50) 70% 32%)); box-shadow: 0 0 0 2px transparent; transition: box-shadow .12s; }
.speaking .avatar, .speaking > .avatar-wrap .avatar { box-shadow: 0 0 0 2px var(--speak), 0 0 14px rgb(34 224 122 / .7); }
.avatar-wrap { position: relative; flex: none; display: inline-block; }
.status-dot { position: absolute; right: 0; bottom: 0; width: calc(var(--size, 36px) * .3); height: calc(var(--size, 36px) * .3); min-width: 10px; min-height: 10px; border-radius: 50%; background: var(--speak); border: 2.5px solid var(--panel-solid); }
.avatar-wrap.off .status-dot { background: #6f6aa6; }

/* ================= Основная колонка ================= */
.main { display: flex; flex-direction: column; overflow: hidden; position: relative; }
.main.scroll { overflow-y: auto; padding: 18px 20px 24px; display: block; }
.main-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); min-width: 0; flex: none; }
.head-ic .i { width: 28px; height: 28px; color: var(--muted); }
.main-head h2 { margin: 0; font-size: 21px; white-space: nowrap; }
.head-stack { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.head-stack small { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.topic { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line); }
.head-actions { margin-left: auto; display: flex; gap: 4px; flex: none; }

/* сообщения */
.messages { flex: 1; overflow-y: auto; padding: 10px 0 14px; min-height: 0; }
.msg { position: relative; display: flex; gap: 14px; padding: 6px 20px; }
.msg:not(.grouped) { margin-top: 10px; }
.msg.grouped { padding-top: 1px; padding-bottom: 1px; }
.msg:hover { background: rgb(255 255 255 / .025); }
.msg.flash { background: rgb(139 61 255 / .18); transition: background .4s; }
.side-time { width: 42px; flex: none; text-align: right; font-size: 11px; color: var(--dim); visibility: hidden; padding-top: 3px; }
.msg:hover .side-time { visibility: visible; }
.msg-body { min-width: 0; flex: 1; }
.msg-head { display: flex; gap: 10px; align-items: baseline; }
.msg-head b { font: 700 15.5px var(--font-h); }
.msg-head time { color: var(--dim); font-size: 12px; }
.msg p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; color: #ebe9ff; }
.msg p a { color: #8fd8ff; }
.msg .at { color: #e6d9ff; background: rgb(139 61 255 / .3); padding: 0 4px; border-radius: 5px; font-weight: 600; }
.msg.mention { background: rgb(255 194 61 / .07); box-shadow: inset 3px 0 0 var(--gold); }
.read { color: var(--accent-2); align-self: flex-start; margin-top: 4px; }
.read .i { width: 16px; height: 16px; }
.reply-ref { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 2px 0; max-width: 100%; }
.reply-ref .i { width: 14px; height: 14px; transform: scaleX(-1); }
.reply-ref span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-ref b { color: var(--accent-2); }
.reply-ref i { font-style: normal; }
.reply-ref:hover { color: var(--text); }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.reactions:empty { display: none; }
.rx { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 10px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); font-size: 14px; }
.rx b { font-size: 13px; color: var(--muted); }
.rx:hover { border-color: var(--accent-2); }
.rx.mine { background: rgb(139 61 255 / .25); border-color: var(--accent); }
.rx.mine b { color: var(--text); }
.rx.add { color: var(--muted); padding: 3px 8px; }
.rx.add .i { width: 16px; height: 16px; }
.msg-actions { position: absolute; right: 20px; top: -12px; display: none; gap: 2px; padding: 3px; border-radius: 10px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 6px 20px rgb(0 0 0 / .4); }
.msg:hover .msg-actions { display: flex; }
.msg-actions button { padding: 4px; border-radius: 7px; color: var(--muted); }
.msg-actions button:hover { background: var(--hover); color: var(--text); }
.msg-actions .quick { font-size: 16px; line-height: 1; padding: 4px 5px; }
.picker { position: fixed; z-index: 20; display: flex; gap: 2px; padding: 6px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgb(0 0 0 / .5); }
.picker button { font-size: 22px; padding: 4px 6px; border-radius: 8px; }
.picker button:hover { background: var(--hover); transform: scale(1.15); }
.chan-empty { padding: 36px 20px 10px; }
.chan-empty .big-hash { width: 68px; height: 68px; border-radius: 50%; background: rgb(139 61 255 / .18); border: 1px solid var(--line-2); display: grid; place-items: center; box-shadow: 0 0 22px var(--glow); }
.chan-empty .big-hash .i { width: 34px; height: 34px; }
.chan-empty h3 { font-size: 26px; margin: 14px 0 4px; }
.chan-empty p { color: var(--muted); margin: 0; }
.day-sep { display: flex; align-items: center; gap: 12px; margin: 6px 20px; color: var(--muted); font-size: 12.5px; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.new-msgs { position: absolute; right: 26px; bottom: 92px; display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; background: rgb(139 61 255 / .35); border: 1px solid var(--accent-2); backdrop-filter: blur(6px); }
.new-msgs .i { width: 14px; height: 14px; }
.reply-bar { display: flex; align-items: center; justify-content: space-between; margin: 0 20px -6px; padding: 6px 8px 12px 14px; border-radius: 12px 12px 0 0; background: rgb(139 61 255 / .14); border: 1px solid var(--line); border-bottom: 0; font-size: 13px; color: var(--muted); }
.reply-bar b { color: var(--text); }

/* поле ввода */
.composer { display: flex; align-items: flex-end; gap: 4px; margin: 0 20px 18px; padding: 6px 6px 6px 8px; border-radius: 16px; background: rgb(10 8 30 / .55); border: 1px solid var(--line-2); flex: none; position: relative; }
.composer:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgb(139 61 255 / .2); }
.composer textarea { flex: 1; min-width: 0; padding: 10px 6px; border: 0; background: none; outline: none; resize: none; line-height: 1.4; max-height: 200px; font-size: 15px; }
.composer .icon-btn, .composer .send { margin-bottom: 2px; }
.icon-btn.gif { font: 800 11px var(--font); border: 1.5px solid currentColor; width: 30px; height: 22px; border-radius: 6px; margin: 8px 3px; }
.send { width: 46px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #a259ff, var(--accent)); box-shadow: 0 0 16px var(--glow); flex: none; }
.send:hover { filter: brightness(1.12); }
.typing { height: 20px; margin: -14px 26px 4px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex: none; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* подсказки */
.tips { margin: 12px 20px 0; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, rgb(34 224 122 / .1), rgb(139 61 255 / .14)); border: 1px solid rgb(34 224 122 / .3); flex: none; }
.tips-head { display: flex; justify-content: space-between; align-items: center; }
.tips ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-top: 8px; }
.tips li { display: flex; gap: 10px; font-size: 13.5px; color: var(--muted); }
.tips li b { color: var(--text); }
.tip-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--speak); color: #0a0e24; font-weight: 800; font-size: 13px; }

/* ================= Правая колонка ================= */
.right { overflow-y: auto; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.card { padding: 14px 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(10px); flex: none; }
.card-head { display: flex; align-items: center; gap: 9px; font-size: 16.5px; font-weight: 800; margin-bottom: 10px; }
.card-head .i { color: var(--accent-2); }
.card-head.sm { font-size: 14px; margin: 12px 0 8px; }
.card.is-soon { opacity: .82; }
.next-event { width: 100%; display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 14px; background: rgb(255 255 255 / .03); border: 1px dashed var(--line-2); }
.next-event:hover { border-color: var(--accent-2); }
.ne-art { width: 64px; height: 64px; border-radius: 12px; flex: none; background: radial-gradient(30px 16px at 50% 80%, rgb(255 170 80 / .6), transparent), linear-gradient(180deg, #2a1d70, #5a32b8); }
.next-event span:last-child { display: flex; flex-direction: column; }
.next-event small { color: var(--muted); }
.members ul { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 12px; }
.stats3 div { display: flex; flex-direction: column; }
.stats3 b { font: 800 19px var(--font-h); }
.stats3 small { color: var(--muted); font-size: 12px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { font-size: 13px; padding: 4px 12px; border-radius: 10px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); }
.server-card .sc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.sc-head div { display: flex; flex-direction: column; line-height: 1.25; }
.sc-head b { font: 800 18px var(--font-h); }
.sc-head small { color: var(--muted); }
.qa { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-weight: 600; }
.qa:hover { background: rgb(139 61 255 / .15); }
.qa.danger { color: var(--danger); border-color: rgb(255 77 109 / .45); background: rgb(255 77 109 / .06); }
.qa .i { width: 18px; height: 18px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.vc-list li.mrow { cursor: default; }
.mic-state .i { width: 18px; height: 18px; color: var(--muted); }
.mic-state .i.off { color: var(--danger); }
.lvl-list li { display: grid; grid-template-columns: 24px 80px 1fr; gap: 10px; align-items: center; padding: 5px 0; }
.lvl-list b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-meter { display: flex; gap: 2px; height: 12px; }
.seg-meter i { flex: 1; border-radius: 2px; background: rgb(255 255 255 / .08); }
.seg-meter i.on { background: linear-gradient(180deg, var(--speak), #16b862); box-shadow: 0 0 6px rgb(34 224 122 / .6); }

/* ================= 03. Голос ================= */
.stage-body { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 16px 20px 18px; min-height: 0; overflow-y: auto; }
.screen { flex: 1; min-height: 200px; border-radius: 18px; border: 1px solid var(--line-2); display: grid; place-items: center; text-align: center;
  background: radial-gradient(400px 200px at 50% 110%, rgb(139 61 255 / .35), transparent), radial-gradient(300px 140px at 80% 0, rgb(0 229 255 / .12), transparent), rgb(10 8 30 / .5); box-shadow: 0 0 30px rgb(139 61 255 / .2) inset; }
.screen-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 360px; padding: 20px; }
.screen-empty .i { width: 46px; height: 46px; color: var(--accent-2); }
.screen-empty b { font: 800 18px var(--font-h); }
.screen-empty small { color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; flex: none; }
.tile { position: relative; padding: 16px 10px 12px; border-radius: 16px; background: radial-gradient(circle at 50% 30%, #2a2070, var(--panel-solid) 75%); border: 1.5px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 8px; transition: border-color .12s, box-shadow .12s; }
.tile.speaking { border-color: var(--speak); box-shadow: 0 0 22px rgb(34 224 122 / .35); }
.tile-name { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.tile .vol { width: 80%; opacity: 0; transition: opacity .15s; accent-color: var(--accent); height: 14px; }
.tile:hover .vol, .tile .vol:focus { opacity: 1; }
.controls { display: flex; justify-content: center; gap: 10px; padding: 10px; border-radius: 18px; background: rgb(10 8 30 / .45); border: 1px solid var(--line); flex: none; flex-wrap: wrap; }
.ctl { width: 104px; padding: 10px 6px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.ctl .i { width: 24px; height: 24px; margin-bottom: 4px; }
.ctl small { color: var(--muted); font-size: 12px; }
.ctl:hover { background: rgb(139 61 255 / .16); }
.ctl.off { color: var(--danger); }
.ctl.is-soon { opacity: .55; }
.ctl.danger { background: linear-gradient(135deg, #ff5d7a, #d92d55); border-color: transparent; color: #fff; box-shadow: 0 0 18px rgb(255 77 109 / .4); }
.ctl.danger small { color: #ffe3e9; }
.ctl-sep { width: 1px; background: var(--line); margin: 6px 4px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pick { padding: 18px; border-radius: 18px; background: rgb(255 255 255 / .03); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.pick:hover { border-color: var(--accent-2); box-shadow: 0 0 22px rgb(139 61 255 / .3); }
.pick .i { color: var(--accent-2); width: 28px; height: 28px; margin-bottom: 6px; }
.pick b { font: 800 18px var(--font-h); }
.pick small { color: var(--muted); }
.faces { display: flex; margin-top: 8px; }
.faces .avatar { margin-right: -6px; border: 2px solid var(--panel-solid); }

/* ================= 04. ЛС ================= */
.profile-mini { padding: 0; overflow: hidden; }
.pm-banner { height: 84px; background: radial-gradient(40px 20px at 70% 80%, rgb(255 170 80 / .5), transparent), linear-gradient(135deg, #2a1d70, #6a35c8 60%, #1a1240); }
.pm-row { display: flex; align-items: flex-end; gap: 12px; padding: 0 16px; margin-top: -32px; }
.pm-row > div { display: flex; flex-direction: column; padding-bottom: 4px; min-width: 0; }
.pm-row b { font: 800 20px var(--font-h); overflow: hidden; text-overflow: ellipsis; }
.pm-row small { color: var(--muted); display: flex; align-items: center; gap: 5px; font-size: 12.5px; }
.pm-av .avatar { box-shadow: 0 0 0 4px var(--panel-solid), 0 0 18px var(--glow); }
.pm-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 14px; }
.pm-actions button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px; border-radius: 12px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); }
.pm-actions button:hover { background: rgb(139 61 255 / .18); }
.pm-actions small { font-size: 11px; color: var(--muted); }
.pm-actions .is-soon { opacity: .6; }
.pm-foot { display: flex; align-items: center; gap: 6px; margin: 12px 14px 14px; padding: 9px 12px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); font-size: 13px; }
.pm-foot .i { width: 16px; height: 16px; }
.mini-profile { border-radius: 16px; overflow: hidden; background: rgb(10 8 30 / .4); border: 1px solid var(--line); }
.note { width: 100%; resize: vertical; padding: 10px 12px; border-radius: 12px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); outline: none; }
.note:focus { border-color: var(--accent-2); }

/* ================= 05. Профиль ================= */
.p-hero { position: relative; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
.p-banner { height: 150px; background:
  radial-gradient(2px 2px at 15% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 60% 30%, #fffa, transparent), radial-gradient(2px 2px at 85% 15%, #fff9, transparent),
  radial-gradient(70px 70px at 82% 40%, #c9b8ff, #7a5fd0 60%, transparent 62%), radial-gradient(300px 90px at 30% 100%, #2b1c72, transparent), linear-gradient(180deg, #1c1458, #4a2aa0 70%, #241866); }
.p-banner-btn { position: absolute; top: 12px; right: 12px; background: rgb(10 8 30 / .6); }
.p-row { display: flex; align-items: flex-end; gap: 22px; padding: 0 22px 18px; margin-top: -60px; position: relative; flex-wrap: wrap; }
.p-av .avatar { box-shadow: 0 0 0 4px var(--panel-solid), 0 0 0 7px var(--pink), 0 0 30px rgb(255 47 214 / .5); }
.p-info { flex: 1; min-width: 220px; }
.p-name { margin: 0; font-size: 38px; line-height: 1.1; }
.p-status { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--muted); }
.status-sel { background: rgb(255 255 255 / .06); border: 1px solid var(--line); border-radius: 10px; padding: 4px 8px; }
.p-about-line { color: #d9d4f7; margin: 0 0 8px; }
.p-platforms { display: flex; gap: 6px; }
.p-actions { display: flex; gap: 8px; align-items: center; }
.lvl-card { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.lvl-badge { width: 64px; height: 64px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; font: 800 22px var(--font-h); background: linear-gradient(135deg, var(--gold), #c47a00); color: #2a1a00; flex: none; }
.lvl-num { display: flex; flex-direction: column; }
.lvl-num b { font: 800 34px var(--font-h); line-height: 1; }
.lvl-num small { color: var(--muted); }
.xp { flex: 1; }
.xp-top { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); }
.xp-bar { height: 12px; border-radius: 99px; background: rgb(255 255 255 / .08); overflow: hidden; }
.xp-bar.thin { height: 6px; margin-top: 6px; }
.xp-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--accent) 50%, var(--cyan)); box-shadow: 0 0 12px var(--glow); }
.seg-tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 16px; background: rgb(10 8 30 / .4); border: 1px solid var(--line); overflow-x: auto; }
.seg-tabs button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-weight: 700; color: #cfcaf0; white-space: nowrap; }
.seg-tabs button.active { color: #fff; background: linear-gradient(135deg, rgb(162 89 255 / .75), rgb(139 61 255 / .6)); box-shadow: 0 0 16px var(--glow); }
.seg-tabs .i { width: 18px; height: 18px; }
.seg-tabs .is-soon { opacity: .7; }
.p-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.p-about { margin: 0; color: #dcd8f8; white-space: pre-wrap; }
.p-about-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; align-items: flex-end; }
.p-about-form textarea { width: 100%; resize: vertical; padding: 10px; border-radius: 12px; background: rgb(10 8 30 / .5); border: 1px solid var(--line-2); outline: none; }
.stat4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat4 div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); text-align: center; }
.stat4 .i { color: var(--accent-2); width: 22px; height: 22px; }
.stat4 b { font: 800 18px var(--font-h); }
.stat4 small { color: var(--muted); font-size: 11.5px; }
.badge-row { display: flex; gap: 10px; justify-content: space-between; }
.badge-hex { width: 52px; height: 58px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); display: grid; place-items: center; background: linear-gradient(135deg, rgb(139 61 255 / .5), rgb(0 229 255 / .25)); color: #fff; opacity: .55; }
.fav-games { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.fav { aspect-ratio: 3 / 4; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(160deg, #3a2a90, #1a1240); border: 1px solid var(--line); color: rgb(255 255 255 / .4); }
.fav.g1 { background: linear-gradient(160deg, #7a1f3a, #1a1240); }
.fav.g2 { background: linear-gradient(160deg, #0f4d6a, #1a1240); }
.fav.add { border-style: dashed; display: flex; flex-direction: column; justify-content: center; align-items: center; font-size: 11px; color: var(--muted); }
.progress-list li, .milestones li { display: flex; gap: 12px; align-items: center; padding: 6px 0; }
.progress-list li > div { flex: 1; }
.progress-list b, .milestones b { display: block; font-size: 14px; }
.progress-list small, .milestones small { color: var(--muted); font-size: 12px; }
.progress-list .i { color: var(--gold); }

/* ================= 11. Настройки ================= */
.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.page-ic { width: 52px; height: 52px; border-radius: 16px; display: grid !important; place-items: center; background: rgb(139 61 255 / .18); border: 1px solid var(--line-2); color: #d9c6ff; flex: none; box-shadow: 0 0 18px rgb(139 61 255 / .3); }
.page-ic .i { width: 28px; height: 28px; }
.page-head h2 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 10px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.page-actions { margin-left: auto; display: flex; gap: 8px; }
h3.sec { font-size: 18px; margin: 20px 0 10px; display: flex; align-items: center; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; font-size: 13.5px; color: #cfcaf0; position: relative; }
.field small { color: var(--muted); }
.field .val { position: absolute; right: 0; top: 0; }
.field select { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgb(10 8 30 / .55); }
.field input[type="range"] { accent-color: var(--accent); width: 100%; }
.field.is-soon { opacity: .55; }
.row3.is-soon { opacity: .55; }
.meter { display: flex; gap: 3px; height: 30px; padding: 7px 10px; border-radius: 12px; background: rgb(10 8 30 / .55); border: 1px solid var(--line); }
.meter i { flex: 1; border-radius: 3px; background: rgb(255 255 255 / .1); }
.meter i.on { background: linear-gradient(180deg, var(--speak), var(--cyan)); box-shadow: 0 0 6px rgb(34 224 122 / .6); }
.tile-tgl { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); cursor: pointer; font-size: 13.5px; }
.tile-tgl input, .tgl-wrap input { position: absolute; opacity: 0; pointer-events: none; }
.tile-tgl i, .tgl-wrap i { width: 42px; height: 24px; border-radius: 99px; background: rgb(255 255 255 / .14); position: relative; flex: none; transition: background .15s; }
.tile-tgl i::after, .tgl-wrap i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #cfcaf0; transition: left .15s; }
.tile-tgl input:checked + i, .tgl-wrap input:checked + i { background: var(--accent); box-shadow: 0 0 12px var(--glow); }
.tile-tgl input:checked + i::after, .tgl-wrap input:checked + i::after { left: 21px; background: #fff; }
.tile-tgl input:focus-visible + i, .tgl-wrap input:focus-visible + i { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tgl-wrap { display: inline-flex; cursor: pointer; }
.opt-list li { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.opt-list li:last-child { border-bottom: 0; }
.opt-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-list small { color: var(--muted); font-size: 12.5px; }
.opt-list .i { color: var(--muted); }
.opt-list.compact li { padding: 8px 0; gap: 10px; }
.opt-list.keys li > div { font-weight: 600; }
.keycap { padding: 7px 14px; font-size: 13px; color: var(--text); border-radius: 10px; min-width: 52px; text-align: center; }
.keycap.waiting { border-color: var(--cyan); color: var(--cyan); }
.cam-preview { aspect-ratio: 16 / 10; border-radius: 14px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); background: radial-gradient(200px 100px at 50% 100%, rgb(255 47 214 / .2), transparent), rgb(10 8 30 / .5); border: 1px solid var(--line); }
.cam-preview .i { width: 40px; height: 40px; }
.sound-test { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); }
.sound-test .play { width: 38px; height: 38px; border-radius: 50%; display: grid !important; place-items: center; background: var(--accent); box-shadow: 0 0 14px var(--glow); flex: none; }
.sound-test .play .i { width: 15px; height: 15px; }
.sound-test .wave { flex: 1; height: 26px; background: repeating-linear-gradient(90deg, var(--accent-2) 0 2px, transparent 2px 5px); -webkit-mask: radial-gradient(60% 100% at 45% 50%, #000 30%, rgb(0 0 0 / .35) 70%); mask: radial-gradient(60% 100% at 45% 50%, #000 30%, rgb(0 0 0 / .35) 70%); opacity: .7; }
.sound-test.playing .wave { animation: pulse .5s infinite alternate; opacity: 1; }
.sound-test small { color: var(--muted); }
@keyframes pulse { to { transform: scaleY(.6); } }

/* ================= Экраны «скоро» ================= */
.hero-card { position: relative; padding: 24px; border-radius: 20px; margin-bottom: 14px; border: 1px solid var(--line-2); overflow: hidden;
  background: radial-gradient(420px 220px at 90% 30%, rgb(255 47 214 / .25), transparent), radial-gradient(500px 260px at 70% 120%, rgb(0 229 255 / .16), transparent), linear-gradient(135deg, #20185a, #15113e); box-shadow: 0 0 40px rgb(139 61 255 / .2); }
.hero-card h2 { font-size: 40px; margin: 4px 0 8px; }
.hero-card h3 { font-size: 26px; margin: 10px 0 6px; }
.hero-card p { color: #d4cff5; max-width: 560px; margin: 0 0 14px; }
.hero-card small { color: #cfcaf0; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.perk { display: inline-flex; align-items: center; gap: 6px; color: #d4cff5; font-size: 13.5px; margin-left: 10px; }
.perk .i { color: var(--accent-2); width: 18px; height: 18px; }
.tag-gold { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-weight: 700; font-size: 12.5px; background: rgb(139 61 255 / .5); }
.tag-gold .i { color: var(--gold); width: 15px; height: 15px; }
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chips-row span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 10px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); font-size: 13px; }
.chips-row .i { width: 16px; height: 16px; color: var(--muted); }
.sec-row { display: flex; align-items: center; justify-content: space-between; }
.row-card { display: flex; align-items: center; gap: 16px; padding: 12px; margin-bottom: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.rc-art { width: 110px; height: 70px; border-radius: 12px; flex: none; display: grid !important; place-items: center; color: rgb(255 255 255 / .55); background: linear-gradient(135deg, #3a1f8a, #12103a); }
.rc-art .i { width: 32px; height: 32px; }
.rc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rc-body b { font: 700 16px var(--font-h); }
.rc-meta { display: flex; flex-direction: column; gap: 6px; }
.sk { display: block; height: 9px; border-radius: 6px; background: linear-gradient(90deg, rgb(255 255 255 / .06), rgb(255 255 255 / .12), rgb(255 255 255 / .06)); background-size: 200% 100%; animation: shimmer 1.6s infinite linear; }
@keyframes shimmer { to { background-position: -200% 0; } }
.cal-head { text-align: center; font: 700 16px var(--font-h); text-transform: capitalize; margin-bottom: 8px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; }
.cal b { color: var(--muted); font-weight: 600; font-size: 12px; }
.cal span { padding: 6px 0; border-radius: 50%; aspect-ratio: 1; display: grid; place-items: center; }
.cal span.today { background: var(--accent); box-shadow: 0 0 12px var(--glow); font-weight: 800; }
.game-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.game-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.game-card.sel { border-color: var(--accent-2); box-shadow: 0 0 18px var(--glow); }
.gc-art { width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; display: grid !important; place-items: center; color: rgb(255 255 255 / .6); background: linear-gradient(135deg, #3a2a90, #15113e); }
.gc-art.g1 { background: linear-gradient(135deg, #8a1f2a, #15113e); }
.gc-art.g2 { background: linear-gradient(135deg, #b5651d, #15113e); }
.gc-art.g3 { background: linear-gradient(135deg, #1f5e8a, #15113e); }
.gc-art.g4 { background: linear-gradient(135deg, #8a1f6a, #15113e); }
.gc-art.g5 { background: linear-gradient(135deg, #1f8a5e, #15113e); }
.game-card b { font-size: 13.5px; }
.game-card small { color: var(--muted); font-size: 11.5px; display: flex; align-items: center; gap: 4px; }
.game-card small .i { width: 12px; height: 12px; }
.filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 12px; margin-bottom: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.filters label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sel-btn { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); color: var(--text); font-size: 13px; }
.sel-btn .i { width: 15px; height: 15px; }
.sel-btn .i:last-child { margin-left: auto; }
.quick-list li { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border-radius: 14px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.quick-list li > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.quick-list b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-list small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.quick-list small .i { width: 13px; height: 13px; }
.qa-art { width: 40px; height: 40px; border-radius: 10px; display: grid !important; place-items: center; background: linear-gradient(135deg, #3a2a90, #15113e); flex: none; color: var(--accent-2); }
.store-hero h2 { font-size: 34px; }
.plus-mark { display: inline-flex; align-items: center; gap: 8px; font: 800 22px var(--font-h); background: linear-gradient(90deg, var(--pink), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plus-mark .i { color: var(--pink); }
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pill-tabs button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; }
.pill-tabs button.active { background: linear-gradient(135deg, rgb(162 89 255 / .75), rgb(139 61 255 / .6)); border-color: var(--accent-2); box-shadow: 0 0 16px var(--glow); }
.pill-tabs .i { width: 16px; height: 16px; color: #ffb14a; }
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.shop-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 10px 10px 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.sc-tag { position: absolute; top: 16px; left: 16px; padding: 3px 9px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--accent); z-index: 1; }
.shop-art { aspect-ratio: 16 / 10; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px; color: #fff; background: radial-gradient(circle at 50% 60%, rgb(255 47 214 / .45), transparent 60%), linear-gradient(135deg, #3a2a90, #15113e); }
.shop-art .i { width: 44px; height: 44px; filter: drop-shadow(0 0 10px var(--pink)); }
.shop-card b { font: 700 15px var(--font-h); }
.shop-card small { color: var(--muted); font-size: 12.5px; min-height: 34px; }
.shop-buy { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 6px 6px 6px 10px; border-radius: 12px; background: rgb(10 8 30 / .5); }
.price { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; }
.price .coin { width: 18px; height: 18px; }
.more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.more-card { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.more-card > .i:first-child { width: 36px; height: 36px; color: var(--pink); }
.more-card span { flex: 1; display: flex; flex-direction: column; }
.more-card small { color: var(--muted); font-size: 12.5px; }
.ach-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; margin-bottom: 12px; }
.xp-card { display: flex; gap: 18px; align-items: center; }
.xp-card .lvl-badge { width: 90px; height: 100px; font-size: 30px; background: linear-gradient(135deg, var(--accent-2), #3a1f9e); color: #fff; box-shadow: 0 0 20px var(--glow); }
.xp-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.xp-body b { font: 800 22px var(--font-h); }
.xp-body small { color: var(--muted); }
.big-num { font: 800 32px var(--font-h); display: block; }
.week { display: flex; gap: 6px; margin-top: 8px; }
.week span { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.week i { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; color: transparent; }
.week i .i { width: 14px; height: 14px; }
.week .on i { background: var(--accent); color: #fff; box-shadow: 0 0 10px var(--glow); border-color: transparent; }
.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 6px; }
.stat-strip div { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.stat-strip .i { grid-row: span 2; width: 30px; height: 30px; color: var(--accent-2); }
.stat-strip b { font: 800 20px var(--font-h); }
.stat-strip small { color: var(--muted); font-size: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.cat-card .i { width: 34px; height: 34px; color: var(--accent-2); }
.cat-card small { color: var(--muted); }
.cat-card .xp-bar { width: 100%; }
.badges4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; margin-bottom: 12px; }
.badges4 div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.badges4 .i { width: 34px; height: 34px; color: var(--accent-2); }
.badges4 small { font-size: 11.5px; color: var(--muted); }
.milestones li i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--accent-2); flex: none; }
.promo { background: radial-gradient(200px 120px at 80% 100%, rgb(255 170 80 / .25), transparent), linear-gradient(160deg, #2a1d70, #15113e); }
.promo b { font: 800 22px var(--font-h); }
.promo p { color: #d4cff5; margin: 6px 0 0; }
.roles { width: 100%; border-collapse: collapse; font-size: 14px; }
.roles th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12.5px; padding: 6px 8px; }
.roles td { padding: 8px; border-top: 1px solid var(--line); }
.roles td:first-child { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.roles tr.sel td { background: rgb(139 61 255 / .1); }
.swatch { display: inline-block; width: 22px; height: 22px; border-radius: 6px; }
.swatch.lg { width: 30px; height: 30px; border-radius: 9px; }
.swatch.sel { outline: 2px solid #fff; outline-offset: 2px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.role-name { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: rgb(10 8 30 / .5); border: 1px solid var(--line); font-weight: 700; }
.perm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.perm-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: rgb(255 255 255 / .03); border: 1px solid var(--accent); box-shadow: 0 0 14px rgb(139 61 255 / .2) inset; }
.perm-card.c1, .perm-card.c2 { border-color: var(--cyan); box-shadow: 0 0 14px rgb(0 229 255 / .15) inset; }
.perm-card.c5 { border-color: var(--gold); box-shadow: 0 0 14px rgb(255 194 61 / .15) inset; }
.perm-card .i { width: 28px; height: 28px; color: var(--accent-2); }
.perm-card small { color: var(--muted); font-size: 12.5px; }
.count { white-space: nowrap; }

/* ---------- быстрый переход ---------- */
dialog { border: 1px solid var(--line-2); border-radius: 20px; background: var(--panel-solid); color: var(--text); box-shadow: 0 0 60px rgb(139 61 255 / .35); }
dialog::backdrop { background: rgb(5 3 15 / .7); backdrop-filter: blur(4px); }
.switcher { padding: 0; width: min(580px, calc(100vw - 32px)); margin-top: 12vh; overflow: hidden; }
.switcher input { width: 100%; margin: 0; padding: 18px 20px; font-size: 17px; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; }
#sw-list { max-height: 52vh; overflow-y: auto; padding: 6px; }
#sw-list li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; cursor: pointer; }
#sw-list li.sel { background: rgb(139 61 255 / .25); }
.sw-ic { color: var(--accent-2); }
.sw-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sw-t small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sw-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--dim); }
.sw-empty { color: var(--muted); justify-content: center; cursor: default !important; }
.sw-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.sw-foot kbd { margin-right: 4px; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--panel-solid); border: 1px solid var(--accent-2); padding: 11px 18px; border-radius: 14px; box-shadow: 0 0 30px var(--glow); max-width: calc(100vw - 32px); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgb(139 61 255 / .35); border-radius: 8px; }

/* ================= Адаптив ================= */
@media (max-width: 1360px) {
  .app { grid-template-columns: 76px 270px minmax(0, 1fr) 300px; }
  .search { width: 200px; }
  .p-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .app { grid-template-columns: 76px 260px minmax(0, 1fr); grid-template-areas: "top top top" "rail side main"; }
  .view > .right { display: none; }
  .view[data-view="profile"] > .main { grid-area: main; }
  .search { display: none; }
  .logo .wordmark { display: none; }
  .row2, .row3, .ach-top { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .login-screen { grid-template-columns: 1fr; padding: 24px 16px; gap: 24px; }
  .login-hero .features, .login-hero > p { display: none; }
  .brand-big .logo-mark { width: 64px; height: 64px; border-radius: 18px; }
  .login-hero h1 { margin-top: 16px; }
  .app { height: auto; min-height: 100dvh; gap: 10px; padding: 8px; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(70dvh, 1fr); grid-template-areas: "top" "side" "main"; }
  .rail, .logo, .topbar > .icon-btn { display: none; }
  .topbar { overflow-x: auto; }
  .tabs { margin: 0; }
  .side-col { max-height: 46dvh; }
  .server-head, .hub-banner { display: none; }
  .topic { display: none; }
  .p-grid, .stat4, .stat-strip, .cat-grid, .perm-grid, .more-grid, .shop-grid, .game-row, .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ctl { width: 84px; }
  .hero-card h2 { font-size: 30px; }
}

/* ================= Подгонка под макеты: арт, неон, бренд ================= */
.neon-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.neon-bg i { position: absolute; border-radius: 50%; border: 5px solid transparent; filter: drop-shadow(0 0 10px var(--c)) drop-shadow(0 0 28px var(--c)); }
.neon-bg .n1 { --c: #a259ff; width: 560px; height: 360px; left: -300px; top: -150px; border-bottom-color: #c39bff; border-right-color: #8b3dff; transform: rotate(-18deg); }
.neon-bg .n2 { --c: #00b8ff; width: 900px; height: 520px; left: -560px; bottom: -330px; border-top-color: #3aa0ff; border-right-color: #6c4dff; transform: rotate(12deg); opacity: .85; }
.neon-bg .n3 { --c: #ff2fd6; width: 620px; height: 380px; right: -380px; top: -230px; border-left-color: #ff4fe0; border-bottom-color: #b04dff; transform: rotate(15deg); opacity: .8; }
.neon-bg .n4 { --c: #2d7bff; width: 900px; height: 520px; right: -560px; bottom: -320px; border-top-color: #4aa8ff; border-left-color: #8b3dff; transform: rotate(-14deg); opacity: .9; }
.app, .login-screen { z-index: 1; }
.app { position: relative; }

.login-art { position: absolute; top: 0; bottom: 0; left: 24%; width: 36%; z-index: 0; pointer-events: none;
  background: url(art/login-hero.jpg) center top / cover no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 55% 60% at 55% 45%, #000 55%, transparent 100%);
          mask-image: radial-gradient(ellipse 55% 60% at 55% 45%, #000 55%, transparent 100%); }
.login-hero h1, .login-hero > p, .login-hero li { text-shadow: 0 2px 12px rgb(10 14 36 / .9); }
.login-screen::after { display: none; }
.brand-big .logo-img { height: 120px; width: auto; filter: drop-shadow(0 0 24px rgb(139 61 255 / .6)); }
.brand-big .wordmark-img { height: 84px; width: auto; filter: drop-shadow(0 0 22px rgb(255 47 214 / .35)); }
.brand-sep { width: 2px; align-self: stretch; margin: 10px 0; background: linear-gradient(transparent, #a76bff, transparent); }

.logo .logo-img { height: 40px; width: auto; filter: drop-shadow(0 0 10px rgb(139 61 255 / .55)); }
.logo .wordmark-img { height: 26px; width: auto; }
.site-link { display: inline-flex; align-items: center; gap: 4px; font: 500 12px var(--font); color: var(--muted); margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.site-link .i { width: 12px; height: 12px; }
.site-link:hover { color: #fff; }
.bell { position: relative; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); box-shadow: 0 0 8px var(--pink); }
.win-space { display: none; width: 140px; flex: none; }
html.electron .win-space { display: block; }
html.electron .topbar { -webkit-app-region: drag; }
html.electron .topbar button, html.electron .topbar a, html.electron .topbar input { -webkit-app-region: no-drag; }

.server-banner { position: relative; height: 140px; background: url(art/server-banner.jpg) center / cover no-repeat; }
.banner-chev { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgb(10 8 30 / .55); backdrop-filter: blur(6px); border: 1px solid var(--line); }
.banner-chev .i { width: 16px; height: 16px; }
img.p-banner, img.pm-banner, img.hub-banner { display: block; width: 100%; object-fit: cover; background: #1c1458; }
img.hub-banner { width: calc(100% - 20px); }
.hub-head { position: relative; }

.hero-card { isolation: isolate; }
.hero-card > *:not(.hero-art) { position: relative; z-index: 1; }
.hero-art { position: absolute; top: 0; right: 0; height: 100%; width: 62%; object-fit: cover; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); mask-image: linear-gradient(90deg, transparent, #000 35%); }
.promo { position: relative; overflow: hidden; isolation: isolate; }
.promo > *:not(.promo-art) { position: relative; z-index: 1; }
.promo-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; z-index: 0;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent); mask-image: linear-gradient(180deg, #000, transparent); }

.next-event { display: flex; gap: 12px; align-items: stretch; }
.ne-art { width: 92px; height: 120px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line-2); }
.ne-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; color: #cfcaf0; }
.ne-body b { font: 800 16px var(--font-h); color: #fff; }
.ne-body .btn-primary, .ne-body .btn-ghost { margin-top: auto; align-self: flex-start; }
.show-all { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; padding: 9px; border-radius: 12px; font-size: 13px; color: #d4d0f5; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.show-all:hover { border-color: var(--line-2); color: #fff; }
.show-all .i { width: 14px; height: 14px; }
.stats3 div { align-items: flex-start; gap: 2px; padding: 10px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.stats3 .i { width: 18px; height: 18px; color: var(--accent-2); }
.stats3 .dot-on { margin: 5px 0; }
.tags span { display: inline-flex; align-items: center; gap: 6px; }
.tags .i { width: 14px; height: 14px; color: var(--accent-2); }
.login-screen:not([hidden]) ~ .neon-bg { z-index: 2; }
.ne-body small { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #cfcaf0; }
.ne-body small .i { width: 14px; height: 14px; flex: none; color: var(--accent-2); }
.show-all .i { transform: rotate(-90deg); }
.stats3 { grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 4px; }
.stats3 > div { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 7px; row-gap: 0; align-items: center; padding: 0; background: none; border: 0; }
.stats3 > div > :first-child { grid-row: 1 / 3; }
.stats3 b { font-size: 16px; line-height: 1.1; }
.stats3 small { font-size: 11px; }
.avatar.has-img { background-size: cover; background-position: center; color: transparent; }

/* профиль: баннер крупнее, текст на затемнении */
img.p-banner { height: 230px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
.p-hero { background: linear-gradient(180deg, transparent 40%, rgb(16 12 44 / .9)); }
.p-row { margin-top: -110px; }
.p-av .avatar { --size: 150px !important; width: 150px; height: 150px; }
.p-name { text-shadow: 0 2px 14px rgb(10 14 36 / .9); }

/* голос: сцена со стримом-превью, плотнее каналы */
.screen { background: linear-gradient(180deg, rgb(10 14 36 / .35), rgb(10 14 36 / .85)), url(art/stream-preview.jpg) center / cover no-repeat !important; }
.channel-list button, #text-channels li > button, #voice-channels li > button { padding-top: 6px; padding-bottom: 6px; }
.server-icon.img { padding: 0; overflow: hidden; background: #1c1458; }
.server-icon.img img { width: 100%; height: 100%; object-fit: cover; }

/* ================= Проход 3: наполнение экранов как на макетах ================= */
.grow { flex: 1; }
.push { margin-left: auto; }
.seg-tabs em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 8px; background: rgb(255 255 255 / .12); }
.tabs-line { display: flex; gap: 10px; align-items: flex-start; }
.tabs-line .seg-tabs { flex: 1; }
.tabs-line > .sel-btn { flex: none; height: 46px; }
.date-chip, .ok-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; }
.date-chip { background: rgb(10 8 30 / .5); border: 1px solid var(--line); }
.date-chip .i { width: 15px; height: 15px; }
.ok-chip { background: rgb(34 211 107 / .16); color: #5cf09a; border: 1px solid rgb(34 211 107 / .35); font-weight: 700; }
.left-time { display: inline-flex; align-items: center; gap: 5px; color: var(--muted) !important; font-size: 12.5px !important; }
.left-time .i { width: 14px; height: 14px; }
.sort-lbl { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.rc-img { width: 120px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
.rc-img.sq { width: 76px; height: 76px; }
.rc-body small { color: var(--muted); font-size: 12.5px; }
.mini-tags { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: #cfcaf0; }
.mini-tags span, .rc-meta span, .grp-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.mini-tags .i, .rc-meta .i, .grp-foot .i { width: 14px; height: 14px; color: var(--muted); }
.rc-meta { font-size: 12.5px; color: #d4d0f5; min-width: 150px; }
.rc-act { display: flex; align-items: center; gap: 8px; flex-direction: column; }
.ev-row .rc-act { flex-direction: row; }
.cal-head { display: flex; align-items: center; justify-content: space-between; }
.cal span.ev { box-shadow: 0 0 0 1.5px var(--accent-2) inset; }
.near-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.near-list li:last-child { border: 0; }
.near-list img { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex: none; }
.near-list div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.near-list b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.near-list small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.near-list small .i { width: 12px; height: 12px; }
.near-list > li > .i { width: 16px; height: 16px; transform: rotate(-90deg); color: var(--muted); }

.sec-row.tight { margin: 0 0 10px; }
.gc-img { width: 100%; aspect-ratio: 16 / 11; border-radius: 12px; object-fit: cover; }
.filters .reset { align-self: flex-end; padding-bottom: 10px; }
.grp-row { align-items: flex-start; }
.grp-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.grp-top .ago { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; }
.grp-top .ago .i { width: 12px; height: 12px; }
.mini-chip { font-size: 11.5px; padding: 2px 8px; border-radius: 8px; background: rgb(139 61 255 / .25); border: 1px solid rgb(167 107 255 / .4); color: #e6dcff; }
.grp-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: #d4d0f5; margin-top: 2px; }
.who { display: inline-flex; align-items: center; gap: 8px; }
.who img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.who > span { display: flex; flex-direction: column; line-height: 1.15; }
.who b { font-size: 13px; color: #5cd4ff; }
.who small { font-size: 11px; }
.checks li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; color: var(--muted); }
.checks li b { color: #fff; font-weight: 600; }
.checks .i { width: 16px; height: 16px; color: #fff; background: #22c55e; border-radius: 50%; padding: 2px; flex: none; }

.shop-img { width: 100%; aspect-ratio: 16 / 11; object-fit: cover; border-radius: 12px; margin-bottom: 6px; }
.my-items li { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.my-items img { width: 54px; height: 38px; border-radius: 8px; object-fit: cover; flex: none; }
.my-items div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.my-items b { font-size: 12.5px; }
.my-items small { color: var(--muted); font-size: 11px; }
.my-items .ok { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: #5cf09a; }
.my-items .ok .i { width: 13px; height: 13px; }
.card-head .link.push, .card-head .push { font: 600 12px var(--font); }

.ach-av { position: relative; flex: none; }
.ach-av img { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--accent), 0 0 0 7px rgb(139 61 255 / .25), 0 0 26px var(--glow); }
.ach-av em { position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%); font: 800 14px var(--font-h); font-style: normal; padding: 2px 10px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-2), #3a1f9e); box-shadow: 0 0 12px var(--glow); }
.xp-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 3px 9px; border-radius: 8px; background: rgb(255 194 61 / .15); color: var(--gold); border: 1px solid rgb(255 194 61 / .35); }
.top-chip .i { width: 13px; height: 13px; }
.xp-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.xp-tag { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: var(--accent); }
.streak-row { display: flex; align-items: center; gap: 10px; }
.ach-mid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 12px; margin: 12px 0; }
.ach-mid .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach-mid .cat-card { padding: 10px; }
.ach-mid .cat-card .i { width: 26px; height: 26px; }
.ach-mid .cat-card b { font-size: 13px; }
.rewards li { display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 6px; border-radius: 12px; background: rgb(255 255 255 / .04); border: 1px solid var(--line); }
.rewards .rw-ic { width: 38px; height: 38px; flex: none; display: grid; place-items: center; font: 800 13px var(--font-h); border-radius: 50%; background: radial-gradient(circle, #6a35c8, #2a1d70); box-shadow: 0 0 0 2px var(--accent-2), 0 0 14px var(--glow); }
.rewards div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rewards b { font-size: 13px; }
.rewards small { color: var(--muted); font-size: 11.5px; }
.rewards > li > .i { width: 15px; height: 15px; color: var(--muted); }
.recent-ach { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ra { display: flex; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line-2); background: rgb(255 255 255 / .03); }
.ra.gold { border-color: rgb(255 194 61 / .55); box-shadow: 0 0 16px rgb(255 194 61 / .15) inset; }
.ra.epic { border-color: rgb(167 107 255 / .6); box-shadow: 0 0 16px rgb(139 61 255 / .2) inset; }
.ra.blue { border-color: rgb(0 229 255 / .4); }
.ra img { width: 66px; height: 66px; border-radius: 12px; object-fit: cover; flex: none; }
.ra div { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.ra b { font-size: 13.5px; }
.ra small { color: var(--muted); font-size: 11.5px; }
.ra em { font: 800 15px var(--font-h); font-style: normal; color: #d08bff; }
.badges3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; margin-bottom: 12px; }
.badges3 div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.badges3 img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; }
.badges3 small { color: var(--muted); font-size: 11.5px; }
.milestones li { display: flex; align-items: center; gap: 10px; }
.milestones li.done > i { background: #22c55e; border-color: #22c55e; display: grid; place-items: center; }
.milestones li > i .i { width: 11px; height: 11px; color: #fff; }
.milestones li > div { flex: 1; }
.ms-st { font-size: 12px; color: var(--muted); }
.ms-st .i { width: 16px; height: 16px; color: #22c55e; }
@media (max-width: 1300px) { .ach-mid, .recent-ach { grid-template-columns: 1fr; } }
.badge-imgs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.badge-imgs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.fav.img { position: relative; overflow: hidden; padding: 0; background: #15113e; }
.fav.img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fav.img b { position: absolute; inset: auto 0 0 0; padding: 14px 4px 6px; font-size: 11.5px; text-align: center; background: linear-gradient(transparent, rgb(10 8 30 / .9)); }
.progress-list b { display: flex; }
.lvl-card .lvl-badge .i { width: 30px; height: 30px; color: #2a1a00; }
.xp-top b { color: #fff; }
.next-lvl { display: grid; grid-template-columns: auto auto; column-gap: 14px; align-items: center; text-align: left; padding: 10px 14px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid var(--line-2); flex: none; }
.next-lvl small { grid-column: 1; color: var(--muted); font-size: 12px; }
.next-lvl b { grid-column: 1; font: 800 17px var(--font-h); }
.next-lvl .i { grid-column: 2; grid-row: 1 / 3; width: 22px; height: 22px; transform: rotate(-90deg); color: var(--accent-2); }
#side-roles .server-banner { height: 96px; }
#side-roles .side-title { padding: 8px 6px 4px; font-size: 16px; }
#side-roles .side-nav { padding: 0; }
#side-roles .side-nav button.active { color: #fff; background: linear-gradient(135deg, rgb(162 89 255 / .55), rgb(139 61 255 / .4)); box-shadow: 0 0 0 1px var(--accent-2) inset; }
.side-nav.back { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px !important; }
.side-nav.back .i { transform: rotate(180deg); }

/* ================= Вложения и голосовые ================= */
.att-img { display: block; margin-top: 6px; max-width: min(420px, 100%); border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgb(10 8 30 / .5); }
.att-img img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 10px 12px; max-width: 360px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid var(--line-2); }
.af-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--accent), #5a23c8); box-shadow: 0 0 12px var(--glow); }
.af-ic .i { width: 20px; height: 20px; }
.att-file > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-file b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file small { color: var(--muted); font-size: 12px; }
.att-voice { display: flex; align-items: center; gap: 12px; margin-top: 6px; padding: 8px 12px 8px 8px; max-width: 380px; border-radius: 14px; background: rgb(255 255 255 / .05); border: 1px solid var(--line-2); }
.vp-play { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent); box-shadow: 0 0 14px var(--glow); color: #fff; }
.vp-play .i { width: 14px; height: 14px; }
.vp-wave { flex: 1; height: 28px; display: flex; align-items: center; gap: 2px; cursor: pointer; min-width: 120px; }
.vp-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: rgb(196 160 255 / .45); }
.vp-wave i.on { background: linear-gradient(180deg, #ff6be6, #a259ff); box-shadow: 0 0 6px rgb(255 47 214 / .5); }
.vp-time { font-variant-numeric: tabular-nums; font-size: 13px; color: #d4d0f5; }
.vp-rate { font-size: 11.5px; font-weight: 700; padding: 3px 7px; border-radius: 8px; background: rgb(255 255 255 / .08); border: 1px solid var(--line); }
.composer { position: relative; }
.composer .rec-bar { position: absolute; inset: 0 96px 0 50px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 12px; background: var(--panel-solid); }
.composer .rec-bar[hidden] { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 10px #ff3b5c; animation: pulse-dot 1s infinite; }
@keyframes pulse-dot { 50% { opacity: .3; } }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-hint { color: var(--muted); font-size: 13px; flex: 1; }
.composer.recording .rec { background: #ff3b5c; color: #fff; box-shadow: 0 0 14px rgb(255 59 92 / .6); }
.composer.busy { opacity: .7; pointer-events: none; }
.composer.busy::after { content: "Загружаю…"; position: absolute; right: 60px; top: -22px; font-size: 12px; color: var(--muted); }
.main.dropping { outline: 2px dashed var(--accent-2); outline-offset: -8px; }
.main.dropping::after { content: "Отпусти, чтобы отправить"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 22px var(--font-h); background: rgb(10 8 30 / .6); border-radius: inherit; pointer-events: none; z-index: 5; }
.main { position: relative; }

/* ================= Демонстрация экрана ================= */
.screen.live { position: relative; overflow: hidden; background: #000 !important; border: 2px solid var(--accent-2); box-shadow: 0 0 0 1px rgb(255 47 214 / .4), 0 0 30px var(--glow); }
.screen.live video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen:fullscreen { border: 0; border-radius: 0; }
.live-top { position: absolute; top: 12px; left: 12px; display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 14px; background: rgb(10 8 30 / .7); backdrop-filter: blur(8px); }
.live-top b { font: 700 15px var(--font-h); }
.live-badge { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 8px; background: linear-gradient(135deg, #a259ff, #7a2dff); box-shadow: 0 0 12px var(--glow); }
.viewers { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; }
.viewers .i { width: 16px; height: 16px; }
.live-bottom { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.live-bottom > * { backdrop-filter: blur(8px); }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 5px 10px; border-radius: 10px; background: rgb(10 8 30 / .7); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #ff3b5c; box-shadow: 0 0 8px #ff3b5c; animation: pulse-dot 1.2s infinite; }
.live-bottom .q { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 10px; background: rgb(10 8 30 / .7); border: 1px solid var(--line); }
.live-bottom .icon-btn { background: rgb(10 8 30 / .7); }
.screen-empty .btn-primary { margin-top: 10px; }
.tile.sharing { cursor: pointer; }
.tile.watched { border-color: var(--accent-2) !important; box-shadow: 0 0 0 1px var(--accent-2), 0 0 22px var(--glow); background: linear-gradient(180deg, rgb(139 61 255 / .28), rgb(139 61 255 / .08)); }
.tile-live { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 8px; background: rgb(139 61 255 / .45); }
.tile-live .i { width: 13px; height: 13px; }
.ctl.on { color: #fff; border-color: var(--accent-2); background: linear-gradient(135deg, rgb(162 89 255 / .6), rgb(139 61 255 / .35)); box-shadow: 0 0 18px var(--glow); }
.tiles { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.tile { padding: 12px 10px 10px; gap: 6px; }
.tile .vol { position: absolute; left: 12px; right: 12px; bottom: 6px; width: auto; opacity: 0; transition: opacity .15s; }
.tile:hover .vol { opacity: 1; }
.tile:hover .tile-live { opacity: 0; }

/* ================= Настройки как на макете 11 ================= */
.field select { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background: rgb(10 8 30 / .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23cfcaf0' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.field select:hover { border-color: var(--accent-2); }
.field select option { background: #15113e; }
.cam-preview { position: relative; overflow: hidden; }
.cam-preview .btn-primary { margin-top: 6px; }
.cam-preview.on > :not(video) { display: none; }
.cam-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.acc-ic { width: 40px; height: 40px; border-radius: 12px; display: grid !important; place-items: center; flex: none; font: 700 17px var(--font-h); background: rgb(255 255 255 / .05); border: 1px solid var(--line); }
.acc-ic .i { width: 20px; height: 20px; }
.meter { gap: 4px; height: 34px; padding: 8px 12px; }
.meter { justify-content: space-between; }
.meter i { flex: 0 0 5px; border-radius: 99px; }
.meter i.on { background: linear-gradient(180deg, #2bf08a, #00e5ff); }
input[type=range] { accent-color: var(--accent); }

/* ================= Лёгкость ================= */
.level-fill { width: 100% !important; transform-origin: left; transform: scaleX(0); transition: transform .08s linear; will-change: transform; }
/* Облегчённый режим: без размытия, неонового свечения и анимаций. Включается в настройках
   или сам, если система просит меньше анимаций. */
html.lite *, html.lite *::before, html.lite *::after { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; animation: none !important; transition: none !important; }
html.lite .neon-bg i { filter: none; box-shadow: none !important; }
html.lite .card, html.lite .side-col, html.lite .main, html.lite .right > * { box-shadow: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
/* слайдеры как на макете: заполненная часть с градиентом и светящийся бегунок */
input[type=range] { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; --p: 100%; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #8b3dff, #c56bff var(--p), rgb(255 255 255 / .12) var(--p)); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #e9dcff; border: 3px solid #a259ff; box-shadow: 0 0 12px var(--glow); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 99px; background: rgb(255 255 255 / .12); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 99px; background: linear-gradient(90deg, #8b3dff, #c56bff); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #e9dcff; border: 3px solid #a259ff; }
#settings-main .sec { margin: 14px 0 8px; }
#settings-main .page-head { margin-bottom: 4px; padding-bottom: 12px; }
#settings-main .row2, #settings-main .row3 { margin-bottom: 8px; }
#settings-main .field { gap: 6px; }
#settings-main .opt-list li { padding-top: 9px; padding-bottom: 9px; }
/* как на макете: вкладки сразу после логотипа, а не по центру */
.topbar .tabs { margin: 0 auto 0 18px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }

/* Крупные игровые заголовки: широкий Unbounded */
.login-hero h1, .hero-card h2, .hero-card h3, .page-head h2, .p-name, .server-meta h1 { font-family: var(--font-d); font-weight: 700; letter-spacing: -.01em; }
.page-head h2 { font-size: 26px; }
.hero-card h2 { font-size: 36px; }
.hero-card h3 { font-size: 24px; }
.p-name { font-size: 32px; }
.server-meta h1 { font-size: 19px; }
.socials button .soc { background: none !important; width: 22px; height: 22px; display: grid; place-items: center; }
.socials button.off { opacity: .75; }
.logout-nav { margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px !important; }
.danger-link { color: #ff7a93 !important; }
.danger-link .i { transform: rotate(180deg); }
#side-settings:not([hidden]) { display: flex; flex-direction: column; }

/* ===== Сверка 1: экран входа ближе к макету 01 ===== */
.login-art { left: 22%; width: 42%; background-position: center 70%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%), linear-gradient(180deg, #000 80%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 22%, #000 78%, transparent 100%); filter: saturate(1.15) brightness(1.08); }
.login-screen::before { opacity: .55; }
.login-hero h1 { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.2; }
.features .f-ic { background: linear-gradient(160deg, rgb(139 61 255 / .35), rgb(20 14 60 / .9)); border: 1.5px solid #8f5bff; color: #fff; box-shadow: 0 0 16px rgb(139 61 255 / .55), inset 0 0 12px rgb(139 61 255 / .35); }
.features .f-ic .i { width: 24px; height: 24px; }
.login-card { padding: 30px 30px 24px; gap: 16px; border: 1.5px solid transparent;
  background: linear-gradient(rgb(18 14 52 / .78), rgb(18 14 52 / .78)) padding-box, linear-gradient(160deg, #c08bff, #6a2be0 40%, #00e5ff 75%, #ff2fd6) border-box;
  box-shadow: 0 0 50px rgb(139 61 255 / .45), 0 0 120px rgb(0 229 255 / .12); }
.socials button { padding: 14px 8px; font-size: 15px; border-color: var(--line-2); }
.socials button[data-provider="telegram"] { background: rgb(41 169 235 / .14); border-color: rgb(41 169 235 / .45); }
.input-ic { height: 56px; }
.login-card .btn-primary.wide { padding: 16px; box-shadow: 0 0 26px var(--glow); }
.login-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 58%, transparent 96%); -webkit-mask-composite: source-over; mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 58%, transparent 96%); }
.login-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 50%, transparent 84%); mask-image: linear-gradient(90deg, transparent 0, #000 20%, #000 50%, transparent 84%); }

/* ===== Сверка 2: друзья и ЛС (макет 04) ===== */
.profile-mini img.pm-banner { height: 110px; -webkit-mask-image: linear-gradient(180deg, #000 45%, transparent); mask-image: linear-gradient(180deg, #000 45%, transparent); }
.profile-mini .pm-row { margin-top: -48px; position: relative; }
.profile-mini .pm-av .avatar { --size: 72px !important; width: 72px; height: 72px; }
.pm-row b { text-shadow: 0 2px 10px rgb(10 14 36 / .9); }
#friend-list li, #dm-list li { position: relative; }
.row-more { margin-left: auto; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: none; opacity: 0; background: rgb(255 255 255 / .06); transition: opacity .12s; }
.row-more .i { width: 16px; height: 16px; }
.prow:hover .row-more, .prow.active .row-more { opacity: 1; }
#dm-list .row-more { display: none; }
/* уведомления сверху, чтобы не закрывать поле ввода */
.toast { bottom: auto; top: 76px; }

/* ===== Сверка 4: профиль (макет 05) ===== */
.lvl-emblem { width: 84px; height: 60px; object-fit: cover; border-radius: 10px; flex: none; -webkit-mask-image: radial-gradient(closest-side, #000 70%, transparent); mask-image: radial-gradient(closest-side, #000 70%, transparent); }
.p-tags { margin-top: 10px; }
.p-tags span { font-size: 12px; padding: 3px 10px; }
.fav.img b { font-size: 10.5px; line-height: 1.15; white-space: normal; }

/* ===== Сверка 5–6: события и хаб (макеты 08, 09) ===== */
.events-hero { border: 1.5px solid #c56bff; box-shadow: 0 0 0 1px rgb(255 47 214 / .35), 0 0 34px rgb(197 107 255 / .45); }
.cal span.dim { color: rgb(207 202 240 / .35); }
.stat4 b { font-size: 16px; white-space: nowrap; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--accent); box-shadow: 0 0 10px var(--glow); }
.game-row-wrap { position: relative; }
.row-next { position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 0 14px var(--glow); }
.row-next .i { width: 18px; height: 18px; transform: rotate(-90deg); }

/* ===== Сверка 7–9: роли, настройки, голос ===== */
.page-head h2 { font-size: 21px; font-weight: 700; letter-spacing: 0; }
/* Уведомление в правом нижнем углу: не перекрывает заголовки и поле ввода. */
.toast { top: auto; bottom: 24px; left: auto; right: 24px; transform: none; max-width: 360px; }
@media (max-width: 760px) { .toast { left: 16px; right: 16px; bottom: 84px; max-width: none; } }
.filters { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; align-items: end; }
.filters .reset { padding-bottom: 10px; white-space: nowrap; }
@media (max-width: 1360px) { .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.opt-list li.all { background: rgb(139 61 255 / .1); border-radius: 10px; }
.card-head.sm .link { font-size: 12px; }
.filters .sel-btn { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.filters label { min-width: 0; }
.claim-code { margin-top: 14px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--accent-2); background: rgb(139 61 255 / .12); text-align: center; }
.claim-code small { display: block; color: var(--muted); }
.claim-code b { display: block; margin-top: 6px; font: 700 26px/1 ui-monospace, monospace; letter-spacing: .12em; color: #c9a6ff; }

/* ===== Ревью дизайна: узкие экраны (1280) и телефон ===== */
.page-head { flex-wrap: wrap; row-gap: 10px; }
.page-head > div:not(.page-actions) { flex: 1 1 280px; min-width: 0; }
.page-head h2 { white-space: nowrap; }
.page-actions { flex-wrap: wrap; }
.seg-tabs button { flex: 0 0 auto; }
.profile .seg-tabs button, .seg-tabs.fill button { flex: 1; }
.side-nav button { white-space: nowrap; }
.side-nav .soon-pill, .side-nav em { font-size: 9px; }
.sidebar > .side-nav, .sidebar > .toggles, .sidebar > .hub-head { flex: none; }
#side-hub, #side-store, #side-roles { overflow-y: auto; scrollbar-width: thin; }
.roles tr.sel td:first-child { border-radius: 10px 0 0 10px; }
.roles tr.sel td:last-child { border-radius: 0 10px 10px 0; }
.roles td:nth-child(4) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.perm-grid > * { padding-block: 10px; }
.perm-grid small { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.my-items b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-card h2 { font-size: clamp(24px, 2.6vw, 40px); overflow-wrap: anywhere; }
.fav.img b { padding-top: 22px; background: linear-gradient(transparent, rgb(8 6 24 / .96) 55%); text-shadow: 0 1px 2px #000; }
@media (min-width: 1600px) { .ach-mid .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1600px) { .my-items .ok { font-size: 0; gap: 0; } }
@media (min-width: 1101px) and (max-width: 1360px) {
  .app { grid-template-columns: 72px 250px minmax(0, 1fr) 280px; }
  .search { width: 230px; }
}
@media (max-width: 1360px) {
  .ev-row { flex-wrap: wrap; }
  .ev-row .rc-act { flex-basis: 100%; justify-content: flex-end; }
  .rc-meta { min-width: 0; }
  .tabs-line .seg-tabs { min-width: 0; }
  .game-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 140px; overflow-x: auto; scrollbar-width: thin; }
  .quick-list .btn-primary { padding-inline: 10px; font-size: 12px; }
}
@media (max-width: 760px) {
  .brand-big .logo-img { height: 56px; }
  .brand-big .wordmark-img { height: 40px; max-width: 70vw; }
  .page-actions { width: 100%; }
  .page-head h2 { white-space: normal; font-size: 19px; }
  .xp-card { flex-wrap: wrap; }
  .xp-top b, .xp-body b { white-space: nowrap; }
}


/* Видимый фокус с клавиатуры для всех элементов управления. */
:where(button, a, input, select, textarea, [tabindex]):focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.socials { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.socials button { min-width: 0; }
.login-hero, .login-card { min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  .socials button { font-size: 13px; gap: 6px; padding: 12px 4px; }
  .login-hero h1 { overflow-wrap: anywhere; }
  #side-hub, #side-store { overflow-y: auto; }
  #side-hub > .toggles { flex: none; }
}
@media (max-width: 760px) { .login-screen { grid-template-columns: minmax(0, 1fr); } }

/* ===== Вход: арт на весь экран без тёмных провалов (как в макете 01) =====
   Под резким артом лежит тот же арт, увеличенный и размытый на весь экран: цвета замка
   и неба продолжаются до карточки и за неё, а резкая часть мягко в них растворяется. */
.login-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.login-bg::before, .login-bg::after { content: ""; position: absolute; top: -8%; bottom: -8%; background: url(art/login-hero.jpg) center 60% / cover no-repeat; filter: blur(34px) saturate(1.35) brightness(.62); }
.login-bg::before { left: -6%; width: 62%; }
.login-bg::after { right: -6%; width: 58%; transform: scaleX(-1); filter: blur(42px) saturate(1.3) brightness(.5); }
.login-art { left: 20%; width: 46%; background-size: cover; background-position: center 64%;
  -webkit-mask-image: radial-gradient(70% 95% at 50% 52%, #000 55%, transparent 100%); mask-image: radial-gradient(70% 95% at 50% 52%, #000 55%, transparent 100%); }
.login-screen::before { opacity: .35; }
@media (max-width: 760px) { .login-bg::after { display: none; } .login-bg::before { width: 100%; left: 0; } }

/* ===== Сетка по координатам макетов (замер на окне 1672×815) =====
   Рейл 80, колонка сервера 300, правая колонка 354, поля слева 45 и справа 26,
   логотип на 95 от края, вкладки начинаются над чатом, поиск 240. */
@media (min-width: 1500px) {
  .app { padding: 10px 26px 10px 45px; grid-template-columns: 80px 300px minmax(0, 1fr) 354px; grid-template-rows: 52px minmax(0, 1fr); }
  .topbar { padding-left: 50px; padding-right: 0; }
  .topbar .tabs { margin-left: 64px; }
  .search { width: 240px; }
  .top-me { margin-left: 110px; } /* в десктопе на этом месте кнопки окна, как в макете */
}

/* ===== Плотность как в макетах: заголовки страниц и вкладки =====
   В макетах заголовок страницы набран основным шрифтом (Onest/Manrope), 22px, без разделителя;
   иконка в небольшой плашке, вкладки-пилюли низкие. Unbounded остаётся для героев и логотипа. */
.page-head { margin-bottom: 12px; padding-bottom: 0; border-bottom: 0; gap: 12px; }
.page-head h2 { font-family: var(--font-h); font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.page-head p { font-size: 13px; margin-top: 1px; }
.page-ic { width: 40px; height: 40px; border-radius: 12px; box-shadow: none; }
.page-ic .i { width: 22px; height: 22px; }
.seg-tabs { padding: 3px; margin-bottom: 12px; border-radius: 13px; gap: 2px; }
.seg-tabs button { padding: 7px 14px; font-size: 13px; border-radius: 10px; gap: 6px; }
.seg-tabs .i { width: 16px; height: 16px; }
@media (max-width: 760px) { .page-head h2 { font-size: 19px; } }

/* Меню сервера */
.banner-chev { z-index: 3; cursor: pointer; transition: background .15s, transform .15s; }
.banner-chev:hover { background: rgb(139 61 255 / .45); }
.banner-chev.open .i { transform: rotate(180deg); }

.server-menu { position: absolute; top: 46px; right: 10px; z-index: 30; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--panel-solid); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgb(0 0 0 / .55), 0 0 24px rgb(139 61 255 / .25); display: flex; flex-direction: column; gap: 2px; }
.server-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #e4e0ff; font-weight: 500; text-align: left; }
.server-menu button:hover, .server-menu button:focus-visible { background: rgb(139 61 255 / .3); color: #fff; outline: none; }
.server-menu .i { width: 18px; height: 18px; color: var(--muted); }
.server-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 6px; }

/* Левая панель серверов: высота по количеству таверн, а не на всю колонку. */
.rail { align-self: start; max-height: 100%; height: auto; }
.side-col { position: relative; }
.server-menu { top: 52px; right: 20px; }
/* Роли: права доступа компактно, как в макете 07 — описание в одну строку. */
#view-roles-right .opt-list.compact li, .view[data-view="roles"] .right .opt-list.compact li { padding-block: 6px; gap: 10px; }
.view[data-view="roles"] .right .opt-list.compact small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 210px; }
.view[data-view="roles"] .right .opt-list.compact div { min-width: 0; font-size: 13px; }
.view[data-view="roles"] .right .opt-list.compact li { padding-block: 4px; }
.view[data-view="roles"] .right .card { padding: 12px 14px; }
.view[data-view="roles"] .right .swatch.lg { width: 26px; height: 26px; }
.view[data-view="roles"] .right .role-name { padding: 8px 12px; margin-bottom: 8px; }

/* ===== Достижения (макет 06): всё помещается в экран без прокрутки ===== */
.view[data-view="achievements"] .xp-card { padding: 12px 16px; gap: 16px; }
.view[data-view="achievements"] .xp-body b { font-size: 17px; }
.view[data-view="achievements"] .xp-line b { font: 700 14px var(--font); }
.view[data-view="achievements"] .xp-line { font-size: 12.5px; }
.view[data-view="achievements"] .ach-av img { width: 96px; height: 96px; }
.view[data-view="achievements"] .xp-body small { font-size: 12px; }
.view[data-view="achievements"] .big-num { font-size: 26px; }
.view[data-view="achievements"] .streak { padding: 12px 14px; }
.view[data-view="achievements"] .week i { width: 22px; height: 22px; }
.view[data-view="achievements"] .ach-top { margin-bottom: 10px; }
.stat-strip { gap: 8px; }
.stat-strip div { padding: 8px 12px; border-radius: 14px; }
.stat-strip .i { width: 26px; height: 26px; }
.stat-strip b { font-size: 17px; }
.stat-strip small { font-size: 11.5px; white-space: nowrap; }
.ach-mid { margin: 10px 0; grid-template-columns: 1.55fr 1fr; }
.ach-mid .card { padding: 12px 14px; }
.ach-mid .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ach-mid .cat-card { padding: 8px 6px; gap: 2px; border-radius: 12px; }
.ach-mid .cat-card .i { width: 22px; height: 22px; }
.ach-mid .cat-card b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ach-mid .cat-card small { font-size: 11px; white-space: nowrap; }
.ach-mid .card-head { white-space: nowrap; }
.ach-mid .card-head .link { font-size: 12px; }
.rewards li { padding: 6px 8px; margin-bottom: 5px; }
.rewards small { font-size: 11.5px; }
.view[data-view="achievements"] .recent-ach .ra { padding: 10px; }
.view[data-view="achievements"] .recent-ach .ra img { width: 72px; height: 72px; }
@media (max-width: 1300px) { .ach-mid .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Шапка страницы как в макетах: иконка без плашки, меньше отступы. */
.main.scroll { padding: 12px 16px 16px; }
.page-ic { width: 30px; height: 30px; background: none; border: 0; color: #cdb8ff; }
.page-ic .i { width: 24px; height: 24px; }
.page-head { margin-bottom: 10px; align-items: center; }
.page-head h2 { font-size: 20px; }
.right { padding: 0; }
.right > .card, .right .card { padding: 12px 14px; }

/* ===== События (макет 08): компактный герой, календарь и строки турниров ===== */
.events-hero { padding: 14px 18px; margin-bottom: 10px; }
.events-hero h3 { font-size: 24px; margin: 8px 0 4px; }
.events-hero p { font-size: 13px; margin: 0 0 8px; max-width: 520px; }
.events-hero .chips-row span { padding: 4px 10px; font-size: 12px; }
.events-hero .hero-actions { margin-top: 8px; gap: 8px; flex-wrap: nowrap; }
.events-hero .hero-actions > * { flex: none; }
.events-hero .hero-actions .btn-ghost, .events-hero .hero-actions .btn-primary { padding: 7px 14px; font-size: 13px; }
.events-hero .date-chip, .events-hero .ok-chip, .events-hero .left-time { font-size: 12px; }
.tabs-line .seg-tabs { margin-bottom: 0; }
.tabs-line { margin-bottom: 10px; }
.sec-row { margin: 4px 0 8px; }
.cal { gap: 2px 4px; }
.cal span { aspect-ratio: auto; width: 26px; height: 24px; padding: 0; margin: 0 auto; font-size: 12.5px; border-radius: 50%; }
.cal-head { margin-bottom: 4px; }
.ev-row { padding: 8px 10px; margin-bottom: 8px; gap: 14px; }
.ev-row .rc-img { width: 104px; height: 58px; border-radius: 10px; }
.ev-row .rc-body { gap: 3px; }
.ev-row .rc-body b { font-size: 14.5px; }
.ev-row .rc-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.ev-row .mini-tags span { font-size: 11.5px; }
.ev-row .rc-meta { font-size: 12px; gap: 4px; }

/* ===== Игровой хаб (макет 09) ===== */
.hub-hero { padding: 16px 22px; margin-bottom: 10px; }
.hub-hero h2 { font-size: 34px; margin: 2px 0 6px; }
.hub-hero p { max-width: 380px; font-size: 13.5px; margin: 0; }
.hub-hero .hero-actions { flex-wrap: nowrap; gap: 14px; margin-top: 12px; }
.hub-hero .perk { white-space: nowrap; font-size: 12.5px; }
.hub-hero .btn-primary.lg { padding: 10px 18px; }
.game-row { margin-bottom: 10px; gap: 8px; }
.game-card { padding: 6px 6px 8px; gap: 2px; border-radius: 14px; }
.gc-img { aspect-ratio: 16 / 9; border-radius: 10px; }
.game-card b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.view[data-view="team"] .card { padding: 12px 14px; }
.view[data-view="team"] .filters { padding: 8px 10px; margin-bottom: 10px; }

/* ===== Профиль (макет 05): баннер ниже, имя основным шрифтом, вкладки на всю ширину ===== */
img.p-banner { height: 236px; }
.p-hero { margin-bottom: 10px; }
.p-row { margin-top: -196px; padding-bottom: 14px; }
.p-name { font-family: var(--font-h); font-weight: 800; font-size: 34px; letter-spacing: -.01em; }
.view[data-view="profile"] .seg-tabs button { flex: 1; padding: 9px 14px; font-size: 14px; }
.view[data-view="profile"] .lvl-card { margin-bottom: 10px; padding-block: 10px; }
.view[data-view="profile"] .card { padding: 12px 14px; }

/* ===== Герои: основной шрифт, размеры по макетам ===== */
.hero-card h2, .hero-card h3 { font-family: var(--font-h); font-weight: 800; letter-spacing: -.015em; }
.store-hero h2, .view[data-view="store"] .hero-card h2 { font-size: 28px; }
.hub-hero h2 { font-size: 38px; }
.events-hero h3 { font-size: 26px; }

/* ===== Магазин (макет 10) ===== */
.view[data-view="store"] .hero-card { padding: 16px 22px; margin-bottom: 10px; }
.view[data-view="store"] .hero-card p { font-size: 13px; max-width: 360px; }
.view[data-view="store"] .seg-tabs { margin-bottom: 10px; }
.shop-grid { gap: 10px; }
.shop-card { padding: 8px 8px 10px; gap: 2px; border-radius: 14px; }
.shop-card b { font: 700 13.5px var(--font); }
.shop-card small { font-size: 11.5px; min-height: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== Роли (макет 07) ===== */
.roles td { padding: 5px 8px; }
.roles th { padding: 4px 8px; }
.view[data-view="roles"] .main .card { padding: 12px 14px; margin-bottom: 10px; }
.perm-grid { gap: 8px; }
.perm-card { padding: 8px 12px; gap: 2px; border-radius: 12px; }
.perm-card .i { width: 22px; height: 22px; }
.perm-card b { font-size: 13px; }
.perm-card small { font-size: 11.5px; }
.shop-img { aspect-ratio: 16 / 10; margin-bottom: 4px; border-radius: 10px; }

/* ===== Настройки (макет 11): плотнее, всё в один экран ===== */
#settings-main h3.sec { font-size: 16px; margin: 12px 0 6px; }
#settings-main .page-head { margin-bottom: 4px; }
#settings-main .field { gap: 5px; margin-bottom: 8px; font-size: 12.5px; }
#settings-main .field select { padding: 8px 12px; border-radius: 10px; font-size: 13px; }
#settings-main .row2 { gap: 20px; }
#settings-main .row3 { gap: 10px; }
#settings-main .meter { height: 26px; padding: 6px 10px; }
#settings-main .tile-tgl { padding: 8px 12px; font-size: 12.5px; min-height: 0; }
#settings-main .opt-list li { padding-block: 6px; }
#settings-main .field small:not(.muted) { font-size: 11.5px; }
/* Чат (макет 02): поле ввода ближе к низу, теги сервера в одну строку. */
.composer { margin: 0 14px 10px; }
.right .tags { flex-wrap: nowrap; gap: 6px; }
.right .tags > span { padding: 5px 9px; font-size: 12px; white-space: nowrap; }

/* ===== Отклик кнопок: наведение и нажатие =====
   Только transform, opacity, цвет и тень: это дёшево для видеокарты и не двигает разметку. */
:where(button, .btn-primary, .btn-ghost, .icon-btn, .tab, .rail-btn, .shop-card, .game-card, .cat-card, .perm-card, .row-card, .qa, a.icon-btn) {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .2s ease, transform .12s ease, filter .15s ease;
}
:where(button, a.icon-btn):not(:disabled):active { transform: scale(.96); }
.btn-primary:not(:disabled):hover { filter: brightness(1.12); box-shadow: 0 0 22px var(--glow); }
.btn-primary:not(:disabled):active { filter: brightness(.95); transform: scale(.97); }
.btn-ghost:not(:disabled):hover { border-color: var(--accent-2); background: rgb(139 61 255 / .12); }
.icon-btn:not(:disabled):hover { color: #fff; background: rgb(139 61 255 / .18); }
.tab:not(.active):hover { background: rgb(139 61 255 / .14); color: #fff; }
.rail-btn:hover .server-icon { transform: translateY(-1px); box-shadow: 0 0 16px var(--glow); }
.server-icon { transition: transform .15s ease, box-shadow .2s ease, border-radius .2s ease; }
.shop-card:hover, .game-card:hover, .cat-card:hover, .perm-card:hover, .row-card:hover { border-color: var(--accent-2); transform: translateY(-2px); box-shadow: 0 8px 24px rgb(0 0 0 / .35), 0 0 16px rgb(139 61 255 / .25); }
.seg-tabs button:not(.active):hover { background: rgb(255 255 255 / .06); color: #fff; }
.side-nav button:not(.active):active, #text-channels li > button:active, #voice-channels li > button:active { transform: scale(.98); }
.tgl, .tgl-wrap i { transition: background-color .2s ease, box-shadow .2s ease; }
@media (prefers-reduced-motion: reduce) { :where(button, a):active { transform: none !important; } .shop-card:hover, .game-card:hover, .cat-card:hover, .perm-card:hover, .row-card:hover { transform: none; } }
html.lite :where(button, a):active { transform: none; }
.view[data-view="achievements"] .page-head { margin-bottom: 4px; }
.view[data-view="achievements"] .seg-tabs { margin-bottom: 8px; }
.view[data-view="achievements"] .stat-strip { margin-bottom: 0; }
.view[data-view="achievements"] .ach-mid { margin: 8px 0; }
.view[data-view="achievements"] .main > .card:last-child { padding: 10px 14px; }
.view[data-view="achievements"] .ra { gap: 10px; }
.view[data-view="achievements"] .ra img { width: 64px !important; height: 64px !important; }
.view[data-view="achievements"] .ra b { font-size: 13px; }
.view[data-view="achievements"] .ra small { font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.view[data-view="achievements"] .ra > div { min-width: 0; }
.view[data-view="achievements"] .promo { min-height: 150px; }
/* Вход: мягкий край арта без шва; теги сервера не вылезают за панель */
.login-art { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 64%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16%, #000 64%, transparent 100%); }
.right .tags { flex-wrap: wrap; }
.right .tags > span { flex: 1 1 auto; justify-content: center; }
/* Шапка по макету: две группы вкладок, крупнее логотип и текст, поиск шире */
.topbar { margin-top: -6px; }
.topbar .tabs { background: none; border: 0; padding: 0; gap: 10px; }
.tab-grp { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: rgb(20 16 52 / .72); border: 1px solid var(--line); }
.tab { font-family: var(--font); font-weight: 600; font-size: 15px; padding: 9px 18px; }
.tab .i { width: 20px; height: 20px; }
.logo .wordmark-img { height: 34px; }
.site-link { text-decoration: none; color: var(--muted); }
@media (min-width: 1500px) {
  .search { width: 268px; height: 42px; border-radius: 16px; }
  .bell { margin-left: 10px; }
  .top-me { margin-left: 130px; }
}
.tab { font-size: 14px; font-weight: 500; padding: 7px 16px; }
.tab.active { font-weight: 600; }
@media (min-width: 1500px) { .topbar .tabs { margin-left: 40px; } .top-me { margin-left: 120px; } }
/* Вне экрана сервера голосовая панель сжимается в одну строку, чтобы не съедать меню */
.side-col:has(#side-server[hidden]) .voice-panel:not([hidden]) { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.side-col:has(#side-server[hidden]) .voice-panel .vp-top { flex: 1; min-width: 0; margin: 0; }
.side-col:has(#side-server[hidden]) .voice-panel :is(.level, .mic-warn, .ptt-hint, .vp-open) { display: none; }
.side-col:has(#side-server[hidden]) .voice-panel .vp-actions { display: flex; margin: 0; }
.side-col:has(#side-server[hidden]) .voice-panel .vp-actions > :not(#leave-btn) { display: none; }
.side-col:has(#side-server[hidden]) .voice-panel #leave-btn { width: 40px; height: 34px; flex: none; }
.side-col:has(#side-server[hidden]) .voice-panel .vp-where { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Магазин: предпросмотр профиля крупнее, с неоновым кольцом и значками */
#store-preview img.pm-banner { height: 150px; -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent); mask-image: linear-gradient(180deg, #000 60%, transparent); }
#store-preview .pm-row { margin-top: -62px; align-items: center; gap: 14px; }
#store-preview .pm-av .avatar { width: 84px; height: 84px; box-shadow: 0 0 0 3px #0e0b2c, 0 0 0 5px var(--accent-2), 0 0 22px var(--glow); }
#store-preview .pm-row > div { padding-top: 26px; }
#store-preview .pm-row b { font-size: 19px; }
.pm-badges { display: flex; gap: 5px; margin-top: 6px; }
.pm-badges img { width: 22px; height: 22px; border-radius: 6px; object-fit: cover; }
#store-preview .pm-row b { color: #fff; }
/* Профиль: вкладки слева компактно, как в макете */
.view[data-view="profile"] .seg-tabs { justify-content: flex-start; }
.view[data-view="profile"] .seg-tabs button { flex: 0 0 auto; padding: 8px 22px; }
/* Чат: теги сервера в одну строку, иконки без плашек */
.right .tags { flex-wrap: nowrap; }
.right .tags > span { flex: 0 1 auto; padding: 5px 9px; }
.right .tags .i { background: none !important; padding: 0 !important; width: 14px; height: 14px; }
.tags span[data-i] { padding: 0; background: none; border: 0; border-radius: 0; display: inline-flex; }
/* Вход: карточка крупнее и выше, как в макете */
@media (min-width: 1300px) {
  .login-screen { grid-template-columns: 1.2fr minmax(380px, 572px); padding-right: 96px; align-items: start; padding-top: 64px; }
  .login-card { padding: 34px 34px 26px; gap: 18px; }
  .login-card .seg-btn { padding: 13px; }
  .login-card .socials button { padding: 16px 8px; }
  .login-card .input-ic { height: 58px; }
  .login-card .btn-primary.wide { padding: 18px; }
  .login-hero { align-self: center; margin-top: -40px; }
}
/* Профиль: читаемая шапка и плотные карточки, чтобы всё влезало в экран */
.p-about-line { max-width: 520px; text-shadow: 0 1px 8px rgb(8 6 28 / .95), 0 0 2px rgb(8 6 28 / .9); }
.p-status { text-shadow: 0 1px 6px rgb(8 6 28 / .95); color: #e8e4ff; }
.plat-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.plat-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: rgb(255 255 255 / .03); border: 1px solid var(--line); font-size: 13px; }
.plat-list li .i { width: 16px; height: 16px; color: var(--accent-2); flex: none; }
.plat-list li span { flex: 1; min-width: 0; }
.plat-list li small { color: var(--dim); font-size: 11.5px; }
.view[data-view="profile"] .progress-list li { padding-block: 4px; }
.view[data-view="profile"] .progress-list small { display: none; }
.view[data-view="profile"] .p-grid { gap: 10px; }
.view[data-view="profile"] .p-grid .card { padding: 12px 14px; }
.view[data-view="profile"] .card-head { margin-bottom: 8px; }
.view[data-view="profile"] .progress-list { gap: 6px; }
.view[data-view="profile"] .progress-list li { padding-block: 2px; gap: 10px; }
.view[data-view="profile"] .progress-list .xp-bar { margin-top: 5px; }
.view[data-view="profile"] .lvl-card { padding-block: 10px; }
.view[data-view="profile"] .seg-tabs { margin-block: 10px; }
.plat-list li { padding: 5px 10px; }
.p-status .status-sel { background: transparent; border: 0; color: #e8e4ff; }
.view[data-view="profile"] img.p-banner { height: 216px; }
.view[data-view="profile"] .p-row { margin-top: -180px; }
.p-status .status-sel { width: auto; padding: 2px 22px 2px 4px; }
/* Достижения: плотнее, чтобы «Недавно полученные» влезали целиком */
.view[data-view="achievements"] .card { padding: 12px 14px; }
.view[data-view="achievements"] .card-head { margin-bottom: 8px; }
.view[data-view="achievements"] .cat-card { padding: 7px 8px; gap: 2px; }
.view[data-view="achievements"] .seg-tabs { margin-bottom: 10px; }
.view[data-view="achievements"] :is(.ach-grid, .ach-row, .ach-stats) { gap: 10px; margin-bottom: 10px; }
.view[data-view="achievements"] :is(.ach-top, .stat-strip, .ach-mid) { gap: 10px; margin-bottom: 10px; }
.view[data-view="achievements"] .stat-strip > * { padding-block: 7px; }
.view[data-view="achievements"] .recent-ach > * { padding-block: 8px; }
.view[data-view="achievements"] .cat-grid { gap: 6px; }
.view[data-view="achievements"] .ach-mid { margin-top: 0; }
.view[data-view="achievements"] .cat-card .i { width: 18px; height: 18px; }
.view[data-view="achievements"] .cat-card b { font-size: 13px; }
.view[data-view="achievements"] .xp-card, .view[data-view="achievements"] .streak { padding-block: 10px; }
.view[data-view="achievements"] .recent-ach img { width: 58px; height: 58px; }
.view[data-view="achievements"] .recent-ach .ra img { width: 56px; height: 56px; }
.view[data-view="achievements"] .recent-ach .ra { padding: 8px 10px; }
.view[data-view="achievements"] .ach-mid .card { padding-bottom: 10px; }
.cat-grid .cat-card:nth-child(n+5):nth-last-child(-n+2) { grid-column: span 2; }
/* Узкие окна: шапка не вылезает за край */
@media (max-width: 1499px) { .topbar .site-link { display: none; } .tab { padding: 7px 12px; } .topbar .tabs { gap: 6px; } }
@media (max-width: 1180px) { .tab { font-size: 0; gap: 0; padding: 8px 11px; } .tab .i { width: 20px; height: 20px; } }

/* Телефон: неоновые дуги рассчитаны на широкий экран и на узком перечёркивали форму входа.
   Ужимаем их в углы экрана. */
@media (max-width: 760px) {
  .neon-bg i { border-width: 3px; }
  .neon-bg .n1 { transform-origin: 0 0; transform: rotate(-18deg) scale(.42); }
  .neon-bg .n2 { transform-origin: 0 100%; transform: rotate(12deg) scale(.36); }
  .neon-bg .n3 { transform-origin: 100% 0; transform: rotate(15deg) scale(.42); }
  .neon-bg .n4 { transform-origin: 100% 100%; transform: rotate(-14deg) scale(.36); }
}
