/* ═══════════════════════════════════════════════════════════════════════════
   IGROUTKA — New Design System
   Fonts: Black Ops One (display) · Manrope (body) — both self-hosted
   Accent: #F25C05 (tangerine, single hue)
   Radius scale: 8 / 14 / 20 px
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS (dark by default) ─────────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:      #0B0B0E;
  --surface: #131318;
  --card:    #17171D;
  --card-2:  #1E1E25;

  /* Borders */
  --border:   #23232C;
  --border-2: #33333F;

  /* Text */
  --text:   #F4F4F0;
  --text-2: #CECDC4;
  --muted:  #8D8D9A;
  --muted-2:#5A5A66;

  /* Accent */
  --accent:       #F25C05;
  --accent-soft:  rgba(242,92,5,.10);
  --accent-line:  rgba(242,92,5,.32);
  --accent-darker:#D94D00;

  /* Semantic */
  --online: #5BB870;

  /* Radius */
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 20px;

  /* Typography */
  --display: "Black Ops One", ui-sans-serif, system-ui, sans-serif;
  --body:    "Manrope", ui-sans-serif, system-ui, sans-serif;

  /* ── Compatibility aliases for common.css / engine.css ── */
  --tt:                    #F4F4F0;
  --tt-2:                  #CECDC4;
  --bg-2:                  #131318;
  --bg-dark:               #0B0B0E;
  --ui-bg:                 #131318;
  --ui-bg-darker:          #17171D;
  --ui-bg-darkest:         #0B0B0E;
  --ui-bdc:                #23232C;
  --ui-bg-accent:          rgba(242,92,5,.10);
  --text-color-on-accent:  #0B0B0E;
  --ui-text-color-on-accent:#0B0B0E;

  /* Legacy tokens kept for engine.css / plugins */
  --yellow:        #F25C05;
  --indent:        28px;
}

/* ── LIGHT THEME ─────────────────────────────────────────────────────────── */
:root[data-theme="light"] {
  --bg:      #FAFAF7;
  --surface: #FFFFFF;
  --card:    #FFFFFF;
  --card-2:  #F2F2EC;
  --border:  #E6E6DF;
  --border-2:#CECEC4;
  --text:    #14141A;
  --text-2:  #3F3F45;
  --muted:   #6F6F76;
  --muted-2: #9A9AA0;
  --accent-soft: rgba(242,92,5,.08);
  --accent-line: rgba(242,92,5,.36);

  /* Aliases */
  --tt:           #14141A;
  --tt-2:         #3F3F45;
  --bg-2:         #FFFFFF;
  --ui-bg:        #FFFFFF;
  --ui-bg-darker: #F2F2EC;
  --ui-bg-darkest:#FAFAF7;
  --ui-bdc:       #E6E6DF;
}

/* ── BASE OVERRIDES (augment common.css) ─────────────────────────────────── */
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  font-feature-settings: "ss01","cv11";
  background: var(--bg);
  color: var(--text);
}

h1,h2,h3,h4,h5 {
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -.01em;
  line-height: 1.1;
}

a { color: inherit; text-decoration: none; }

/* ── SVG ICON ─────────────────────────────────────────────────────────────── */
.icon {
  display: inline-block;
  width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
.icon-sm { width: 14px; height: 14px; }
.icon-lg { width: 22px; height: 22px; }

/* ── HELPERS ──────────────────────────────────────────────────────────────── */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 290;
  display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════════════════ */
#sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 264px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  z-index: 300;
  transform: translateX(-100%);
  transition: transform .32s cubic-bezier(.2,0,0,1);
  display: flex; flex-direction: column;
  overflow-y: auto;
}
#sidebar.open { transform: translateX(0); }
#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

#sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 299;
  opacity: 0; pointer-events: none;
  transition: opacity .32s cubic-bezier(.2,0,0,1);
}
#sidebar-backdrop.open { opacity: 1; pointer-events: auto; }

.sb-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0;
  background: var(--surface); z-index: 1;
}
.sb-close {
  width: 32px; height: 32px;
  border-radius: var(--r-s);
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  cursor: pointer; border: 0;
}
.sb-close:hover { background: var(--card); color: var(--text); }

.sb-section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sb-section:last-child { border-bottom: 0; }

.sb-title {
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  text-transform: uppercase; letter-spacing: .12em;
  color: var(--muted);
  padding: 0 22px 8px;
}

.sb-item {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 22px;
  color: var(--text-2);
  font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
}
.sb-item:hover { background: var(--card); color: var(--text); }
.sb-item.active {
  background: var(--accent-soft); color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}
.sb-item .icon { color: var(--muted); }
.sb-item.active .icon, .sb-item:hover .icon { color: var(--text); }

.sb-label { flex: 1; }

/* Sidebar footer (mobile-only: theme + auth) */
.sb-footer { display: none; }
.sb-theme-item .icon-sun,
.sb-theme-item .icon-moon { display: none; }
:root[data-theme="dark"]  .sb-theme-item .icon-sun  { display: inline-block; }
:root[data-theme="light"] .sb-theme-item .icon-moon { display: inline-block; }
.sb-footer .sb-item {
  background: transparent !important;
  border: 1px solid var(--accent-line) !important;
  border-radius: var(--r-s);
  color: var(--accent);
  cursor: pointer;
  width: 100%;
  box-shadow: none;
}
.sb-footer .sb-item .icon { color: var(--accent); opacity: 1; }
.sb-footer .sb-item:hover {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
}

.sb-tag {
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent-line);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky; top: 0; z-index: 200;
  height: 64px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(12px);
  -webkit-backdrop-filter: saturate(1.1) blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 var(--indent);
}

.topbar-inner {
  width: 100%; max-width: 1320px;
  margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
}

.logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
  font-family: var(--display);
  font-size: 18px; font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text);
  text-decoration: none;
}
.logo-mark {
  width: 34px; height: 34px;
  border-radius: var(--r-s);
  background: var(--accent); color: #0B0B0E;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark .icon { stroke: #0B0B0E; width: 18px; height: 18px; stroke-width: 2; }
.logo-pro { color: var(--accent); margin-left: 1px; }
/* Hide old logo-icon if present */
.logo-icon { display: none; }

.search-wrap {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-s);
  padding: 0 14px; height: 40px;
  transition: border-color .2s, background .2s;
}
.search-wrap:focus-within {
  border-color: var(--border-2);
  background: var(--card-2);
}
.search-wrap .icon { color: var(--muted); width: 16px; height: 16px; }
.search-wrap input[type="text"],
.search-wrap input[type="search"] {
  flex: 1; background: 0; border: 0; outline: 0;
  color: var(--text); font-size: 14px;
  box-shadow: none; height: auto;
  padding: 0; width: 100%;
}
.search-wrap input::placeholder { color: var(--muted-2); }
/* Hide old search button */
.search-btn { display: none; }

.tb-gap { flex: 1; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-s);
  background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
  flex-shrink: 0;
  cursor: pointer; border: 0;
  position: relative;
}
.icon-btn:hover { background: var(--card); color: var(--text); }
.icon-btn .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent); color: #0B0B0E;
  font-size: 12px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
}
.icon-btn .badge:empty,
.icon-btn .badge[data-zero="true"] { display: none; }

/* Theme toggle: show sun in dark, moon in light */
.theme-toggle .icon-sun,
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"]  .theme-toggle .icon-sun  { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* Auth buttons */
.tbtn {
  padding: 0 16px; height: 40px;
  border-radius: var(--r-s);
  font-family: var(--display);
  font-weight: 400; font-size: 13px; letter-spacing: .02em;
  display: inline-flex; align-items: center;
  transition: background .15s, color .15s, transform .12s;
  white-space: nowrap; text-decoration: none; border: 0; cursor: pointer;
}
.tbtn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--border);
}
.tbtn-ghost:hover { background: var(--card); color: var(--text); }
.tbtn-primary { background: var(--accent); color: #0B0B0E; }
.tbtn-primary:hover { background: var(--accent-darker); }
.tbtn-primary:active { transform: translateY(1px); }

/* Topbar hot-menu buttons (favorites/history) */
.topbar-right { display: contents; }
.hot-menu {
  position: relative;
}
.hot-menu .hm { display: none; }

/* ═══════════════════════════════════════════════════════════════════════════
   NAV TABS
   ═══════════════════════════════════════════════════════════════════════════ */
.navtabs {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.navtabs::-webkit-scrollbar { display: none; }

.navtabs-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--indent);
  display: flex;
}

