/* Сайт бета-теста. Строгий тёмный форумный стиль «как у Фаталити» (06.11, просьба Влада, скриншоты в треде):
   ровный тёмно-серый фон, шапка-полоса с вкладками капсом, большой логотип по центру, блоки-«рамки» с заголовком на линии,
   разделы — плашками с рамкой, оранжевый акцент (кнопки, активная вкладка), малиновые ссылки, фиолетовые ники.
   Никакого неона: ни свечений, ни переливов, ни бегущих рамок. Цвета — только токенами из :root.
   Сезонное (Хэллоуин) — в конце файла под [data-season="halloween"]; темы «Классика» и «Фурри» — в своих файлах. */
:root {
  --bg: #1a1a1a;
  --bar: #222222;             /* шапка */
  --panel: #1d1d1d;           /* плашки внутри блоков, всплывающие меню */
  --raised: #252525;
  --raised-hover: #2b2b2b;
  --edge: #313131;
  --edge-hi: #3c3c3c;
  --control: #161616;         /* поля ввода */
  --control-hover: #2a2a2a;
  --accent: #ff5e0e;          /* оранжевый: кнопки, активная вкладка, заголовки меню */
  --accent-hi: #ff7a33;
  --accent-ink: #ffffff;      /* текст на оранжевом */
  --accent-soft: rgba(255, 94, 14, 0.12);
  --link: #ec1f5a;            /* малиновые ссылки и ники в строках «последнее» */
  --link-hi: #ff4a7d;
  --name: #9b5cff;            /* фиолетовые ники */
  --label: #8580a4;           /* сиреневато-серые подписи («Тем:», «Сообщений:») */
  --khaki: #9aa36b;
  --good: #3ccf8e;
  --warn: #ffb020;
  --bad: #ff4757;
  --money: #f7c948;
  --info: #4ea8ff;
  --viz-1: #3987e5;           /* графики админки: синий и оранжевый, проверены на различимость (в т. ч. дальтонизм) */
  --viz-2: #d95926;
  --text: #f1f1f1;
  --muted: #8c8c8c;
  --subtle: #c4c4c4;
  --hud: var(--panel);
  /* Старые имена «неона» — теперь просто акцент без свечения (их читают темы и старые стили). */
  --neon-a: var(--accent);
  --neon-b: var(--accent);
  --glow: transparent;
  --shine: linear-gradient(90deg, #ff5e0e, #ffc23a, #ff3d7f, #a46bff, #ff7a33, #ff5e0e); /* перелив свежих новостей */
  --r-panel: 4px;
  --r-group: 4px;
  --r-ctl: 3px;
  --f-head: "Jost", -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mega: "Jost", sans-serif;
  --w: 1420px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 var(--f-head);
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
  overflow-x: hidden;
}
body.noscroll { overflow: hidden; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hi); text-decoration: underline; }
::selection { background: var(--accent); color: #fff; }

.backdrop { display: none; }
.spooky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }

