/* v5.7 (редизайн 10 октября 2026 — «Кузня у края Бездны», tools/art/UI_MASTER_PROMPT.md, разделы 5–8): список комнат и лобби
   комнаты. Разметка и поведение — ui.js (roomsMsg, showLobby, lobbyCyclers), расстановка кадра 1920×1080 — lobbylayout.js (здесь
   только поправки нового вида, прежний вид её не замечает). Всё под html.ns; картинки набора (js/nskit.js: --k-slab, --k-btn…,
   свои --k-lobby-*) — под html.ns.nskit. Главное меню (#M-menu, #M-sub, #L-logo, #ns-me) здесь не трогаем.
   1 пиксель интерфейса = 3 px: рамки, полосы, отступы у пиксельных деталей — кратны 3. */

/* ---------- общее ---------- */
/* размер текста — по настройке «Текст» (0.85–1.2): панели фиксированного размера не должны рваться */
html.ns .lobby-stage :is(#R-rooms, #L-players, #L-match, #L-ready, #L-host, .nav-btn) { --tk: clamp(.85, calc(var(--fst, 1.3) / 1.3), 1.2); }
/* мелкие пиксельные значки прежнего вида в строках и кнопках не нужны — их заменяют детали набора */
html.ns .lobby-stage :is(#R-rooms, #L-players, #L-match, #L-ready, #L-host, .nav-btn) img.ic { display: none !important; }
/* узлы нового вида в прежнем виде (?ui=old) не показываются */
html:not(.ns) :is(#lb-rdy, .rb-stamp, .slot .rk, .set-arr) { display: none !important; }

/* ---------- материалы: корпус — кованая плита, название — на бирке с самоцветом (как у окон) ---------- */
html.ns.nskit .lobby-stage :is(#R-rooms, #L-players, #L-match) {
  border: 18px solid transparent !important; border-image: var(--k-slab) 18 fill / 18px / 0 repeat !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .6)); image-rendering: pixelated; color: var(--k-text);
}
/* шапка внутри плиты: слева ярлык-счётчик, справа текстовые кнопки; само название — бирка на верхнем крае */
html.ns .lobby-stage :is(#R-rooms, #L-players) .lm-head {
  position: static; display: flex; align-items: center; gap: 27px; min-height: 36px; margin: 0 0 9px; padding: 0 3px; background: none !important;
}
html.ns .lobby-stage :is(#R-rooms, #L-players) .lm-head::after { display: none; }
html.ns .lobby-stage :is(#R-rooms, #L-players) .lm-ttl {
  position: absolute; left: 0; right: 0; top: -40px; z-index: 2; width: fit-content; max-width: calc(100% - 96px); margin: 0 auto;
  height: 45px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 0 24px; border-style: solid; border-color: transparent; border-width: 0 21px; border-image: var(--k-tag) 0 21 fill / 0 21px / 0 stretch;
  background: none; color: #f2e5c6; text-shadow: 0 3px 0 var(--k-ink); text-transform: none; letter-spacing: 0;
  font: 600 calc(24px * var(--tk, 1)) / 45px var(--k-title);
}
html.ns:not(.nskit) .lobby-stage :is(#R-rooms, #L-players) .lm-ttl { background: var(--k-2); box-shadow: inset 0 0 0 3px var(--k-gold-lo); }
/* самоцвет Бездны над биркой */
html.ns.nskit .lobby-stage :is(#R-rooms, #L-players) .lm-head::before {
  content: ''; position: absolute; left: 50%; top: -51px; z-index: 3; width: 39px; height: 21px; margin-left: -19px; pointer-events: none;
  background: var(--k-gem) center / 39px 21px no-repeat; image-rendering: pixelated;
}
/* счётчик («ОТКРЫТО: 4», «ЛЮДЕЙ 3 / 10 · БОТОВ 4») — ярлык */
html.ns .lobby-stage :is(#R-rooms, #L-players) .lm-cnt {
  flex: 1; min-width: 0; margin: 0; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 600 calc(12px * var(--tk, 1)) / 1 var(--k-font); letter-spacing: .06em; text-transform: uppercase; color: var(--k-text-3); font-variant-numeric: tabular-nums;
}
/* текстовые кнопки шапки: «Назад», «Наблюдать» / «Играть», «Выйти» (кровью) — без плит, наведение — черта снизу */
html.ns .lobby-stage .lm-head .spec-btn {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 9px; height: 36px !important; min-width: 0; margin: 0; padding: 0 3px !important;
  border: 0 !important; border-image: none !important; background: none !important; box-shadow: none !important; filter: none !important;
  font: 600 calc(16px * var(--tk, 1)) / 1 var(--k-font) !important; letter-spacing: 0; text-transform: none; color: var(--k-text-2); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); white-space: nowrap;
}
html.ns .lobby-stage .lm-head .spec-btn:hover:not(:disabled) { color: var(--k-text); background: none !important; box-shadow: inset 0 -3px 0 var(--k-violet) !important; }
html.ns .lobby-stage .lm-head .spec-btn:active:not(:disabled) { transform: none; }
html.ns .lobby-stage #btn-spec.on { color: var(--k-gold-hi); }
html.ns .lobby-stage #btn-leave { color: #e9776b; }
html.ns .lobby-stage #btn-leave:hover:not(:disabled) { color: #ffd9d2; box-shadow: inset 0 -3px 0 var(--k-blood) !important; }
html.ns.nskit .lobby-stage #rooms-back::before { content: ''; flex: none; width: 18px; height: 27px; background: var(--k-arr-l) center / 18px 27px no-repeat; image-rendering: pixelated; }
html.ns.nskit .lobby-stage #rooms-back:hover::before { filter: brightness(1.2); }

/* ---------- кнопки-плиты вне окон: тёмная (обычная) и золотая (главное действие) ---------- */
html.ns.nskit .lobby-stage :is(.rr-go, #h-take) { position: relative; }
html.ns.nskit .lobby-stage :is(.nav-btn, .rr-go, #h-take) {
  border-style: solid !important; border-color: transparent !important; border-width: 6px 6px 9px !important; border-radius: 0 !important;
  border-image: var(--k-btn) 6 6 9 fill / 6px 6px 9px / 0 stretch !important; background: none !important; box-shadow: none !important; image-rendering: pixelated;
  color: var(--k-text); text-shadow: 0 2px 0 rgba(0, 0, 0, .45); letter-spacing: 0; text-transform: none; transition: none;
  font: 600 calc(16px * var(--tk, 1)) / 1.2 var(--k-font) !important;
}
html.ns.nskit .lobby-stage :is(.nav-btn, .rr-go, #h-take):hover:not(:disabled) { border-image-source: var(--k-btn-hi) !important; color: #fff; }
html.ns.nskit .lobby-stage :is(.nav-btn, .rr-go, #h-take):active:not(:disabled) { border-image-source: var(--k-btn-dn) !important; transform: translateY(3px); }
/* наведение — фиолетовая засечка у левого края (знак «можно нажать», не обводка) */
html.ns.nskit .lobby-stage :is(.rr-go, #h-take):hover:not(:disabled)::before,
html.ns.nskit .lobby-stage .nav-btn:hover:not(:disabled)::before {
  content: '' !important; display: block !important; position: absolute; left: -3px !important; right: auto !important; top: 50% !important; bottom: auto !important;
  width: 3px !important; height: 12px !important; margin: -6px 0 0 !important; border: 0 !important; transform: none !important; pointer-events: none;
  background: var(--k-violet-hi) !important; box-shadow: 0 3px 0 var(--k-violet);
}
html.ns.nskit .lobby-stage :is(#btn-ready, #btn-start, #room-create) {
  position: relative; border-style: solid !important; border-color: transparent !important; border-width: 6px 6px 9px !important; border-radius: 0 !important;
  border-image: var(--k-btn-gold) 6 6 9 fill / 6px 6px 9px / 0 stretch !important; background: none !important; box-shadow: none !important;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .5)) !important; image-rendering: pixelated; transition: none;
  color: var(--k-on-gold); text-shadow: 0 2px 0 rgba(255, 240, 200, .35); letter-spacing: 0; text-transform: none; text-indent: 0;
}
html.ns.nskit .lobby-stage :is(#btn-ready, #btn-start, #room-create):hover:not(:disabled) { border-image-source: var(--k-btn-gold-hi) !important; color: var(--k-on-gold); }
html.ns.nskit .lobby-stage :is(#btn-ready, #btn-start, #room-create):active:not(:disabled) { border-image-source: var(--k-btn-gold-dn) !important; transform: translateY(3px); }
html.ns.nskit .lobby-stage :is(#btn-ready, #btn-start, #room-create)::before,
html.ns.nskit .lobby-stage :is(#btn-ready, #btn-start, #room-create)::after { display: none; }

/* таблички разделов сверху справа (Рейтинг · Список героев · Настройки) — тёмные плиты, обычным регистром */
html.ns.nskit .lobby-stage .nav-btn {
  top: 27px !important; height: 51px !important; padding: 0 12px !important; justify-content: center; overflow: visible; white-space: nowrap;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)) !important;
}
html.ns .lobby-stage #btn-rate     { left: 1389px !important; width: 135px !important; }
html.ns .lobby-stage #btn-heroes   { left: 1539px !important; width: 192px !important; }
html.ns .lobby-stage #btn-settings { left: 1746px !important; width: 150px !important; }

/* ============================== СПИСОК КОМНАТ ============================== */
/* плита — справа от логотипа и паладина (они свободны), по высоте — от 120 до общей нижней линии 1032 */
html.ns .lobby-stage #R-rooms {
  left: 776px !important; width: 1120px !important; top: 120px !important; height: 912px; min-height: 0 !important; box-sizing: border-box;
  display: flex; flex-direction: column; padding: 18px 24px 15px !important; overflow: visible;
}
html.ns .lobby-stage #rooms-list {
  flex: 1 1 auto; min-height: 0; max-height: none; display: flex; flex-direction: column; gap: 0; margin: 0; padding: 0; overflow-y: auto;
  scrollbar-color: var(--k-4) var(--k-0); scrollbar-width: thin; background: var(--k-0);
}
/* лоток: список лежит во вдавленном гнезде — пустое место под строками читается как дно, а не как дыра */
html.ns.nskit .lobby-stage #rooms-list { border: 6px solid transparent; border-image: var(--k-well) 6 fill / 6px / 0 stretch; image-rendering: pixelated; background: none; }
/* строка комнаты — полоса во всю ширину (зебра); слева место под меч-курсор */
html.ns .lobby-stage .room-row {
  position: relative; flex: none; display: grid; grid-template-columns: 27px minmax(0, 1fr) 180px 135px 120px; align-items: center; column-gap: 15px;
  height: 69px; min-height: 0; padding: 0 9px 0 54px; cursor: pointer; border: 0; background: var(--k-1); box-shadow: none; transition: none;
}
html.ns .lobby-stage .room-row:nth-child(even of .room-row) { background: var(--k-2); }
html.ns:lang(en) .lobby-stage .room-row { grid-template-columns: 27px minmax(0, 1fr) 180px 120px 120px; }
/* наведение: полоса на ступень светлее и меч слева (перепрыгивает сразу, без плавности) */
html.ns .lobby-stage .room-row:hover { background: var(--k-3); box-shadow: inset 0 3px 0 #352e40, inset 0 -3px 0 #1a1720; }
html.ns.nskit .lobby-stage .room-row:hover::before {
  content: ''; position: absolute; left: 6px; top: 50%; width: 45px; height: 21px; margin-top: -11px; pointer-events: none;
  background: var(--k-sword) 0 0 / 90px 21px no-repeat; image-rendering: pixelated; animation: k-sway .6s steps(2) infinite;
}
/* замок (вход по паролю) */
html.ns .lobby-stage .rr-lock { display: block; width: 27px; height: 33px; justify-self: center; background: var(--k-lobby-lock) center / 27px 33px no-repeat; image-rendering: pixelated; }
html.ns .lobby-stage .rr-lock.off { visibility: hidden; }
/* название и «хост · режим · жизни» */
html.ns .lobby-stage .room-row .rr-main { display: flex; flex-direction: column; justify-content: center; gap: 6px; min-width: 0; }
html.ns .lobby-stage .rr-name {
  display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 600 calc(17px * var(--tk, 1)) / 1.2 var(--k-font); color: var(--k-text); text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
html.ns .lobby-stage .rr-sub { display: block; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 calc(13px * var(--tk, 1)) / 1.2 var(--k-font); color: var(--k-text-2); }
html.ns .lobby-stage .rr-sub > span { display: inline; padding: 0; background: none; box-shadow: none; font: inherit; }
html.ns .lobby-stage .rr-sub .rr-host { color: var(--k-text); }
html.ns .lobby-stage .rr-sub .rr-host::after { content: '·'; margin: 0 8px; color: var(--k-text-3); }
/* игроки: пипсы мест (золото — занято), «2/10» и мелко боты */
html.ns .lobby-stage .room-row .rr-pl { display: grid; grid-template-columns: auto 1fr; align-items: baseline; column-gap: 9px; row-gap: 6px; min-width: 0; }
html.ns .lobby-stage .room-row .rr-pips { grid-column: 1 / -1; }
html.ns .lobby-stage .rr-pips, html.ns .lobby-stage .lr-pips { display: inline-flex; gap: 3px; line-height: 0; }
html.ns .lobby-stage :is(.rr-pips, .lr-pips) i { display: block; width: 15px; height: 15px; background: var(--k-lobby-pip-off) center / 15px 15px no-repeat; image-rendering: pixelated; }
html.ns .lobby-stage .rr-pips i.on { background-image: var(--k-lobby-pip); }
html.ns:not(.nskit) .lobby-stage :is(.rr-pips, .lr-pips) i { background: var(--k-0); box-shadow: inset 0 0 0 3px var(--k-3); }
html.ns:not(.nskit) .lobby-stage .rr-pips i.on { background: var(--k-gold); }
html.ns .lobby-stage .rr-n { font: 700 calc(15px * var(--tk, 1)) / 1 var(--k-font); font-variant-numeric: tabular-nums; color: var(--k-text); white-space: nowrap; }
html.ns .lobby-stage .room-row.full .rr-n { color: var(--k-blood); }
html.ns .lobby-stage .rr-bots { font: 500 calc(13px * var(--tk, 1)) / 1 var(--k-font); color: var(--k-text-3); white-space: nowrap; }
/* состояние: пиксельная точка и слово — «Лобби» зелёное, «Выбор героев» золото, «Матч»/«Итоги» тусклые */
html.ns .lobby-stage .rr-st { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0; white-space: nowrap; background: none; box-shadow: none !important; font: 600 calc(14px * var(--tk, 1)) / 1.2 var(--k-font); color: var(--k-text-3); }
html.ns .lobby-stage .rr-st::before { content: ''; flex: none; width: 9px; height: 9px; background: currentColor; box-shadow: inset -3px -3px 0 rgba(0, 0, 0, .35), 0 0 0 3px var(--k-ink); }
html.ns .lobby-stage .rr-st:empty::before { display: none; }
html.ns .lobby-stage .rr-st.ok { color: var(--k-life) !important; }
html.ns .lobby-stage .rr-st.warn { color: var(--k-gold) !important; }
html.ns .lobby-stage .rr-st.dim { color: var(--k-text-3) !important; }
/* «Войти» / «Смотреть» — у наведённой строки (на телефоне — всегда) */
html.ns .lobby-stage .rr-go { width: 120px; height: 48px !important; min-width: 0; padding: 0 9px !important; white-space: nowrap; visibility: hidden; }
html.ns .lobby-stage .room-row:hover .rr-go, html.ns .lobby-stage .rr-go:focus-visible { visibility: visible; }
@media (hover: none) { html.ns .lobby-stage .rr-go { visibility: visible; } }
/* пусто: костёр и «Комнат пока нет» */
html.ns .lobby-stage .rooms-empty {
  display: flex; flex-direction: column; align-items: center; gap: 12px; margin: auto; padding: 0 0 30px; text-align: center; font-style: normal;
}
html.ns .lobby-stage .rooms-empty::before, html.ns .lobby-stage .rooms-empty::after { display: none; }
@keyframes k-lobby-fire { to { background-position: -228px 0; } }
html.ns.nskit .lobby-stage .rooms-empty .re-fire { display: block; width: 114px; height: 102px; margin-bottom: 6px; background: var(--k-lobby-fire) 0 0 / 228px 102px no-repeat; image-rendering: pixelated; animation: k-lobby-fire .5s steps(2) infinite; }
html.ns .lobby-stage .rooms-empty b { font: 600 calc(29px * var(--tk, 1)) / 1.1 var(--k-title); color: var(--k-text); text-shadow: 0 3px 0 var(--k-ink); }
html.ns .lobby-stage .rooms-empty span { font: 500 calc(15px * var(--tk, 1)) / 1.45 var(--k-font); color: var(--k-text-2); }
/* сообщение (комната полна, комнаты нет…) — вложенный блок с золотым текстом */
html.ns .lobby-stage .rooms-note { flex: none; margin: 0 0 9px; padding: 9px 15px; font: 600 calc(15px * var(--tk, 1)) / 1.35 var(--k-font); color: var(--k-gold-hi); background: var(--k-2); box-shadow: inset 6px 0 0 var(--k-gold); }
html.ns.nskit .lobby-stage .rooms-note { border: 6px solid transparent; border-image: var(--k-block) 6 fill / 6px / 0 stretch; background: none; box-shadow: none; }
/* новая комната: прут с ромбом, заголовок раздела, два гнезда и золотая плита */
html.ns .lobby-stage .rooms-new {
  position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: center; gap: 9px 15px;
  margin: 12px 0 0; padding: 30px 0 0;
}
html.ns.nskit .lobby-stage .rooms-new::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 18px; pointer-events: none;
  border-style: solid; border-color: transparent; border-width: 0 18px; border-image: var(--k-rod) 0 18 fill / 0 18px / 0 stretch; image-rendering: pixelated;
}
html.ns .lobby-stage .rooms-new::before {
  content: 'Новая комната'; grid-column: 1 / -1; display: block; margin: 0 0 3px 3px; background: none;
  font: 600 calc(19px * var(--tk, 1)) / 1.1 var(--k-title); letter-spacing: 0; text-transform: none; color: var(--k-gold); text-shadow: 0 3px 0 var(--k-ink);
}
html.ns[lang="en"] .lobby-stage .rooms-new::before { content: 'New room'; }
html.ns .lobby-stage .rooms-new input {
  height: 54px; min-width: 0; box-sizing: border-box; padding: 0 15px !important; color: var(--k-text); font: 600 calc(16px * var(--tk, 1)) / 1 var(--k-font) !important;
}
html.ns.nskit .lobby-stage .rooms-new input {
  border-style: solid !important; border-color: transparent !important; border-width: 6px !important; border-radius: 0 !important;
  border-image: var(--k-well) 6 fill / 6px / 0 stretch !important; background: none !important; box-shadow: none !important; image-rendering: pixelated;
}
html.ns .lobby-stage .rooms-new input::placeholder { color: var(--k-text-3); font-weight: 500; }
html.ns .lobby-stage .rooms-new input:focus { outline: 3px solid var(--k-gold); outline-offset: 0; }
html.ns .lobby-stage #room-create { height: 57px !important; min-width: 0; padding: 0 30px !important; white-space: nowrap; font: 600 calc(17px * var(--tk, 1)) / 1 var(--k-font) !important; }

/* ============================== ЛОББИ КОМНАТЫ ============================== */
/* колонка: «Игроки» (название комнаты — на бирке) 120…732, «Матч» 756…1032 (подсказка снизу — до двух строк) */
html.ns .lobby-stage #L-players { top: 120px !important; height: 612px !important; min-height: 0 !important; box-sizing: border-box; display: flex; flex-direction: column; padding: 18px 21px 9px !important; }
html.ns .lobby-stage #L-players #slots { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 0; }
/* слот — строка «как сохранение»: медальон цвета игрока, ник, под ним ранг и рейтинг; справа — свеча готовности */
html.ns .lobby-stage #L-players .slot {
  position: relative; flex: 1 1 0; min-height: 0; max-height: 57px; display: flex; align-items: center; gap: 15px;
  margin: 0; padding: 0 15px 0 15px; border: 0; background: var(--k-1); box-shadow: none;
}
html.ns .lobby-stage #L-players .slot:nth-child(even) { background: var(--k-2); }
/* своя строка — золотая полоса слева */
html.ns .lobby-stage #L-players .slot.me { background: #262030; box-shadow: inset 3px 0 0 var(--k-gold-hi), inset 6px 0 0 var(--k-gold), inset 9px 0 0 var(--k-gold-lo); }
html.ns .lobby-stage #L-players .slot.me { padding-left: 21px; }
/* медальон: оправа и блик — картинка набора, внутри — цвет игрока, маска — силуэт медальона */
html.ns .lobby-stage #L-players .slot .dot {
  flex: none; width: 33px; height: 33px; margin: 0; border: 0; border-radius: 0; transform: none; box-shadow: none; opacity: 1;
  background: var(--pc, var(--k-3));
}
html.ns.nskit .lobby-stage #L-players .slot .dot {
  background: var(--k-lobby-medal) 0 0 / 33px 33px no-repeat, var(--pc, #14111a); image-rendering: pixelated;
  -webkit-mask: var(--k-lobby-medal-mask) 0 0 / 33px 33px no-repeat; mask: var(--k-lobby-medal-mask) 0 0 / 33px 33px no-repeat;
}
html.ns.nskit .lobby-stage #L-players .slot.me .dot { background: var(--k-lobby-medal-gold) 0 0 / 33px 33px no-repeat, var(--pc, #14111a); }
html.ns.nskit .lobby-stage #L-players .slot.empty .dot { background: var(--k-lobby-medal-off) 0 0 / 33px 33px no-repeat, #100e14; }
/* хост — корона на медальоне */
html.ns .lobby-stage #L-players .slot .tag.host {
  position: absolute; left: 15px; top: 50%; z-index: 1; width: 33px; height: 24px; margin: -30px 0 0; padding: 0; border: 0; box-shadow: none; pointer-events: none;
  background: var(--k-crown) center / 33px 24px no-repeat; image-rendering: pixelated; font-size: 0 !important; color: transparent !important; text-shadow: none;
}
html.ns .lobby-stage #L-players .slot.me .tag.host { left: 21px; }
html.ns:not(.nskit) .lobby-stage #L-players .slot .tag.host { position: static; width: auto; height: auto; margin: 0; font-size: 12px !important; color: var(--k-gold) !important; background: none; }
/* ник (18 px), под ним — ранг цветом ранга и рейтинг (13 px) */
html.ns .lobby-stage #L-players .slot .sn {
  flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, max-content) auto auto 1fr; align-items: center; column-gap: 9px; row-gap: 3px; overflow: hidden; white-space: nowrap;
  font: 600 calc(18px * var(--tk, 1)) / 1.15 var(--k-font); color: var(--k-text); text-shadow: 0 2px 0 rgba(0, 0, 0, .4); letter-spacing: 0;
}
html.ns .lobby-stage #L-players .slot .sn .rate-tag {
  grid-row: 2; grid-column: 1 / -1; display: block; margin: 0; overflow: hidden; text-overflow: ellipsis;
  font: 500 calc(13px * var(--tk, 1)) / 1.2 var(--k-font); font-variant-numeric: tabular-nums; color: var(--k-text-2) !important; text-shadow: none;
}
html.ns .lobby-stage #L-players .slot .sn .rate-tag::before { display: none; }
html.ns .lobby-stage #L-players .slot .sn .rk { font-weight: 600; }
html.ns .lobby-stage #L-players .slot .sn .rk::after { content: '·'; margin: 0 7px; color: var(--k-text-3); font-weight: 500; }
html.ns .lobby-stage #L-players .slot .sn .you {
  flex: none; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; text-shadow: none;
  font: 700 calc(11px * var(--tk, 1)) / 1 var(--k-font); letter-spacing: .08em; text-transform: uppercase; color: var(--k-gold);
}
/* ник закреплён за аккаунтом — пиксельная зелёная галочка */
html.ns .lobby-stage #L-players .slot .sn .acc-ok {
  display: inline-block; width: 15px; height: 12px; margin: 0; border: 0; transform: none; opacity: 1;
  background:
    linear-gradient(var(--k-life), var(--k-life)) 0 3px / 3px 3px no-repeat, linear-gradient(var(--k-life), var(--k-life)) 3px 6px / 3px 3px no-repeat,
    linear-gradient(var(--k-life), var(--k-life)) 6px 3px / 3px 3px no-repeat, linear-gradient(var(--k-life), var(--k-life)) 9px 0 / 3px 3px no-repeat,
    linear-gradient(#3f8a4f, #3f8a4f) 3px 9px / 3px 3px no-repeat, linear-gradient(#3f8a4f, #3f8a4f) 6px 6px / 3px 3px no-repeat;
}
/* свободное место — «Свободно» курсивом, тускло */
html.ns .lobby-stage #L-players .slot.empty .sn { display: block; font: italic 500 calc(15px * var(--tk, 1)) / 1 var(--k-font); color: var(--k-text-3); text-shadow: none; opacity: 1; }
/* свеча: горит — готов, погасла — ещё выбирает (ГОТОВ / выбирает — текст скрыт, свеча говорит сама) */
@keyframes k-lobby-flame { to { background-position: -54px -3px; } }
html.ns .lobby-stage #L-players .slot .tag:is(.ready, .wait) {
  order: 10; flex: none; display: block; width: 27px; height: 48px; margin: 0 0 0 3px; padding: 0; border: 0 !important; box-shadow: none; text-shadow: none;
  font-size: 0 !important; color: transparent !important;
  background-color: transparent; background-image: var(--k-candle); background-size: 81px 54px; background-repeat: no-repeat; background-position: 0 -3px; image-rendering: pixelated;
  animation: k-lobby-flame .5s steps(2) infinite;
}
html.ns .lobby-stage #L-players .slot .tag.wait { animation: none; background-position: -54px -3px; }
html.ns:not(.nskit) .lobby-stage #L-players .slot .tag:is(.ready, .wait) { width: auto; height: auto; font-size: 12px !important; color: var(--k-life) !important; background: none; animation: none; }
html.ns:not(.nskit) .lobby-stage #L-players .slot .tag.wait { color: var(--k-text-3) !important; }
html.ns .lobby-stage #L-players .slot .tag.bot { flex: none; padding: 3px 9px; border: 0; background: var(--k-0); font: 600 calc(12px * var(--tk, 1)) / 1 var(--k-font); color: var(--k-text-2); }
/* команда (режим «Две команды»): плашка цвета команды, нажатие меняет команду */
html.ns .lobby-stage #L-players .slot .tm {
  flex: none; padding: 3px 9px; border: 3px solid !important; background: rgba(8, 7, 11, .6); box-shadow: none; cursor: pointer; white-space: nowrap;
  font: 600 calc(13px * var(--tk, 1)) / 1.2 var(--k-font); letter-spacing: 0; text-transform: none;
}
html.ns .lobby-stage #L-players .slot .tm:hover { background: var(--k-3); }
/* кнопки хоста в строке игрока (host.js): «сделать хостом» — корона, «исключить» — крестик; второе нажатие — подтверждение */
html.ns .lobby-stage #L-players .slot :is(.hbtn, .x) {
  flex: none; display: block; width: 39px; height: 36px; min-width: 0; margin: 0; padding: 0; line-height: 1; cursor: pointer;
  font-size: 0 !important; color: transparent; filter: none;
}
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn, .x) {
  position: relative; border-style: solid !important; border-color: transparent !important; border-width: 6px 6px 9px !important; border-radius: 0 !important;
  border-image: var(--k-btn) 6 6 9 fill / 6px 6px 9px / 0 stretch !important; background: none !important; box-shadow: none !important; image-rendering: pixelated;
}
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn, .x)::after {
  content: ''; position: absolute; inset: -6px -6px -9px; pointer-events: none; background: var(--k-crown) center calc(50% - 1px) / 22px 16px no-repeat; image-rendering: pixelated;
}
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn.kick, .x)::after { background: var(--k-x) center calc(50% - 1px) / 18px 18px no-repeat; }
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn, .x):hover { border-image-source: var(--k-btn-hi) !important; }
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn.kick, .x):hover { border-image-source: var(--k-btn-blood-hi) !important; }
html.ns.nskit .lobby-stage #L-players .slot :is(.hbtn.kick, .x):hover::after { background-image: var(--k-x-hi); }
html.ns.nskit .lobby-stage #L-players .slot .hbtn.armed {
  width: auto; padding: 0 9px; border-image-source: var(--k-btn-blood-hi) !important;
  font: 600 calc(12px * var(--tk, 1)) / 21px var(--k-font) !important; color: #ffd9d2; white-space: nowrap;
}
html.ns.nskit .lobby-stage #L-players .slot .hbtn.armed::after { display: none; }
/* наблюдатели — строка под списком, над ней канавка */
html.ns .lobby-stage #L-players #specs {
  flex: none; display: block; margin: 6px 0 0; padding: 9px 6px 0; border: 0; box-shadow: inset 0 3px 0 #0b0a0e, inset 0 6px 0 #221e2a;
  font: 500 calc(13px * var(--tk, 1)) / 1.35 var(--k-font); color: var(--k-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
html.ns .lobby-stage #L-players #specs.hidden { display: none; }
html.ns .lobby-stage #L-players #specs b { font-weight: 600; color: var(--k-text-2); }
html.ns .lobby-stage #L-players #specs span[style] { color: var(--k-gold) !important; }

/* ---------- «Матч»: заголовок раздела (шрифт заголовков) и прут; строки «Подпись ◂ значение ▸» ---------- */
html.ns .lobby-stage #L-match { height: 276px !important; min-height: 0 !important; box-sizing: border-box; display: flex; flex-direction: column; padding: 6px 18px 9px !important; }
html.ns .lobby-stage #L-match .lm-head { display: flex; align-items: center; gap: 12px; min-height: 0; margin: 0 0 3px; padding: 0 0 0 3px; background: none !important; }
html.ns .lobby-stage #L-match .lm-ttl {
  position: static; height: auto; padding: 0; border: 0; border-image: none; background: none;
  font: 600 calc(19px * var(--tk, 1)) / 1.2 var(--k-title); letter-spacing: 0; text-transform: none; color: var(--k-gold); text-shadow: 0 3px 0 var(--k-ink);
}
html.ns .lobby-stage #L-match .lm-head::after { content: ''; flex: 1; height: 18px; background: none; }
html.ns.nskit .lobby-stage #L-match .lm-head::after { border-style: solid; border-color: transparent; border-width: 0 18px; border-image: var(--k-rod) 0 18 fill / 0 18px / 0 stretch; image-rendering: pixelated; }
html.ns .lobby-stage #L-match #settings { flex: 1; display: flex; flex-direction: column; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
html.ns .lobby-stage #L-match .set-row, html.ns .lobby-stage #settings #bot-cnt {
  position: relative; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) 18px 204px 18px; align-items: center; column-gap: 9px;
  width: auto; height: 39px; min-height: 0; margin: 0; padding: 0 12px; border: 0; background: none; box-shadow: none;
}
html.ns .lobby-stage #L-match:not(.ro) :is(.set-row, #bot-cnt):hover { background: var(--k-2); box-shadow: inset 0 3px 0 #252030, inset 0 -3px 0 #121017; }
html.ns .lobby-stage #L-match:not(.ro) :is(.set-row, #bot-cnt):hover::before { content: ''; position: absolute; left: 0; top: 50%; width: 3px; height: 18px; margin-top: -9px; background: var(--k-violet-hi); box-shadow: 0 3px 0 var(--k-violet); }
/* подпись */
html.ns .lobby-stage #L-match .set-row > span:first-child, html.ns .lobby-stage #settings #bot-cnt .bc-mid > span {
  grid-column: 1; grid-row: 1; flex: none; width: auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-indent: 0;
  font: 500 calc(15px * var(--tk, 1)) / 1.2 var(--k-font); letter-spacing: 0; text-transform: none; color: var(--k-text); text-shadow: none;
}
/* «Боты» (уровень) — подписью «Сила ботов», чтобы не путать с числом ботов строкой ниже */
html.ns .lobby-stage #L-match .set-row:has(#bots-opts) > span:first-child { font-size: 0; }
html.ns .lobby-stage #L-match .set-row:has(#bots-opts) > span:first-child::before { content: 'Сила ботов'; font-size: calc(15px * var(--tk, 1)); }
html.ns[lang="en"] .lobby-stage #L-match .set-row:has(#bots-opts) > span:first-child::before { content: 'Bot skill'; }
/* значение — только выбранный вариант, золотом по центру между стрелками */
html.ns .lobby-stage #L-match .set-row > span:not(:first-child) { display: contents; }
html.ns .lobby-stage #L-match .set-row .btn.sm { display: none; }
html.ns .lobby-stage #L-match .set-row .btn.sm.on {
  display: block; grid-column: 3; grid-row: 1; width: 100%; height: 33px; min-width: 0; margin: 0; padding: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0 !important; border-image: none !important; background: none !important; box-shadow: none !important; filter: none !important; transform: none; opacity: 1; cursor: default; pointer-events: none;
  font: 700 calc(16px * var(--tk, 1)) / 33px var(--k-font); letter-spacing: 0; text-align: center; font-variant-numeric: tabular-nums; color: var(--k-gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}