.ntab {
  padding: 13px 16px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.ntab:first-child { padding-left: 0; }
.ntab:hover { color: var(--text); }
.ntab.on,
.ntab.active { color: var(--text); border-bottom-color: var(--accent); }
.ntab svg { display: none; }

.ntab--all {
  margin-left: auto;
  align-self: center;
  padding: 5px 14px;
  border: 1px solid var(--accent-line);
  border-bottom-color: var(--accent-line);
  border-radius: 100px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
}
.ntab--all:hover {
  background: rgba(242,92,5,.16);
  border-color: var(--accent);
  color: var(--accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE WRAPPER
   ═══════════════════════════════════════════════════════════════════════════ */
.page,
.page-wrap {
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px var(--indent) 96px;
}

/* ── Breadcrumbs ─────────────────────────────────────────────────────────── */
.crumbs {
  max-width: 1320px;
  margin: 0 auto;
  padding: 16px var(--indent) 0;
}
.crumbs ol {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  list-style: none; font-size: 13px; color: var(--muted);
}
.crumbs li { display: inline-flex; align-items: center; gap: 10px; }
.crumbs li:not(:last-child)::after {
  content: "/"; color: var(--muted-2); font-size: 12px;
}
.crumbs a { color: var(--muted); transition: color .15s; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current="page"] { color: var(--text); font-weight: 500; }

/* ── Speedbar (DLE native) ───────────────────────────────────────────────── */
.speedbar {
  font-size: 13px; color: var(--muted);
  padding: 16px 0 0;
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.speedbar a { color: var(--muted); transition: color .15s; }
.speedbar a:hover { color: var(--text); }
.speedbar svg { color: var(--muted); }

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════════════════════════════════ */
.section,
.sect { margin-bottom: 48px; }

.sec-hd {
  display: flex; align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px; gap: 16px;
}
.sec-hd h2,
.sect__title {
  font-size: 22px; font-weight: 400;
  letter-spacing: -.01em;
  font-family: var(--display);
  color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.sec-hd h2 .icon { color: var(--accent); width: 20px; height: 20px; flex-shrink: 0; }
.sec-meta {
  font-family: var(--display);
  font-size: 12px; font-weight: 400; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  margin-left: 12px;
}
.more-link {
  font-size: 13px; font-weight: 500;
  color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  transition: color .15s; text-decoration: none;
}
.more-link:hover { color: var(--text); }
.more-link .icon { width: 14px; height: 14px; }

/* ═══════════════════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════════════════ */
.hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-main {
  position: relative;
  border-radius: var(--r-l); overflow: hidden;
  background: var(--card); border: 1px solid var(--border);
  min-height: 300px; display: flex;
}

.hero-art {
  position: absolute; inset: 0;
  background: var(--card-2);
}
.hero-art img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.hero-art::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--bg) 78%, transparent) 0%,
    color-mix(in srgb, var(--bg) 0%,  transparent) 60%);
  pointer-events: none;
}

.hero-body {
  position: relative; z-index: 1;
  padding: 32px 36px;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  max-width: 540px;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display);
  font-size: 12px; font-weight: 400; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.hero-eyebrow .live {
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--online);
}

.hero h1,
.hero-title {
  font-size: 38px; font-weight: 400;
  letter-spacing: -.015em;
  margin-bottom: 12px;
  font-family: var(--display);
  color: var(--text);
}

.hero-sub {
  color: var(--text-2); font-size: 14px;
  max-width: 420px; margin-bottom: 22px;
  line-height: 1.6;
}

.hero-acts { display: flex; gap: 10px; align-items: center; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; height: 46px;
  border-radius: var(--r-s);
  background: var(--accent); color: #0B0B0E;
  font-family: var(--display);
  font-weight: 400; font-size: 14px; letter-spacing: .02em;
  transition: background .15s, transform .12s;
  border: 0; cursor: pointer; text-decoration: none;
}
.btn-primary:hover { background: var(--accent-darker); color: #0B0B0E; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .icon { color: #0B0B0E; width: 16px; height: 16px; stroke-width: 2.2; }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 18px; height: 46px;
  border-radius: var(--r-s);
  background: transparent; color: var(--text);
  border: 1px solid var(--border-2);
  font-family: var(--display);
  font-weight: 400; font-size: 14px;
  transition: background .15s, border-color .15s;
  cursor: pointer; text-decoration: none;
}
.btn-secondary:hover { background: var(--card); border-color: var(--muted); color: var(--text); }

