/* ==========================================================================
   fsbans — тёмная космическая тема, акцент фиолет → розовый
   ========================================================================== */

:root {
  --bg: #050307;
  --ink: #f5f0fa;
  --ink-2: #c9bdd8;
  --mute: #7d6f8e;
  --hair: rgba(255, 255, 255, 0.075);
  --hair-2: rgba(255, 255, 255, 0.13);
  --panel: rgba(14, 10, 20, 0.66);

  --violet: #b47cff;
  --violet-2: #8b3dff;
  --pink: #ff5cb8;
  --pink-2: #e0287a;
  --grad: linear-gradient(100deg, var(--violet) 0%, var(--pink) 100%);

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI Variable", "Segoe UI", Inter, Roboto, system-ui, sans-serif;
  --mono: "Cascadia Mono", "JetBrains Mono", Consolas, ui-monospace, monospace;

  --gut: 46px;              /* боковой отступ: контент почти во весь экран */
  --nav-top: 18px;          /* отступ плавающей шапки от верха окна */
  --r: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
b { font-weight: 650; }
::selection { background: rgba(180, 124, 255, 0.35); color: #fff; }

/* Контент тянется на всю ширину окна, только с воздухом по краям */
.frame { width: 100%; max-width: 2200px; margin-inline: auto; padding-inline: var(--gut); }

/* --------------------------------------------------------------------------
   Фон: живой canvas + туманность + направляющие
   -------------------------------------------------------------------------- */

#space {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  z-index: 0;
  pointer-events: none;
}

.nebula { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.nebula {
  background:
    radial-gradient(60% 45% at 50% -10%, rgba(139, 61, 255, 0.26), transparent 70%),
    radial-gradient(38% 32% at 86% 20%, rgba(224, 40, 122, 0.13), transparent 72%),
    radial-gradient(32% 30% at 10% 34%, rgba(139, 61, 255, 0.10), transparent 72%);
}

header, main, footer { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Навигация
   -------------------------------------------------------------------------- */

.nav {
  position: sticky;
  top: var(--nav-top);
  z-index: 20;
  padding-inline: var(--gut);
  /* Отступ сверху, чтобы шапка не прилипала к краю окна */
  margin-top: var(--nav-top);
}

.nav-row {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 62px;
  flex-wrap: wrap;
  max-width: 2200px;
  margin-inline: auto;
  padding: 8px 10px 8px 24px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(10, 6, 16, 0.72);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}

.logo { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 20px; }

.logo-mark {
  font-style: normal;
  font-size: 17px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(180, 124, 255, .55));
}

.logo-sm { font-size: 17px; }

.links { display: flex; gap: 20px; }

.links a { position: relative; color: var(--ink-2); font-size: 16px; padding: 6px 0; transition: color .2s; }

.links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.links a:hover { color: var(--ink); }
.links a.on { color: #fff; }
.links a.on::after, .links a:hover::after { transform: scaleX(1); }

.find {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, 0.03);
  transition: border-color .2s, box-shadow .2s;
}

.find:focus-within { border-color: rgba(180, 124, 255, .55); box-shadow: 0 0 0 4px rgba(139, 61, 255, .12); }

.find input {
  width: 140px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.find input::placeholder { color: var(--mute); }
.find input::-webkit-search-cancel-button { display: none; }

.find button {
  border: 0;
  border-radius: 999px;
  padding: 7px 14px;
  background: #f5f0fa;
  color: #0b0710;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: box-shadow .2s;
}

.find button:hover { box-shadow: 0 0 24px rgba(255, 255, 255, .25); }

.login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color .2s, background .2s, box-shadow .2s;
}

.login:hover { border-color: rgba(180, 124, 255, .6); background: rgba(139, 61, 255, .1); }

.login.on {
  border-color: rgba(255, 92, 184, .5);
  background: rgba(224, 40, 122, .12);
  box-shadow: 0 0 20px rgba(224, 40, 122, .18);
}

.login-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 8px var(--pink);
}

/* Счётчик посетителей в шапке */
.online {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .025);
  color: var(--ink-2);
  font-size: 13px;
  white-space: nowrap;
}