/* стрелки ◂ ▸ (у хоста; на краю — погасшие; у остальных стрелок нет) */
html.ns .lobby-stage #L-match .set-arr, html.ns .lobby-stage #settings #bot-cnt .bc-b {
  grid-row: 1; display: block; width: 18px; height: 27px; min-width: 0; margin: 0; padding: 0 !important; cursor: pointer;
  border: 0 !important; border-image: none !important; box-shadow: none !important; filter: none !important; font-size: 0 !important; color: transparent !important;
  background: var(--k-arr-l) center / 18px 27px no-repeat !important; image-rendering: pixelated;
}
html.ns .lobby-stage #L-match .set-arr.l, html.ns .lobby-stage #settings #bot-cnt .bc-b:first-child { grid-column: 2; }
html.ns .lobby-stage #L-match .set-arr.r, html.ns .lobby-stage #settings #bot-cnt .bc-b:last-child { grid-column: 4; background-image: var(--k-arr-r) !important; }
html.ns .lobby-stage #L-match .set-arr:hover:not(:disabled), html.ns .lobby-stage #settings #bot-cnt .bc-b:hover:not(:disabled) { filter: brightness(1.25) drop-shadow(0 0 0 transparent) !important; }
html.ns .lobby-stage #L-match .set-arr:active:not(:disabled), html.ns .lobby-stage #settings #bot-cnt .bc-b:active:not(:disabled) { transform: translateY(3px); }
html.ns .lobby-stage #L-match .set-arr.l:disabled { background-image: var(--k-arr-l-off) !important; cursor: default; opacity: 1; }
html.ns .lobby-stage #L-match .set-arr.r:disabled { background-image: var(--k-arr-r-off) !important; cursor: default; opacity: 1; }
html.ns .lobby-stage #L-match.ro .set-arr, html.ns .lobby-stage #settings #bot-cnt.ro .bc-b { visibility: hidden; }
/* число ботов — та же строка: «Ботов ◂ 12 ▸»; у хоста число можно вписать (гнездо при наведении и вводе) */
html.ns .lobby-stage #settings #bot-cnt .bc-mid { display: contents; }
html.ns .lobby-stage #settings #bot-cnt input {
  grid-column: 3; grid-row: 1; width: 96px; height: 33px; justify-self: center; box-sizing: border-box; margin: 0; padding: 0 !important; text-align: center;
  border: 6px solid transparent !important; border-image: none !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; outline: 0;
  font: 700 calc(16px * var(--tk, 1)) / 21px var(--k-font) !important; font-variant-numeric: tabular-nums; color: var(--k-gold-hi); text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}