/* Hero side promos */
.hero-side {
  display: flex; flex-direction: column; gap: 14px;
}
.promo {
  flex: 1;
  border-radius: var(--r-m); padding: 20px;
  background: var(--card); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  justify-content: space-between;
  transition: border-color .15s, background .15s;
  text-decoration: none; color: var(--text);
}
.promo:hover { border-color: var(--border-2); background: var(--card-2); }
.promo-eyebrow {
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.promo h3 {
  font-size: 17px; font-weight: 400;
  letter-spacing: -.01em; line-height: 1.25;
  font-family: var(--display);
}
.promo-meta { font-size: 13px; color: var(--muted); margin-top: 6px; }
.promo-cta {
  align-self: flex-start; margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-weight: 400; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid var(--accent-line);
  padding-bottom: 2px;
  transition: color .15s, border-color .15s;
}
.promo-cta:hover { color: var(--accent-darker); border-color: var(--accent-darker); }

/* ═══════════════════════════════════════════════════════════════════════════
   GAME CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
/* Continue playing strip */
.continue-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.continue-strip::-webkit-scrollbar { display: none; }
.cs-item {
  flex: 0 0 100px;
  width: 100px;
  height: 100px;
  border-radius: var(--r-m);
  overflow: hidden;
  position: relative;
  display: block;
  background: var(--card-2);
  transition: transform .18s cubic-bezier(.2,0,0,1);
}
.cs-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.cs-item:hover { transform: translateY(-3px); }
.cs-overlay {
  position: absolute; inset: 0;
  background: rgba(11,11,14,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.cs-item:hover .cs-overlay { opacity: 1; }
.cs-overlay svg { fill: var(--accent); stroke: none; opacity: .9; }

.game-grid { display: grid; gap: 14px; }
.gg-8  { grid-template-columns: repeat(8, minmax(0,1fr)); }
.gg-6  { grid-template-columns: repeat(6, minmax(0,1fr)); }
.gg-4  { grid-template-columns: repeat(4, minmax(0,1fr)); }

/*
  DLE content wrapper — НИКОГДА не ставить id="dle-content" на .game-grid.
  Правильная вложенность: <div class="game-grid"><div id="dle-content">{content}</div></div>
  display:contents делает враппер прозрачным: .gcard-и становятся прямыми детьми грида.
*/
#dle-content { display: contents; }

.gcard {
  display: flex; flex-direction: column; gap: 8px;
  position: relative; min-width: 0;
}

.gcard-thumb {
  display: block; width: 100%; height: 0; padding-bottom: 100%;
  border-radius: var(--r-m); overflow: hidden;
  background: var(--card-2); position: relative;
  transition: transform .18s cubic-bezier(.2,0,0,1);
}
.gcard-thumb img,
.gcard-thumb > span,
.gcard-thumb > span img {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.gcard:hover .gcard-thumb { transform: translateY(-3px); }

/* Overlay on hover */
.gcard-overlay {
  position: absolute; inset: 0;
  background: rgba(11,11,14,.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .18s;
}
.gcard:hover .gcard-overlay { opacity: 1; }
.gcard-overlay svg {
  width: 40px; height: 32px;
  fill: var(--accent); stroke: none;
  opacity: .9;
}

/* Badge */
.gbadge,
[data-label]::after {
  position: absolute; top: 8px; left: 8px;
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  letter-spacing: .10em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 5px;
  background: #0B0B0E; color: var(--text);
  border: 1px solid var(--border-2);
  pointer-events: none;
}
.gcard-thumb[data-label]::after { content: attr(data-label); }

/* Rating badge */
.gcard-rating-badge {
  position: absolute; bottom: 8px; right: 8px;
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  padding: 3px 7px; border-radius: 5px;
  background: rgba(11,11,14,.7); color: var(--text);
  border: 1px solid var(--border);
}

/* Card info */
.gcard-info { padding: 0 2px; overflow: hidden; min-width: 0; }
.gcard-name {
  font-family: var(--body);
  font-size: 13px; font-weight: 600;
  color: var(--text);
  letter-spacing: 0; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: block; text-decoration: none;
}
.gcard-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 4px; font-size: 12px; color: var(--muted);
}
.gcard-stat {
  display: inline-flex; align-items: center; gap: 3px;
}
.gcard-stat .icon { color: var(--accent); opacity: .8; }

/* Progress bar (continue playing) */
.gprog {
  height: 2px; background: var(--border);
  margin-top: 6px; border-radius: 1px; overflow: hidden;
}
.gprog i { display: block; height: 100%; background: var(--accent); }

/* Desktop-only badge */
.desk-only {
  position: absolute; bottom: 8px; left: 8px;
  font-size: 12px; color: var(--muted);
  background: rgba(11,11,14,.75);
  border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 7px;
  display: flex; align-items: center; gap: 4px;
}
.desk-only-svg { width: 12px; height: 12px; vertical-align: middle; }

/* Grid-item compatibility (old class) */
.grid-item { }

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORIES
   ═══════════════════════════════════════════════════════════════════════════ */
.cat-row { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }

.catcard {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--border);
  transition: background .15s, border-color .15s, transform .15s;
  text-decoration: none; color: var(--text);
}
.catcard:hover {
  background: var(--card-2); border-color: var(--border-2);
  transform: translateY(-2px);
}
.catcard-ico {
  width: 40px; height: 40px;
  border-radius: var(--r-s);
  background: var(--card-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background .15s, color .15s;
}
.catcard:hover .catcard-ico { background: var(--accent); color: #0B0B0E; }
.catcard-ico .icon { width: 20px; height: 20px; stroke-width: 1.6; }
.catcard-name {
  font-family: var(--display);
  font-size: 13px; font-weight: 400;
  letter-spacing: .01em; color: var(--text);
}
.catcard-count { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════════════════════
   TOP LIST
   ═══════════════════════════════════════════════════════════════════════════ */
.toplist { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; counter-reset: toprank; }
.topitem { counter-increment: toprank; }
.topnum::before { content: counter(toprank); }

.topitem {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
  text-decoration: none; color: var(--text);
}
.topitem:hover { background: var(--card-2); border-color: var(--border-2); }

.topnum {
  font-family: var(--display);
  font-size: 28px; font-weight: 400; letter-spacing: -.02em;
  color: var(--muted-2); width: 40px; text-align: center; line-height: 1;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.topitem:nth-child(-n+3) .topnum { color: var(--accent); }

.topthumb {
  width: 48px; height: 48px;
  border-radius: var(--r-s); overflow: hidden;
  flex-shrink: 0; background: var(--card-2);
}
.topthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.topbody { flex: 1; min-width: 0; }
.topname {
  font-family: var(--body);
  font-size: 14px; font-weight: 600; color: var(--text);
  letter-spacing: 0; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topmeta {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  display: flex; align-items: center; gap: 6px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CATEGORY TABS (main-tabs.tpl)
   ═══════════════════════════════════════════════════════════════════════════ */
.sect-categories { margin-bottom: 36px; }

.sect-categories__tabs {
  display: flex; gap: 4px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.sect-categories__tabs-item {
  padding: 7px 14px;
  border-radius: var(--r-s);
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  background: var(--card); border: 1px solid var(--border);
  cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.sect-categories__tabs-item:hover { color: var(--text); background: var(--card-2); }
.sect-categories__tabs-item.active {
  color: var(--text); background: var(--accent-soft);
  border-color: var(--accent-line);
}

.sect-categories__boxes-item {
  display: none;
}
.sect-categories__boxes-item.visible {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 20px;
  align-items: flex-start;
}

/* ─── BUBBLE ITEMS ─── */
.bubble-item {
  width: 74px; height: 74px;
  border-radius: 50%;
  overflow: hidden;
  display: block; flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  animation: bubble-drift 5s ease-in-out infinite;
  will-change: transform;
}
.bubble-item img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  pointer-events: none;
}
.bubble-item:hover {
  animation-play-state: paused;
  filter: brightness(1.12) drop-shadow(0 0 10px rgba(242,92,5,.55));
}

@keyframes bubble-drift {
  0%   { transform: translate(0,    0);    }
  20%  { transform: translate( 4px, -10px); }
  45%  { transform: translate(-5px, -16px); }
  65%  { transform: translate( 7px,  -8px); }
  85%  { transform: translate(-3px, -12px); }
  100% { transform: translate(0,    0);    }
}

/* Stagger via prime-number nth-child — creates maximum variety */
.bubble-item:nth-child(2n)  { animation-delay: -0.9s;  animation-duration: 5.4s; }
.bubble-item:nth-child(3n)  { animation-delay: -1.8s;  animation-duration: 4.7s; }
.bubble-item:nth-child(5n)  { animation-delay: -2.7s;  animation-duration: 6.1s; }
.bubble-item:nth-child(7n)  { animation-delay: -0.5s;  animation-duration: 5.8s; }
.bubble-item:nth-child(11n) { animation-delay: -3.3s;  animation-duration: 4.3s; }
.bubble-item:nth-child(13n) { animation-delay: -1.4s;  animation-duration: 6.6s; }
.bubble-item:nth-child(17n) { animation-delay: -4.1s;  animation-duration: 5.0s; }

/* Loading spinner */
.lds-facebook {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 32px; grid-column: 1/-1;
}
.lds-facebook div {
  width: 10px; height: 10px;
  border-radius: 50%; background: var(--accent);
  animation: lds-fb .6s alternate infinite;
}
.lds-facebook div:nth-child(2) { animation-delay: .2s; }
.lds-facebook div:nth-child(3) { animation-delay: .4s; }
@keyframes lds-fb { to { opacity: .2; transform: scale(.7); } }

/* ═══════════════════════════════════════════════════════════════════════════
   SEO DESCRIPTION BLOCKS
   ═══════════════════════════════════════════════════════════════════════════ */
.descr {
  border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--border);
  padding: 24px 28px;
  margin-bottom: 32px;
}
.descr h1 { font-size: 22px; font-weight: 700; margin-bottom: 14px; }
.descr h2 {
  font-size: 18px; font-weight: 600; line-height: 1.3;
  margin: 20px 0 10px;
  padding-left: 12px; border-left: 3px solid var(--accent);
}
.descr h3 { font-size: 16px; font-weight: 600; margin: 16px 0 8px; }
.descr h4 {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--muted); margin: 14px 0 6px;
}
.descr p { font-size: 14px; line-height: 1.75; color: var(--text-2); margin-bottom: 10px; }
.descr ul, .descr ol { padding-left: 0; margin: 8px 0 14px; }
.descr ul { list-style: none; }
.descr ul li {
  font-size: 14px; line-height: 1.7; color: var(--text-2);
  padding-left: 18px; position: relative; margin-bottom: 4px;
}
.descr ul li::before {
  content: ''; position: absolute; left: 4px; top: 9px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0.75;
}
.descr ol { list-style: none; counter-reset: descr-ol; }
.descr ol li {
  font-size: 14px; line-height: 1.7; color: var(--text-2);
  padding-left: 30px; position: relative; margin-bottom: 6px;
  counter-increment: descr-ol;
}
.descr ol li::before {
  content: counter(descr-ol);
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; line-height: 20px; text-align: center;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 12px; font-weight: 700;
}
.descr--top { margin-bottom: 24px; }
.descr--btm { margin-top: 40px; }

.descr__text { position: relative; }
.descr__text.not-active { max-height: 120px; overflow: hidden; }
.descr__text.not-active::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 70px;
  background: linear-gradient(to bottom, transparent, var(--card));
  pointer-events: none;
}
.descr__btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent); font-size: 13px; font-weight: 500;
  cursor: pointer; margin-top: 14px; padding: 6px 16px;
  border: 1px solid var(--accent); border-radius: 20px;
  background: transparent;
  transition: background .15s, color .15s;
  user-select: none;
}
.descr__btn:hover { background: var(--accent); color: #fff; }
.descr__btn .icon { width: 16px; height: 16px; transition: transform .25s; flex-shrink: 0; }
.descr__btn.open .icon { transform: rotate(180deg); }

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION (navigation.tpl)
   ═══════════════════════════════════════════════════════════════════════════ */
.navigation, .navi, .navi-bottom {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px;
  margin: 32px 0 0;
}
.navi a, .navi span,
.navigation a, .navigation span {
  display: flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 10px;
  border-radius: var(--r-s);
  font-size: 13px; font-weight: 500;
  background: var(--card); color: var(--muted);
  border: 1px solid var(--border);
  transition: background .15s, color .15s, border-color .15s;
  text-decoration: none;
}
.navi a:hover, .navigation a:hover {
  background: var(--card-2); color: var(--text); border-color: var(--border-2);
}
.navi span.current, .navigation span.current,
.navi a.current, .navigation a.current {
  background: var(--accent); color: #0B0B0E;
  border-color: var(--accent);
}
.pages {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; justify-content: center;
}
.page_next-prev { display: flex; gap: 4px; }
.pages span:not(.nav_ext) {
  background: var(--accent); color: #0B0B0E; border-color: var(--accent);
}
.game-grid .navigation,
.game-grid .navi,
.game-grid .navi-bottom { grid-column: 1 / -1; }
.nav-icon { fill: currentColor; stroke: none; width: 12px; height: 12px; }

/* ═══════════════════════════════════════════════════════════════════════════
   INFO MESSAGES (DLE {info})
   ═══════════════════════════════════════════════════════════════════════════ */
.info_block {
  padding: 14px 20px;
  border-radius: var(--r-s);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--text); font-size: 14px;
  margin-bottom: 20px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEARCH PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.search-page { display: flex; flex-direction: column; gap: 20px; grid-column: 1 / -1; }
.search-page__title { font-size: 1.25rem; font-weight: 700; color: var(--text); }
.searchtable { background: var(--card); border-radius: var(--r-m); overflow: hidden; }
.searchtable input[type="text"],
.searchtable input[type="search"] {
  width: 100%; padding: 14px 16px;
  background: transparent; border: none; outline: none;
  color: var(--text); font-size: 1rem;
  font-family: inherit;
}
.searchtable input[type="submit"],
.searchtable button[type="submit"] {
  padding: 10px 24px;
  background: var(--accent); color: #0B0B0E;
  border: none; border-radius: var(--r-s);
  font-weight: 600; font-size: 0.9rem;
  cursor: pointer; white-space: nowrap;
  font-family: inherit;
}
.searchtable input[type="submit"]:hover,
.searchtable button[type="submit"]:hover { opacity: .88; }
.searchtable form { display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 4px; }
.message-info {
  padding: 14px 20px;
  border-radius: var(--r-s);
  font-size: 14px; color: var(--text-2);
  background: var(--card);
  border: 1px solid var(--border);
  grid-column: 1 / -1;
}
.message-info::before { display: none; }
.message-info--yellow { background: var(--card); border-color: var(--border); }

/* ═══════════════════════════════════════════════════════════════════════════
   FAST SEARCH RESULTS
   ═══════════════════════════════════════════════════════════════════════════ */
#dle_search_result {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  z-index: 400;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  max-height: 400px; overflow-y: auto;
  margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════════════════════════════════════════ */
#pagination { margin: 32px 0 8px; }
.pagination__btn-loader { margin-bottom: 16px; }

/* "Загрузить ещё" button */
.pagination__btn-loader a,
.pagination__btn-loader span {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 32px;
  border-radius: var(--r-s);
  background: var(--card); border: 1px solid var(--border-2);
  color: var(--text-2); font-family: var(--display);
  font-size: 14px; font-weight: 400;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s;
}
.pagination__btn-loader a:hover {
  background: var(--card-2); border-color: var(--muted); color: var(--text);
}

/* Numbered pages */
.pagination__pages {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 4px;
}
.pagination__pages a,
.pagination__pages span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 6px;
  border-radius: var(--r-s);
  font-family: var(--display); font-size: 14px; font-weight: 400;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.pagination__pages a {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-2);
}
.pagination__pages a:hover {
  background: var(--card-2); border-color: var(--border-2); color: var(--text);
}
/* Current page — DLE outputs <span class="npage"> */
.pagination__pages span.npage,
.pagination__pages .npage {
  background: var(--accent); color: #0B0B0E;
  border: 1px solid var(--accent); cursor: default;
}
/* Ellipsis */
.pagination__pages span:not(.npage) {
  background: none; border: none; color: var(--muted);
  min-width: 24px; letter-spacing: .05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
footer,
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 28px;
  margin-top: auto;
}
.footer-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 var(--indent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 36px;
}
.footer-brand p,
.footer-desc {
  font-size: 14px; color: var(--muted);
  margin-top: 12px; line-height: 1.7; max-width: 340px;
}
.footer-col h5,
.footer-col__title {
  font-family: var(--display);
  font-size: 12px; font-weight: 400; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text-2);
  margin-bottom: 12px;
}
.footer-links { list-style: none; }
.footer-col a,
.footer-links a {
  display: block; padding: 4px 0;
  color: var(--muted); font-size: 14px;
  transition: color .15s; text-decoration: none;
}
.footer-col a:hover,
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap; gap: 12px;
}
.footer-socials { display: flex; gap: 8px; }
.fsoc {
  width: 36px; height: 36px;
  border-radius: var(--r-s);
  background: transparent; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  transition: color .15s, border-color .15s; text-decoration: none;
}
.fsoc:hover { color: var(--text); border-color: var(--border-2); }
.footer-age-badge {
  display: inline-block;
  padding: 3px 8px; border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 12px; color: var(--muted);
  margin-top: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DLEPUSH / JGROWL — позиция и тёмная тема
   ═══════════════════════════════════════════════════════════════════════════ */
#DLEPush {
  position: fixed !important;
  bottom: 24px !important; right: 24px !important;
  left: auto !important; top: auto !important;
  z-index: 9999 !important;
}
.DLEPush-notification.wrapper {
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-left: 3px solid #e74c3c !important;
  border-radius: var(--r-m) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.55) !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  max-width: 320px !important;
  color: var(--text) !important;
  font-size: 13px !important; line-height: 1.5 !important;
  font-family: var(--body) !important;
  display: flex !important; align-items: flex-start !important; gap: 10px !important;
}
.DLEPush-message { color: var(--text) !important; flex: 1; }
.DLEPush-header { display: none !important; }
.DLEPush-icon  { display: none !important; }
.DLEPush-close {
  background: none !important; border: none !important;
  color: var(--muted) !important; cursor: pointer !important;
  font-size: 18px !important; line-height: 1 !important;
  padding: 0 !important; flex-shrink: 0 !important;
  order: 2 !important;
}
.DLEPush-close:hover { color: var(--text) !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   JQUERY UI DIALOG — переопределить стили под новый дизайн
   ═══════════════════════════════════════════════════════════════════════════ */
.ui-dialog {
  position: fixed !important;
  background: var(--surface) !important;
  border: 1px solid var(--border-2) !important;
  border-radius: var(--r-l) !important;
  box-shadow: 0 24px 80px rgba(0,0,0,.7) !important;
  padding: 0 !important;
  z-index: 2100 !important;
  max-width: calc(100vw - 32px) !important;
  overflow: hidden !important;
}
.ui-dialog-titlebar {
  background: var(--card) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: var(--r-l) var(--r-l) 0 0 !important;
  padding: 0 20px !important;
  height: 52px !important;
  display: flex !important; align-items: center !important;
}
.ui-dialog-title {
  font-family: var(--display) !important;
  font-size: 16px !important; font-weight: 400 !important;
  color: var(--text) !important; flex: 1 !important;
}
.ui-dialog-titlebar-close {
  background: transparent !important;
  border: 0 !important; outline: 0 !important;
  color: var(--muted) !important;
  cursor: pointer !important;
  width: 32px !important; height: 32px !important;
  border-radius: var(--r-s) !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  transition: background .15s, color .15s !important;
  flex-shrink: 0 !important;
}
.ui-dialog-titlebar-close:hover { background: var(--card-2) !important; color: var(--text) !important; }
.ui-icon-closethick,
.ui-button-icon-space { display: none !important; }
.ui-dialog-titlebar-close svg {
  display: block !important;
  width: 18px !important; height: 18px !important;
  flex-shrink: 0 !important;
  overflow: visible !important;
}
.ui-dialog-titlebar-close:hover svg { stroke: #F4F4F0 !important; }
.ui-dialog-content {
  background: var(--surface) !important;
  padding: 20px 20px 24px !important;
  overflow-y: auto !important;
}
.ui-widget-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,.65) !important;
  z-index: 2099 !important;
}
.ui-resizable-handle { display: none !important; }
.ui-dialog-buttonpane {
  padding: 12px 18px !important;
  border-top: 1px solid var(--border) !important;
  background: var(--card) !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}
.ui-dialog-buttonset { display: flex !important; gap: 8px !important; }
.ui-dialog .ui-button {
  padding: 7px 18px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  background: var(--card-2, #23232C) !important;
  color: var(--text, #F4F4F0) !important;
}
.ui-dialog .ui-button:hover { background: var(--border-2, #35354A) !important; }
.ui-dialog .ui-button.ui-button-delete { background: #c0392b !important; color: #fff !important; }
.ui-dialog .ui-button.ui-button-delete:hover { background: #a93226 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   LEGACY LIBS.JS ELEMENTS — скрыть старые элементы от libs.js
   ═══════════════════════════════════════════════════════════════════════════ */
.mobile-menu,
.mobile-menu-close,
#mobile-menu { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   ANNOUNCEMENT BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.ann {
  background: var(--accent);
  color: #0B0B0E;
  padding: 7px var(--indent);
  text-align: center;
  font-family: var(--display);
  font-size: 12px; letter-spacing: .02em;
}
.ad-banner { margin: 0 0 24px; }

/* ═══════════════════════════════════════════════════════════════════════════
   STREAK BANNER
   ═══════════════════════════════════════════════════════════════════════════ */
.streak {
  display: flex; align-items: center; gap: 24px;
  padding: 18px 24px;
  border-radius: var(--r-m); margin-bottom: 40px;
  background: var(--card); border: 1px solid var(--border);
}
.streak-dots { display: flex; gap: 6px; }
.sd {
  width: 30px; height: 30px;
  border-radius: var(--r-s);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 12px; font-weight: 400; letter-spacing: .04em;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--muted);
}
.sd.done { background: var(--accent); color: #0B0B0E; border-color: var(--accent); }
.sd.today {
  background: var(--card-2); color: var(--accent);
  border-color: var(--accent-line);
}
.streak-text { flex: 1; min-width: 0; }
.streak-text h3 { font-size: 15px; margin-bottom: 2px; }
.streak-text p { font-size: 13px; color: var(--muted); font-family: var(--body); font-weight: 400; }
.streak-cta {
  padding: 0 18px; height: 40px;
  border-radius: var(--r-s);
  background: transparent; color: var(--text);
  border: 1px solid var(--border-2);
  font-family: var(--display);
  font-weight: 400; font-size: 13px;
  transition: background .15s, border-color .15s;
  flex-shrink: 0; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}
.streak-cta:hover { background: var(--card-2); border-color: var(--muted); color: var(--text); }

/* ═══════════════════════════════════════════════════════════════════════════
   QUESTS
   ═══════════════════════════════════════════════════════════════════════════ */
.quests { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }

.quest {
  padding: 20px 22px;
  border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--border);
  transition: background .15s, border-color .15s;
}
.quest:hover { background: var(--card-2); border-color: var(--border-2); }

.quest-hd {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
}
.quest-ico {
  width: 36px; height: 36px;
  border-radius: var(--r-s);
  background: var(--card-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.quest-ico .icon { width: 18px; height: 18px; }
.quest-title { font-size: 14px; font-weight: 600; color: var(--text); }
.quest-sub { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

.quest-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.quest-bar-track {
  flex: 1; height: 3px;
  background: var(--border); border-radius: 2px; overflow: hidden;
}
.quest-bar-track i {
  display: block; height: 100%;
  background: var(--accent);
  transition: width .6s ease;
}
.quest-pct {
  font-family: var(--display);
  font-size: 12px; font-weight: 400;
  color: var(--text); width: 32px; text-align: right;
  font-variant-numeric: tabular-nums;
}
.quest-reward {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--display);
  font-size: 12px; font-weight: 400; letter-spacing: .04em;
  color: var(--accent);
}
.quest-reward .icon { width: 13px; height: 13px; color: var(--accent); }

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH MODAL
   ═══════════════════════════════════════════════════════════════════════════ */
/* Overlay — toggled via JS: style.display = 'flex' / 'none' */
.lgn {
  position: fixed; inset: 0; z-index: 2000;
  align-items: center; justify-content: center;
}
.lgn::before {
  content: '';
  position: absolute; inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.lgn__modal {
  position: relative; z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--r-l);
  width: calc(100% - 32px); max-width: 460px;
  overflow: hidden;
  animation: lgn-in .18s ease;
}
@keyframes lgn-in {
  from { opacity: 0; transform: translateY(-12px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.lgn__ctrl {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--border);
  background: var(--card); padding: 0 24px;
}
.lgn__tab {
  padding: 15px 0; margin-right: 24px; margin-bottom: -1px;
  font-family: var(--display); font-size: 15px; font-weight: 400;
  color: var(--muted); text-decoration: none;
  border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.lgn__tab:hover { color: var(--text); }
.lgn__tab--active { color: var(--text); border-bottom-color: var(--accent); }

.lgn__close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 8px; border-radius: var(--r-s);
  display: flex; align-items: center; transition: background .15s, color .15s;
}
.lgn__close:hover { background: var(--card-2); color: var(--text); }
.lgn__close .icon { width: 18px; height: 18px; }

.lgn__content { padding: 28px 32px; }

.lgn__header { text-align: center; margin-bottom: 24px; }
.lgn__avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--card-2) center/cover no-repeat; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px; overflow: hidden;
}
.lgn__avatar .icon { width: 28px; height: 28px; color: var(--muted); }
.lgn__title { font-family: var(--display); font-size: 20px; color: var(--text); margin-bottom: 4px; }
.lgn__caption { font-size: 13px; color: var(--muted); }

.lgn__inputs { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.lgn__input {
  display: block; width: 100%; height: 46px; box-sizing: border-box;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--r-s); padding: 0 16px;
  color: var(--text); font-family: var(--body); font-size: 14px;
  outline: none; transition: border-color .15s;
}
.lgn__input:focus { border-color: var(--accent-line); }
.lgn__input::placeholder { color: var(--muted-2); }

.lgn__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; gap: 8px;
}
.lgn__remember {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--text-2); cursor: pointer;
}
.lgn__remember input[type="checkbox"] { display: none; }
.lgn__toggle {
  width: 36px; height: 20px; border-radius: 10px; flex-shrink: 0;
  background: var(--border-2); display: inline-block; position: relative;
  transition: background .2s;
}
.lgn__toggle::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left .2s;
}
.lgn__remember input:checked ~ .lgn__toggle { background: var(--accent); }
.lgn__remember input:checked ~ .lgn__toggle::after { left: 18px; }
.lgn__forgot { font-size: 13px; color: var(--accent); text-decoration: none; flex-shrink: 0; }
.lgn__forgot:hover { color: var(--accent-darker); }

.lgn__submit {
  display: block; width: 100%; height: 48px;
  background: var(--accent); color: #0B0B0E;
  border: none; border-radius: var(--r-s); cursor: pointer;
  font-family: var(--display); font-size: 15px;
  transition: background .15s;
}
.lgn__submit:hover { background: var(--accent-darker); }

/* User panel */
.lgn__modal--user { max-width: 340px; }
.lgn__menu { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.lgn__menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--r-s);
  text-decoration: none; color: var(--text-2); font-size: 14px;
  transition: background .15s, color .15s;
}
.lgn__menu-item:hover { background: var(--card-2); color: var(--text); }
.lgn__menu-item .icon { width: 16px; height: 16px; opacity: .65; flex-shrink: 0; }
.lgn__count {
  margin-left: auto; padding: 0 7px; height: 18px; min-width: 18px;
  background: var(--accent); color: #0B0B0E; border-radius: 9px;
  font-size: 12px; font-family: var(--display);
  display: inline-flex; align-items: center; justify-content: center;
}
.lgn__menu-item--out { color: #cf6679; }
.lgn__menu-item--out:hover { background: rgba(207,102,121,.1); color: #cf6679; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .promo { flex: 1; }
  .gg-8 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .gg-6 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .cat-row { grid-template-columns: repeat(3,1fr); }
  .toplist { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .sect-categories__boxes-item.visible { gap: 8px; }
  .bubble-item { width: 64px; height: 64px; }
}
@media (max-width: 700px) {
  :root { --indent: 16px; }
  .page, .page-wrap { padding: 20px var(--indent) 64px; }
  .gg-8, .gg-6 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .cat-row { grid-template-columns: repeat(2,1fr); }
  .hero h1, .hero-title { font-size: 26px; }
  .hero-side { flex-direction: column; }
  .hero-body { padding: 20px 22px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .toplist { grid-template-columns: 1fr; }
  .sect-categories__boxes-item.visible { gap: 6px; }
  .bubble-item { width: 54px; height: 54px; }
  .topbar { padding: 0 var(--indent); overflow: hidden; }
  .topbar .tbtn { display: none; }
  .topbar .streak-pill { display: none; }

  /* Топбар: убрать тему и авторизацию — они переедут в сайдбар */
  .topbar .theme-toggle { display: none; }
  .topbar .js-show-login { display: none; }
  /* Показать sidebar-footer на мобиле */
  .sb-footer { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 14px; }

  /* Streak-баннер: переносить на две строки */
  .streak { flex-wrap: wrap; gap: 10px 14px; padding: 14px 18px; }
  .streak-dots { width: 100%; order: 1; }
  .streak-text { order: 2; flex: 1; min-width: 0; }
  .streak-cta { order: 3; flex-shrink: 0; }

  /* Quests: 1 колонка на мобиле */
  .quests { grid-template-columns: 1fr; }

  /* Уменьшить отступы SEO-блока */
  .descr { padding: 18px 20px; }
}
@media (max-width: 480px) {
  .hero { display: block; }
  .hero-side { display: none; }

  /* Streak на очень маленьких: кнопка тоже в полную ширину */
  .streak-cta { width: 100%; justify-content: center; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULLSTORY — game-layout
   ═══════════════════════════════════════════════════════════════════════════ */

/* SVG icon utility (Lucide, stroke-based) */
.icon {
  display: inline-block; width: 18px; height: 18px;
  stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}

.game-layout {
  display: flex; flex-direction: column;
  gap: 24px; margin-bottom: 40px;
}
.game-layout .section-game { margin-bottom: 0; }

/* ── section-game card ── */
.section-game {
  border-radius: var(--r-l);
  background: var(--card);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Header */
.section-game__header { padding: 18px 22px 14px; }

.section-game__crumbs {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin: 0 0 12px; padding: 0; list-style: none;
  font-size: 12px; color: var(--muted);
}
.section-game__crumbs li { display: inline-flex; align-items: center; gap: 8px; }
.section-game__crumbs li:not(:last-child)::after { content: "›"; color: var(--muted); font-size: 13px; }
.section-game__crumbs a { color: var(--muted); transition: color .15s; }
.section-game__crumbs a:hover { color: var(--text); }
.section-game__crumbs [aria-current] { color: var(--text); }

.header-game {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.header-game__title {
  font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.1;
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; min-width: 0;
}
.header-game__subtitle {
  font-family: var(--display); font-weight: 500; color: var(--muted);
  font-size: 15px; letter-spacing: -.005em;
}
.header-game__edit {
  display: inline-flex; align-items: center; color: var(--muted);
  vertical-align: middle; margin-left: 6px;
}
.header-game__edit:hover { color: var(--accent); }
.header-game__buttons { display: flex; gap: 8px; flex-shrink: 0; }

.game-button {
  width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--r-s); color: var(--text-2); cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.game-button:hover { color: var(--text); border-color: var(--muted); }
.game-button.is-on,
.game-button.gamelist__added {
  color: var(--accent); border-color: var(--accent-line);
  background: var(--accent-soft, rgba(242,92,5,.10));
}
.game-button .icon { width: 18px; height: 18px; stroke-width: 1.8; }

/* Body / stage */
.section-game__body {
  position: relative; background: var(--surface);
  aspect-ratio: 16 / 9; overflow: hidden;
}
.stage-noimg {
  position: absolute; inset: 0; z-index: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  color: var(--border-2);
  background: radial-gradient(ellipse at 50% 40%, #1a1a22 0%, var(--surface) 75%);
}
.stage-noimg span { font-family: var(--display); font-size: 16px; color: var(--muted-2); letter-spacing: .04em; }
.stage-poster:has(img) ~ .stage-noimg { display: none; }

.stage-poster { position: absolute; inset: 0; display: block; overflow: hidden; background: var(--bg); }
.stage-poster img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: blur(6px) brightness(0.28) saturate(0.6);
  transform: scale(1.05);
}
.stage-poster::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
}

.stage-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent); color: #0B0B0E; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, transform .12s;
  box-shadow: 0 18px 40px rgba(0,0,0,.45); z-index: 3;
}
.stage-play:hover { background: #FF6E1A; }
.stage-play:active { transform: translate(-50%,-50%) scale(.97); }
.stage-play .icon { width: 36px; height: 36px; stroke-width: 0; fill: currentColor; }

.stage-hint {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 3; padding: 6px 12px; border-radius: 99px;
  background: rgba(11,11,14,.7); border: 1px solid var(--border);
  color: var(--text-2); font-size: 12px;
  backdrop-filter: blur(4px); white-space: nowrap;
}

.stage-frame {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; display: none; background: #000;
}
.stage-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.stage-desktop-only {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: #fff; text-align: center; padding: 40px;
}
.stage-desktop-only__title { font-size: 18px; font-weight: 600; }
.stage-desktop-only__sub { font-size: 14px; opacity: .7; }

/* is-playing state */
.section-game.is-playing .stage-poster,
.section-game.is-playing .stage-play,
.section-game.is-playing .stage-hint { display: none; }
.section-game.is-playing .stage-frame { display: block; }

/* Actions row */
.actions-game {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border);
}
.actions-game__buttons { display: flex; gap: 8px; flex-wrap: wrap; }

.action-btn {
  height: 38px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border);
  border-radius: var(--r-s); color: var(--text-2); font-size: 13px;
  font-family: inherit; cursor: pointer; transition: all .15s;
}
.action-btn:hover { color: var(--text); border-color: var(--muted); background: var(--card-2); }
.action-btn .icon { width: 16px; height: 16px; stroke-width: 1.8; }
.actions-game__buttons a { color: inherit; text-decoration: none; display: contents; }
.page__compl a { color: inherit; text-decoration: none; }

/* Game rating */
.game-rating {
  display: inline-flex; align-items: center;
  background: var(--card);
  border: 1px solid var(--border-2);
  border-radius: 100px;
  overflow: hidden;
}
.react-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px;
  background: transparent; border: 0;
  color: var(--text-2); font-family: var(--body); font-weight: 700; font-size: 15px;
  cursor: pointer; user-select: none;
  transition: color .18s, background .18s, transform .1s;
}
#react-like {
  color: var(--accent);
  background: var(--accent-soft);
}
#react-dislike {
  padding: 0 16px;
  border-left: 1px solid var(--border-2);
}
.react-btn .icon {
  width: 18px; height: 18px;
  fill: currentColor; stroke: none;
  transition: transform .18s;
}
#react-dislike .icon { transform: scaleY(-1); }
.react-btn:active { transform: scale(.95); }
#react-like:hover .icon { transform: translateY(-2px); }
#react-dislike:hover .icon { transform: scaleY(-1) translateY(-2px); }
#react-like:hover, #react-like.is-on {
  color: var(--accent); background: rgba(242,92,5,.16);
}
#react-dislike:hover, #react-dislike.is-on {
  color: #5b9cf6; background: rgba(91,156,246,.09);
}

/* Controls */
.section-game__controls { padding: 14px 22px 22px; border-top: 1px solid var(--border); }

.controls__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px; cursor: default;
}
.section-game__controls.is-collapsed .controls__header { margin-bottom: 0; }

.controls__pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px;
  background: transparent; color: var(--text);
  border: 1px solid var(--accent-line); border-radius: 99px;
  font: 600 13px/1 var(--body); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.controls__pill:hover { border-color: var(--accent); background: var(--accent-soft, rgba(242,92,5,.1)); }
.controls__pill .icon { width: 16px; height: 16px; color: var(--text-2); }
.controls__chevron { transition: transform .2s; }
.section-game__controls:not(.is-collapsed) .controls__chevron { transform: rotate(180deg); }

.stat-pills { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 99px; color: var(--text-2); font-size: 12px;
}
.stat-pill .icon { width: 13px; height: 13px; color: var(--accent); flex-shrink: 0; }
.stat-pill b { color: var(--accent); font-weight: 700; font-size: 14px; font-family: var(--display); }
.stat-pill__suffix { color: var(--text-2); font-size: 12px; }
.stat-pill__label { color: var(--muted); font-size: 12px; margin-left: 2px; }
.stat-pill--muted .icon { color: var(--muted); }
.stat-pill--muted b { color: var(--text); font-family: var(--body); }
.stat-pill--score { gap: 5px; }
.stat-pill--score b { font-size: 15px; }
.stat-pill__max { color: var(--muted); font-size: 12px; }
.stat-pill__dot { width: 3px; height: 3px; border-radius: 50%; background: var(--border-2); flex-shrink: 0; }
.stat-pill__votes { color: var(--muted); font-size: 12px; }

.controls__items { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.section-game__controls.is-collapsed .controls__items { display: none; }

.controls__group {
  flex: 0 0 100%;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-top: 6px;
}
.controls__group:first-child { margin-top: 0; }

.controls__item {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 10px;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 99px;
}
.controls__line { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.controls__desc { font-size: 13px; color: var(--text-2); line-height: 1.3; white-space: nowrap; }

kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 9px;
  font-family: var(--display); font-weight: 700; font-size: 12px; color: var(--text);
  background: var(--card-2); border: 1px solid var(--border-2);
  border-bottom: 3px solid var(--border-2); border-radius: var(--r-s);
  letter-spacing: .03em; line-height: 1;
  box-shadow: 0 1px 0 var(--border);
}
kbd.kbd--icon { min-width: 28px; padding: 0 9px; }
kbd.kbd--icon.kbd--tall { height: 44px; padding: 6px 8px; }

/* Top Players */
.top-players {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-l); overflow: hidden;
}
.top-players__hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.top-players__title {
  font-family: var(--display); font-size: 13px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--text); margin: 0;
}
.top-players__tabs { display: flex; gap: 4px; }
.tptab {
  height: 30px; padding: 0 12px; border-radius: var(--r-s);
  background: transparent; border: 1px solid transparent;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; color: var(--muted); cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.tptab:hover { color: var(--text); background: var(--card-2); }
.tptab.is-active { background: var(--accent); border-color: var(--accent); color: #0b0b0e; }
.tp-list { display: flex; flex-direction: column; }
.tp-loading { padding: 20px; text-align: center; color: var(--muted); font-size: 13px; }
.tprow {
  display: grid; grid-template-columns: 36px 36px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px 20px; border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.tprow:last-child { border-bottom: 0; }
.tprow:hover { background: var(--card-2); }
.tprow--me { background: rgba(242,92,5,.04); }
.tprow--me:hover { background: rgba(242,92,5,.07); }
.tprank {
  font-family: var(--display); font-size: 14px; font-weight: 700;
  color: var(--muted-2); text-align: center;
}
.tprank--1 { color: var(--accent); }
.tprank--2 { color: #CECDC4; }
.tprank--3 { color: #CD7F32; }
.tpava {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 13px; font-weight: 700; color: #fff;
  text-transform: uppercase; flex-shrink: 0;
}
.tpname { font-size: 14px; color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tprow--me .tpname { color: var(--accent); }
.tptime { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Tags cloud */
.tags-cloud {
  padding: 22px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-l);
}
.tags-cloud h2 { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--text); margin: 0 0 14px; }
.tags-cloud__list { display: flex; flex-wrap: wrap; gap: 8px; }

.tag {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 4px 16px 4px 4px; border-radius: 99px;
  font-size: 13px; color: var(--text-2);
  background: var(--card-2); border: 1px solid var(--border);
  transition: color .15s, border-color .15s, background .15s;
}
.tag:hover { color: var(--text); border-color: var(--muted); background: var(--card); }
.tag__thumb {
  width: 30px; height: 30px; border-radius: var(--r-m);
  background: var(--card); object-fit: cover; display: block; flex-shrink: 0;
}

/* Feedback stack */
.feedback-stack {
  display: grid; grid-template-columns: minmax(0,1fr) 320px;
  gap: 24px; align-items: start;
}
.feedback-stack__main { min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.feedback-block {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-l); padding: 22px 24px;
}

.comments-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-l); padding: 22px 24px;
}
.feedback-block .comments-section {
  background: transparent; border: 0; border-radius: 0; padding: 0;
}

.comments-hd {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 6px; gap: 16px; flex-wrap: wrap;
}
.comments-hd h2 { font-size: 20px; font-weight: 700; letter-spacing: -.015em; color: var(--text); margin: 0; }
.comments-hd__note { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }

.aside-similar {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-l); padding: 18px;
  position: sticky; top: 88px; align-self: start;
}
.aside-similar__hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px;
}
.aside-similar__hd h3 {
  font-family: var(--display); font-size: 12px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text); margin: 0;
}
.aside-similar__all {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 12px; color: var(--muted); text-decoration: none;
  transition: color .15s;
}
.aside-similar__all:hover { color: var(--accent); }
.aside-similar__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px;
}