/* ---------- логотип: белые буквы со сдвинутой оранжевой тенью, кольцо со сколами вместо «О», ударение над «А» ---------- */
.logoband { display: flex; justify-content: center; padding: 64px 16px 52px; }
.biglogo { color: var(--text); font-size: clamp(46px, 7vw, 92px); line-height: 1; }
.biglogo:hover { text-decoration: none; color: var(--text); }
.wm { display: inline-flex; align-items: baseline; font: 800 1em/1 var(--f-mega); letter-spacing: .02em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.wm-t { display: inline-block; text-shadow: .045em .045em 0 var(--accent); }
.wm-ring { width: .74em; height: .74em; color: var(--text); flex: none; margin-right: .13em; filter: drop-shadow(.045em .045em 0 var(--accent)); overflow: visible; }
.wm .st { position: relative; display: inline-block; }
.wm .st::before { content: ""; position: absolute; left: 50%; top: -.09em; width: .19em; height: .06em;
  background: var(--accent); transform: translateX(-30%) rotate(-30deg); }

/* ---------- шапка ---------- */
.top { position: sticky; top: 0; z-index: 20; width: 100%; background: var(--bar); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.top-in { display: flex; align-items: center; gap: 12px; max-width: var(--w); margin: 0 auto; padding: 0 24px; height: 58px; }
.brand { display: none; }
.burger { display: none; }
#nav { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; height: 100%; }
#nav .push, #nav .btn.push, #nav .btn.primary.push { margin-left: auto; }
#nav .btn {
  background: none; border: 0; border-radius: 0; height: 100%; padding: 0 10px; gap: 7px;
  font: 500 14px var(--f-head); text-transform: uppercase; letter-spacing: .01em; color: var(--muted);
  transition: color .15s;
}
#nav .btn .ni { opacity: .9; }
#nav .tab { position: relative; }
#nav .tab::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 13px; height: 2px; background: transparent; }
#nav .btn:hover { color: var(--text); background: none; text-decoration: none; }
#nav .tab.on { color: var(--text); font-weight: 600; }
#nav .tab.on::after { background: var(--accent); }
#nav .bellbox { height: 100%; display: flex; align-items: center; }
#nav .bellbox .btn { height: 100%; }
#nav .btn.primary { color: #fff; border-radius: var(--r-ctl); height: 34px; margin-left: 8px; padding: 0 16px; background: var(--accent); font-weight: 600; }
#nav .btn.primary:hover { background: var(--accent-hi); }
#nav .btn.user { color: var(--text); text-transform: none; font-weight: 600; font-size: 15px; }
#nav .btn.bell { color: var(--muted); padding: 0 8px; }
#nav .btn.lang { border: 1px solid var(--edge-hi); border-radius: var(--r-ctl); height: 30px; margin-left: 8px; padding: 0 10px; font-size: 12px; }
.mini-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: none; }
.mini-av.letter { display: inline-grid; place-items: center; background: #2a1d4d; color: var(--link); font-weight: 700; font-size: 13px; }

#banners { width: 100%; max-width: var(--w); margin: 0 auto; padding: 0 24px 6px; display: flex; flex-direction: column; gap: 14px; }
#banners:empty { display: none; }
main { flex: 1; width: 100%; max-width: var(--w); margin: 0 auto; padding: 14px 24px 64px; }

/* Подвал: три колонки, как на форуме. */
.foot { border-top: 1px solid var(--edge); color: var(--muted); font-size: 13.5px; }
.foot-in { max-width: var(--w); margin: 0 auto; padding: 22px 24px; display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.foot-m { text-align: center; }
.foot-c { color: var(--accent); }
.foot-r { display: flex; justify-content: flex-end; gap: 18px; flex-wrap: wrap; }
.foot-r a { color: var(--accent); }

/* ---------- объявление под шапкой: рамка цвета акцента, текст оранжевый, без свечения ---------- */
.banner {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 8px 14px; border-radius: var(--r-ctl);
  border: 1px solid var(--accent); background: rgba(255, 94, 14, .04); color: var(--accent-hi); font-weight: 500;
}
a.banner:hover { text-decoration: none; background: rgba(255, 94, 14, .08); color: var(--accent-hi); }
.banner.neon-y { border-color: #e9b81f; color: var(--text); background: rgba(233, 184, 31, .04); font-weight: 600; }
.banner .bico { font-size: 15px; }
.banner .btitle { flex: 1; min-width: 0; color: inherit; }
.banner .bdate { white-space: nowrap; color: var(--label); }
.banner .bgo { color: inherit; }

/* Перелив свежих новостей и закреплённых тем (Влад 06.11 попросил оставить): цветной текст плавно переливается,
   как цветные заголовки объявлений на форумах. Только сам текст — без свечения и рамок. */
.shimmer {
  background-image: var(--shine); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: shine 4s linear infinite; font-weight: 600;
}
@keyframes shine { from { background-position: 0 0; } to { background-position: -200% 0; } }
.panel-news { position: relative; }

/* ---------- блоки: рамка, заголовок капсом прямо на верхней линии (как legend у fieldset) ---------- */
.sheet { position: relative; background: transparent; border: 1px solid var(--edge); border-radius: var(--r-panel); padding: 24px 20px 18px; margin-top: 12px; }
.sheet h1 { font: 500 26px/1.25 var(--f-head); margin: 0 0 4px; }
.sheet > h2, .sheet > .legend {
  position: absolute; top: -12px; left: 12px; margin: 0; padding: 0 8px; max-width: calc(100% - 24px);
  background: var(--bg); font: 500 15.5px/24px var(--f-head); text-transform: uppercase; letter-spacing: .01em; color: var(--text);
  display: flex; justify-content: space-between; gap: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet h2 { font: 500 15.5px/1.3 var(--f-head); margin: 0 0 14px; text-transform: uppercase; color: var(--text); }
.npop.sheet > h2 { position: static; background: none; padding: 0; }
.sub { color: var(--muted); margin: 0 0 20px; }
.small { font-size: 13px; color: var(--muted); }
.caps { font: 500 15.5px var(--f-head); color: var(--text); text-transform: uppercase; margin: 30px 0 12px 2px; }

/* ---------- главная ---------- */
.mast { margin: 30px 0 18px; text-align: center; }
.mast .mega { display: none; } /* название — в большом логотипе над страницей */
.kicker { font: 500 13px var(--f-head); text-transform: uppercase; letter-spacing: .16em; color: var(--accent); margin: 0 0 14px; }
.mast .lead { font-size: 17px; color: var(--subtle); margin: 0 auto 26px; max-width: 660px; }
.mast-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; margin-top: 18px; }
.hero > .sheet { margin-top: 0; }
/* Задание дня (11.11): задание крупно, ниже таблица лучших по времени партии. */
.daily { margin: 18px 0 0; opacity: .8; }
.daily[open] { opacity: 1; }
.daily summary { cursor: pointer; list-style-position: inside; }
.daily > .small { margin-top: 8px; }
.daily-table { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.daily-table li { display: flex; gap: 10px; align-items: center; padding: 9px 14px; border: 1px solid var(--edge); border-radius: var(--r-ctl); background: var(--panel); min-width: 0; }
.daily-table .dn { color: var(--muted); width: 1.6em; text-align: right; }
.daily-table .grow { flex: 1; min-width: 0; }
.daily-table .dt { font-variant-numeric: tabular-nums; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.card { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-panel); padding: 20px 22px; display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; align-items: center; }
.card .cico { grid-row: span 2; color: var(--accent); }
.card .cico svg { width: 30px; height: 30px; }
.card h3 { margin: 0; font: 600 17px var(--f-head); }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* Значки разделов: плоские оранжевые контуры, без плиток и свечения. --c оставлен для темы «Классика». */
.tile { width: 44px; height: 44px; display: grid; place-items: center; font-size: 18px; flex: none; color: var(--accent); }
.tile svg { width: 26px; height: 26px; }
.tile-news { color: var(--text); }

.newslist { display: flex; flex-direction: column; gap: 10px; }
.nrow { display: flex; gap: 12px; align-items: center; padding: 13px 16px; border: 1px solid var(--edge); border-radius: var(--r-ctl); background: var(--panel); color: var(--text); }
.nrow:hover { text-decoration: none; color: var(--text); border-color: var(--edge-hi); background: var(--raised); }
.nrow .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nrow .ntitle { font-size: 15.5px; font-weight: 500; line-height: 1.35; color: var(--accent-hi); }
.nmark { color: var(--muted); flex: none; }
.allnews { display: block; text-align: right; margin-top: 2px; }

.steps { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.step { display: flex; gap: 14px; align-items: center; color: var(--subtle); }
.stepn { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 600 14px var(--f-head);
  background: var(--accent); color: #fff; }

/* Группа строк */
.group { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-group); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 8px 14px; border-top: 1px solid var(--edge); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .label { color: var(--subtle); }
.row .value { color: var(--label); text-align: right; }

/* ---------- поля и кнопки ---------- */
label.field, div.field { display: block; margin-bottom: 14px; }
label.field span, div.field > span { display: block; font-size: 14px; color: var(--text); margin: 0 0 6px 1px; font-weight: 500; }
input, select {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--r-ctl);
  background: var(--control); color: var(--text); border: 1px solid var(--edge-hi); font: inherit; outline: none; transition: border-color .15s;
}
select option { background: var(--raised); }
input:focus, select:focus, textarea:focus { border-color: #5a5a5a; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 32px; padding: 0 14px; border-radius: var(--r-ctl); border: 1px solid var(--edge-hi); cursor: pointer;
  background: var(--raised); color: var(--text); font: 500 14px var(--f-head); white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--control-hover); color: var(--text); text-decoration: none; border-color: #4a4a4a; }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); color: #fff; }
.btn.big { height: 42px; padding: 0 24px; font-size: 15.5px; }
.btn.wide { width: 100%; }
.btn.danger { color: var(--bad); }
.btn.good { color: var(--good); }
.btn:disabled { opacity: .5; cursor: default; }
.pill { height: 32px; }

.seg { display: flex; border-bottom: 1px solid var(--edge); margin-bottom: 20px; gap: 4px; }
.seg button { height: 40px; padding: 0 16px; border: 0; background: none; color: var(--muted); font: 500 15px var(--f-head); cursor: pointer; box-shadow: inset 0 -2px 0 transparent; }
.seg button:hover { color: var(--text); }
.seg button.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }

.msg { border-radius: var(--r-ctl); padding: 10px 14px; margin: 0 0 12px; font-size: 14px; border: 1px solid transparent; }
.msg.err { background: rgba(255, 71, 87, .07); color: #ff8a95; border-color: rgba(255, 71, 87, .45); }
.msg.ok { background: rgba(60, 207, 142, .07); color: #7fe0b3; border-color: rgba(60, 207, 142, .45); }

.badge { display: inline-block; vertical-align: 2px; font-size: 11px; font-weight: 600; line-height: 18px; padding: 0 7px; border-radius: 3px;
  background: var(--raised-hover); color: var(--subtle); text-transform: uppercase; letter-spacing: .03em; }
.badge.good { background: rgba(60,207,142,.14); color: var(--good); }
.badge.bad { background: rgba(255,71,87,.14); color: var(--bad); }
.badge.warn { background: rgba(255,176,32,.14); color: var(--warn); }
.badge.accent { background: var(--accent-soft); color: var(--accent-hi); }
/* Кодер (Влад 06.11): метка как ник — чёрная плашка, белые буквы и белое свечение. */
.badge.coder { background: #000; color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.55), 0 0 10px rgba(255,255,255,.45);
  text-shadow: 0 0 4px rgba(255,255,255,.8); }
.badge.new { background: var(--accent); color: #fff; }

.auth { max-width: 440px; margin: 10px auto 0; }
.auth.sheet { padding: 30px 26px 24px; }
.wrap2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.wrap2 > .sheet { margin-top: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 16px; }
.stat .n { font: 600 30px var(--f-head); color: var(--text); }

/* ---------- онлайн и статистика (#/admin/online, site/online.js) ---------- */
.stats.on-tiles, #stats { grid-template-columns: repeat(4, 1fr); }
a.stat.on-link { color: var(--text); text-decoration: none; }
a.stat.on-link:hover { border-color: var(--accent); }
a.stat.on-link .small:last-child { color: var(--accent); }
.on-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.on-head .seg { margin: 0; border: 0; }
.on-head .push { margin-left: auto; }
.on-team { display: flex; align-items: center; gap: 8px; color: var(--subtle); font-size: 14px; cursor: pointer; white-space: nowrap; }
.on-team input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.online > .sheet, .online > .wrap2 { margin-top: 24px; }
.on-sub { font-size: 20px; color: var(--muted); font-weight: 500; }
.chart { position: relative; width: 100%; }
.chart svg { display: block; touch-action: pan-y; }
.chart text { fill: var(--muted); font: 400 11px var(--f-head); }
.chart .grid { stroke: var(--edge); stroke-width: 1; }
.chart .cross { stroke: var(--subtle); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .hl { fill: var(--text); opacity: .06; }
.on-tip { position: absolute; top: 6px; pointer-events: none; background: var(--panel); border: 1px solid var(--edge-hi);
  border-radius: var(--r-ctl); padding: 6px 10px; font-size: 13px; white-space: nowrap; z-index: 2; }
.on-legend { display: flex; gap: 16px; font-size: 13px; color: var(--subtle); margin: -4px 0 8px; }
.on-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.on-hbar { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 6px 0; }
.on-hl { color: var(--subtle); font-size: 14px; }
.on-ht { height: 10px; background: var(--raised); border-radius: 2px; overflow: hidden; }
.on-ht i { display: block; height: 100%; background: var(--accent); border-radius: 0 2px 2px 0; }
.on-hv { white-space: nowrap; }
td.on-wrap { white-space: normal; word-break: break-word; min-width: 180px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; font-size: 13px; color: var(--label); text-transform: uppercase; padding: 11px 14px; }
td { white-space: nowrap; padding: 10px 14px; border-top: 1px solid var(--edge); vertical-align: middle; }
td.mono, .mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.tablebox { background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-group); overflow-x: auto; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.codes { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.codes .mono { background: var(--control); border: 1px solid var(--edge); border-radius: var(--r-ctl); padding: 8px 12px; user-select: all; }

.hidden { display: none !important; }
/* Колонки сетки не раздуваются длинными строками с «…» (иначе на телефоне страница шире экрана, 03.11). */
.pgrid > *, .wrap2 > *, .hero > *, .cards > *, .stats > *, .shoutgrid > *, .fl2 > * { min-width: 0; }

/* ---------- форум ---------- */
.forum { margin-top: 0; }
.forum .fhead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 0 0 16px;
  background: none; border: 0; padding: 0; }
.forum .fhead h1 { font: 500 28px/1.2 var(--f-head); margin: 0; }
/* Главная форума: слева чат и категории, справа «Сейчас на сайте», последние темы и правила. */
.fl2 { display: grid; grid-template-columns: 1fr 340px; gap: 22px; align-items: start; }
.flmain, .flside { display: flex; flex-direction: column; gap: 22px; }
.flmain > .sheet, .flside > .sheet { margin-top: 0; }
.cat { padding: 22px 16px 16px; }
.nodes { display: flex; flex-direction: column; gap: 14px; }
.node { display: flex; align-items: center; gap: 16px; padding: 18px 20px; min-height: 72px; color: var(--text);
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-panel); }
.node:hover { text-decoration: none; color: var(--text); border-color: var(--edge-hi); }
.node .grow { flex: 1 1 200px; min-width: 150px; }
.node .ftitle { font-size: 17px; font-weight: 600; }
.node .ndesc { color: var(--muted); }
.node .nmob { display: none; color: var(--label); }
.node .nmob b { color: var(--text); font-weight: 500; }
.nstat { width: 92px; text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.nstat b { font-size: 17px; font-weight: 500; }
.nstat span { font-size: 13px; color: var(--muted); text-transform: lowercase; }
.nlast { width: 290px; display: flex; gap: 10px; align-items: center; min-width: 0; }
.nlast .avatar { width: 36px; height: 36px; font-size: 15px; }
.nlast .grow, .lrow .grow { min-width: 0; display: flex; flex-direction: column; }
.ltitle { color: var(--accent-hi); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lby { color: var(--link); }
.latest { display: flex; flex-direction: column; gap: 14px; }
.lrow { display: flex; gap: 10px; align-items: flex-start; color: var(--text); }
.lrow:hover { text-decoration: none; color: var(--text); }
.lrow .avatar { width: 30px; height: 30px; font-size: 13px; margin-top: 2px; }
.lrow .ltitle { color: var(--link); white-space: normal; }
.lrow:hover .ltitle { color: var(--link-hi); }
.lrow .lsec { color: var(--label); }

/* Список тем раздела и таблица «шапка + строки». */
.ftable { display: flex; flex-direction: column; gap: 10px; }
.frow { display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: var(--text); background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-panel); }
a.frow:hover { text-decoration: none; color: var(--text); border-color: var(--edge-hi); }
.frow.fth { font: 500 13px var(--f-head); color: var(--label); text-transform: uppercase; background: none; border: 0; padding: 0 18px; }
.frow .grow { flex: 1; min-width: 0; }
.frow .num { width: 96px; text-align: center; color: var(--text); font-variant-numeric: tabular-nums; }
.frow.fth .num { color: var(--label); }
.frow .flast { width: 240px; min-width: 0; }
.frow .fmark { width: 30px; text-align: center; color: var(--accent); font-size: 18px; }
.ftitle { font-weight: 600; font-size: 15.5px; }
a.frow .ftitle { color: var(--text); }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs { font-size: 14px; color: var(--muted); margin: 0 0 12px 1px; }
.crumbs a { color: var(--subtle); }
.crumbs span { margin: 0 4px; }
.pager { display: flex; gap: 4px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.pager .small { margin-right: 6px; }
.pager .btn { min-width: 32px; padding: 0 8px; }
.pager .btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.posts { display: flex; flex-direction: column; gap: 14px; }
.post { display: grid; grid-template-columns: 190px 1fr; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-panel); overflow: hidden; }
.pauthor { padding: 20px 14px; border-right: 1px solid var(--edge); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; }
.pauthor .avatar { width: 96px; height: 96px; font-size: 40px; }
.pauthor .ftitle .ulink { font-size: 16px; }
.pauthor .badge { margin: 4px 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 19px;
  background: #261a45; color: var(--link); }
.pbody { padding: 14px 20px 18px; min-width: 0; display: flex; flex-direction: column; }
.pmeta { display: flex; justify-content: space-between; color: var(--label); padding-bottom: 10px; margin-bottom: 12px; }
.pmeta a { color: var(--label); }
.ptext { overflow-wrap: anywhere; line-height: 1.65; font-size: 15.5px; flex: 1; }
.ptext blockquote { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--edge); border-left: 2px solid var(--accent); background: var(--raised); border-radius: var(--r-ctl); color: var(--subtle); }
.pbody .actions .btn { background: none; border-color: transparent; color: var(--link); padding: 0 8px; height: 28px; }
.pbody .actions .btn:hover { color: var(--link-hi); text-decoration: underline; }
.pbody .actions .btn.danger { color: var(--bad); }
textarea { width: 100%; padding: 12px; border-radius: var(--r-ctl); background: var(--control); color: var(--text);
  border: 1px solid var(--edge-hi); font: inherit; outline: none; resize: vertical; }
.lang { min-width: 44px; font-weight: 600; }

/* Шапка: колокольчик, счётчики, всплывающие меню */
.count { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px;
  background: var(--link); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; text-transform: none; }
.bellbox { position: relative; }
.bell { position: relative; }
.bell .count { position: absolute; top: 12px; right: -2px; }
.npop { position: absolute; right: 0; top: 100%; width: 350px; max-height: 460px; overflow-y: auto; z-index: 30; padding: 0; margin: 0;
  background: var(--panel); border: 1px solid var(--edge-hi); border-radius: 0 0 var(--r-panel) var(--r-panel); box-shadow: 0 14px 34px rgba(0,0,0,.5);
  text-transform: none; letter-spacing: 0; font-size: 14px; }
#npop > .small, #npop > .msg { padding: 14px; display: block; }
.nhead { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--edge); }
.nhead b { color: var(--accent); font-weight: 600; font-size: 16px; }
.nitem { display: block; padding: 10px 14px; color: var(--subtle); border-top: 1px solid var(--edge); }
.nhead + .nitem { border-top: 0; }
.nitem:hover { background: var(--raised); color: var(--text); text-decoration: none; }
.nitem.unread { color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.btn.mini { height: 24px; padding: 0 8px; font-size: 12.5px; }
.upop { width: 380px; }
.ptabs { display: flex; border-bottom: 1px solid var(--edge); padding: 0 12px; }
.ptabs span { padding: 10px 6px; font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.ucard { display: flex; gap: 14px; align-items: center; padding: 14px; border-bottom: 1px solid var(--edge); color: var(--text); }
.ucard:hover { text-decoration: none; color: var(--text); background: var(--raised); }
.ucard .avatar { width: 64px; height: 64px; font-size: 28px; }
.ucard > span { display: flex; flex-direction: column; line-height: 1.35; }
.ucard b { font-size: 17px; }
.urole { font-size: 13.5px; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 6px; }
.mitem { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--subtle); font: inherit; text-align: left; cursor: pointer; text-decoration: none; }
.mitem:hover, .mitem:focus { background: var(--raised); color: var(--text); text-decoration: none; }
.upop > .mitem { margin: 6px; width: calc(100% - 12px); }
.mitem.danger { color: var(--subtle); }
.msep { height: 1px; background: var(--edge); margin: 0 14px; }

/* Шторка-меню на телефоне */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.drawer[hidden] { display: none; }
.drawer-in { width: min(320px, 80vw); height: 100%; background: var(--panel); overflow-y: auto; display: flex; flex-direction: column; }
.drawer-h { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; font-size: 22px; color: var(--muted); }
.drawer-x { border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; }
.ditem { display: flex; align-items: center; gap: 10px; padding: 13px 16px; color: var(--text); font: 500 17px var(--f-head); border: 0; background: none; text-align: left; cursor: pointer; }
.ditem .ni { width: 18px; height: 18px; }
.ditem:hover { text-decoration: none; color: var(--text); background: var(--raised); }
.ditem.on { color: var(--link); }
#dlang { margin-top: auto; border-top: 1px solid var(--edge); color: var(--muted); font-size: 15px; }

/* Профиль */
.ulink { color: var(--name); font-weight: 600; }
.ulink:hover { filter: brightness(1.25); }
img.avatar { object-fit: cover; display: block; padding: 0; }
.avrow { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.avrow .btn { cursor: pointer; }
.avatar.big { width: 110px; height: 110px; font-size: 46px; border-radius: 50%; }
.avatar { flex: none; } /* в строке с кнопками на узком экране аватарка не сжимается в овал (03.11) */
.pgrid { display: grid; grid-template-columns: 330px 1fr; gap: 22px; align-items: start; }
.pgrid > div > .sheet:first-child, .pgrid > .sheet { margin-top: 12px; }
.wpost { display: flex; gap: 12px; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r-group); padding: 12px 14px; }
.wpost .grow { flex: 1; min-width: 0; }
.post.staff { border-color: rgba(255, 94, 14, .35); }
.qr { width: 200px; height: 200px; background: #fff; border-radius: var(--r-ctl); padding: 6px; margin: 8px 0 12px; }
.qr svg { width: 100%; height: 100%; display: block; }

@media (max-width: 1100px) {
  .fl2 { grid-template-columns: 1fr; }
  .nlast { width: 220px; }
  .stats.on-tiles, #stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .hero, .wrap2, .cards, .stats, .stats.on-tiles, #stats { grid-template-columns: 1fr; }
  .on-hbar { grid-template-columns: 96px 1fr auto; }
  .top-in { padding: 0 8px 0 4px; gap: 4px; height: 56px; }
  .burger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 46px; height: 46px; padding: 0 10px; border: 0; background: none; cursor: pointer; }
  .burger span { display: block; height: 3px; border-radius: 2px; background: var(--text); }
  #nav .tab { display: none; }
  #nav .btn { padding: 0 9px; }
  #nav .btn.user .uname { display: none; }
  #nav .btn.user .mini-av { width: 30px; height: 30px; }
  #nav .btn.primary { padding: 0 12px; height: 32px; font-size: 13px; }
  .logoband { padding: 40px 12px 34px; }
  #banners { padding: 0 14px 4px; }
  .banner { padding: 8px 12px; font-size: 14px; }
  .banner .bdate { display: none; }
  main { padding: 10px 14px 44px; }
  .mast .lead { font-size: 15.5px; }
  .mast-btns .btn { flex: 1 1 auto; }
  .sheet { padding: 22px 14px 14px; }
  .sheet > h2, .sheet > .legend { left: 8px; }
  .cat { padding: 22px 10px 10px; }
  .node { flex-wrap: wrap; padding: 14px; gap: 6px 12px; align-items: flex-start; }
  .node .grow { flex: 1 1 calc(100% - 60px); }
  .node .ndesc { display: none; }
  .node .nmob { display: block; }
  .node .nlast { width: 100%; padding-left: 56px; }
  .node .nlast .avatar { display: none; }
  .hide-sm { display: none; }
  .post { grid-template-columns: 1fr; }
  .pauthor { flex-direction: row; text-align: left; border-right: 0; border-bottom: 1px solid var(--edge); padding: 10px 14px; }
  .pauthor .avatar { width: 44px; height: 44px; font-size: 19px; }
  .pbody { padding: 12px 14px 14px; }
  .frow { padding: 12px 14px; gap: 10px; }
  .frow .flast { width: 104px; }
  .pgrid { grid-template-columns: 1fr; }
  .npop { position: fixed; left: 8px; right: 8px; top: 56px; width: auto; border-radius: var(--r-panel); }
  .mgrid { grid-template-columns: 1fr 1fr; }
  .foot-in { grid-template-columns: 1fr; text-align: left; padding: 18px 16px; }
  .foot-m { text-align: left; }
  .foot-r { justify-content: flex-start; }
}

/* ---------- чат (шаутбокс) и «Сейчас на сайте» ---------- */
.shoutgrid { display: grid; grid-template-columns: 1fr 340px; gap: 22px; margin: 0 0 16px; align-items: stretch; }
.shoutbox { display: flex; flex-direction: column; min-width: 0; padding-top: 22px; }
.shoutbox h2 .small { text-transform: none; color: var(--bad); }
.shoutlist { height: 330px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; margin-bottom: 12px;
  scrollbar-width: thin; scrollbar-color: var(--edge-hi) transparent; }
.shout { display: flex; gap: 8px; align-items: flex-start; padding: 4px 2px; }
.shout .shav .avatar { width: 26px; height: 26px; font-size: 12px; }
.shout .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.45; padding-top: 2px; position: relative; padding-right: 22px; font-size: 15px; }
.shout .at { border: 0; background: none; color: var(--label); font: 500 15px var(--f-head); padding: 0 4px 0 0; cursor: pointer; }
.shout .at:hover { color: var(--accent); }
.shout .who { font-weight: 600; }
.shout .sep { color: var(--muted); margin-right: 4px; }
.shout .stext { font-weight: 400; }
.shout .when { color: var(--label); font-size: 12.5px; white-space: nowrap; margin-left: 4px; }
.shout.sys .stext { color: var(--muted); font-style: italic; } /* системная строка: мут, бан, очистка */
.shout .sdel { position: absolute; right: 0; top: 2px; border: 0; background: none; color: var(--muted); cursor: pointer; opacity: 0; font-size: 12px; }
.shout:hover .sdel { opacity: 1; }
.shout .sdel:hover { color: var(--bad); }
.shout .sdm { color: var(--label); margin-left: 5px; font-size: 13px; text-decoration: none; }
.shout .sdm:hover { color: var(--accent); }

/* Личные сообщения (06.11): слева диалоги, справа переписка; на телефоне — что-то одно. */
.pmgrid { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: stretch; }
.pmgrid > * { min-width: 0; margin-top: 0; }
.pmlist { padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.pmfind input { width: 100%; }
.pmfind #pmfound:not(:empty) { margin-top: 6px; border-bottom: 1px solid var(--edge); padding-bottom: 6px; }
.pmrows { display: flex; flex-direction: column; gap: 2px; max-height: 560px; overflow-y: auto; }
.pmrow { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: var(--r-ctl); color: var(--text); text-decoration: none; }
.pmrow:hover { background: var(--raised); }
.pmrow.on { background: var(--raised-hover); box-shadow: inset 2px 0 0 var(--accent); }
.pmrow .avatar { width: 34px; height: 34px; font-size: 14px; flex: none; }
.pmrow .grow { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pmrow .pmname { display: flex; justify-content: space-between; gap: 8px; }
.pmrow.unread .ell { color: var(--text); }
.pmrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.pmconv { display: flex; flex-direction: column; padding: 14px 16px; min-height: 480px; }
.pmhint { margin: auto; text-align: center; }
.pmhead { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--edge); }
.pmhead .avatar { width: 32px; height: 32px; font-size: 14px; }
.pmhead .pmback { display: none; }
.pmmsgs { flex: none; height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 12px 4px; }
.pmmsg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; }
.pmmsg.mine { align-self: flex-end; }
.pmmsg .avatar { width: 26px; height: 26px; font-size: 12px; }
.pmb { background: var(--raised); border: 1px solid var(--edge); border-radius: 8px; padding: 7px 11px 5px; min-width: 0; }
.pmmsg.mine .pmb { background: var(--accent-soft); border-color: rgba(255, 94, 14, 0.35); }
.pmtext { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.45; }
.pmb .when { color: var(--label); font-size: 12px; text-align: right; margin-top: 2px; }
.pmform { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--edge); padding-top: 12px; }
.pmform textarea { flex: 1; resize: vertical; min-height: 42px; }
.pmform .btn { height: 42px; padding: 0 18px; }
#pmm .msg { margin: 10px 0 0; }
@media (max-width: 820px) {
  .pmgrid { grid-template-columns: 1fr; }
  .pmgrid.open .pmlist, .pmgrid:not(.open) .pmconv { display: none; }
  .pmhead .pmback { display: inline-flex; }
  .pmconv { min-height: 0; }
  .pmmsgs { height: 45vh; }
  .pmmsg { max-width: 90%; }
}
.mention { color: var(--link); font-weight: 600; }
.mention.me { background: rgba(236, 31, 90, .14); border-radius: 3px; padding: 0 3px; }
.shoutform { display: flex; gap: 8px; }
.shoutform input { flex: 1; }
.shoutform .btn { height: 38px; padding: 0 18px; }
.shoutbox #shm .msg { margin: 10px 0 0; }
.onlinebox { display: flex; flex-direction: column; padding-top: 22px; }
.onlinelist { line-height: 1.5; font-weight: 500; flex: 1; font-size: 14px; }
.onlinetotal { border-top: 1px solid var(--edge); padding-top: 10px; margin-top: 12px; }
/* Цвета ников по ролям: тестеры — фиолетовые, админы — оранжевые, кодер — чёрный в белом свечении (как цветные группы на форумах). */
.r-admin { color: var(--accent-hi); }
/* Кодер — над админами (03.11). Влад 06.11: «чёрный с белыми тенями», потом «снеси анимацию, оставь только белое
   свечение»: чёрные буквы в ровном белом свечении, без анимации. */
.r-coder, #nav .uname.r-coder, .row .value.r-coder, .shout .who.r-coder {
  color: #050505; -webkit-text-fill-color: #050505; font-weight: 700;
  text-shadow: 0 0 1px #fff, 0 0 3px #fff, 0 0 7px rgba(255,255,255,.75), 0 0 14px rgba(255,255,255,.35);
}
.r-junior { color: #ffb020; }
.r-tester { color: var(--name); }
a.r-admin, a.r-junior, a.r-tester, a.r-coder { text-decoration: none; }
/* Ник в шапке и в строке «Аккаунт» — тоже цветом роли (их собственные правила сильнее). */
#nav .uname.r-admin, .row .value.r-admin { color: var(--accent-hi); }
#nav .uname.r-junior, .row .value.r-junior { color: #ffb020; }
#nav .uname.r-tester, .row .value.r-tester { color: var(--name); }
a.r-admin:hover, a.r-junior:hover, a.r-tester:hover, a.r-coder:hover { text-decoration: underline; }
@media (max-width: 820px) {
  .shoutgrid { grid-template-columns: 1fr; }
  .shoutlist { height: 300px; }
}

/* Архив в админ-панели (03.11): решённые заявки, отработанные ключи, закрытые обращения — свёрнуты под таблицей. */
details.archive { margin: 8px 0 16px; }
details.archive > summary { cursor: pointer; color: var(--muted); font-size: 14px; padding: 6px 2px; list-style: none; user-select: none; }
details.archive > summary::before { content: "▸ "; }
details.archive[open] > summary::before { content: "▾ "; }
details.archive > summary:hover { color: var(--text); }
details.archive[open] .tablebox, details.archive[open] .ftable { opacity: .8; }

/* ================= Сезон: Хэллоуин (index.html → <html data-season="halloween">) ================= */
[data-season="halloween"] {
  --neon-a: #ffd84a;
  --neon-b: #ff7b1c;
  --glow: rgba(255, 123, 28, 0.5);
  --shine: linear-gradient(90deg, #ff7b1c, #ffd84a, #ff3e8a, #a35cff, #ff9a3c, #ff7b1c);
}
[data-season="halloween"] .backdrop {
  background:
    radial-gradient(ellipse 70% 45% at 50% -8%, rgba(255,123,28,.22), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(163,92,255,.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(255,62,138,.08), transparent 70%),
    linear-gradient(180deg, rgba(12,12,11,.82), rgba(12,12,11,.95) 55%, var(--bg)),
    url(bg.jpg) center top/cover no-repeat;
}
[data-season="halloween"] .mega {
  text-shadow: -3px 0 0 rgba(163,92,255,.75), 3px 0 0 rgba(255,123,28,.85), 0 0 18px rgba(255,123,28,.7), 0 0 48px rgba(255,123,28,.45);
}
[data-season="halloween"] .btn.primary, [data-season="halloween"] #nav .btn.primary {
  background: linear-gradient(180deg, #ffa24a, #e2601a); color: #1a0b02;
}
[data-season="halloween"] .avatar:not(img) { background: linear-gradient(180deg, #ffa24a, #c24d12); color: #1a0b02; }

.sp { position: absolute; display: block; opacity: .55; transform: translate(-50%, -50%) rotate(var(--r));
  animation: float 9s ease-in-out infinite; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.sp svg { width: 100%; height: auto; display: block; }
.sp-pumpkin { opacity: .7; filter: drop-shadow(0 0 16px rgba(255,123,28,.35)); }
.sp-ghost { opacity: .45; animation-duration: 7s; }
.sp-bat { opacity: .8; animation: flap 3.2s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--r)); }
  50% { transform: translate(-50%, calc(-50% - 16px)) rotate(calc(var(--r) + 5deg)); }
}
@keyframes flap {
  0%, 100% { transform: translate(-50%, -50%) rotate(var(--r)) scaleY(1); }
  50% { transform: translate(calc(-50% + 18px), calc(-50% - 10px)) rotate(var(--r)) scaleY(.7); }
}
@media (max-width: 820px) {
  .sp { opacity: .3; width: 44px !important; }
  .sp:nth-child(n + 9) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
[hidden] { display: none !important; }


/* Темы «Классика» и «Фурри» живут со своей шапкой: маленький логотип слева, без большого логотипа под шапкой. */
[data-theme="classic"] .logoband, [data-theme="furry"] .logoband { display: none; }
[data-theme="classic"] .brand, [data-theme="furry"] .brand { display: flex; }
[data-theme="classic"] .mast .mega, [data-theme="furry"] .mast .mega { display: block; }
[data-theme="classic"] #nav .tab::after, [data-theme="furry"] #nav .tab::after { display: none; }
[data-theme="classic"] .fl2 { grid-template-columns: 1fr; } /* у «Классики» узкая колонка — боковые блоки уходят вниз */

/* Вложения бага из игры (страница обращения, site/profile.js attachments) */
.attach figure.shot { margin: 0 0 12px; }
.attach figure.shot img { display: block; max-width: 100%; max-height: 420px; border-radius: 6px; border: 1px solid var(--edge); background: #000; cursor: zoom-in; }
.attach figure.shot figcaption { margin-top: 6px; }
.attach details { margin: 8px 0; }
.attach summary { cursor: pointer; font-weight: 600; }
/* «Реплей партии» — кнопка как «Закрыть обращение» (.btn), рядом размер и подсказка */
.attach .replay { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 8px 0 12px; }
.attach .replay .btn.busy { opacity: .6; cursor: progress; }
/* Снимки к обращению с сайта (15.11): под сообщением и выбор в форме (site/profile.js shotPicker) */
.mshots { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 10px; }
.mshots figure.shot { margin: 0; }
.mshots figure.shot img { max-height: 260px; }
.shotpick { margin: 10px 0 16px; }
.shotrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.shotthumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.shotthumbs:not(:empty) { margin-top: 10px; }
.shotthumb { position: relative; }
.shotthumb img { display: block; height: 84px; max-width: 160px; object-fit: cover; border-radius: 6px; border: 1px solid var(--edge); }
.shotthumb .btn { position: absolute; top: 4px; right: 4px; }
.attach pre { white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; margin: 8px 0 0; padding: 10px 12px; border-radius: 6px; background: rgba(0,0,0,.25); }

/* Снимок бага из игры в теме форума «Баги» (13.11.2026) */
.ptext img.fshot { display: block; max-width: 100%; max-height: 420px; margin: 12px 0; border-radius: 6px; border: 1px solid var(--edge); background: #000; }