html.ns.nskit .lobby-stage #settings #bot-cnt:not(.ro) input:is(:hover, :focus) { border-image: var(--k-well) 6 fill / 6px / 0 stretch !important; image-rendering: pixelated; }
html.ns .lobby-stage #settings #bot-cnt:not(.ro) input { cursor: text; }
html.ns .lobby-stage #settings #bot-cnt.ro input { cursor: default; }
html.ns .lobby-stage #L-match #set-info { margin: auto 0 0; padding: 6px 12px 0; font: 500 calc(13px * var(--tk, 1)) / 1.4 var(--k-font); color: var(--k-text-3); }

/* ---------- «ГОТОВ» — большая золотая плита в центре над пропастью; под ней пипсы «Готовы 3 из 5» ---------- */
html.ns .lobby-stage #L-ready { top: 798px !important; height: 156px !important; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 12px; overflow: visible; }
html.ns .lobby-stage #L-ready :is(.lb-pend, .lb-swords) { display: none; }
html.ns .lobby-stage #btn-ready {
  flex: none; width: 100%; height: 111px !important; margin: 0; padding: 0 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 600 calc(40px * var(--tk, 1)) / 1 var(--k-title) !important;
}
/* по краю плиты — гравированная линия (3 px тёмного золота в 6 px от кромки) */
html.ns.nskit .lobby-stage #btn-ready:not(.on) { box-shadow: inset 0 0 0 6px var(--k-gold), inset 0 0 0 9px #b38c45 !important; }
html.ns.nskit .lobby-stage #btn-ready:not(.on):hover:not(:disabled) { box-shadow: inset 0 0 0 6px #e8c67f, inset 0 0 0 9px #c49d52 !important; }
html.ns.nskit .lobby-stage #btn-ready:not(.on):active:not(:disabled) { box-shadow: inset 0 0 0 6px #c9a25a, inset 0 0 0 9px #a37a36 !important; }
html.ns .lobby-stage #btn-ready .rb-t { display: block; text-transform: lowercase; letter-spacing: 0; }
html.ns .lobby-stage #btn-ready .rb-t::first-letter { text-transform: uppercase; }
/* нажата: тёмная плита, текст зелёный, штамп «ГОТОВ» */
html.ns.nskit .lobby-stage #btn-ready.on { border-image-source: var(--k-btn) !important; color: var(--k-life); text-shadow: 0 3px 0 var(--k-ink); }
html.ns.nskit .lobby-stage #btn-ready.on:hover:not(:disabled) { border-image-source: var(--k-btn-hi) !important; color: #a6eab2; }
html.ns.nskit .lobby-stage #btn-ready.on:active:not(:disabled) { border-image-source: var(--k-btn-dn) !important; }
html.ns .lobby-stage #btn-ready.on { align-items: flex-start; padding-left: 36px !important; }
html.ns .lobby-stage #btn-ready.on .rb-t { font-size: calc(29px * var(--tk, 1)); }
html.ns .lobby-stage #btn-ready .rb-sub {
  display: block; margin: 0; text-indent: 0; text-shadow: none; letter-spacing: 0; text-transform: none;
  font: 500 calc(13px * var(--tk, 1)) / 1.2 var(--k-font); color: var(--k-text-3);
}
html.ns .lobby-stage #btn-ready.on:hover .rb-sub { color: var(--k-text-2); }
html.ns .lobby-stage #btn-ready .rb-stamp { position: absolute; right: 33px; top: 50%; margin-top: -27px; padding: 3px 12px; font-size: calc(20px * var(--tk, 1)); line-height: 24px; pointer-events: none; }
/* пипсы готовности: зелёные — готовы, пустые — ещё выбирают */
html.ns .lobby-stage #lb-rdy { flex: none; align-self: center; display: flex; align-items: center; gap: 12px; height: 33px; padding: 0 15px; background: rgba(8, 7, 11, .7); }
html.ns.nskit .lobby-stage #lb-rdy { border: 6px solid transparent; border-image: var(--k-block) 6 fill / 6px / 0 stretch; image-rendering: pixelated; background: none; }
html.ns .lobby-stage #lb-rdy:empty { display: none; }
html.ns .lobby-stage #lb-rdy .lr-pips i.on { background-image: var(--k-lobby-pip-life); }
html.ns:not(.nskit) .lobby-stage #lb-rdy .lr-pips i.on { background: var(--k-life); }
html.ns .lobby-stage #lb-rdy .lr-t { font: 600 calc(14px * var(--tk, 1)) / 1 var(--k-font); font-variant-numeric: tabular-nums; color: var(--k-text-2); white-space: nowrap; }