/* Aside game card */
.agame { display: block; text-decoration: none; border-radius: var(--r-m); overflow: hidden; background: var(--card-2); border: 1px solid var(--border); transition: border-color .15s, transform .15s; }
.agame:hover { border-color: var(--muted-2); transform: translateY(-2px); }
.agame__thumb { aspect-ratio: 4/3; overflow: hidden; background: var(--surface); }
.agame__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.agame__body { padding: 7px 9px 9px; }
.agame__title { font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; line-height: 1.3; }
.agame__meta { display: flex; align-items: center; gap: 6px; }
.agame__score { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--accent); font-weight: 700; }
.agame__views { font-size: 11px; color: var(--muted); }

/* More games */
.more-games { margin-bottom: 40px; }
.more-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 20px; }

/* Description article */
.descr-article {
  margin-bottom: 40px; padding: 28px 32px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r-l);
}
.descr-article h2 {
  font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text);
  margin: 0 0 14px;
}
.descr-article h2:not(:first-child) { margin-top: 28px; }
.descr-article p { color: var(--text-2); font-size: 15px; line-height: 1.7; margin-bottom: 14px; }
.descr-article p:last-child { margin-bottom: 0; }
.descr-article__head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; margin-bottom: 8px; }
.descr-article__poster {
  width: 200px; height: 200px; border-radius: var(--r-l);
  object-fit: cover; background: var(--card-2); display: block;
  border: 1px solid var(--border);
}
.descr-article__intro { font-size: 14px; color: var(--text-2); line-height: 1.7; }

