/* ==========================================================================
   Очередь — страница одного режима v2: цветная шапка с рендером, статусом,
   счётчиками и кнопкой; ниже слева тестеры/игроки, справа чат с тестером.
   Подключается ПОСЛЕДНИМ в queue.html. Админку («Очереди») не затрагивает.
   ========================================================================== */
html body.mc-page:not(.x) .qd-back {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  font-family: var(--pl-body, 'Onest', sans-serif); font-size: 13px; font-weight: 600; color: #cfcfcf;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); transition: background .15s, color .15s;
}
html body.mc-page:not(.x) .qd-back:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Шапка режима ---------- */
html body.mc-page:not(.x) .qd {
  --g1: #8a5a00; --g2: #e8b400; --sc: #3fbf3f;
  position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  min-height: 190px; padding: 26px 30px; margin-bottom: 20px; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--g2) 35%, rgba(255,255,255,.08));
  background:
    radial-gradient(ellipse 55% 110% at 80% 50%, color-mix(in srgb, var(--g2) 40%, transparent), transparent 70%),
    linear-gradient(135deg, var(--g1), color-mix(in srgb, var(--g1) 45%, #141414) 70%);
  box-shadow: 0 18px 38px -20px rgba(0,0,0,.9);
}
html body.mc-page:not(.x) .qd.tone-cyan  { --g1: #05606e; --g2: #14b6c9; }
html body.mc-page:not(.x) .qd.tone-ember { --g1: #a3180a; --g2: #ff5a2a; }
html body.mc-page:not(.x) .qd.tone-violet { --g1: #4c2a9a; --g2: #8b5cf6; }
html body.mc-page:not(.x) .qd.st-closed { --sc: #e04444; }
html body.mc-page:not(.x) .qd.st-off { --sc: #7d838c; }
html body.mc-page:not(.x) .qd::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, transparent, var(--g2), transparent); z-index: 2; }
html body.mc-page:not(.x) .qd::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 24px 24px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 85%); mask-image: linear-gradient(90deg, transparent, #000 85%); }

html body.mc-page:not(.x) .qd-main { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
html body.mc-page:not(.x) .qd-pill {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px;
  font-family: var(--pl-body, 'Onest', sans-serif); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff;
  background: rgba(12,12,12,.7); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--sc) 70%, transparent);
}
html body.mc-page:not(.x) .qd-pill i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
html body.mc-page:not(.x) .qd.st-open .qd-pill i { animation: qv-pulse 1.8s ease-out infinite; }
html body.mc-page:not(.x) .qd-name { margin: 0; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; line-height: 1; }
html body.mc-page:not(.x) .qd-name b { text-transform: none; font-family: var(--pl-body, 'Onest', sans-serif); font-size: 44px; font-weight: 800; color: #fff; text-shadow: 3px 3px 0 rgba(0,0,0,.4); }
html body.mc-page:not(.x) .qd-name span { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: rgba(255,255,255,.7); }

html body.mc-page:not(.x) .qd-stats { display: flex; gap: 10px; flex-wrap: wrap; }
html body.mc-page:not(.x) .qd-stats > div { display: flex; align-items: baseline; gap: 8px; padding: 8px 14px; border-radius: 10px; background: rgba(0,0,0,.34); }
html body.mc-page:not(.x) .qd-stats b { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 22px; font-weight: 800; color: #fff; line-height: 1; }
html body.mc-page:not(.x) .qd-stats span { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 12px; color: rgba(255,255,255,.7); }
html body.mc-page:not(.x) .qd-note { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 12.5px; color: rgba(255,255,255,.72); }
html body.mc-page:not(.x) .qd-note a { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
html body.mc-page:not(.x) .qd-note.red { color: #ff8a8a; font-weight: 600; }
html body.mc-page:not(.x) .qd-me { align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-family: var(--pl-body, 'Onest', sans-serif); font-size: 13px; font-weight: 700; color: #f5c518; background: rgba(0,0,0,.4); box-shadow: inset 0 0 0 1px rgba(245,197,24,.5); }

html body.mc-page:not(.x) .qd-side { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; }
html body.mc-page:not(.x) .qd-render { position: absolute; right: 250px; bottom: 0; height: 100%; max-height: 210px; width: auto; max-width: 340px; object-fit: contain; object-position: right bottom; filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)); pointer-events: none; user-select: none; z-index: 0; }
html body.mc-page:not(.x) .qd-sprite { position: absolute; right: 270px; bottom: 28px; z-index: 0; }
html body.mc-page:not(.x) .qd-sprite .mc-sprite { width: 104px; height: 104px; image-rendering: pixelated; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)); }
html body.mc-page:not(.x) .qd-sprite .q-cross { width: 104px; height: 104px; }

html body.mc-page:not(.x) .qd .qd-btn {
  min-width: 230px; height: 48px; padding: 0 22px; border: 0; border-radius: 12px; cursor: pointer;
  font-family: var(--pl-body, 'Onest', sans-serif); font-size: 15px; font-weight: 800; color: #151515; text-shadow: none;
  background: var(--g2); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--g2) 70%, #000); transition: transform .15s, filter .15s;
}
html body.mc-page:not(.x) .qd .qd-btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
html body.mc-page:not(.x) .qd .qd-btn.leave { background: #e04444; color: #fff; box-shadow: 0 8px 18px -8px rgba(224,68,68,.7); }
html body.mc-page:not(.x) .qd .qd-btn:disabled { cursor: not-allowed; background: rgba(0,0,0,.45); color: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* ---------- Низ: списки слева, чат справа ---------- */
html body.mc-page:not(.x) .q-detail { grid-template-columns: 360px 1fr; gap: 20px; }
html body.mc-page:not(.x) .q-sidebar { gap: 16px; }
html body.mc-page:not(.x) .q-sidebar .q-section { border-radius: 14px; background: linear-gradient(180deg, #232323, #1a1a1a); border: 1px solid rgba(255,255,255,.07); box-shadow: none; padding: 16px 14px 12px; }
html body.mc-page:not(.x) .q-sidebar .q-section::before { display: none; }
html body.mc-page:not(.x) .q-sidebar .q-section-title { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 16px; font-weight: 800; color: #fff; margin-bottom: 8px; padding: 0 4px; }
html body.mc-page:not(.x) .q-sidebar .q-section-title .count { border-radius: 999px; background: rgba(255,255,255,.08); box-shadow: none; padding: 1px 9px; font-size: 12px; margin-left: auto; }
html body.mc-page:not(.x) .q-sidebar .q-rows { max-height: 300px; overflow-y: auto; }
html body.mc-page:not(.x) .q-sidebar .q-row { border-radius: 10px; padding: 7px 8px; }
html body.mc-page:not(.x) .q-sidebar .q-row .nick { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 14px; font-weight: 600; }
html body.mc-page:not(.x) .q-sidebar .q-row .pos { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 13px; font-weight: 800; width: 28px; }
html body.mc-page:not(.x) .q-sidebar .q-row.mine { background: rgba(245,197,24,.1); box-shadow: inset 3px 0 0 #f5c518; }
html body.mc-page:not(.x) .q-sidebar .q-empty-note { padding: 10px 6px 6px; font-family: var(--pl-body, 'Onest', sans-serif); font-size: 13.5px; color: #8d8d8d; }

html body.mc-page:not(.x) .session-panel { border-radius: 14px; min-height: 420px; border: 1px solid rgba(255,255,255,.07); background: linear-gradient(180deg, #232323, #1a1a1a); }
html body.mc-page:not(.x) .session-panel::before { display: none; }
html body.mc-page:not(.x) .session-empty { font-family: var(--pl-body, 'Onest', sans-serif); color: #9a9a9a; line-height: 1.5; }

@media (max-width: 960px) {
  html body.mc-page:not(.x) .q-detail { grid-template-columns: 1fr; }
  html body.mc-page:not(.x) .qd { padding: 22px 20px; }
  html body.mc-page:not(.x) .qd-render, html body.mc-page:not(.x) .qd-sprite { right: 8px; opacity: .35; }
  html body.mc-page:not(.x) .qd-side { align-items: stretch; width: 100%; }
  html body.mc-page:not(.x) .qd .qd-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html body.mc-page:not(.x) .qd.st-open .qd-pill i { animation: none; } html body.mc-page:not(.x) .qd .qd-btn { transition: none; } }

/* ---------- Карточка Discord в пустом месте шапки ---------- */
html body.mc-page:not(.x) .qd-discord {
  position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; flex: 0 1 290px; margin-left: 8px;
  padding: 12px 14px; border-radius: 14px; text-decoration: none; color: #fff;
  background: rgba(0,0,0,.34); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(2px);
  transition: transform .18s, border-color .18s, background .18s;
}
html body.mc-page:not(.x) .qd-discord:hover { transform: translateY(-2px); border-color: #5865f2; background: rgba(88,101,242,.22); }
html body.mc-page:not(.x) .qd-dc-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff; background: #5865f2; box-shadow: 0 6px 14px -6px rgba(88,101,242,.9); }
html body.mc-page:not(.x) .qd-dc-ico svg { width: 26px; height: 26px; }
html body.mc-page:not(.x) .qd-dc-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-family: var(--pl-body, 'Onest', sans-serif); line-height: 1.25; }
html body.mc-page:not(.x) .qd-dc-txt small { font-size: 11.5px; color: rgba(255,255,255,.7); }
html body.mc-page:not(.x) .qd-dc-txt b { font-size: 13.5px; font-weight: 800; color: #fff; }
html body.mc-page:not(.x) .qd-discord em { margin-left: auto; font-style: normal; font-size: 16px; color: rgba(255,255,255,.6); transition: transform .18s, color .18s; }
html body.mc-page:not(.x) .qd-discord:hover em { color: #fff; transform: translate(2px, -2px); }
@media (max-width: 1100px) { html body.mc-page:not(.x) .qd-discord { flex: 1 1 100%; margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { html body.mc-page:not(.x) .qd-discord, html body.mc-page:not(.x) .qd-discord em { transition: none; } }

/* ---------- Гость: «зарегистрируйся, чтобы смотреть очереди» ---------- */
html body.mc-page:not(.x) .ql-gate {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  max-width: 560px; margin: 40px auto 0; padding: 40px 32px 34px; border-radius: 18px;
  border: 1px solid rgba(255,255,255,.09);
  background: radial-gradient(ellipse 80% 60% at 50% 0, rgba(88,101,242,.28), transparent 70%), linear-gradient(180deg, #232323, #181818);
  box-shadow: 0 20px 44px -22px rgba(0,0,0,.9);
}
html body.mc-page:not(.x) .ql-gate::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, transparent, #5865f2, transparent); }
html body.mc-page:not(.x) .ql-ico { display: grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; color: #fff; background: #5865f2; box-shadow: 0 12px 26px -10px rgba(88,101,242,.9); }
html body.mc-page:not(.x) .ql-ico svg { width: 42px; height: 42px; }
html body.mc-page:not(.x) .ql-gate h2 { margin: 6px 0 0; font-family: var(--pl-body, 'Onest', sans-serif) !important; line-height: 1.2; font-size: 26px; font-weight: 800; color: #fff; text-transform: none; }
html body.mc-page:not(.x) .ql-gate p { margin: 0; max-width: 440px; font-family: var(--pl-body, 'Onest', sans-serif); font-size: 14.5px; line-height: 1.6; color: #a9a9a9; }
html body.mc-page:not(.x) .ql-btn {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 0 26px; height: 50px; border-radius: 12px; text-decoration: none; cursor: pointer;
  font-family: var(--pl-body, 'Onest', sans-serif); font-size: 15px; font-weight: 800; color: #fff; background: #5865f2;
  box-shadow: 0 10px 22px -10px rgba(88,101,242,.95); transition: transform .15s, filter .15s;
}
html body.mc-page:not(.x) .ql-btn svg { width: 22px; height: 22px; }
html body.mc-page:not(.x) .ql-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
html body.mc-page:not(.x) .ql-gate small { font-family: var(--pl-body, 'Onest', sans-serif); font-size: 12px; color: #7d7d7d; }
@media (prefers-reduced-motion: reduce) { html body.mc-page:not(.x) .ql-btn { transition: none; } }