.online b { color: #fff; font-family: var(--mono); font-style: normal; font-size: 13px; }

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #41e08a;
  box-shadow: 0 0 8px rgba(65, 224, 138, .8);
  animation: pulse-green 2.4s ease-out infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(65, 224, 138, .5); }
  80%, 100% { box-shadow: 0 0 0 8px rgba(65, 224, 138, 0); }
}

/* Короткая вспышка при смене числа */
.online b.tick { animation: tick .45s ease; }

@keyframes tick {
  0% { color: var(--pink); transform: translateY(-2px); }
  100% { color: #fff; transform: none; }
}

/* Новая запись въезжает сверху */
.item.is-new { opacity: 0; transform: translateY(-14px); }

.item {
  transition: background .2s, opacity .45s ease, transform .45s cubic-bezier(.2, .8, .3, 1);
}

.arr { display: inline-block; font-style: normal; }

/* --------------------------------------------------------------------------
   Заголовок
   -------------------------------------------------------------------------- */

.hero { text-align: center; padding: 44px 0 40px; }
.hero-sm { padding: 44px 0 30px; }

.eyebrow + .display { margin-top: 18px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, 0.025);
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: .4px;
}

.pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--pink);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 92, 184, .55); }
  80%, 100% { box-shadow: 0 0 0 9px rgba(255, 92, 184, 0); }
}

.display {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(54px, 8vw, 118px);
  line-height: .95;
  letter-spacing: -2.5px;
  color: #fff;
  text-shadow: 0 0 60px rgba(180, 124, 255, .25);
}

.display em {
  font-style: italic;
  background: linear-gradient(100deg, #fff 0%, var(--violet) 40%, var(--pink) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: .06em;
}

.display-sm { font-size: clamp(46px, 6vw, 86px); }

.sub { max-width: 600px; margin: 16px auto 0; color: var(--ink-2); font-size: 16px; }
.sub b { color: #fff; }
.sub a, .note a { color: var(--violet); border-bottom: 1px solid rgba(180, 124, 255, .35); }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.cta-left { justify-content: flex-start; margin-top: 22px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow .2s, border-color .2s, background .2s;
}
.btn-wide { width: 100%; justify-content: center; }

.btn-light { background: #f5f0fa; color: #0b0710; }
.btn-light:hover { box-shadow: 0 0 34px rgba(255, 255, 255, .28), 0 0 70px rgba(180, 124, 255, .25); }

.btn-ghost { border: 1px solid var(--hair-2); color: var(--ink); background: rgba(255, 255, 255, .02); }
.btn-ghost:hover { border-color: rgba(180, 124, 255, .55); background: rgba(139, 61, 255, .08); }

.btn-danger { background: linear-gradient(100deg, var(--violet-2), var(--pink-2)); color: #fff; }
.btn-danger:hover { box-shadow: 0 0 34px rgba(224, 40, 122, .4); }
.btn-danger[disabled] { opacity: .4; pointer-events: none; }

.btn.off { opacity: .3; pointer-events: none; }

/* --------------------------------------------------------------------------
   «Окно»
   -------------------------------------------------------------------------- */

.stage { margin-bottom: 34px; }

.window {
  position: relative;
  border-radius: var(--r);
  border: 1px solid var(--hair-2);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02) inset;
}

.window-glow {
  position: absolute;
  top: -1px; left: 14%; right: 14%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), var(--violet), var(--pink), transparent);
  box-shadow: 0 0 18px 2px rgba(180, 124, 255, .45);
}

.window-bar { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--hair); }

.dots { display: inline-flex; gap: 7px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.dots i:first-child { background: rgba(255, 92, 184, .55); }
.dots i:nth-child(2) { background: rgba(180, 124, 255, .45); }

.window-title { font-family: var(--serif); font-size: 15px; color: #fff; }
.window-meta { margin-left: auto; font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--mute); }

/* --- статистика --- */

.stats { display: grid; grid-template-columns: repeat(4, 1fr); }

.stat { display: block; padding: 30px 28px 26px; border-right: 1px solid var(--hair); transition: background .25s; }
.stat:last-child { border-right: 0; }
a.stat:hover { background: rgba(139, 61, 255, .06); }

.stat-k {
  display: block;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mute);
}