.descr-facts {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.descr-facts li {
  display: flex; align-items: flex-start; gap: 12px;
  color: var(--text-2); font-size: 14px; line-height: 1.5;
}
.descr-facts li::before {
  content: ""; flex-shrink: 0; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--accent);
  margin-top: 6px; background: transparent;
}
.descr-facts li b { color: var(--text); font-weight: 600; }

/* CTA end */
.cta-end {
  margin-bottom: 48px; padding: 32px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-l); text-align: center;
}
.cta-end h2 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; color: var(--text); margin: 0 0 8px; }
.cta-end p { color: var(--text-2); margin: 0 0 18px; font-size: 15px; line-height: 1.6; }
.cta-end .btn-primary { display: inline-flex; height: 48px; padding: 0 28px; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; height: 46px; border-radius: var(--r-s);
  background: var(--accent); border: none; color: #0B0B0E;
  font-family: var(--display); font-weight: 700; font-size: 14px; letter-spacing: .01em;
  cursor: pointer; transition: background .15s, transform .12s;
}
.btn-primary:hover { background: #FF6E1A; }
.btn-primary:active { transform: translateY(1px); }
.btn-primary .icon { color: #0B0B0E; width: 16px; height: 16px; stroke-width: 2.2; fill: currentColor; stroke: none; }

/* Responsive */
@media (max-width: 1100px) {
  .more-grid { grid-template-columns: repeat(4, 1fr); }
  .controls__desc { white-space: normal; }
  .feedback-stack { grid-template-columns: 1fr; gap: 24px; }
  .aside-similar { position: static; top: auto; }
}
@media (max-width: 700px) {
  .section-game__header { padding: 14px 18px 12px; }
  .header-game { flex-direction: column; align-items: flex-start; }
  .header-game__title { font-size: 22px; }
  .stage-play { width: 72px; height: 72px; }
  .stage-play .icon { width: 28px; height: 28px; }
  .stage-hint { font-size: 11px; padding: 5px 10px; left: 8px; right: 8px; transform: none; text-align: center; }
  .actions-game { padding: 10px 14px; flex-direction: column; align-items: stretch; }
  .actions-game__buttons { justify-content: space-between; }
  .action-btn { flex: 1; justify-content: center; padding: 0 10px; font-size: 12px; }
  .action-btn span { display: none; }
  .game-rating { display: flex; width: 100%; }
  .react-btn { flex: 1; }
  #react-dislike { flex: 0 0 56px; padding: 0; }
  .section-game__controls { padding: 14px 18px 18px; }
  .tags-cloud { padding: 20px; }
  .tag { height: 34px; padding: 3px 14px 3px 3px; }
  .tag__thumb { width: 28px; height: 28px; }
  .feedback-block, .aside-similar { padding: 18px; }
  .comments-section { padding: 18px; }
  .descr-article { padding: 22px 20px; }
  .descr-article__head { grid-template-columns: 1fr; gap: 18px; }
  .descr-article__poster { width: 100%; height: auto; aspect-ratio: 1/1; max-width: 280px; margin: 0 auto; }
  .more-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-end { padding: 20px; }
  .aside-similar__grid { gap: 8px; }
  .comment-form__row { gap: 8px; }
  .cf-btn { width: 28px; height: 28px; font-size: 12px; }
  .cf-emoji-panel { right: 0; bottom: calc(100% + 8px); }
  .cf-emoji-grid { grid-template-columns: repeat(6,28px); }
  .cf-emoji-item { width: 28px; height: 28px; font-size: 18px; }
}

/* ── Comment form ── */
.comment-form { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 22px; }
.comment-form__name {
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--r-m); padding: 11px 14px;
  font: 500 14px/1.4 var(--body); color: var(--text);
  outline: 0; transition: border-color .15s, background .15s;
  width: 100%; max-width: 280px; box-sizing: border-box;
}
.comment-form__name:focus { border-color: var(--text-2); background: #1F1F26; }
.comment-form__name::placeholder { color: var(--muted); }
.comment-form__notice {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(242,92,5,.06); border: 1px solid rgba(242,92,5,.28);
  border-radius: var(--r-m); padding: 10px 14px;
  color: var(--text-2); font-size: 13px; line-height: 1.5;
  margin: 8px 0;
}
.comment-form__notice .icon { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.comment-form__row { display: flex; align-items: flex-start; gap: 10px; position: relative; }
.comment-form__avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--card-2); border: 1px solid var(--border);
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.comment-form__avatar .icon { width: 18px; height: 18px; }
.comment-form__editor {
  flex: 1; min-width: 0;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: var(--r-m); display: flex; align-items: flex-start; gap: 6px;
  padding: 10px 10px 10px 16px; transition: border-color .15s;
}
.comment-form__body { flex: 1; min-width: 0; }
.comment-form__body textarea,
#comment_area {
  width: 100%; height: auto; min-height: 22px; max-height: 200px;
  background: transparent; border: 0 !important; resize: none; overflow-y: hidden;
  font: 500 14px/1.45 var(--body); color: var(--text);
  outline: 0 !important; box-shadow: none !important;
  padding: 4px 0; box-sizing: border-box;
}
.comment-form__body textarea::placeholder { color: var(--muted); }
.comment-form__toolbar { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; }
.cf-btn {
  width: 30px; height: 30px; border-radius: var(--r-s); border: 0;
  background: transparent; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--body); font-size: 13px; cursor: pointer;
  transition: background .15s, color .15s;
}
.cf-btn:hover { background: rgba(255,255,255,.05); color: var(--text); }
.cf-btn.is-on { background: rgba(242,92,5,.16); color: var(--accent); }
.cf-btn[data-fmt="bold"] { font-weight: 800; }
.cf-btn[data-fmt="italic"] { font-style: italic; }
.cf-btn[data-fmt="underline"] { text-decoration: underline; text-underline-offset: 2px; }
.cf-btn .icon { width: 16px; height: 16px; }
.cf-counter { margin-left: auto; font-size: 12px; color: var(--muted); line-height: 30px; padding: 0 2px; pointer-events: none; }
.cf-counter--warn { color: var(--accent); }
.cf-send {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--accent); color: #fff; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: filter .15s;
}
.cf-send:hover { filter: brightness(1.08); }
.cf-send .icon { width: 16px; height: 16px; stroke-width: 2; }
.cf-emoji-panel {
  position: absolute; right: 46px; bottom: calc(100% + 6px);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r-m); padding: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  display: none; z-index: 20;
}
.cf-emoji-panel.is-open { display: block; }
.cf-emoji-grid { display: grid; grid-template-columns: repeat(6,32px); gap: 4px; max-height: 204px; overflow-y: auto; }
.cf-emoji-item {
  width: 32px; height: 32px; border-radius: var(--r-s); border: 0;
  background: transparent; cursor: pointer; padding: 0;
  font-size: 20px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.cf-emoji-item:hover { background: rgba(255,255,255,.06); }
.acf-protect { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.acf-label { font-size: 13px; color: var(--text-2); }
.acf-input {
  height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-m); color: var(--text); font-size: 14px;
  font-family: var(--body); box-sizing: border-box; transition: border-color .15s;
}
.acf-input:focus { outline: none; border-color: var(--accent-line, rgba(242,92,5,.4)); }
.acf-seccode { display: flex; align-items: center; gap: 10px; }

/* ── Comments list ── */
.comments-list { display: flex; flex-direction: column; }
.comment {
  display: grid; grid-template-columns: 44px minmax(0,1fr) auto;
  column-gap: 14px; row-gap: 6px;
  padding: 16px 0; border-top: 1px solid var(--border);
}
.comments-list .comment:first-child { border-top: 0; padding-top: 8px; }
.comment--admin .comment-author::after {
  content: "Адм."; display: inline-block; margin-left: 6px;
  padding: 1px 6px; border-radius: 4px;
  background: rgba(242,92,5,.15); color: var(--accent);
  font-size: 10px; font-family: var(--display); vertical-align: middle;
}
.comment-source {
  grid-column: 1 / -1; display: block;
  font-size: 12px; color: var(--muted); text-decoration: none; margin-bottom: 4px;
}
.comment-source:hover { color: var(--accent); }
.comment-vote {
  grid-column: 1; grid-row: 1 / 5;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding-top: 2px;
}
.comment-vote a { display: block; color: inherit; text-decoration: none; }
.cvote {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  width: 38px; padding: 7px 4px;
  border-radius: var(--r-m);
  background: var(--card); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cvote .icon { width: 15px; height: 15px; stroke-width: 1.8; fill: none; }
.cvote b { font-size: 11px; font-weight: 700; }
.comment-vote a:hover .cvote.cvote--up,
.cvote.cvote--up:hover  { color: var(--accent); border-color: rgba(242,92,5,.35); background: rgba(242,92,5,.07); }
.comment-vote a:hover .cvote.cvote--down,
.cvote.cvote--down:hover { color: #5b9cf6; border-color: rgba(91,156,246,.35); background: rgba(91,156,246,.07); }
.comment-meta {
  grid-column: 2; display: inline-flex; align-items: center; gap: 10px;
  flex-wrap: wrap; min-width: 0;
}
.comment-avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--card-2); border: 1px solid var(--border); flex-shrink: 0;
}
.comment-author { font-weight: 600; color: var(--text); font-size: 13px; }
.comment-date { font-size: 12px; color: var(--muted); }
.comment-stars {
  grid-column: 3; grid-row: 1;
  display: inline-flex; gap: 2px; align-items: center; align-self: start;
}
.comment-stars .icon { width: 13px; height: 13px; color: var(--border-2); stroke-width: 1.4; fill: none; }
.comment-stars .icon.is-on { color: var(--accent); fill: var(--accent); stroke: none; }
.comment-body {
  grid-column: 2; font-size: 14px; color: var(--text-2);
  line-height: 1.6; word-break: break-word;
}
.comment-body.is-clamped {
  display: -webkit-box; -webkit-line-clamp: 5;
  -webkit-box-orient: vertical; overflow: hidden;
}
.comment-body p { margin: 0 0 8px; }
.comment-body p:last-child { margin-bottom: 0; }
.comment-expand {
  grid-column: 2; justify-self: start;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  font-family: var(--display); font-size: 11px; font-weight: 700;
  letter-spacing: .06em; color: var(--accent);
}
.comment-expand:hover { color: #FF6E1A; }
.comment-actions {
  grid-column: 2; display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.comment-action {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer;
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid transparent;
  transition: color .15s, background .15s, border-color .15s;
  background: none; font-family: var(--body); letter-spacing: .02em;
}
.comment-action:hover { color: var(--text); background: var(--card-2); border-color: var(--border); }
.comment-action a { color: inherit; text-decoration: none; }
.comment-action--reply,
.comment-action--quote { border-color: var(--border); background: var(--surface); }
.comment-action--reply:hover { color: var(--accent); border-color: rgba(242,92,5,.4); background: rgba(242,92,5,.07); }
.comment-action--quote:hover { color: #a78bfa; border-color: rgba(167,139,250,.4); background: rgba(167,139,250,.07); }
.comment-action--del:hover { color: #f87171; border-color: rgba(248,113,113,.4); background: rgba(248,113,113,.07); }
.comment-action--ip { cursor: default; font-size: 11px; font-weight: 400; padding: 4px 8px; letter-spacing: 0; }
.comment-action--ip:hover { background: transparent; border-color: transparent; color: var(--muted); }
.comments-loadmore { display: flex; justify-content: center; margin-top: 20px; }
.comments-loadmore .navigation { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.comments-loadmore .navigation a {
  height: 46px; padding: 0 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-2);
  border-radius: var(--r-s); color: var(--text); font-size: 14px;
  font-family: var(--display); font-weight: 700; letter-spacing: .03em;
  text-decoration: none; transition: all .15s;
}
.comments-loadmore .navigation a::before { content: "+"; font-size: 18px; font-weight: 400; color: var(--text-2); }
.comments-loadmore .navigation a:hover { background: var(--card-2); border-color: var(--muted); }
.comments-loadmore .navigation span {
  height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card-2); border: 1px solid var(--accent-line);
  border-radius: var(--r-s); color: var(--accent); font-size: 14px;
  font-family: var(--display); font-weight: 700; text-decoration: none;
}

/* ── POLL (inline poll in article) ───────────────────────────────────────── */
.dle-poll {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-s);
}
.dle-poll__q {
  font-size: 15px; font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.4;
}
.dle-poll__btns { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.dle-poll__btn-secondary {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.dle-poll__btn-secondary:hover {
  background: var(--card-2);
  border-color: var(--muted);
  color: var(--text);
}

/* ── TOPNEWS WIDGET ───────────────────────────────────────────────────────── */
.topnews-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: color .15s;
}
.topnews-item:last-child { border-bottom: none; }
.topnews-item:hover { color: var(--accent); }
.topnews-item__thumb {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card-2);
}
.topnews-item__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.topnews-item__title { font-size: 13px; font-weight: 600; line-height: 1.35; }

/* ── PREVIEW (admin editor preview) ──────────────────────────────────────── */
.preview-wrap { max-width: 820px; margin: 0 auto; padding: 24px; }
.preview-wrap__title {
  font-size: 22px; font-weight: 700;
  margin: 0 0 16px;
  color: var(--text);
}

/* ── STATIC PAGE — CATEGORY GRID (static-top.tpl) ────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
  padding: 4px 0 24px;
}
.og {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-m);
  text-align: center;
  transition: background .15s, border-color .15s, transform .15s;
}
.og:hover {
  background: var(--card-2);
  border-color: var(--border-2);
  transform: translateY(-2px);
}
.og img {
  width: 64px; height: 64px;
  border-radius: var(--r-s);
  object-fit: cover;
  display: block;
  background: var(--card-2);
}
.og a {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-2);
  word-break: break-word;
}
.og:hover a { color: var(--text); }