/* ---------- под «ГОТОВ»: «Начать игру» (хост) — золотая плита; у остальных — «Ожидание хоста…» ---------- */
html.ns .lobby-stage #L-host { top: 972px !important; height: 60px !important; display: flex; align-items: stretch; gap: 12px; }
html.ns .lobby-stage #L-host #host-ctrl { flex: 1; display: flex; gap: 12px; margin: 0; }
html.ns .lobby-stage #L-host #host-ctrl.hidden { display: none; }
html.ns .lobby-stage #btn-start { flex: 1; height: 60px !important; min-width: 0; padding: 0 18px !important; gap: 12px; white-space: nowrap; justify-content: center; font: 600 calc(18px * var(--tk, 1)) / 1 var(--k-font) !important; }
html.ns .lobby-stage #L-host #wait-host {
  flex: 1; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0 12px; border: 0 !important; border-image: none !important; box-shadow: none;
  background: rgba(8, 7, 11, .7) !important; font: italic 500 calc(15px * var(--tk, 1)) / 1.2 var(--k-font); letter-spacing: 0; text-transform: none; color: var(--k-text-2);
}
html.ns.nskit .lobby-stage #L-host #wait-host { border: 6px solid transparent !important; border-image: var(--k-block) 6 fill / 6px / 0 stretch !important; image-rendering: pixelated; background: none !important; }
html.ns .lobby-stage #L-host #wait-host.hidden, html.ns .lobby-stage #L-host:has(#h-take:not(.hidden)) #wait-host { display: none; }
html.ns .lobby-stage #L-host #h-take { flex: 1; min-width: 0; height: 60px !important; margin: 0; padding: 0 15px !important; white-space: normal; text-align: center; font: 600 calc(15px * var(--tk, 1)) / 1.25 var(--k-font) !important; }
/* число ботов уходит в «Матч» (ui.js lobbyCyclers); пока не перенесено — в строке под «ГОТОВ» */
html.ns .lobby-stage #L-host #bot-cnt { flex: 0 0 150px; display: flex; align-items: center; justify-content: center; gap: 6px; background: rgba(8, 7, 11, .7); }