.stat-v {
  display: block;
  margin: 14px 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 4vw, 62px);
  line-height: 1;
  letter-spacing: -1.5px;
  background: linear-gradient(180deg, #fff 30%, #b9a6cf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-go { font-size: 13px; color: var(--violet); }
.stat-sum .stat-go { color: var(--mute); }

/* --------------------------------------------------------------------------
   Блоки и лента
   -------------------------------------------------------------------------- */

.block { margin-bottom: 20px; }

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 46px);
  letter-spacing: -1px;
  line-height: 1.05;
}

.title em { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; }

.filters a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  color: var(--ink-2);
  font-size: 13px;
  transition: color .2s, border-color .2s, background .2s;
}

.filters a:hover { color: #fff; border-color: rgba(180, 124, 255, .5); }

.filters a.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(100deg, rgba(139, 61, 255, .45), rgba(224, 40, 122, .35));
}

.note { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }

.list { list-style: none; margin: 0; padding: 4px 0; }

.item {
  display: grid;
  grid-template-columns: 70px minmax(190px, 1fr) minmax(220px, 2.4fr) minmax(190px, auto);
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--hair);
  transition: background .2s;
}

.item:last-child { border-bottom: 0; }
.item:hover { background: linear-gradient(90deg, rgba(139, 61, 255, .07), rgba(224, 40, 122, .04)); }

.chip {
  justify-self: start;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-style: normal;
  font-size: 10px;
  letter-spacing: 1.2px;
}