/* без цепей (просьба владельца 10 октября): панели и таблички спускаются сверху и уезжают вверх, но цепей не видно */
html.ns .lobby-stage :is(#R-rooms, #L-players, #L-match)::before, html.ns .lobby-stage :is(#R-rooms, #L-players, #L-match)::after,
html.ns .lobby-stage .nav-btn:not(:hover)::before, html.ns .lobby-stage .nav-btn::after { display: none !important; }

/* фон — чёрная дыра справа (html.bg-hole, js/blackhole.js): интерфейс слева, как в главном меню, — Бездна справа открыта целиком,
   «ГОТОВ» — прямо под ней. С видео-фоном (?bg=paladin) — прежняя расстановка владельца (паладин слева ничем не закрыт) */
html.ns.bg-hole .lobby-stage #btn-rate     { left: 24px !important; }
html.ns.bg-hole .lobby-stage #btn-heroes   { left: 174px !important; }
html.ns.bg-hole .lobby-stage #btn-settings { left: 381px !important; }
html.ns.bg-hole .lobby-stage #R-rooms { left: 24px !important; width: 984px !important; }
html.ns.bg-hole .lobby-stage :is(#L-players, #L-match) { left: 24px !important; }
html.ns.bg-hole .lobby-stage :is(#L-ready, #L-host) { left: 1134px !important; }