.chip-bans { color: #ffc9e6; border: 1px solid rgba(255, 92, 184, .45); background: rgba(224, 40, 122, .1); }
.chip-mutes { color: #e3d0ff; border: 1px solid rgba(180, 124, 255, .45); background: rgba(139, 61, 255, .1); }
.chip-kicks { color: #cfc4dd; border: 1px solid var(--hair-2); background: rgba(255, 255, 255, .04); }

.who { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }

.who img {
  flex: none;
  border-radius: 8px;
  image-rendering: pixelated;
  border: 1px solid var(--hair-2);
  background: rgba(22, 16, 32, .8);
}

.who-txt { display: flex; flex-direction: column; min-width: 0; }
.who-txt b { font-size: 14px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who-txt small { font-size: 11px; color: var(--mute); }

.why {
  color: var(--ink-2);
  font-size: 13px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 2px; }
.when small { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--mute); white-space: nowrap; }

.st { font-size: 12px; white-space: nowrap; }
.st-live { color: var(--pink); }
.st-perm { color: var(--violet); }
.st-off { color: var(--mute); }

/* --- пустое состояние --- */

.void { padding: 72px 24px 68px; text-align: center; }

.void-orb {
  position: relative;
  width: 64px; height: 64px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--hair-2);
  background: radial-gradient(circle at 50% 35%, rgba(180, 124, 255, .3), rgba(14, 10, 20, .8) 70%);
  box-shadow: 0 0 40px rgba(139, 61, 255, .25);
}

.void-orb span {
  font-style: normal;
  font-size: 22px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.void-orb::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px dashed rgba(180, 124, 255, .25);
  animation: spin 22s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.void-title { margin: 0; font-family: var(--serif); font-size: 24px; color: #fff; }
.void-sub { margin: 8px 0 0; color: var(--mute); font-size: 14px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 28px 0 10px; }
.pager-pos { font-family: var(--mono); font-style: normal; font-size: 12px; color: var(--mute); }

/* --- карточка игрока --- */

.player-head { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }

.player-head img {
  border-radius: 14px;
  image-rendering: pixelated;
  border: 1px solid var(--hair-2);
  background: rgba(22, 16, 32, .8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
}

.player-head .display { margin: 0; }

.stat-go.now { color: var(--pink); }
.stat-state { font-size: clamp(26px, 2.4vw, 34px) !important; }
.stat-state.bad { background: linear-gradient(90deg, #fff, var(--pink)); -webkit-background-clip: text; background-clip: text; }
.stat-state.good { background: linear-gradient(90deg, #fff, #41e08a); -webkit-background-clip: text; background-clip: text; }

.player-form { display: flex; gap: 12px; flex-wrap: wrap; }

.player-form input {
  flex: 1;
  min-width: 180px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.player-form input:focus { border-color: rgba(180, 124, 255, .6); box-shadow: 0 0 0 4px rgba(139, 61, 255, .12); }

/* --------------------------------------------------------------------------
   Админка
   -------------------------------------------------------------------------- */

.auth { max-width: 520px; margin-inline: auto; padding-top: 86px; padding-bottom: 40px; }
.auth-body { padding: 40px 36px 36px; text-align: center; }
.auth-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 32px; color: #fff; }
.auth-sub { margin: 6px 0 26px; color: var(--mute); font-size: 14px; }

.auth-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; }
.auth-form span { font-family: var(--mono); font-style: normal; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--mute); }

.auth-form input {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.auth-form input:focus { border-color: rgba(180, 124, 255, .6); box-shadow: 0 0 0 4px rgba(139, 61, 255, .12); }
.auth-form .btn { margin-top: 8px; }

.alert {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 92, 184, .4);
  background: rgba(224, 40, 122, .1);
  color: #ffd2e8;
  font-size: 13px;
}

.alert-warn { border-color: rgba(255, 176, 32, .4); background: rgba(255, 176, 32, .08); color: #ffe0b0; }
.alert-ok { border-color: rgba(180, 124, 255, .45); background: rgba(139, 61, 255, .1); color: #e7d8ff; }

.panes { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 20px; }
.pane { padding: 24px 24px 26px; }
.pane-sub { margin: 0 0 16px; color: var(--ink-2); font-size: 14px; }

.grid-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }

.tile {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--hair-2);
  background: rgba(255, 255, 255, .025);
  color: var(--ink);
  font: inherit;
  font-style: italic;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}

.tile b { font-family: var(--serif); font-size: 20px; color: #fff; }
.tile small { font-size: 12px; color: var(--violet); }
.tile:hover { border-color: rgba(180, 124, 255, .6); background: rgba(139, 61, 255, .1); }

.confirm { padding: 26px 24px; }
.confirm-text { margin: 0; font-size: 16px; color: var(--ink); }
.confirm-num { font-family: var(--serif); font-size: 26px; color: var(--pink); }
.confirm-note { margin: 8px 0 0; color: var(--mute); font-size: 13px; }

.logout { margin-top: 26px; }

/* --------------------------------------------------------------------------
   Подвал
   -------------------------------------------------------------------------- */

.foot { margin-top: 70px; padding-bottom: 42px; }

.rule {
  position: relative;
  height: 1px;
  margin: 0 0 28px;
  background: linear-gradient(90deg, transparent, var(--hair-2) 6%, var(--hair-2) 94%, transparent);
}

.tick, .rule-label { display: none; }

.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 10px; color: var(--mute); font-size: 13px; }
.foot-links a { color: var(--ink-2); transition: color .2s; }
.foot-links a:hover { color: var(--violet); }
.foot-note { color: var(--mute); font-size: 12px; }

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */

@media (max-width: 1420px) {
  .online .online-label { display: none; }
  .links { gap: 16px; }
  .find input { width: 120px; }
}

@media (max-width: 1280px) {
  :root { --gut: 28px; --nav-top: 14px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--hair); }
}

@media (max-width: 900px) {
  :root { --gut: 14px; --nav-top: 10px; }

  .nav-row { gap: 12px; padding: 12px 14px; border-radius: 26px; }
  .logo { flex: 1; }
  .find { order: 2; width: 100%; }
  .find input { flex: 1; width: auto; min-width: 0; }
  .links { order: 3; width: 100%; justify-content: flex-start; gap: 20px; }
  .online { order: 4; }
  .login { order: 1; }

  .hero { padding: 30px 0 28px; }
  .display { letter-spacing: -1.5px; }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--hair); }
  .stat:last-child { border-bottom: 0; }

  .item { grid-template-columns: 1fr auto; row-gap: 8px; padding: 14px 16px; }
  .chip { grid-column: 2; grid-row: 1; justify-self: end; }
  .who { grid-column: 1; grid-row: 1; }
  .why { grid-column: 1 / -1; }
  .when { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }

  .panes { grid-template-columns: 1fr; }
  .auth { padding-top: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Канвас фона исключён: он сам переходит в щадящий режим, а не замирает */
  *:not(#space), *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Чат сайта
   -------------------------------------------------------------------------- */

.chat-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(14, 10, 20, .88);
  backdrop-filter: blur(14px);
  color: var(--ink);
  font-family: inherit;
  font-style: italic;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .9);
  transition: border-color .2s, background .2s;
}

.chat-toggle:hover { border-color: rgba(180, 124, 255, .6); background: rgba(24, 14, 36, .95); }
.chat-toggle-icon { font-style: normal; font-size: 15px; }

.chat-badge {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--pink-2);
  color: #fff;
  font-family: var(--mono);
  font-style: normal;
  font-size: 11px;
  text-align: center;
}

.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 31;
  width: min(340px, calc(100vw - 40px));
  max-height: min(560px, calc(100vh - 40px));
  display: none;
  flex-direction: column;
  border: 1px solid var(--hair-2);
  border-radius: 18px;
  background: rgba(12, 8, 18, .94);
  backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px -26px rgba(0, 0, 0, .95);
  overflow: hidden;
}

.chat.open { display: flex; }

.chat-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px 13px 18px;
  border-bottom: 1px solid var(--hair);
}

.chat-title { font-family: var(--serif); font-size: 16px; color: #fff; }
.chat-sub { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--mute); }

.chat-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mute);
  font-size: 14px;
  cursor: pointer;
  transition: color .2s, background .2s;
}

.chat-close:hover { color: #fff; background: rgba(255, 255, 255, .06); }

.chat-body {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(168, 85, 247, .4) transparent;
}

.chat-body::-webkit-scrollbar { width: 6px; }
.chat-body::-webkit-scrollbar-thumb { background: rgba(168, 85, 247, .4); border-radius: 3px; }

.chat-empty { margin: auto; color: var(--mute); font-size: 13px; text-align: center; }

.msg { display: flex; flex-direction: column; gap: 2px; animation: msg-in .3s ease; }

@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.msg-top { display: flex; align-items: baseline; gap: 8px; }

.msg-name { font-size: 12px; font-weight: 700; }
.msg-name.admin { color: #ff4d4d; }
.msg-name.player { color: var(--violet); }

.msg-time { font-family: var(--mono); font-style: normal; font-size: 10px; color: var(--mute); }
.msg-text { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }

.chat-form { display: flex; gap: 8px; padding: 12px 14px 8px; border-top: 1px solid var(--hair); }

.chat-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid var(--hair-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}

.chat-form input:focus { border-color: rgba(180, 124, 255, .55); }

.chat-form button {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f5f0fa;
  color: #0b0710;
  cursor: pointer;
  transition: box-shadow .2s, opacity .2s;
}

.chat-form button svg { display: block; margin-left: 1px; }

.chat-form button:hover { box-shadow: 0 0 20px rgba(255, 255, 255, .25); }
.chat-form button:disabled { opacity: .4; cursor: default; box-shadow: none; }

.chat-note { margin: 0; padding: 0 16px 13px; color: var(--mute); font-size: 11px; }
.chat-note.err { color: #ff8080; }

@media (max-width: 900px) {
  .chat-toggle { right: 14px; bottom: 14px; padding: 10px 15px; }
  .chat-toggle-text { display: none; }
  .chat { left: 14px; right: 14px; bottom: 14px; width: auto; }
}
