/* =========================================
   INTER VARIABLE FONT — self-hosted
========================================= */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-cyrillic-wght-normal.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-cyrillic-wght-italic.woff2') format('woff2');
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/inter-latin-wght-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/*
Theme Name: Gameye
Theme URI: https://test.gameye.ru/
Author: Gameye
Author URI: https://test.gameye.ru/
Description: A modern gaming news and blog theme with support for posts, categories, and game pages.
Version: 3.1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gaming-blog
Tags: blog, gaming, news, custom-menu, featured-images, post-formats
*/

/* =========================================
   CSS VARIABLES
========================================= */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f4f4f6;
  --color-card: #ffffff;
  --color-card-bg: #f7f8f9;
  --color-text: #1a1a1a;
  --color-text-muted: #666666;
  --color-border: #e8e8e8;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-sidebar-bg: #f9f9f9;

  --badge-cosplay: #1a1a2e;
  --badge-reviews: #e63946;
  --badge-news: #2563eb;
  --badge-special: #16a34a;
  --badge-guide: #7c3aed;
  --badge-default: #374151;

  --font-heading: 'Inter', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-logo:    'Inter', sans-serif;

  --radius: 1rem;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
  --transition: 0.2s ease;

  --container-width: 1260px;
  --sidebar-width: 200px;
  --content-max: 700px;
}


/* =========================================
   ТЁМНАЯ ТЕМА
   Системная (prefers-color-scheme) + ручная (data-theme="dark")
========================================= */
/* переменные темы управляются через html.dark-theme */
html.dark-theme {
  --color-bg:           #0f1117;
  --color-bg-alt:       #1a1d26;
  --color-card:         #1a1d26;
  --color-card-bg:      #1e2130;
  --color-text:         #e8eaf0;
  --color-text-muted:   #8b92a9;
  --color-border:       #2a2d3e;
  --color-accent:       #3b82f6;
  --color-accent-hover: #2563eb;
  --color-sidebar-bg:   #13151f;
}
html:not(.dark-theme) {
  --color-bg:           #ffffff;
  --color-bg-alt:       #f4f4f6;
  --color-card:         #ffffff;
  --color-card-bg:      #f7f8f9;
  --color-text:         #1a1a1a;
  --color-text-muted:   #666666;
  --color-border:       #e8e8e8;
  --color-accent:       #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-sidebar-bg:   #f9f9f9;
}

/* Кнопка переключения темы */
.btn-theme-toggle {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--color-text);
  transition: background 0.2s;
  flex-shrink: 0;
}
.btn-theme-toggle:hover { background: var(--color-border); }
.btn-theme-toggle svg { width: 18px; height: 18px; }

/* Три состояния темы: system / light / dark
   gbr-theme в localStorage: undefined=system, 'light'=light, 'dark'=dark
   Иконки управляются JS через data-theme-mode на <html> */
.icon-system,
.icon-sun,
.icon-moon { display: none; }

/* Системная (нет атрибута или mode=system) */
html:not([data-theme-mode]) .icon-system,
html[data-theme-mode="system"] .icon-system { display: block; }

/* Светлая */
html[data-theme-mode="light"] .icon-sun { display: block; }

/* Тёмная */
html[data-theme-mode="dark"] .icon-moon { display: block; }

/* Дополнительные фиксы */
html.dark-theme .post-card     { border-color: var(--color-border); }
html.dark-theme .agf-select    { background: var(--color-card-bg); color: var(--color-text); }
html.dark-theme .review-item   { background: var(--color-card-bg); }
html.dark-theme .review-form-wrap { background: var(--color-card-bg); }
html.dark-theme .game-meta-block { background: var(--color-card-bg); }
html.dark-theme .game-ratings-block { background: var(--color-card-bg); }
html.dark-theme .review-textarea { background: var(--color-bg); color: var(--color-text); }
html.dark-theme input,
html.dark-theme textarea       { background: var(--color-bg); color: var(--color-text); }

@media (prefers-color-scheme: dark) {
  html.dark-theme .post-card     { border-color: #2a2d3e; }
  html.dark-theme .review-item   { background: #1e2130; }
  html.dark-theme .review-form-wrap { background: #1e2130; }
  html.dark-theme .game-meta-block { background: #1e2130; }
  html.dark-theme .game-ratings-block { background: #1e2130; }
  html.dark-theme .review-textarea { background: #0f1117; color: #e8eaf0; }
  html.dark-theme .agf-select    { background: #1e2130; color: #e8eaf0; }
  html.dark-theme input,
  html.dark-theme textarea       { background: #0f1117; color: #e8eaf0; }
}

/* =========================================
   RESET & BASE
========================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =========================================
   TYPOGRAPHY
========================================= */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

/* =========================================
   LAYOUT
========================================= */
/* =========================================
   LAYOUT
========================================= */
.site-container { width: 100%; }

.site-layout {
  display: block;
  min-height: 100vh;
}

.site-main {
  margin-left: var(--sidebar-width);
  display: flex;
  justify-content: center;
  padding-bottom: 0;
  transition: margin-left 0.18s ease;
}
/* Контент должен подстраиваться и под свёрнутый, и под развёрнутый
   сайдбар — иначе в развёрнутом виде сайдбар перекрывает контент,
   т.к. .app-sidebar расширяется, а отступ .site-main оставался
   завязан только на узкую (свёрнутую) ширину. */
html.sidebar-expanded .site-main { margin-left: var(--sidebar-width-expanded); }

.site-main-inner {
  width: 100%;
  max-width: var(--container-width);
  padding: 1.5rem;
}

/* =========================================
   APP SIDEBAR — сворачиваемый левый сайдбар.
   Развёрнут по умолчанию, сворачивается по клику
   на кнопку сворачивания (класс .sidebar-expanded на <html>
   присутствует по умолчанию, снимается при сворачивании).
========================================= */
:root {
  --sidebar-width: 76px;
  --sidebar-width-expanded: 248px;
}

.app-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  background: var(--color-bg);
  border-right: 1px solid var(--color-border);
  z-index: 500;
  transition: width 0.18s ease;
  overflow: visible;
}
html.sidebar-expanded .app-sidebar { width: var(--sidebar-width-expanded); }

.app-sidebar-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  /* Важно: overflow здесь должен оставаться видимым, иначе выпадающие
     панели уведомлений/аккаунта (position: absolute) обрезаются по
     границам сайдбара. Скроллится только .app-sidebar-scroll ниже. */
  overflow: visible;
}

/* Прокручиваемая часть — поиск + меню категорий. Именно тут может быть
   много пунктов, поэтому скролл повешен на неё, а не на весь .app-sidebar-inner. */
.app-sidebar-scroll {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.app-sidebar-scroll::-webkit-scrollbar { display: none; }

.app-sidebar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  min-height: 34px;
}
html.sidebar-expanded .app-sidebar-top {
  flex-direction: row;
  justify-content: space-between;
}

.app-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--color-text);
}
.app-sidebar-logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-accent), #7c3aed);
  color: #fff;
}
.app-sidebar-logo-badge svg { width: 20px; height: 20px; }
.app-sidebar-logo-text {
  font-family: var(--font-logo);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  width: 0;
  transition: opacity 0.15s;
}
html.sidebar-expanded .app-sidebar-logo-text { opacity: 1; width: auto; }

.app-sidebar-collapse-btn {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background var(--transition), transform 0.18s;
}
.app-sidebar-collapse-btn:hover { background: var(--color-bg-alt); color: var(--color-text); }
/* Свёрнутый сайдбар (по умолчанию) — стрелка вправо: подсказка «развернуть».
   Развёрнутый — стрелка влево (естественное положение SVG): подсказка «свернуть». */
.app-sidebar-collapse-btn svg { transform: rotate(180deg); }
html.sidebar-expanded .app-sidebar-collapse-btn svg { transform: none; }

/* Универсальный пункт (поиск, тема, вход) */
.app-sidebar-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--color-text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  transition: background var(--transition);
}
html.sidebar-expanded .app-sidebar-item { justify-content: flex-start; }
.app-sidebar-item:hover { background: var(--color-bg-alt); }
html:not(.sidebar-expanded) .app-sidebar-item { gap: 0; }

.app-sidebar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
}
.app-sidebar-icon svg { width: 100%; height: 100%; stroke: currentColor; fill: none; }

.app-sidebar-label {
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  width: 0;
  transition: opacity 0.15s;
}
html.sidebar-expanded .app-sidebar-label { opacity: 1; width: auto; }

/* ---- Меню категорий ---- */
.app-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 6px;
}
.app-sidebar-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: all var(--transition);
}
html.sidebar-expanded .app-sidebar-nav a { justify-content: flex-start; }
html:not(.sidebar-expanded) .app-sidebar-nav a { gap: 0; }
.app-sidebar-nav a:hover { background: var(--color-bg-alt); }
.app-sidebar-nav a.active {
  color: var(--color-accent);
  font-weight: 600;
  background: rgba(37, 99, 235, 0.12);
  background: color-mix(in srgb, var(--color-accent) 12%, transparent);
}
.sidebar-menu-icon {
  display: inline-flex;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.sidebar-menu-icon svg { width: 100%; height: 100%; }
.app-sidebar-nav a:hover .sidebar-menu-icon,
.app-sidebar-nav a.active .sidebar-menu-icon { color: var(--color-accent); }
.sidebar-menu-label {
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  width: 0;
  transition: opacity 0.15s;
}
html.sidebar-expanded .sidebar-menu-label { opacity: 1; width: auto; }

.app-sidebar-spacer { flex: 1 1 auto; }

/* ---- Переключатель темы ---- */
.app-sidebar-theme-toggle .app-sidebar-icon svg { display: none; }
html[data-theme-mode="system"] .app-sidebar-theme-toggle .icon-system,
html[data-theme-mode="light"]  .app-sidebar-theme-toggle .icon-sun,
html[data-theme-mode="dark"]   .app-sidebar-theme-toggle .icon-moon { display: block; }

/* ---- Уведомления + профиль внизу ----
   В свёрнутом сайдбаре ширины не хватает, чтобы уместить колокольчик
   и кнопку аккаунта в один ряд (аккаунт получал flex:1 и почти
   не оставалось места, за счёт чего аватар был обрезан/еле виден).
   Поэтому в свёрнутом виде располагаем их друг под другом, а в
   развёрнутом — как раньше, в один ряд. */
.app-sidebar-bottom-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
html.sidebar-expanded .app-sidebar-bottom-row {
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.app-sidebar-notif { position: relative; flex-shrink: 0; }

.app-sidebar-account { position: relative; min-width: 0; width: 100%; }
html.sidebar-expanded .app-sidebar-account { flex: 1 1 auto; }
.app-sidebar-account-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 4px;
  border-radius: 10px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 0;
  transition: background var(--transition);
}
html.sidebar-expanded .app-sidebar-account-btn { justify-content: flex-start; }
.app-sidebar-account-btn:hover { background: var(--color-bg-alt); }
html:not(.sidebar-expanded) .app-sidebar-account-btn { gap: 0; }
.app-sidebar-account-btn .account-avatar-img {
  width: 32px; height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.app-sidebar-account-name {
  font-size: 0.85rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Панели уведомлений/аккаунта открываются ВВЕРХ (сайдбар внизу экрана) */
.app-sidebar-panel-up {
  position: absolute !important;
  bottom: calc(100% + 8px) !important;
  top: auto !important;
  left: 0 !important;
  right: auto !important;
}
.app-sidebar-notif .app-sidebar-panel-up { left: 0; }
.app-sidebar-account .app-sidebar-panel-up { left: 0; min-width: 240px; }


/* =========================================
   MOBILE BOTTOM NAV
========================================= */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 500;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  align-items: stretch;
  justify-content: space-around;
}
.mbn-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 10px;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.64rem;
  font-family: inherit;
  cursor: pointer;
}
.mbn-item svg { width: 21px; height: 21px; stroke: currentColor; fill: none; }
.mbn-item.is-active { color: var(--color-accent); }
.mbn-profile .mbn-avatar-img { width: 21px; height: 21px; border-radius: 50%; object-fit: cover; }

/* Обёртки колокольчика/аккаунта в нижнем баре — не должны сами занимать
   место в flex-ряду, поэтому display:contents: реальным flex-элементом
   остаётся вложенная .mbn-item кнопка, как и у соседних пунктов. */
.mbn-item-wrap { display: contents; }
.mbn-item-wrap .btn-notif-bell {
  position: relative;
  border-radius: 10px;
}
.mbn-item-wrap .notif-bell-badge {
  position: absolute;
  top: 2px;
  right: 14px;
}

/* Всплывающие панели (уведомления / мини-меню профиля) нижнего мобильного
   бара — открываются по центру над баром, а не от границ узкой кнопки. */
.mbn-popup-panel {
  position: fixed !important;
  left: 12px !important;
  right: 12px !important;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important;
  top: auto !important;
  width: auto !important;
  max-width: 360px !important;
  margin: 0 auto;
  z-index: 9999;
}

/* =========================================
   ACCOUNT MENU (выпадающее меню профиля)
========================================= */
.account-menu-wrap { position: relative; }

.account-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  min-width: 220px;
  background: var(--color-card, var(--color-card-bg));
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 9999;
  animation: pcmFadeIn 0.12s ease;
}
.account-menu-wrap.is-open .account-menu { display: block; }

.account-menu-header {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 14px 8px;
}
.account-menu-label {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}
.account-menu-username {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-menu-username:hover { color: var(--color-accent); }

.account-menu-divider {
  height: 1px;
  background: var(--color-border);
}

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s;
  text-align: left;
  box-sizing: border-box;
}
.account-menu-item:hover { background: var(--color-bg-alt); }
.account-menu-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: 0.75;
}
.account-menu-logout { color: var(--badge-reviews, #e63946); }
.account-menu-logout svg { opacity: 1; }
.account-menu-logout:hover { background: rgba(230, 57, 70, 0.1); }

/* =========================================
   BADGE / TAG
========================================= */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--badge-default);
}
.badge-cosplay    { background: var(--badge-cosplay); }
.badge-reviews, .badge-news { background: var(--badge-reviews); }
.badge-special  { background: var(--badge-special); }
.badge-guide    { background: var(--badge-guide); }
.badge-blue   { background: var(--color-accent); }

/* =========================================
   HOME — FRESH RELEASES GRID
========================================= */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.releases-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

/* ---- Карусель «Специально для тебя!» (Flickity) ---- */
.releases-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.releases-section-head .section-title { margin-bottom: 0; }

.releases-carousel-nav { display: flex; gap: 8px; }
.carousel-arrow {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.carousel-arrow svg { width: 16px; height: 16px; }
.carousel-arrow:hover { background: var(--color-bg-alt); border-color: var(--color-accent); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }
.carousel-arrow:disabled:hover { background: var(--color-bg); border-color: var(--color-border); }

.releases-carousel { margin-bottom: 40px; }
.releases-carousel .carousel-cell {
  width: calc(45% - 11px);
  margin-right: 16px;
}
/* Пока Flickity не инициализировался — простой ряд с прокруткой, чтобы не было "стопки" карточек */
.releases-carousel:not(.flickity-enabled) {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}
.releases-carousel:not(.flickity-enabled)::-webkit-scrollbar { display: none; }
.releases-carousel:not(.flickity-enabled) .carousel-cell { flex-shrink: 0; }

.flickity-prev-next-button { display: none; } /* используем свои стрелки в шапке секции */

@media (max-width: 900px) {
  .releases-carousel .carousel-cell { width: calc(50% - 8px); }
}
@media (max-width: 560px) {
  .releases-carousel .carousel-cell { width: 78%; }
}

.release-card {
  cursor: pointer;
}

.release-card-thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/2;
}

.release-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.release-card:hover .release-card-thumb img { transform: scale(1.04); }

.release-card-badge {
  position: absolute;
  top: 10px; left: 10px;
}

.release-card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
}

.release-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.release-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   HOME — POST FEED + RIGHT PANEL
========================================= */
.home-content-grid {
  display: grid;
  grid-template-columns: 1fr 27%;
  gap: 32px;
}

/* POST CARD */
/* =========================================
   POST CARD — единая карточка поста.
   Два вида: обычный (картинка сверху) и .post-card--flat (картинка слева).
========================================= */
.post-card {
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 28px;
  margin-bottom: 28px;
}
.post-card:last-child { border-bottom: none; margin-bottom: 0; }

.post-card-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  aspect-ratio: 9/4;
}
.post-card-thumbnail img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.post-card:hover .post-card-thumbnail img { transform: scale(1.02); }

.post-card-body { min-width: 0; }

.post-card-badge { margin-bottom: 10px; }

.post-card-title {
  font-size: 1.4rem;
  margin-bottom: 10px;
  line-height: 1.25;
}
.post-card-title a:hover { color: var(--color-accent); }

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
.post-card-author-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}
.post-card-author-link img { border-radius: 50%; overflow: hidden; }
.post-card-author {
  font-weight: 700;
  color: var(--color-text);
  font-size: 0.8rem;
}
.post-card-author-link:hover .post-card-author { text-decoration: underline; color: var(--color-accent); }
.post-card-author-link:hover .post-card-avatar-img { outline: 2px solid var(--color-accent); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.post-card-footer-action {
  display: flex; align-items: center; gap: 5px;
}
.post-card-footer-action svg {
  width: 14px; height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Плоский вариант: картинка слева, всё остальное справа ---- */
.post-card--flat {
  flex-direction: row;
  gap: 20px;
  align-items: flex-start;
}
.post-card--flat .post-card-thumbnail {
  flex-shrink: 0;
  width: 220px;
  aspect-ratio: 4/3;
  margin-bottom: 0;
}
.post-card--flat .post-card-body { flex: 1; }
.post-card--flat .post-card-excerpt { margin-bottom: 8px; }

/* ---- Кнопка "···" и контекстное меню ---- */
.post-card-more-wrap {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}
.post-card-more {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 1.2rem;
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.post-card-more:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.post-card-context-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  min-width: 160px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  overflow: hidden;
  z-index: 100;
  animation: pcmFadeIn 0.12s ease;
}
.post-card-context-menu.is-open { display: block; }
@keyframes pcmFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pcm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--color-text);
  text-decoration: none;
  transition: background 0.12s;
  text-align: left;
  box-sizing: border-box;
}
.pcm-item:hover { background: var(--color-bg-alt); }
.pcm-item svg { flex-shrink: 0; opacity: 0.7; }
.pcm-report { color: #f87171; }
.pcm-report svg { stroke: #f87171; }
.pcm-edit { color: #34d399; }
.pcm-edit svg { stroke: #34d399; }



.single-post-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}
.single-post-breadcrumbs a { color: var(--color-text-muted); }
.single-post-breadcrumbs a:hover { color: var(--color-accent); }
.single-post-breadcrumbs span[aria-hidden] { opacity: 0.5; }
.single-post-breadcrumbs-current {
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

/* RIGHT PANEL — sticky inner */
.right-panel {
  /* Колонка сама по себе не sticky — sticky делаем внутренний div */
}
.right-panel-sticky {
  position: sticky;
  top: 16px;
  overflow-y: auto;
	margin-top: 32px;
}
.right-panel-sticky::-webkit-scrollbar { display: none; }

/* RIGHT PANEL headings */
.right-panel h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  margin-top: 32px;
}
.right-panel h3:first-child { margin-top: 0; }

/* Trending authors */
.trending-list { display: flex; flex-direction: column; gap: 12px; }
.trending-item { display: flex; align-items: flex-start; gap: 10px; }
.trending-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-border);
}
.trending-avatar img { width: 100%; height: 100%; object-fit: cover; }
.trending-text {
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--color-text);
}

/* =========================================
   SINGLE POST PAGE
========================================= */
.single-post-grid {
  display: grid;
  grid-template-columns: 1fr 27%;
  gap: 40px;
}

.single-post-header { margin-bottom: 24px; }
.single-post-header .badge { margin-bottom: 12px; }
.single-post-title {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.2;
}
.single-post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
}
.single-post-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-border);
  flex-shrink: 0;
}
.single-post-avatar img { width: 100%; height: 100%; object-fit: cover; }
.single-post-author-name { font-weight: 700; }
.single-post-date { color: var(--color-text-muted); }
.single-post-stats {
  display: flex; gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

.single-post-thumbnail {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 28px;
}
.single-post-thumbnail img { width: 100%; height: 100%; object-fit: cover; }

.post-content {
  font-size: 1.1rem;
  line-height: 1.76;
  color: var(--color-text);
}
.post-content p { margin-bottom: 20px; }
.post-content p a { color: var(--color-accent, var(--color-accent)); text-decoration:underline; }
.post-content h2 { font-size: 1.4rem; margin: 32px 0 12px; }
.post-content h3 { font-size: 1.15rem; margin: 24px 0 10px; }

.post-tags {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 32px;
}
.post-tag {
  padding: 5px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--transition);
}
.post-tag:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Comments */
.comments-section { margin-top: 40px; }
.comments-title {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}

.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  min-height: 80px;
  transition: border-color var(--transition);
}
.comment-form textarea:focus { outline: none; border-color: var(--color-accent); }

.btn-submit {
  display: block;
  margin-left: auto;
  margin-top: 10px;
  padding: 10px 28px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background var(--transition);
}
.btn-submit:hover { background: var(--color-accent); }

.comment-list { display: flex; flex-direction: column; gap: 20px; margin-top: 24px; }
.comment-item { display: flex; gap: 12px; align-items: flex-start; }
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  font-size: 0; background: var(--color-border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; color: #fff;
}
.comment-body {width:100%;}
.comment-meta { font-size: 0.8rem; color: var(--color-text-muted); margin-bottom: 4px; }
.comment-meta strong { color: var(--color-text); font-weight: 700; margin-right: 6px; }
.comment-text { font-size: 0.9rem; line-height: 1.5; }
.comment-actions {
  display: flex; gap: 12px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}
.comment-actions a:hover { color: var(--color-accent); }

/* Recent posts sidebar */
.recent-posts-sidebar { display: flex; flex-direction: column; gap: 16px; }
.recent-post-item {}
.recent-post-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/9;
  margin-bottom: 8px;
  position: relative;
}
.recent-post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-post-thumb .badge { position: absolute; bottom: 8px; left: 8px; }
.recent-post-date { font-size: 0.75rem; color: var(--color-text-muted); margin-bottom: 4px; }

/* =========================================
   GAME PAGE
========================================= */
.game-page-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 0;
  align-items: start;
}

.game-hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.game-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  position: relative;
  aspect-ratio: 16/9;
}
.game-cover img { width: 100%; height: 100%; object-fit: cover; }
.game-cover .badge { position: absolute; top: 16px; left: 16px; font-size: 0.9rem; padding: 5px 14px; }

.game-info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 28px;
}
.game-info-table tr { border-bottom: 1px solid var(--color-border); }
.game-info-table td {
  padding: 14px 0;
  font-size: 0.95rem;
  vertical-align: top;
}
.game-info-table td:first-child {
  color: var(--color-text-muted);
  width: 40%;
}
.game-info-table td:last-child { font-weight: 700; }

/* ---- Game Meta Block (новый стиль) ---- */
.game-meta-block {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.game-meta-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 7px 15px;
  border-bottom: 1px solid var(--color-border);
}
.game-meta-row:last-child { border-bottom: none; }
.game-meta-label {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  width: 130px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  padding-top: 2px;
}
.game-meta-label svg { opacity: 0.6; flex-shrink: 0; }
.game-meta-value {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}
.game-meta-plain {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  align-items: center;
}
.game-meta-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-bg-alt, var(--color-bg-alt));
  color: var(--color-text);
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.game-meta-pill:hover {
  background: var(--color-accent, #7c3aed);
  color: #fff;
  border-color: var(--color-accent, #7c3aed);
}

/* ---- Строка: мета-блок + блок рейтингов ---- */
.game-meta-ratings-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.game-meta-col { flex: 2 1 0; min-width: 0; display: flex; flex-direction: column; }

.game-box-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}

/* ---- Боковая колонка: рейтинги + системные требования ---- */
.game-sidebar-col {
  flex: 1 1 0;
  min-width: 168px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Блок рейтингов ---- */
.game-ratings-block {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.game-rating-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 15px;
  border-bottom: 1px solid var(--color-border);
}
.game-rating-item:last-child { border-bottom: none; }
.game-rating-source {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}
.game-rating-val-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  color: var(--color-text);
}
.game-rating-num {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}
.game-rating-site .game-rating-val-row { align-items: center; }
.game-rating-site .review-stars-display { display: inline-flex; gap: 1px; }
.game-rating-site .star { width: 14px; height: 14px; }
.game-rating-tier {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}
a.game-rating-val-row:hover .game-rating-num { color: var(--color-accent); }

/* ---- Системные требования (табы, в боковой колонке) ---- */
.sys-req-card {
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 15px;
}
.sys-req-card-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin: 0 0 10px;
}
.sys-req-tabs {
  display: flex;
  background: var(--color-bg-alt);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
  margin-bottom: 10px;
}
.sys-req-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sys-req-tab.is-active {
  background: var(--color-accent);
  color: #fff;
}
.sys-req-panel[hidden] { display: none; }
.sys-req-line {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.82rem;
}
.sys-req-line:last-child { border-bottom: none; }
.sys-req-line > span:first-child {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}
.sys-req-line > span:last-child {
  color: var(--color-text);
  font-weight: 600;
}

@media (max-width: 640px) {
  .game-meta-ratings-row { flex-direction: column; }
  .game-sidebar-col { width: 100%; }
  .game-ratings-block { flex-direction: row; flex-wrap: wrap; }
  .game-rating-item { flex: 1 1 45%; border-bottom: none; border-right: 1px solid var(--color-border); }
  .game-rating-item:nth-child(2n) { border-right: none; }
}

/* ---- Галерея скриншотов Steam ---- */
.steam-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.steam-gallery::-webkit-scrollbar { height: 6px; }
.steam-gallery::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
.steam-gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
  border: 1px solid var(--color-border);
}
.steam-gallery-thumb {
  height: 120px;
  width: auto;
  display: block;
  object-fit: cover;
  transition: transform 0.2s;
}
.steam-gallery-item:hover .steam-gallery-thumb { transform: scale(1.03); }
@media (max-width: 480px) {
  .steam-gallery-thumb { height: 92px; }
}

.esrb-badge {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: 2px solid var(--color-text);
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.9rem;
}

/* =========================================
   GAME PAGE V2 — двухколоночный хедер
========================================= */

/* Обёртка хедера переопределяет отступы профиля */
.game-header-wrap {
  margin-bottom: 0;
  /* Переопределяем overflow: hidden от .profile-header-wrap
     чтобы статус-меню не обрезалось */
  overflow: visible !important;
}

/* Двухколоночный хедер: обложка + инфо */
.game-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 28px 20px;
}

/* ---- Вариант с фоновым изображением из Steam ---- */
.game-header-inner.has-steam-hero {
  border-radius: var(--radius);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
}
.game-header-inner.has-steam-hero .game-hero-title { color: #fff; }
.game-header-inner.has-steam-hero .game-quick-meta,
.game-header-inner.has-steam-hero .game-quick-meta-item,
.game-header-inner.has-steam-hero .game-quick-meta-sep { color: rgba(255,255,255,0.78); }
.game-header-inner.has-steam-hero .game-quick-meta-item a { color: rgba(255,255,255,0.78); }
.game-header-inner.has-steam-hero .game-quick-meta-item a:hover { color: #fff; }
.game-header-inner.has-steam-hero .game-avg-num,
.game-header-inner.has-steam-hero .game-avg-count,
.game-header-inner.has-steam-hero .game-avg-none { color: rgba(255,255,255,0.85); }
.game-header-inner.has-steam-hero .game-excerpt { color: rgba(255,255,255,0.72); }
.game-header-inner.has-steam-hero .game-cover-box {
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Левая колонка — обложка */
.game-cover-col {
  flex-shrink: 0;
  width: 160px;
}
.game-cover-box {
  position: relative;
  width: 160px;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg,#1a1a2e 0%,#7c3aed 50%,#ea580c 100%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.game-cover-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.game-cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,#1a1a2e 0%,#7c3aed 50%,#ea580c 100%);
}
.game-cover-box .badge {
  position: absolute;
}
.game-cover-box .badge-rpg    { bottom: 8px; left: 8px; }
.game-cover-box .badge-upcoming { top: 8px; right: 8px; }

/* Правая колонка — инфо */
.game-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Строка: название */
.game-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.game-hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  flex: 1;
  min-width: 0;
}

/* Статус внизу правой колонки */
.game-info-col .game-status-wrap {
  margin-top: auto;
  padding-top: 4px;
  position: relative;
  z-index: 9000;
}

/* Быстрая мета: разработчик · дата · платформы */
.game-quick-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.game-quick-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.game-quick-meta-item svg { opacity: 0.5; flex-shrink: 0; }
.game-quick-meta-item a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.game-quick-meta-item a:hover { color: var(--color-accent); }
.game-quick-meta-sep {
  color: var(--color-border);
  user-select: none;
}

/* Excerpt */
.game-excerpt {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Адаптив для game-header-inner ── */
@media (max-width: 480px) {
  .game-header-inner {
    flex-direction: column;
    padding: 16px 16px 14px;
    gap: 16px;
  }
  .game-cover-col { width: 100%; }
  .game-cover-box { width: 100%; aspect-ratio: 16/9; }
  .game-hero-title { font-size: 1.1rem; }
}

/* =========================================
   SEARCH
========================================= */
.search-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 100px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s;
}
.search-overlay.active { opacity: 1; pointer-events: all; }
.search-box {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 20px;
  width: 560px;
  max-width: 90vw;
  box-shadow: var(--shadow-hover);
}
.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
}

/* =========================================
   UTILITIES
========================================= */
.text-muted { color: var(--color-text-muted); }
.mt-0 { margin-top: 0; }
.hidden { display: none; }

/* =========================================
   PROFILE / AUTHOR PAGE
========================================= */
.profile-page {
  max-width: 900px;
	margin: 0 auto;
}

/* Header */
.profile-header-wrap {
  margin-bottom: 36px;
}

.profile-cover {
  height: 100px;
  background: linear-gradient(135deg, #1a1a2e 0%, #2d2d5e 50%, #1a3a2e 100%);
  border-radius: var(--radius);
  position: relative;
  margin-bottom: 48px;
  overflow: hidden;
}

.profile-avatar-wrap {
  position: absolute;
  bottom: -36px;
  left: 24px;
}

.profile-avatar-initials,
.profile-avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.profile-avatar-img {
  object-fit: cover;
  display: block;
}

.profile-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-display-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-handle {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.profile-bio {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  max-width: 420px;
}

.btn-profile-edit {
  padding: 7px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  white-space: nowrap;
  transition: all var(--transition);
  flex-shrink: 0;
}
.btn-profile-edit:hover {
  border-color: var(--color-text);
  color: var(--color-text);
}

/* Stats bar */
.profile-stats-bar {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.profile-stat {
  flex: 1;
  padding: 14px 0;
  text-align: center;
  border-right: 1px solid var(--color-border);
}
.profile-stat:last-child { border-right: none; }

.profile-stat-num {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}

.profile-stat-lbl {
  display: block;
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Body layout */
.profile-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.profile-section {}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.profile-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.profile-section-head .profile-section-title { margin-bottom: 0; }
.profile-section-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}
.profile-section-link:hover { color: var(--color-accent-hover); }

.dash-genre-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-genre-pill {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dash-genre-pill:hover {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

/* Post feed */
.profile-post-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* =========================================
   СТРАНИЦА ИГРЫ: сетка для отзывов и публикаций
   (только .game-page-v2 — страница автора не затрагивается)
========================================= */
.game-page-v2 .profile-post-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32%, 1fr));
  gap: 16px;
}
.game-page-v2 .profile-post-row {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  height: 100%;
}
.game-page-v2 .profile-post-thumb,
.game-page-v2 .profile-post-thumb-ph {
  width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  border-radius: 0;
}
.game-page-v2 .profile-post-info {
  padding: 12px 14px 14px;
}
.game-page-v2 .profile-post-title {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-page-v2 .review-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(32%, 1fr));
  gap: 16px;
}
.game-page-v2 .review-item,
.game-page-v2 .review-item-link {
  height: 100%;
}
.game-page-v2 .review-item-link .review-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Вкладка "Отзывы" (полный список) — оставляем прежний вид, без сетки */
.game-page-v2 #reviewList {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.game-page-v2 #reviewList .review-item { height: auto; }

@media (max-width: 640px) {
  .game-page-v2 .profile-post-feed,
  .game-page-v2 .review-list {
    grid-template-columns: 1fr;
  }
}

.btn-profile-more {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 20px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.btn-profile-more:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.profile-empty {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Two column */
.profile-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Heatmap */
.profile-heatmap {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.heatmap-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--color-border);
}
.heatmap-cell.level-1 { background: #bfdbfe; }
.heatmap-cell.level-2 { background: #60a5fa; }
.heatmap-cell.level-3 { background: var(--color-accent); }
.heatmap-cell.level-4 { background: var(--color-accent-hover); }
.heatmap-cell.heatmap-cell-future { opacity: 0.35; }

.heatmap-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.65rem;
  color: var(--color-text-muted);
}

/* Achievements */
.profile-achievements {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ach-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.ach-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.ach-body { flex: 1; min-width: 0; }

.ach-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text);
}

.ach-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 1px;
}

.ach-xp {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent);
  white-space: nowrap;
}

/* Favourite games */
.profile-fav-games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* Responsive */
@media (max-width: 640px) {
  .profile-two-col { grid-template-columns: 1fr; }
  .profile-stats-bar { flex-wrap: wrap; }
  .profile-stat { flex-basis: 33.33%; }
  .profile-fav-games { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   RESPONSIVE
========================================= */
@media (max-width: 1024px) {
  .releases-grid { grid-template-columns: repeat(2, 1fr); }
  .home-content-grid, .single-post-grid { grid-template-columns: 1fr; }
  .right-panel { display: none; }
  .app-sidebar { display: none; }
  .site-main,
  html.sidebar-expanded .site-main { margin-left: 0; padding-bottom: 68px; }
  .mobile-bottom-nav { display: flex; }
}

@media (max-width: 640px) {
  .releases-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .site-main-inner { padding: 20px 16px; }
  .single-post-title { font-size: 1.5rem; }
  .game-hero-title { font-size: 2rem; }
}

/* =========================================
   Кликабельная ссылка автора в шапке статьи
========================================= */
.single-post-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.single-post-author-link:hover .single-post-author-name {
  text-decoration: underline;
  color: var(--color-accent, var(--color-accent));
}
.single-post-author-link:hover .single-post-avatar img {
  outline: 2px solid var(--color-accent, var(--color-accent));
}

/* Fix: keep byline layout after wrapping author in <a> */
.single-post-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* comment avatar link */
.comment-avatar-link {
  display: block;
  text-decoration: none;
  flex-shrink: 0;
}
.comment-avatar-link:hover .comment-avatar {
  outline: 2px solid var(--color-accent, var(--color-accent));
}
.comment-author-link {
  text-decoration: none;
  color: inherit;
}
.comment-author-link:hover strong {
  text-decoration: underline;
  color: var(--color-accent, var(--color-accent));
}

/* =========================================
   FIX 3 — CLICKABLE COMMENTS STAT
========================================= */
.profile-stat-comments-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 2px;
}
.profile-stat-comments-link:hover .profile-stat-num {
  color: var(--color-accent, var(--color-accent));
  text-decoration: underline;
}

/* =========================================
   REPORT MODAL
========================================= */
.gbr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.18s ease;
}
.gbr-overlay.is-visible {
  opacity: 1;
}
.gbr-overlay.is-visible .gbr-modal {
  transform: translateY(0);
  opacity: 1;
}

.gbr-modal {
  background: var(--color-card-bg);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  overflow: hidden;
}

.gbr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.gbr-modal-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-text);
}

.gbr-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  color: #6b7280;
  font-size: 1rem;
  padding: 4px;
  line-height: 1;
  transition: color 0.12s;
}
.gbr-modal-close:hover { color: #e5e7eb; }

.gbr-modal-body {
  padding: 20px;
}

.gbr-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--color-text);
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
  transition: background 0.12s, border-color 0.12s;
}
.gbr-radio-label:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.15);
}
.gbr-radio-label input[type="radio"] {
  accent-color: var(--color-accent);
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.gbr-btn-primary {
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.gbr-btn-primary:hover { background: var(--color-accent-hover); }
.gbr-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.gbr-btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--color-text);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s;
}
.gbr-btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* =========================================
   FIX 3 — READING PROGRESS BAR
========================================= */
.reading-progress-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.06);
  z-index: 9998;
  pointer-events: none;
}
.reading-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-accent, #2563eb), #7c3aed);
  transition: width 0.1s linear;
  border-radius: 0 2px 2px 0;
}

/* Reading time badge in byline */
.single-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-text-muted, #9ca3af);
}

/* =========================================
   FIX 4 — BOOKMARK BUTTON (single post)
========================================= */
.btn-bookmark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: transparent;
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.btn-bookmark:hover {
  background: rgba(37,99,235,0.12);
  color: var(--color-accent, var(--color-accent));
  border-color: var(--color-accent, var(--color-accent));
}
.btn-bookmark.is-saved {
  background: rgba(37,99,235,0.15);
  color: var(--color-accent, var(--color-accent));
  border-color: var(--color-accent, var(--color-accent));
}
.btn-bookmark.is-saved svg {
  fill: currentColor;
}

/* Context menu bookmark item when saved */
.pcm-bookmark.is-saved {
  color: var(--color-accent, var(--color-accent));
}
.pcm-bookmark.is-saved svg {
  stroke: var(--color-accent, var(--color-accent));
  fill: var(--color-accent, var(--color-accent));
}

/* =========================================
   FIX 5 — POST VIEWS COUNTER
========================================= */
/* (reuses .post-card-footer-action, just needs svg fill:none already set) */

/* =========================================
   FIX 6 — ACTIVE NAV INDICATOR
========================================= */


/* =========================================
   PROFILE HEADER — новая шапка (Fix 5)
========================================= */
.profile-header-wrap {
  margin-bottom:1rem;
  overflow: hidden;
}

/* убираем старую обложку */
.profile-cover { display: none !important; }

.profile-header-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 28px 28px 0;
  position: relative;
}

.profile-header-inner .profile-avatar-wrap {
  flex-shrink: 0;
  position: static;
  transform: none;
  margin: 0;
}
.profile-header-inner .profile-avatar-wrap .profile-avatar-img,
.profile-header-inner .profile-avatar-wrap .profile-avatar-initials {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--color-bg, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.profile-header-inner .profile-meta-info {
  flex: 1;
  min-width: 0;
}

.profile-header-inner .btn-profile-edit {
  flex-shrink: 0;
  align-self: flex-start;
}

/* Stats bar inside header */
.profile-header-inner .profile-stats-bar {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
}

.profile-stat-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  gap: 2px;
}
.profile-stat-link:hover .profile-stat-num {
  color: var(--color-accent, var(--color-accent));
}

/* =========================================
   PROFILE TABS (Fix 2)
========================================= */
.profile-tabs {
  display: flex;
  gap: 0;
  padding: 0;
  margin-top: 20px;
  border-top: 1px solid var(--color-border, rgba(255,255,255,0.08));
  overflow-x: auto;
}
.profile-tabs::-webkit-scrollbar { display: none; }

.profile-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted, #9ca3af);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.profile-tab:hover {
  color: var(--color-text, #e5e7eb);
}
.profile-tab.is-active {
  color: var(--color-accent, var(--color-accent));
  border-bottom-color: var(--color-accent, var(--color-accent));
}

.profile-tab-count {
  background: var(--color-border, rgba(255,255,255,0.1));
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  line-height: 1.5;
}
.profile-tab.is-active .profile-tab-count {
  background: rgba(37,99,235,0.15);
  color: var(--color-accent, var(--color-accent));
}

/* =========================================
   PROFILE COMMENTS FEED (Fix 4)
========================================= */
.profile-comments-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-comment-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.06));
}
.profile-comment-row:last-child {
  border-bottom: none;
}

/* =========================================
   COMMENT REPLY SYSTEM (Fix 1)
========================================= */
.comment-reply-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted, #9ca3af);
  cursor: pointer;
  font-family: inherit;
  transition: color 0.12s;
}
.comment-reply-btn:hover {
  color: var(--color-accent, var(--color-accent));
}

.comment-reply-form {
  margin-top: 12px;
  animation: replySlideIn 0.15s ease;
}
@keyframes replySlideIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reply-form-inner textarea {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg, #111827);
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  color: var(--color-text, #e5e7eb);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
  font-family: inherit;
  resize: vertical;
  min-height: 72px;
}
.reply-form-inner textarea:focus {
  outline: none;
  border-color: var(--color-accent, var(--color-accent));
}

.reply-guest-fields {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.reply-guest-fields input {
  flex: 1;
  background: var(--color-bg, #111827);
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  color: var(--color-text, #e5e7eb);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-family: inherit;
}
.reply-guest-fields input:focus {
  outline: none;
  border-color: var(--color-accent, var(--color-accent));
}

.reply-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.btn-submit-sm {
  padding: 7px 16px;
  font-size: 0.83rem;
}

.comment-reply-cancel {
  background: none;
  border: none;
  font-size: 0.83rem;
  color: var(--color-text-muted, #9ca3af);
  cursor: pointer;
  font-family: inherit;
  padding: 7px 10px;
  border-radius: 6px;
  transition: color 0.12s, background 0.12s;
}
.comment-reply-cancel:hover {
  color: var(--color-text, #e5e7eb);
  background: rgba(255,255,255,0.05);
}

/* Nested replies indent */
.comment-children {
  margin-top: 12px;
  padding-left: 10px;
  border-left: 2px solid var(--color-border, rgba(255,255,255,0.08));
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Depth 4+ — keep visual nesting but stop adding left padding */
.comment-children.comment-children-capped {
  padding-left: 5px;
  border-left: 2px solid var(--color-border, rgba(255,255,255,0.08));
  margin-left: -2rem;
}

.comment-avatar-sm {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px;
  font-size: 0.72rem !important;
}


/* =========================================
   FIX 1 — GUEST FIELDS IN MAIN COMMENT FORM
========================================= */
.comment-guest-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.comment-guest-fields input {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-bg, #111827);
  border: 1px solid var(--color-border, rgba(255,255,255,0.12));
  color: var(--color-text, #e5e7eb);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-family: inherit;
  transition: border-color 0.15s;
}
.comment-guest-fields input:focus {
  outline: none;
  border-color: var(--color-accent, var(--color-accent));
}
.comment-guest-fields input::placeholder {
  color: var(--color-text-muted, #6b7280);
}
@media (max-width: 480px) {
  .comment-guest-fields { grid-template-columns: 1fr; }
}

/* =========================================
   FIX 3 — PROFILE PAGINATION
========================================= */
.profile-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 20px;
  align-items: center;
}
.profile-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.1));
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.profile-pagination .page-numbers:hover {
  background: rgba(255,255,255,0.06);
  color: var(--color-text, #e5e7eb);
}
.profile-pagination .page-numbers.current {
  background: var(--color-accent, var(--color-accent));
  color: #fff;
  border-color: transparent;
}
.profile-pagination .page-numbers.dots {
  border-color: transparent;
  background: transparent;
  cursor: default;
  pointer-events: none;
  color: var(--color-text-muted, #9ca3af);
  padding: 0 4px;
  min-width: auto;
}
.profile-pagination .page-numbers.prev,
.profile-pagination .page-numbers.next {
  font-size: 1rem;
}

/* =========================================
   MOBILE MENU (оверлей-меню категорий)
========================================= */

/* Overlay */
.mobile-menu-overlay {
  display: block;           /* всегда в DOM */
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  opacity: 0;
  pointer-events: none;     /* не блокирует клики пока закрыт */
  transition: opacity 0.22s ease;
}
.mobile-menu-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;     /* блокирует только когда открыт */
}

/* Menu drawer */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(300px, 85vw);
  background: var(--color-bg);
  z-index: 10001;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  overflow-y: auto;
}
.mobile-menu.is-open {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.mobile-menu-header .app-sidebar-logo {
  font-size: 1.1rem;
  font-family: var(--font-logo);
  font-weight: 700;
  text-transform: uppercase;
}

.mobile-menu-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-muted);
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.mobile-menu-body {
  padding: 16px 20px 32px;
  flex: 1;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
}
.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 4px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 1px solid var(--color-border);
  transition: color 0.15s, padding-left 0.15s;
}
.mobile-nav-list a:last-child { border-bottom: none; }
.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  color: var(--color-accent);
  padding-left: 10px;
}
.mobile-nav-list .sidebar-menu-icon { width: 20px; height: 20px; opacity: 1; }
.mobile-nav-list .sidebar-menu-label { opacity: 1 !important; width: auto !important; }

.mobile-menu-divider {
  height: 1px;
  background: var(--color-border);
  margin: 4px 4px 12px;
}
.mobile-menu-theme-toggle {
  width: 100%;
  padding: 10px 4px;
  font-size: 1rem;
  font-weight: 600;
}
.mobile-menu-theme-toggle .app-sidebar-icon { width: 20px; height: 20px; }
.mobile-menu-theme-toggle .app-sidebar-label { opacity: 1 !important; width: auto !important; }

/* =========================================
   FIX 1 — PROFILE PAGE MOBILE АДАПТАЦИЯ
========================================= */

/* Шапка профиля: на мобиле — в колонку */
@media (max-width: 640px) {
  .profile-header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 0;
    gap: 14px;
  }
  .profile-header-inner .profile-meta-info {
    width: 100%;
  }
  .profile-display-name {
    font-size: 1.3rem;
  }
  .profile-handle {
    font-size: 0.78rem;
  }
  .profile-bio {
    font-size: 0.85rem;
  }
  .profile-stats-bar {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
  }
  .profile-stat {
    flex-basis: 33.33%;
    border-right: 1px solid var(--color-border);
    padding: 10px 4px;
  }
  .profile-stat:nth-child(3) { border-right: none; }
  .profile-stat:nth-child(4) { border-top: 1px solid var(--color-border); }
  .profile-stat:nth-child(5) { border-top: 1px solid var(--color-border); border-right: none; }
  .profile-stat-num { font-size: 1rem; }
  .profile-stat-lbl { font-size: 0.68rem; }
  .btn-profile-edit {
    align-self: center;
    width: 100%;
    text-align: center;
    margin-bottom: 0;
  }

  /* Вкладки профиля — горизонтальный скролл */
  .profile-tabs {
    padding: 0 16px;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .profile-tab {
    padding: 10px 12px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .profile-tab-count { display: none; }

  /* Тело профиля */
  .profile-body { padding: 0 16px 32px; }
  .profile-section { padding: 16px 0; }
  .profile-section-title { font-size: 0.95rem; }

  /* Строки постов в профиле */
  .profile-post-row {
    gap: 10px;
  }
  .profile-post-thumb,
  .profile-post-thumb-ph {
    width: 60px;
    min-width: 60px;
    height: 44px;
  }
  .profile-post-title { font-size: 0.88rem; }
  .profile-post-meta { font-size: 0.72rem; gap: 6px; }

  /* Строки комментариев */
  .profile-comment-row { gap: 8px; }
  .comment-text { font-size: 0.85rem; }

  /* Ачивки */
  .ach-item { gap: 10px; }
  .ach-name { font-size: 0.85rem; }
  .ach-desc { font-size: 0.75rem; }
  .ach-xp   { font-size: 0.75rem; white-space: nowrap; }

  /* Heatmap */
  .profile-heatmap { gap: 3px; }
  .heatmap-cell { width: 10px; height: 10px; border-radius: 2px; }

  /* Two-col → one-col */
  .profile-two-col { grid-template-columns: 1fr; gap: 0; }

  /* Fav games */
  .profile-fav-games { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .fav-game-cover { height: 80px; }
  .fav-game-title { font-size: 0.78rem; }

  /* Btn more */
  .btn-profile-more { font-size: 0.82rem; padding: 8px 14px; }

  /* Pagination */
  .profile-pagination { gap: 4px; }
  .profile-pagination .page-numbers { min-width: 32px; height: 32px; font-size: 0.8rem; }
}

/* Tablet 641-1024 */
@media (min-width: 768px) and (max-width: 1024px) {
  .profile-header-inner {
    padding: 24px 24px 0;
    gap: 16px;
    flex-wrap: wrap;
  }
  .profile-stat { padding: 10px 12px; }
  .profile-body { padding: 0 24px 32px; }
  .profile-two-col { grid-template-columns: 1fr; }
  .profile-fav-games { grid-template-columns: repeat(3, 1fr); }
}

/* =========================================
   FIX 4 — INTER FONT: перезаписываем хардкод
   Некоторые элементы хардкодили font-family
========================================= */
h1, h2, h3, h4, h5, h6,
.app-sidebar-logo-text,
.section-title,
.profile-display-name,
.ach-name,
.profile-section-title,
.post-card-title,
.single-post-title,
.comments-title {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.01em;
}

/* =========================================
   LITE YOUTUBE EMBED — стили
========================================= */
lite-youtube {
  display: block;
  contain: layout paint;
  background-color: #000;
  background-size: cover;           /* Fix: ensure JS-set thumbnail fills element */
  background-position: center;
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  overflow: hidden;
  cursor: pointer;
  border-radius: var(--radius, 8px);
  margin: 1.5em 0;
}
lite-youtube > iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important; /* Fix: override global img/video/iframe { height: auto } */
  border: 0;
}
lite-youtube > .lty-playbtn {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  inset: 0;
  width: 100%;
  cursor: pointer;
  border: 0;
  background: transparent;
  /* YouTube red play icon через SVG */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 68 48'%3E%3Cpath d='M66.52 7.74c-.78-2.93-2.49-5.41-5.42-6.19C55.79.13 34 0 34 0S12.21.13 6.9 1.55c-2.93.78-4.63 3.26-5.42 6.19C.06 13.05 0 24 0 24s.06 10.95 1.48 16.26c.78 2.93 2.49 5.41 5.42 6.19C12.21 47.87 34 48 34 48s21.79-.13 27.1-1.55c2.93-.78 4.64-3.26 5.42-6.19C67.94 34.95 68 24 68 24s-.06-10.95-1.48-16.26z' fill='%23f00'/%3E%3Cpath d='M45 24 27 14v20' fill='%23fff'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 68px 48px;
  filter: grayscale(100%);
  transition: filter 0.1s cubic-bezier(0, 0, 0.2, 1);
  z-index: 1;
}
lite-youtube:hover > .lty-playbtn,
lite-youtube > .lty-playbtn:focus {
  filter: none;
}
lite-youtube.lyt-activated > .lty-playbtn { display: none; }

/* Gradient overlay для читаемости */
lite-youtube::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.3) 0%, transparent 60%);
  pointer-events: none; /* Fix: never block iframe interaction */
}
/* Hide gradient overlay once video is active */
lite-youtube.lyt-activated::after {
  display: none;
}

.lyt-visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* lazy loading — без скрытия, браузер сам управляет загрузкой */

/* =========================================
   FIX 2 — ПОЛНЫЙ RESPONSIVE DESIGN
   Все элементы плавно адаптируются
========================================= */

/* ── Глобальные защитные правила ───────── */
*, *::before, *::after {
  min-width: 0;      /* fix flex/grid overflow */
}
img, video {
  max-width: 100%;
  height: auto;
}
iframe, embed, object {
  max-width: 100%;
  /* без height:auto — иначе встраивания с собственной высотой
     (reddit, pinterest, внутренние карточки) схлопываются и обрезаются */
}
table {
  width: 100%;
  overflow-x: auto;
  display: block;
}

/* ── Контейнер ──────────────────────────── */
/* .site-container теперь полноширинный — см. основной блок LAYOUT выше;
   центрирование контента происходит внутри .site-main-inner. */

/* ── Основная сетка (адаптив) ────────────── */
@media (max-width: 1024px) {
  .app-sidebar           { display: none; }
  .site-main,
  html.sidebar-expanded .site-main { margin-left: 0; padding-bottom: 68px; }
  .mobile-bottom-nav      { display: flex; }
  .home-content-grid,
  .single-post-grid      { grid-template-columns: 1fr; gap: 0; }
  .right-panel           { display: none; }
  .site-main-inner       { padding: 20px 7px; }
}

/* ── Releases grid ──────────────────────── */
@media (max-width: 1024px) {
  .releases-section      { padding: 0; }
  .releases-grid         { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 480px) {
  .releases-grid         { grid-template-columns: 1fr; gap: 10px; }
  .release-card-thumb    { aspect-ratio: 16/9; }
}

/* ── Post cards ─────────────────────────── */
@media (max-width: 640px) {
  .post-card             { padding-bottom: 20px; margin-bottom: 20px; }
  .post-card-title       { font-size: 1.1rem; }
  .post-card-footer      { flex-wrap: wrap; gap: 10px; }
  .post-card-thumbnail   { aspect-ratio: 16/9; }
}

/* ── Single post ─────────────────────────── */
@media (max-width: 640px) {
  .single-post-title     { font-size: 1.4rem; line-height: 1.25; }
  .single-post-byline    { flex-wrap: wrap; gap: 8px; }
  .single-post-stats     { flex-wrap: wrap; gap: 8px; }
  .post-content img      { border-radius: var(--radius); }
  /* Таблицы внутри поста */
  .post-content table    { font-size: 0.82rem; }
  .post-content pre,
  .post-content code     { font-size: 0.82rem; overflow-x: auto; display: block; white-space: pre; }
}

/* ── Comments ────────────────────────────── */
@media (max-width: 640px) {
  .comments-section      { margin-top: 24px; }
  .comment-form textarea { font-size: 0.9rem; }
  .comment-guest-fields  { grid-template-columns: 1fr; }
  .comment-item          { gap: 8px; }
  .comment-avatar        { width: 32px; height: 32px; min-width: 32px; font-size: 0.8rem; }
  .comment-text          { font-size: 0.88rem; }
  .comment-children      { padding-left: 12px; }
  .reply-guest-fields    { flex-direction: column; }
}

/* ── Search overlay ──────────────────────── */
@media (max-width: 640px) {
  .search-box { width: calc(100vw - 32px); padding: 14px; }
}

/* ── Game pages ──────────────────────────── */
@media (max-width: 768px) {
  .game-hero             { padding: 24px 16px; }
  .game-hero-title       { font-size: 1.6rem; }
  .game-meta-grid        { grid-template-columns: 1fr; }
}

/* ── Archive / Search ────────────────────── */
@media (max-width: 640px) {
  .section-title         { font-size: 1.2rem; }
}

/* ── Post tags ───────────────────────────── */
@media (max-width: 640px) {
  .post-tags             { gap: 6px; }
  .post-tag              { font-size: 0.75rem; padding: 3px 8px; }
}

/* ── Profile page — усиленная адаптация ─── */
@media (max-width: 1024px) {
  .profile-page          { max-width: 100%; padding: 0; }
  .profile-body          { padding: 0 16px 32px; }
}
@media (max-width: 640px) {
  .profile-page          { max-width: 100%; }
  .profile-header-inner  { padding: 16px; }

  /* Статистика: 3 в ряд */
  .profile-stats-bar     { gap: 0; }
  .profile-stat          { flex: 1 1 33.33%; min-width: 0; padding: 8px 4px; }

  /* Посты */
  .profile-post-row      { gap: 10px; align-items: flex-start; }
  .profile-post-thumb    { width: 64px; min-width: 64px; height: 46px; flex-shrink: 0; }
  .profile-post-thumb-ph { width: 64px; min-width: 64px; height: 46px; font-size: 0.6rem; }
  .profile-post-info     { min-width: 0; flex: 1; }
  .profile-post-title    { font-size: 0.88rem; line-height: 1.3;
                           display: -webkit-box; -webkit-line-clamp: 2;
                           -webkit-box-orient: vertical; overflow: hidden; }
  .profile-post-meta     { font-size: 0.72rem; flex-wrap: wrap; gap: 4px; }

  /* Ачивки */
  .ach-item              { gap: 8px; flex-wrap: nowrap; }
  .ach-icon              { flex-shrink: 0; }
  .ach-body              { min-width: 0; flex: 1; }
  .ach-xp                { flex-shrink: 0; font-size: 0.72rem; }

  /* Pagination */
  .profile-pagination    { flex-wrap: wrap; gap: 4px; }

  /* Кнопки профиля */
  .btn-profile-more      { font-size: 0.8rem; padding: 7px 12px; }
}

/* ── Context menu ────────────────────────── */
@media (max-width: 480px) {
  .post-card-context-menu { min-width: 140px; right: 0; }
}

/* ── Badges ──────────────────────────────── */
@media (max-width: 480px) {
  .badge { font-size: 0.65rem; padding: 2px 6px; }
}

/* ── Report modal ────────────────────────── */
@media (max-width: 480px) {
  .gbr-modal { margin: 0 8px; }
  .gbr-modal-body { padding: 14px; }
  .gbr-radios { gap: 6px; }
}

/* ── Pagination (theme) ──────────────────── */
@media (max-width: 480px) {
  .page-numbers          { min-width: 32px; height: 32px; font-size: 0.8rem; padding: 0 6px; }
}

/* ── Lite YouTube ────────────────────────── */
@media (max-width: 640px) {
  lite-youtube           { border-radius: 8px; }
}

/* ── Prevent horizontal scroll globally ──── */
html, body {
  max-width: 100%;
}

/* =========================================
   UPCOMING GAMES SIDEBAR — карточки с обложкой,
   датой-бейджем в углу и платформами поверх картинки.
========================================= */
.upcoming-games-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.badge-upcoming {
  background: #7c3aed;
  color: #fff;
  top: 16px; right: 16px; left: auto;
}


/* =========================================
   GAME STATUS BUTTON & MENU
========================================= */
.game-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.game-hero-row .game-hero-title {
  margin-bottom: 0;
  flex: 1;
}
.game-status-wrap {
  position: relative;
  flex-shrink: 0;
}
.game-status-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.game-status-btn:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}
.game-status-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: auto;
  min-width: 210px;
  background: var(--color-card-bg, var(--color-card-bg));
  border: 1px solid var(--color-border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 9000;
  overflow: hidden;
}
.game-status-wrap.is-open .game-status-menu { display: block; }
.game-status-menu-header {
  padding: 10px 14px 8px;
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
  border-bottom: 1px solid var(--color-border);
}
.game-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: none;
  color: var(--color-text);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}
.game-status-item:hover:not(.is-disabled) { background: var(--color-border); }
.game-status-item.is-active { color: var(--color-accent); font-weight: 600; }
.game-status-item.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.game-status-item-icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--color-text-muted);
}
.game-status-item.is-active .game-status-item-icon { color: var(--color-accent); }
.game-status-check { margin-left: auto; color: var(--color-accent); }
.game-status-remove { border-top: 1px solid var(--color-border); color: var(--color-text-muted); }
.game-status-remove:hover { color: #ef4444; background: rgba(239,68,68,0.08); }

/* =========================================
   GAME CARD — единая карточка игры.
   Используется везде: архив игр, «Похожие игры»,
   «Грядущие релизы», «Мои игры» в профиле.
========================================= */
.game-card {
  position: relative;
}
.game-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
}
.game-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.game-card:hover .game-card-cover img { transform: scale(1.04); }
.game-card-cover-ph {
  width: 100%; height: 100%;
  background: linear-gradient(135deg,#1a1a2e,#7c3aed);
}

.game-card-top-row {
  position: absolute;
  top: 8px; left: 8px; right: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  z-index: 2;
}

.game-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.game-card-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--color-accent);
  color: #fff;
  margin-left: auto;
}
.game-card-date-badge .gcd-day { font-size: 0.95rem; font-weight: 700; }
.game-card-date-badge .gcd-month { font-size: 0.6rem; font-weight: 600; letter-spacing: 0.03em; }
.game-card-date-badge .gcd-soon { font-size: 0.7rem; font-weight: 700; padding: 1px 2px; }

/* Плашка статуса профиля — показывает, каким статусом владелец
   просматриваемого профиля отметил игру. Только для чтения. */
.game-card-status-plate {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: calc(100% - 16px);
  padding: 6px 11px;
  border-radius: 20px;
  background: rgba(0,0,0,0.68);
  border: 1px solid rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
}
.game-card-status-plate svg { flex-shrink: 0; }
.game-card-status-plate span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Свой цвет под каждый статус — полупрозрачная заливка поверх обложки */
.game-card-status-plate[data-status="favorite"]  { background: rgba(236,72,153,0.6); border-color: rgba(249,168,212,0.45); }
.game-card-status-plate[data-status="want"]       { background: rgba(14,165,233,0.6); border-color: rgba(125,211,252,0.45); }
.game-card-status-plate[data-status="playing"]    { background: rgba(34,197,94,0.6); border-color: rgba(134,239,172,0.45); }
.game-card-status-plate[data-status="paused"]     { background: rgba(245,158,11,0.6); border-color: rgba(252,211,77,0.45); }
.game-card-status-plate[data-status="completed"]  { background: rgba(139,92,246,0.6); border-color: rgba(196,181,253,0.45); }
.game-card-status-plate[data-status="skipped"]    { background: rgba(239,68,68,0.6); border-color: rgba(252,165,165,0.45); }

.game-card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 26px 10px 10px;
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0));
}
.game-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.game-card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.gc-platform-pill {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 1px 6px;
}

/* Кнопка статуса — плавающая круглая кнопка в правом нижнем углу обложки */
.game-card-status-wrap {
  position: absolute;
  right: 8px; bottom: 8px;
  z-index: 3;
}
.game-card-status-btn {
  width: 32px; height: 32px;
  padding: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: 1.5px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(4px);
  justify-content: center;
}
.game-card-status-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
/* Тот же цвет статуса, что и у плашки — на самой кнопке-кружке.
   Нет статуса — остаётся стандартный чёрный кружок. */
.game-card-status-wrap[data-current-status="favorite"]  .game-card-status-btn { background: rgba(236,72,153,0.6); border-color: rgba(249,168,212,0.45); }
.game-card-status-wrap[data-current-status="want"]       .game-card-status-btn { background: rgba(14,165,233,0.6); border-color: rgba(125,211,252,0.45); }
.game-card-status-wrap[data-current-status="playing"]    .game-card-status-btn { background: rgba(34,197,94,0.6); border-color: rgba(134,239,172,0.45); }
.game-card-status-wrap[data-current-status="paused"]     .game-card-status-btn { background: rgba(245,158,11,0.6); border-color: rgba(252,211,77,0.45); }
.game-card-status-wrap[data-current-status="completed"]  .game-card-status-btn { background: rgba(139,92,246,0.6); border-color: rgba(196,181,253,0.45); }
.game-card-status-wrap[data-current-status="skipped"]    .game-card-status-btn { background: rgba(239,68,68,0.6); border-color: rgba(252,165,165,0.45); }
.game-card-status-wrap[data-current-status]:not([data-current-status=""]) .game-card-status-btn:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}
.game-card-status-wrap .game-status-menu {
  top: auto;
  bottom: calc(100% + 6px);
  right: 0;
  left: auto;
}

.news-feed-header { margin-bottom: 20px; }

.game-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}

/* Грид-режим обычной карточки поста (внутри страницы игры — без отрывка/автора) */
.post-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.post-cards-grid .post-card {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* =========================================
   MY GAMES — PROFILE TAB
========================================= */
.my-games-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.my-games-filter-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  background: none;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.15s;
}
.my-games-filter-btn:hover,
.my-games-filter-btn.is-active {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: rgba(37,99,235,0.08);
}
.my-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
}
.my-game-card { }
.my-game-card[style*="display:none"] { display: none !important; }

/* =========================================
   PROFILE — SOCIAL LINKS & EXTRA META
========================================= */
.profile-extra-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 6px 0 4px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}
.profile-gender,
.profile-birthday {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.profile-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-border);
  color: var(--color-text-muted);
  transition: background 0.18s, color 0.18s, transform 0.15s;
  text-decoration: none;
}
.profile-social-link:hover      { transform: translateY(-2px); color: #fff; }
.profile-social-vk:hover        { background: #0077ff; }
.profile-social-twitter:hover   { background: #000; }
.profile-social-steam:hover     { background: #1b2838; }
.profile-social-discord:hover   { background: #5865f2; }
.profile-social-telegram:hover  { background: #26a5e4; }
.profile-social-twitch:hover    { background: #9147ff; }
.profile-social-youtube:hover   { background: #ff0000; }

/* =========================================
   PROFILE EDIT — GENERAL
========================================= */
.profile-edit-section { max-width: 700px; }

.pedit-block {
  background: var(--color-sidebar-bg, #f9f9f9);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 22px 24px;
  margin-bottom: 18px;
}
.pedit-block-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--color-border);
}

.pedit-field { margin-bottom: 14px; }
.pedit-field:last-child { margin-bottom: 0; }

.pedit-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.pedit-required { color: #ef4444; }

.pedit-input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.pedit-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.pedit-input-disabled {
  background: var(--color-border);
  color: var(--color-text-muted);
  cursor: not-allowed;
}
.pedit-select { cursor: pointer; }
.pedit-textarea { resize: vertical; min-height: 90px; }
.pedit-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.pedit-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .pedit-row-two { grid-template-columns: 1fr; }
}

/* ── Avatar block ── */
.pedit-avatar-block {}
.pedit-avatar-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.pedit-avatar-preview {
  flex-shrink: 0;
}
.pedit-avatar-img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border);
}
.pedit-avatar-actions { flex: 1; }
.btn-avatar-upload {
  display: inline-block;
  padding: 8px 16px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s;
  margin-bottom: 8px;
}
.btn-avatar-upload:hover { background: var(--color-accent-hover); }
.pedit-checkbox-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
  margin-bottom: 6px;
}

/* ── Gender selector ── */
.pedit-gender-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.pedit-gender-option {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, color 0.18s;
  user-select: none;
  background: var(--color-bg);
  color: var(--color-text);
}
.pedit-gender-option input[type="radio"] { display: none; }
.pedit-gender-option:hover,
.pedit-gender-option.is-selected {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
}

/* ── Datepicker overrides ── */
.pedit-datepicker { cursor: pointer; }
.flatpickr-calendar { font-family: inherit !important; }

/* ── Social links grid ── */
.pedit-socials-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
@media (max-width: 480px) {
  .pedit-socials-grid { grid-template-columns: 1fr; }
}
.pedit-social-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pedit-social-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
}
.pedit-input-social { }

/* ── Password ── */
.pedit-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.pedit-password-wrap .pedit-input { padding-right: 40px; }
.pedit-pass-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  color: var(--color-text-muted);
}
.pedit-strength-bar {
  height: 4px;
  background: var(--color-border);
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}
.pedit-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width 0.3s, background 0.3s;
}

/* ── Submit row ── */
.pedit-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.pedit-submit {
  min-width: 200px;
  padding: 11px 28px;
  font-size: 0.95rem;
}

/* ── Cancel button (back to profile) ── */
.btn-profile-cancel {
  background: var(--color-sidebar-bg) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border) !important;
}
.btn-profile-cancel:hover {
  background: var(--color-border) !important;
}

/* ── Notices ── */
.profile-notice {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.profile-notice-success {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}
.profile-notice-error {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* =========================================
   CAPTCHA — universal
========================================= */
.captcha-block {}
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.captcha-question {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--color-text);
  background: var(--color-bg);
  border: 1px dashed var(--color-border);
  border-radius: 6px;
  padding: 6px 12px;
  letter-spacing: 0.06em;
}
.captcha-input {
  width: 90px !important;
  text-align: center;
}
.captcha-input.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
  animation: gb-captcha-shake 0.4s ease;
}
@keyframes gb-captcha-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* WP login/register captcha */
.gb-captcha-wrap {
  margin: 16px 0;
}
.gb-captcha-label label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #555;
  display: block;
  margin-bottom: 6px;
}
.gb-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.gb-captcha-question {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  background: #f0f0f0;
  border: 1px dashed #ccc;
  border-radius: 6px;
  padding: 6px 12px;
  letter-spacing: 0.06em;
}
.gb-captcha-comment {
  margin: 10px 0;
}

/* =========================================
   GLOBAL PAGE NOTICE (toast)
========================================= */
.pe-message {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px 13px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  max-width: calc(100vw - 32px);
  min-width: 260px;
  animation: gb-notice-in 0.3s ease;
  line-height: 1.4;
}
@keyframes gb-notice-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-16px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.pe-message-success {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
}
.pe-message-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}
.pe-message-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.pe-message-text { flex: 1; }
.pe-message-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  padding: 0 0 0 6px;
  transition: opacity 0.15s;
}
.pe-message-close:hover { opacity: 1; }

/* =========================================
   BIRTHDAY SELECTS
========================================= */
.pedit-birthday-selects {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pedit-bday-select {
  flex: 1;
  min-width: 90px;
}

/* Inline profile notice (server-side, inside the form section) */
.profile-notice-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: gb-notice-in 0.3s ease;
}

/* =========================================
   TOAST NOTIFICATION
========================================= */
.gbr-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  max-width: 360px;
  width: max-content;
  box-shadow: 0 4px 20px rgba(0,0,0,0.18);
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
}
.gbr-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.gbr-toast-info {
  background: var(--color-text, var(--color-text));
  color: #fff;
}
.gbr-toast-error {
  background: #dc2626;
  color: #fff;
}
.gbr-toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.gbr-toast-msg {
  flex: 1;
}

@media (max-width: 480px) {
  .gbr-toast {
    bottom: 16px;
    left: 16px;
    right: 16px;
    transform: translateY(12px);
    width: auto;
    max-width: none;
  }
  .gbr-toast.is-visible {
    transform: translateY(0);
  }
}

/* =========================================
   GAME REVIEWS & RATING
========================================= */

/* Средний рейтинг в хедере */
.game-avg-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}
.game-avg-num {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-text);
}
.game-avg-count {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}
.game-avg-none {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* Звёзды — общий вид */
.review-stars-display {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.review-stars-display .star {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.star-full polygon  { fill: #f59e0b; stroke: #f59e0b; }
.star-half .star-bg { fill: none;    stroke: #f59e0b; }
.star-half .star-fg { fill: #f59e0b; stroke: none; }
.star-empty polygon { fill: none;    stroke: #f59e0b; stroke-width: 2; }

/* Форма отзыва */
.review-form-wrap {
  margin-bottom: 28px;
}

/* Интерактивные звёзды */
.review-stars-input {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}
.review-star-btn {
  background: none;
  border: none;
  padding: 2px;
  cursor: pointer;
  line-height: 0;
  transition: transform 0.1s;
}
.review-star-btn:hover { transform: scale(1.15); }
.review-star-btn svg {
  width: 32px;
  height: 32px;
  display: block;
}
.review-star-btn svg polygon {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 2;
  transition: fill 0.1s;
}
.review-star-btn.is-hover svg polygon,
.review-star-btn.is-selected svg polygon {
  fill: #f59e0b;
}

/* Поле текста */
.review-textarea {
  width: 100%;
  min-height: 110px;
  padding: 12px 16px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color var(--transition);
}
.review-textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

/* Футер формы */
.review-form-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.review-form-error {
  font-size: 0.82rem;
  color: #dc2626;
  flex: 1;
}
.review-submit-btn {
  display: block;
  margin-left: auto;
  padding: 10px 28px;
  background: var(--color-text);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}
.review-submit-btn:hover   { background: var(--color-accent); }
.review-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Уведомления */
.review-notice {
  padding: 14px 18px;
  border-radius: 10px;
  background: var(--color-bg-alt, var(--color-bg-alt));
  border: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}
.review-notice-login a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}
.review-notice-login a:hover { text-decoration: underline; }

/* Список отзывов */
.review-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Один отзыв */
.review-item {
  display: flex;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-bg);
  transition: border-color 0.15s;
}
.review-item:hover { border-color: #aaa; }

.review-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
}
.review-avatar img,
.review-avatar a img,
.review-avatar .review-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.review-avatar a { display: block; width: 100%; height: 100%; }

.review-body { flex: 1; min-width: 0; }

.review-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.review-author-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.review-author-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text);
  text-decoration: none;
}
.review-author-name:hover { color: var(--color-accent); }
.review-date {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.review-rating-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.review-rating-num {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.review-text {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text);
  margin: 0;
}

@media (max-width: 480px) {
  .review-form-wrap { padding: 14px; }
  .review-star-btn svg { width: 28px; height: 28px; }
  .review-item { padding: 12px; gap: 10px; }
  .review-avatar { width: 34px; height: 34px; font-size: 0.85rem; }
}

/* =========================================
   REVIEW GAME COVER (в профиле вместо аватарки)
========================================= */
.review-game-cover {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  aspect-ratio: 1/1;
  overflow: hidden;
  display: block;
  background: linear-gradient(135deg, #1a1a2e, #7c3aed);
}
.review-game-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.review-game-cover-ph {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a2e, #7c3aed);
}

/* Кликабельный review-item (на вкладке "Об игре") */
.review-item-link {
  display: flex;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.review-item-link:hover {
  border-color: var(--color-accent);
  box-shadow: 0 2px 10px rgba(37,99,235,0.08);
}
.review-item-link .review-text {
  color: var(--color-text);
}

/* =========================================
   COMMENT AUTHOR BADGE
========================================= */
.comment-author-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  background: var(--color-accent, var(--color-accent));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* =========================================
   ARCHIVE GAME PAGE
========================================= */
.archive-game-page {
  max-width: 900px;
  margin: 0 auto;
}
.archive-game-header {
  margin-bottom: 28px;
}
.archive-game-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
  align-items: center;
}
.agf-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.agf-btn {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--color-border);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.agf-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.agf-btn.is-active { background: var(--color-accent); border-color: var(--color-accent); color: #fff; }

.agf-select {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--color-border);
  font-size: 0.82rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.15s;
}
.agf-select:focus { outline: none; border-color: var(--color-accent); }

/* Сетка игр */
.archive-game-grid,
.tag-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.tag-games-more {
  margin-bottom: 24px;
}
.tag-games-more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--color-accent);
  border-radius: 20px;
  transition: background 0.18s, color 0.18s;
}
.tag-games-more-link:hover {
  background: var(--color-accent);
  color: #fff;
}
.tag-games-back-link {
  margin-left: auto;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-muted, #888);
  text-decoration: none;
  transition: color 0.18s;
}
.tag-games-back-link:hover {
  color: var(--color-accent);
}

/* =========================================
   CATEGORY COSPLAY — масонри сетка
========================================= */
.cosplay-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px;
}
.cosplay-header {
  margin-bottom: 24px;
}
.cosplay-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* Masonry через CSS columns */
.cosplay-grid {
  columns: 3;
  column-gap: 14px;
  margin-bottom: 32px;
}
.cosplay-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.cosplay-card-link { display: block; text-decoration: none; color: inherit; }

.cosplay-card-img {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  line-height: 0;
}
.cosplay-card-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}
.cosplay-card:hover .cosplay-card-img img { transform: scale(1.04); }

.cosplay-card-ph {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #1a1a2e, #7c3aed);
}

/* Оверлей появляется при наведении */
.cosplay-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 55%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  border-radius: 12px;
}
.cosplay-card:hover .cosplay-card-overlay { opacity: 1; }

.cosplay-card-overlay-inner {
  padding: 14px;
  width: 100%;
}
.cosplay-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cosplay-card-overlay-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cosplay-card-author {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.85);
}
.cosplay-card-avatar {
  width: 20px !important;
  height: 20px !important;
  border-radius: 50% !important;
}
.cosplay-card-stats {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.8);
}

/* Теги под карточкой */
.cosplay-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px 2px 0;
}
.cosplay-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--color-bg-alt, var(--color-bg-alt));
  color: var(--color-text-muted);
  text-decoration: none;
  border: 1px solid var(--color-border);
  transition: background 0.15s, color 0.15s;
}
.cosplay-tag:hover { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }

@media (max-width: 1024px) { .cosplay-grid { columns: 2; } }
@media (max-width: 480px) { .cosplay-page { padding: 20px 14px; } }

/* =========================================
   SPINNER — состояние загрузки кнопок
========================================= */
.gbr-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gbr-spin 0.6s linear infinite;
  flex-shrink: 0;
}
.gbr-spinner-dark {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--color-text);
}
@keyframes gbr-spin { to { transform: rotate(360deg); } }

/* Кнопка в состоянии загрузки */
.is-loading {
  opacity: 0.7;
  pointer-events: none;
  cursor: not-allowed;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 48px;
  background: var(--color-bg-alt);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 40px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 40px 24px 28px;
}
.footer-logo {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text);
  text-decoration: none;
  margin-bottom: 8px;
  font-family: var(--font-heading);
}
.footer-tagline {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin: 0;
}
.footer-col-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-nav a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-nav a:hover { color: var(--color-accent); }
.footer-game-link {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}
.footer-game-link:hover { color: var(--color-accent); }
.footer-game-title { font-weight: 600; color: var(--color-text); line-height: 1.3; }
.footer-game-link:hover .footer-game-title { color: var(--color-accent); }
.footer-game-date { font-size: 0.72rem; color: var(--color-text-muted); }
.footer-bottom {
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 14px 24px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom-links {
  display: flex;
  gap: 16px;
}
.footer-bottom-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-bottom-links a:hover { color: var(--color-accent); }

/* Trending author link */
.trending-author-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}
.trending-author-link:hover strong { color: var(--color-accent); }
.trending-post-count {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  display: block;
}

/* 25. Баннер для незалогиненных на странице профиля */
.guest-register-banner {
  background: linear-gradient(135deg, var(--color-accent) 0%, #7c3aed 100%);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.guest-banner-text h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px;
  color: #fff;
}
.guest-banner-text p {
  font-size: 0.82rem;
  margin: 0;
  opacity: 0.85;
}
.guest-banner-btn {
  padding: 9px 20px;
  background: #fff;
  color: var(--color-accent);
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
.guest-banner-btn:hover { opacity: 0.9; }

@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px 16px 20px; }
  .footer-col-brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 16px; }
}

/* =========================================
   404 SUGGESTIONS
========================================= */
.page-404-suggestions {
  padding: 40px 20px;
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}
.page-404-suggest-inner {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
.page-404-suggest-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
.page-404-suggest-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.page-404-suggest-item {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition);
}
.page-404-suggest-item:hover { color: var(--color-accent); }
.page-404-suggest-thumb {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-border);
}
.page-404-suggest-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 480px) {
  .page-404-suggest-inner { grid-template-columns: 1fr; gap: 24px; }
}

/* =========================================
   COMMENT IMAGES
========================================= */
.comment-image-upload {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 8px 0;
}
.comment-image-previews {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.comment-img-preview {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.comment-img-preview.is-loading { animation: gbr-spin 1s linear infinite; }
.comment-img-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.comment-img-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.comment-image-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px dashed var(--color-border);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.comment-image-add:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Изображения в комментарии */
.comment-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.comment-img-link {
  display: block;
  width: 100px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.comment-img-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.comment-img-link:hover img { transform: scale(1.05); }

/* =========================================
   COMMENT & REVIEW EDIT
========================================= */
.gbr-edit-comment-btn,
.review-edit-btn,
.review-reply-btn {
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.gbr-edit-comment-btn:hover,
.review-edit-btn:hover,
.review-reply-btn:hover {
  color: var(--color-accent);
  background: var(--color-bg-alt);
}
.comment-actions,
.review-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.gbr-edit-form,
.gbr-review-edit-form,
.review-reply-form-wrap {
  margin-top: 10px;
  padding: 12px;
  background: var(--color-bg-alt);
  border-radius: 10px;
  border: 1px solid var(--color-border);
}
.gbr-edit-textarea {
  width: 100%;
  min-height: 80px;
  padding: 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--color-bg);
  color: var(--color-text);
  resize: vertical;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.gbr-edit-textarea:focus { outline: none; border-color: var(--color-accent); }
.gbr-edit-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}
.gbr-edit-cancel,
.gbr-reply-cancel {
  background: none;
  border: none;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px 10px;
}
.gbr-edit-cancel:hover,
.gbr-reply-cancel:hover { color: var(--color-text); }

/* =========================================
   REVIEW REPLIES
========================================= */
.review-replies {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-left: 16px;
  border-left: 2px solid var(--color-border);
}
.review-reply-item {
  display: flex;
  gap: 10px;
}
.review-avatar-sm {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  font-size: 0.75rem !important;
}
.review-reply-body { flex: 1; min-width: 0; }
.review-reply-textarea {
  min-height: 72px;
}

/* =========================================
   TOOLBAR (ЦИТАТА / СПОЙЛЕР)
========================================= */
.gbr-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.gbr-toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.gbr-toolbar-btn:hover {
  background: var(--color-border);
  color: var(--color-text);
  border-color: var(--color-text-muted);
}
.gbr-img-upload-label { cursor: pointer; }
.gbr-img-upload-label input[type="file"] { display: none !important; }

/* Жалоба / удаление в comment-actions */
.gbr-report-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.gbr-report-comment-btn:hover { color: #ea580c; background: var(--color-bg-alt); }

.gbr-delete-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.gbr-delete-comment-btn:hover { color: #dc2626; background: #fee2e2; }

/* =========================================
   BLOCKQUOTE / SPOILER В КОММЕНТАРИЯХ
========================================= */
.comment-quote {
  border-left: 3px solid var(--color-accent);
  margin: 8px 0;
  padding: 6px 12px;
  background: var(--color-bg-alt);
  border-radius: 0 6px 6px 0;
  font-size: 0.9em;
  color: var(--color-text-muted);
  font-style: italic;
}

.comment-spoiler {
  display: inline-block;
  background: var(--color-text);
  color: var(--color-text);
  border-radius: 4px;
  padding: 1px 6px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
  position: relative;
}
.comment-spoiler .spoiler-content {
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.comment-spoiler .spoiler-label {
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.6;
  letter-spacing: 0.04em;
}
.comment-spoiler.is-open {
  background: var(--color-bg-alt);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}
.comment-spoiler.is-open .spoiler-content {
  opacity: 1;
  pointer-events: auto;
}
.comment-spoiler.is-open .spoiler-label {
  display: none;
}

/* =========================================
   BACK TO TOP BUTTON  (п.1)
========================================= */
.gbr-back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, visibility .25s, transform .25s, background .15s;
}
.gbr-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.gbr-back-to-top:hover { background: var(--color-accent-hover, #1d4ed8); }
@media (max-width: 1024px) {
  .gbr-back-to-top { bottom: 80px; }
}
@media (max-width: 600px) {
  .gbr-back-to-top { bottom: 80px; right: 14px; width: 38px; height: 38px; }
}

/* =========================================
   RELATED GAMES IN POST  (п.2)
========================================= */
.post-related-games {
  margin: 28px 0 0;
  padding: 20px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.post-related-games-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}
.post-related-games-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.post-related-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background .15s;
  flex: 1 1 200px;
  max-width: 260px;
}
.post-related-game-card:hover {
  border-color: var(--color-accent);
  background: var(--color-bg-alt);
}
.prgc-cover {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-bg-alt);
}
.prgc-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prgc-cover-ph  { width: 100%; height: 100%; background: linear-gradient(135deg, #1a1a2e, #374151); }
.prgc-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.prgc-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-text);
}
.prgc-date { font-size: 0.72rem; color: var(--color-text-muted); }
.prgc-rating {
  font-size: 0.72rem;
  color: #f59e0b;
  font-weight: 600;
}
@media (max-width: 600px) {
  .post-related-game-card { max-width: 100%; flex: 1 1 100%; }
}

/* =========================================
   STORE LINKS  (п.3)
========================================= */
.game-store-row .game-meta-label { align-items: flex-start; padding-top: 2px; }
.game-store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.game-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 8px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  transition: border-color .15s, background .15s, color .15s;
  line-height: 1;
}
.game-store-btn:hover { border-color: var(--color-accent); background: var(--color-accent); color: #fff; }
.game-store-icon { width: 16px; height: 16px; flex-shrink: 0; fill: currentColor; }
.game-store-steam:hover { background: #1b2838; border-color: #1b2838; color: #c7d5e0; }
.game-store-egs:hover   { background: #2d2d2d; border-color: #2d2d2d; color: #fff; }
.game-store-gog:hover   { background: #6600cc; border-color: #6600cc; color: #fff; }

/* =========================================
   MULTI-DATE RELEASE ROWS  (п.5)
========================================= */
.game-release-dates-row .game-meta-value {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.game-release-slot {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.game-release-date-val {
  font-size: 0.875rem;
  color: var(--color-text);
  font-weight: 500;
}
.game-release-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.game-platform-pill {
  display: inline-block;
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  letter-spacing: .02em;
}

/* =====================================================
   GAMEYE v2.1.3 — FOLLOW SYSTEM + PM
===================================================== */

/* ── Profile header actions (follow + pm) ── */
.profile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  align-self: flex-start;
}

.btn-follow {
  padding: 7px 18px;
  border: 1.5px solid var(--color-accent);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn-follow:hover {
  background: var(--color-accent);
  color: #fff;
}
.btn-follow.is-following {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.btn-follow.is-following:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
}
.btn-follow-sm {
  padding: 5px 12px;
  font-size: 0.75rem;
}

.btn-profile-pm {
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.18s;
  text-decoration: none;
  flex-shrink: 0;
}
.btn-profile-pm:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ── Follow stats row under tabs ── */
.profile-follow-stats {
  display: flex;
  gap: 20px;
  padding: 8px 28px 10px;
  border-top: 1px solid var(--color-border);
}
.follow-stat-link {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.follow-stat-link:hover { color: var(--color-accent); }
.follow-stat-num {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--color-text);
}

/* ── Follows tab sub-tabs ── */
.follows-subtabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--color-border);
}
.follows-subtab {
  padding: 8px 20px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.follows-subtab:hover { color: var(--color-text); }
.follows-subtab.is-active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  font-weight: 600;
}

/* ── Follows user list ── */
.follows-user-list { display: flex; flex-direction: column; gap: 4px; }
.follows-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius, 10px);
  transition: background 0.15s;
}
.follows-user-row:hover { background: var(--color-bg-alt); }
.follows-user-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
}
.follows-avatar {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50%;
  flex-shrink: 0;
}
.follows-user-info { display: flex; flex-direction: column; min-width: 0; }
.follows-user-name { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.follows-user-meta { font-size: 0.75rem; color: var(--color-text-muted); margin-top: 2px; }

/* =====================================================
   PM PAGE
===================================================== */

.gameye-pm-wrap {
  display: flex;
  height: calc(100vh - 120px);
  min-height: 500px;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  overflow: hidden;
}

/* ── PM Sidebar ── */
.pm-sidebar {
  width: 300px;
  flex-shrink: 0;
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.pm-sidebar-title { font-size: 1rem; font-weight: 700; margin: 0; }
.pm-new-chat-btn {
  width: 32px; height: 32px;
  border: 1.5px solid var(--color-border);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.15s;
}
.pm-new-chat-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }

.pm-conv-list { flex: 1; overflow-y: auto; padding: 6px; }
.pm-conv-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
  min-width: 0;
}
.pm-conv-item:hover { background: var(--color-bg-alt); }
.pm-conv-item.is-active { background: var(--color-bg-alt); }

.pm-conv-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.pm-conv-avatar-ph {
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
}
.pm-conv-avatar-lg { width: 36px; height: 36px; font-size: 0.9rem; }

.pm-conv-info { flex: 1; min-width: 0; }
.pm-conv-name-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pm-conv-name { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-conv-time { font-size: 0.72rem; color: var(--color-text-muted); flex-shrink: 0; }
.pm-conv-preview { font-size: 0.78rem; color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.pm-unread-badge { background: var(--color-accent); color: #fff; font-size: 0.68rem; font-weight: 700; border-radius: 10px; padding: 1px 6px; flex-shrink: 0; }

.pm-empty-convs, .pm-loading-indicator, .pm-error { padding: 20px 12px; font-size: 0.83rem; color: var(--color-text-muted); text-align: center; }

/* ── PM Main area ── */
.pm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.pm-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}
.pm-empty-state svg { opacity: 0.3; }

.pm-chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pm-chat-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.pm-chat-header-info { display: flex; align-items: center; gap: 12px; }
.pm-chat-avatar { width: 36px; height: 36px; border-radius: 50%; }
.pm-chat-username { font-weight: 700; font-size: 0.92rem; color: var(--color-text); text-decoration: none; display: block; }
.pm-chat-username:hover { color: var(--color-accent); }
.pm-chat-type { font-size: 0.75rem; color: var(--color-text-muted); display: block; }

.pm-messages { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.pm-msgs-loading, .pm-empty-msgs { text-align: center; font-size: 0.82rem; color: var(--color-text-muted); padding: 20px; }

/* Message bubbles */
.pm-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 70%;
  align-self: flex-start;
}
.pm-msg-mine { align-self: flex-end; flex-direction: row-reverse; }
.pm-msg-avatar { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; }
.pm-msg-bubble {
  background: var(--color-bg-alt);
  border-radius: 16px 16px 16px 4px;
  padding: 8px 12px;
  max-width: 100%;
}
.pm-msg-mine .pm-msg-bubble {
  background: var(--color-accent);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.pm-msg-author { font-size: 0.7rem; font-weight: 600; color: var(--color-accent); margin-bottom: 2px; }
.pm-msg-mine .pm-msg-author { display: none; }
.pm-msg-text { font-size: 0.87rem; line-height: 1.45; word-break: break-word; }
.pm-msg-time { font-size: 0.67rem; opacity: 0.55; margin-top: 3px; text-align: right; }

/* Input */
.pm-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}
.pm-input {
  flex: 1;
  resize: none;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 0.87rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.4;
  min-height: 38px;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.15s;
}
.pm-input:focus { outline: none; border-color: var(--color-accent); }
.pm-send-btn {
  width: 38px; height: 38px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.pm-send-btn:hover { background: var(--color-accent-hover); }

/* ── New chat popup ── */
.pm-popup-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pm-popup {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius, 10px);
  width: 400px;
  max-width: calc(100vw - 32px);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.pm-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}
.pm-popup-header h3 { margin: 0; font-size: 0.95rem; font-weight: 700; }
.pm-popup-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--color-text-muted); line-height: 1; padding: 0 4px; }
.pm-popup-close:hover { color: var(--color-text); }
.pm-popup-search {
  margin: 10px 12px;
  padding: 8px 14px;
  border: 1.5px solid var(--color-border);
  border-radius: 20px;
  font-size: 0.87rem;
  font-family: inherit;
  background: var(--color-bg);
  color: var(--color-text);
  width: calc(100% - 24px);
  box-sizing: border-box;
}
.pm-popup-search:focus { outline: none; border-color: var(--color-accent); }
.pm-popup-results { flex: 1; overflow-y: auto; padding: 4px 6px 10px; }
.pm-popup-user {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.13s;
}
.pm-popup-user:hover { background: var(--color-bg-alt); }
.pm-popup-avatar { width: 36px; height: 36px; border-radius: 50%; }
.pm-popup-name { font-weight: 600; font-size: 0.86rem; }
.pm-popup-login { font-size: 0.74rem; color: var(--color-text-muted); margin-top: 1px; }
.pm-popup-searching, .pm-popup-no-results { padding: 16px 12px; text-align: center; font-size: 0.82rem; color: var(--color-text-muted); }

/* ── PM nav badge (for header) ── */
.pm-nav-badge {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .gameye-pm-wrap { height: calc(100vh - 80px); flex-direction: column; border-radius: 0; }
  .pm-sidebar { width: 100%; height: 220px; border-right: none; border-bottom: 1px solid var(--color-border); }
  .profile-follow-stats { padding: 6px 16px 8px; }
  .profile-header-actions { gap: 6px; }
  .btn-follow { padding: 6px 12px; }
}

/* =====================================================
   GAMEYE v2.1.4 — Follow stats inline in meta-info
===================================================== */

/* Счётчики подписок/подписчиков внутри profile-meta-info */
.profile-follow-stats-inline {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}
.profile-follow-stats-inline .follow-stat-link {
  display: flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  transition: color 0.15s;
}
.profile-follow-stats-inline .follow-stat-link:hover { color: var(--color-accent); }
.profile-follow-stats-inline .follow-stat-num {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--color-text);
}

/* Убрать старый stats bar под табами если остался */
.profile-follow-stats { display: none; }

/* ===== Cookie Notice ===== */
#gbr-cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  background: var(--color-card, #1e2030);
  color: var(--color-text, #e2e8f0);
  border: 1px solid var(--color-border, rgba(255,255,255,0.08));
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 4px 24px rgba(0,0,0,0.35);
  max-width: calc(100vw - 32px);
  white-space: nowrap;
}
#gbr-cookie-notice a {
  color: var(--color-accent, #3b82f6);
  text-decoration: underline;
}
#gbr-cookie-ok {
  background: var(--color-accent, #3b82f6);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
#gbr-cookie-ok:hover { background: var(--color-accent-hover, #2563eb); }
@media (max-width: 480px) {
  #gbr-cookie-notice { flex-direction: column; text-align: center; white-space: normal; bottom: 12px; }
}

/* ═══════════════════════════════════════════════════════════
   ACHIEVEMENTS PAGE  — /achievements
   ═══════════════════════════════════════════════════════════ */

.ach-page-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

.ach-page-header {
  margin-bottom: 2rem;
}

.ach-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.ach-page-sub {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.ach-page-progress {
  font-size: 0.9rem;
  color: var(--color-text-muted, #6b7280);
}

.ach-page-progress strong {
  color: var(--color-text, #111);
}

/* ── Группы ─────────────────────────────────────────────── */

.ach-group {
  margin-bottom: 2rem;
}

.ach-group-title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted, #6b7280);
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
}

/* ── Сетка карточек ─────────────────────────────────────── */

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.75rem;
}

.ach-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border, #e5e7eb);
  background: var(--color-card-bg, #fff);
  transition: box-shadow 0.15s;
}

.ach-card--earned {
  border-color: var(--color-accent, #3b82f6);
  background: var(--color-card-bg, #fff);
}

.ach-card--locked {
  opacity: 0.55;
}

.ach-card--earned:hover {
  box-shadow: 0 2px 10px rgba(59,130,246,0.12);
}

.ach-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.ach-card-body {
  flex: 1;
  min-width: 0;
}

.ach-card-name {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text, #111);
}

.ach-card-desc {
  font-size: 0.78rem;
  color: var(--color-text-muted, #6b7280);
  margin-top: 2px;
  line-height: 1.35;
}

.ach-card-xp {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted, #6b7280);
  white-space: nowrap;
  flex-shrink: 0;
}

.ach-card-xp--earned {
  color: var(--color-accent, #3b82f6);
}

@media (max-width: 600px) {
  .ach-grid {
    grid-template-columns: 1fr;
  }
  .ach-page-title { font-size: 1.4rem; }
}

/* =========================================
   ACTIVITY SYSTEM — /activity/ page + profile heatmap link
========================================= */

/* Page wrapper */
.activity-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.activity-page-header {
  margin-bottom: 18px;
}

.activity-page-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text, #111);
  margin: 0;
}

/* Tabs */
.activity-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--color-border, #e5e7eb);
  padding-bottom: 0;
}

.activity-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted, #6b7280);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}

.activity-tab:hover {
  color: var(--color-text, #111);
}

.activity-tab.is-active {
  color: var(--color-accent, #2563eb);
  border-bottom-color: var(--color-accent, #2563eb);
}

.activity-tab-locked {
  opacity: .55;
}

.activity-tab-lock {
  font-size: 0.75rem;
}

/* Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Single item */
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--color-card, #18181b);
  transition: background .15s;
}

.activity-item:hover {
  background: var(--color-card-hover, #1e1e23);
}

.activity-avatar-link {
  flex-shrink: 0;
  line-height: 0;
}

.activity-avatar {
  width: 36px !important;
  height: 36px !important;
  border-radius: 50% !important;
  object-fit: cover;
}

.activity-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.activity-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.activity-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.activity-user-link {
  font-weight: 600;
  color: var(--color-text, #f1f5f9);
  text-decoration: none;
  white-space: nowrap;
}

.activity-user-link:hover {
  color: var(--color-accent, #2563eb);
}

.activity-action {
  color: var(--color-text-muted, #9ca3af);
}

.activity-object-link,
.activity-object {
  color: var(--color-text, #f1f5f9);
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  display: inline-block;
  vertical-align: bottom;
}

.activity-object-link:hover {
  color: var(--color-accent, #2563eb);
  text-decoration: underline;
}

.activity-time {
  color: var(--color-text-muted, #6b7280);
  font-size: 0.76rem;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 6px;
}

/* Empty state */
.activity-empty {
  text-align: center;
  color: var(--color-text-muted, #6b7280);
  padding: 40px 0;
  font-size: 0.9rem;
}

/* Load more */
.activity-load-more-wrap {
  text-align: center;
  margin-top: 20px;
}

.activity-load-more-btn {
  display: inline-block;
  padding: 9px 24px;
  background: transparent;
  border: 1px solid var(--color-border, #374151);
  border-radius: 6px;
  color: var(--color-text-muted, #9ca3af);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}

.activity-load-more-btn:hover:not(:disabled) {
  border-color: var(--color-accent, #2563eb);
  color: var(--color-accent, #2563eb);
}

.activity-load-more-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Type color accents (left border) */
.activity-type-post        { border-left: 3px solid #2563eb; }
.activity-type-comment     { border-left: 3px solid #7c3aed; }
.activity-type-review      { border-left: 3px solid #ea580c; }
.activity-type-follow      { border-left: 3px solid #16a34a; }
.activity-type-achievement { border-left: 3px solid #f59e0b; }
.activity-type-game_status { border-left: 3px solid #0891b2; }
.activity-type-level_up    { border-left: 3px solid #f59e0b; }

/* Responsive */
@media (max-width: 600px) {
  .activity-page-wrap { padding: 16px 12px 40px; }
  .activity-object-link,
  .activity-object { max-width: 130px; }
  .activity-time { display: block; width: 100%; margin-left: 0; margin-top: 2px; }
}

/* =========================================================
   GAMEYE — РЕАКЦИИ, XP, УРОВНИ (v2.3.5)
========================================================= */

/* --- Бейдж уровня (рядом с именем/аватаркой) --- */
.gameye-level-badge {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  border-radius: 999px;
  color: #fff;
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.6;
}
.gameye-level-badge-sm { font-size: 0.66rem; padding: 1px 7px; margin-left: 4px; }
.gameye-level-badge-lg { font-size: 0.78rem; padding: 3px 11px; margin-left: 8px; }

.gameye-level-badge.lvl-novice  { background: linear-gradient(135deg, #94a3b8, #64748b); }
.gameye-level-badge.lvl-gamer   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.gameye-level-badge.lvl-veteran { background: linear-gradient(135deg, #16a34a, #15803d); }
.gameye-level-badge.lvl-expert  { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.gameye-level-badge.lvl-master  { background: linear-gradient(135deg, #ea580c, #c2410c); }
.gameye-level-badge.lvl-legend  { background: linear-gradient(135deg, #f59e0b, #dc2626); }

/* --- Прогресс-бар XP (профиль / страница ачивок) --- */
.profile-xp-block {
  margin: 10px 0 14px;
  max-width: 360px;
}
.profile-xp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.profile-xp-level { display: flex; align-items: center; color: var(--color-text); font-weight: 600; }
.profile-xp-level .gameye-level-badge-lg { margin-left: 0; margin-right: 8px; }
.profile-xp-numbers { font-variant-numeric: tabular-nums; }
.profile-xp-bar-outer {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
}
.profile-xp-bar-inner {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), #7c3aed);
  transition: width 0.4s ease;
}

/* --- Виджет реакций: компактная кнопка-триггер + попап --- */
.gameye-reactions {
  position: relative;
  display: inline-block;
  margin: 10px 0;
}
.comment-body .gameye-reactions,
.review-body .gameye-reactions,
.review-reply-body .gameye-reactions {
  margin: 6px 0 4px;
}
.comment-actions .gameye-reactions,
.review-actions .gameye-reactions {
  margin: 0;
}
.gameye-reaction-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.8rem;
  font-family: var(--font-body);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: var(--transition);
}
.comment-body .gameye-reaction-trigger,
.review-body .gameye-reaction-trigger,
.review-reply-body .gameye-reaction-trigger {
  padding: 3px 10px;
  font-size: 0.74rem;
}
.gameye-reaction-trigger:hover:not([disabled]) {
  border-color: var(--color-accent);
}
.gameye-reaction-trigger.is-active {
  border-color: var(--color-accent);
  background: rgba(37, 99, 235, 0.10);
  color: var(--color-accent);
}
.gameye-reaction-trigger.is-active.is-negative {
  border-color: #dc2626;
  background: rgba(220, 38, 38, 0.10);
  color: #dc2626;
}
.gameye-reaction-trigger[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.gameye-reaction-trigger-emoji { display: inline-flex; width: 16px; height: 16px; }
.gameye-reaction-trigger-emoji svg { width: 100%; height: 100%; display: block; }
.gameye-reaction-trigger:not(.is-active) .gameye-reaction-trigger-emoji { opacity: 0.55; }
.gameye-reaction-trigger-count { font-weight: 600; min-width: 6px; font-variant-numeric: tabular-nums; }

.gameye-reaction-popover {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
  z-index: 30;
}
.gameye-reaction-popover.is-open { display: flex; }
.gameye-reaction-popover.is-below {
  bottom: auto;
  top: calc(100% + 6px);
}
.gameye-reaction-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
}
.gameye-reaction-btn:hover { background: var(--color-border); }
.gameye-reaction-btn.is-active.gameye-reaction-positive { background: rgba(37, 99, 235, 0.14); }
.gameye-reaction-btn.is-active.gameye-reaction-negative { background: rgba(220, 38, 38, 0.12); }
.gameye-reaction-emoji { display: inline-flex; width: 17px; height: 17px; color: var(--color-text-muted); }
.gameye-reaction-emoji svg { width: 100%; height: 100%; display: block; }
.gameye-reaction-btn.is-active .gameye-reaction-emoji { color: var(--color-text); }
.gameye-reaction-btn.is-active.gameye-reaction-positive .gameye-reaction-emoji { color: var(--color-accent); }
.gameye-reaction-btn.is-active.gameye-reaction-negative .gameye-reaction-emoji { color: #dc2626; }

@media (max-width: 600px) {
  .gameye-reaction-trigger { padding: 4px 9px; font-size: 0.74rem; }
  .gameye-reaction-btn { width: 30px; height: 30px; }
  .profile-xp-block { max-width: 100%; }
}

/* =========================================
   GAMEYE — УВЕДОМЛЕНИЯ (v2.4.1)
   Колокольчик в шапке + выпадающее меню + страница /notifications/
========================================= */

/* Бейдж непрочитанных сообщений в пункте "Сообщения" контекстного меню — вправо */
.account-menu-item .pm-nav-badge { margin-left: auto; }

/* ── Колокольчик в шапке ── */
.notif-bell-wrap { position: relative; }

.btn-notif-bell {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background var(--transition);
  color: var(--color-text);
}
.btn-notif-bell:hover { background: var(--color-border); }
.btn-notif-bell svg { width: 18px; height: 18px; }

.notif-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 10px;
  padding: 2px 4px;
  min-width: 16px;
  text-align: center;
}

/* ── Выпадающее меню уведомлений ── */
.notif-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--color-card, var(--color-card-bg));
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow-hover);
  overflow: hidden;
  z-index: 9999;
  animation: pcmFadeIn 0.12s ease;
}
.notif-bell-wrap.is-open .notif-dropdown { display: block; }

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
}
.notif-dropdown-title { font-size: 0.9rem; font-weight: 700; color: var(--color-text); }

.notif-mark-read-btn {
  font-size: 0.74rem;
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-mark-read-btn:hover { color: var(--color-accent-hover); text-decoration: underline; }
.notif-mark-read-btn:disabled { opacity: .5; cursor: default; }

.notif-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
}
.notif-dropdown-loading {
  padding: 24px 14px;
  text-align: center;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.notif-dropdown-footer {
  padding: 10px 14px;
  text-align: center;
  border-top: 1px solid var(--color-border);
}
.notif-dropdown-footer a { font-size: 0.8rem; color: var(--color-accent); font-weight: 600; }
.notif-dropdown-footer a:hover { color: var(--color-accent-hover); }

/* ── Элемент уведомления (общий для дропдауна и страницы /notifications/) ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.12s;
  position: relative;
  border-bottom: 1px solid var(--color-border);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-border); }
.notif-item.is-unread { background: rgba(37, 99, 235, 0.06); }

.notif-item-icon { font-size: 1.05rem; flex-shrink: 0; line-height: 1.3; }

.notif-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.notif-item-text { font-size: 0.82rem; line-height: 1.4; color: var(--color-text); }
.notif-item-time { font-size: 0.72rem; color: var(--color-text-muted); }

.notif-item-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  margin-top: 5px;
}

.notif-item--compact { padding: 9px 14px; }

.notif-empty,
.notif-dropdown-empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 28px 14px;
  font-size: 0.85rem;
}

/* ── Страница /notifications/ ── */
.notif-page-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
.notif-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.notif-page-heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.notif-page-title { font-size: 1.6rem; font-weight: 700; color: var(--color-text); margin: 0; }
.notif-page-subtitle {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin: 0;
}
.notif-page-subtitle a {
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: underline;
}
.notif-page-subtitle a:hover { color: var(--color-accent-hover); }

.notif-page-mark-read-btn {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.notif-page-mark-read-btn:hover { border-color: var(--color-accent); }
.notif-page-mark-read-btn:disabled { opacity: .5; cursor: default; }

.notif-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--color-card, var(--color-card-bg));
}

.notif-load-more-wrap { text-align: center; margin-top: 20px; }
.notif-load-more-btn {
  display: inline-block;
  padding: 9px 24px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.notif-load-more-btn:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.notif-load-more-btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 600px) {
  .notif-dropdown { width: 300px; }
  .notif-page-wrap { padding: 16px 12px 40px; }
  .notif-page-header { flex-wrap: wrap; }
}


/* =========================================================
   EDITOR.JS — фронтенд-создание/редактирование постов (2.5.4)
========================================================= */

.gye-editor-wrap { max-width: var(--content-max); margin: 0 auto; }
.gye-drafts-wrap { max-width: var(--content-max); margin: 0 auto; padding-bottom: 48px; }

/* ---- шапка страницы редактора ---- */
.gye-editor-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; flex-wrap: wrap;
}
.gye-editor-pagetitle { font-size: 1.5rem; font-weight: 800; margin: 0; color: var(--color-text); }
.gye-editor-headlinks { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gye-editor-headlink {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
  text-decoration: none; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--color-border); transition: color var(--transition), border-color var(--transition);
}
.gye-editor-headlink:hover { color: var(--color-accent); border-color: var(--color-accent); }

/* ---- карточка формы: без рамки/тени/фона ---- */
.gye-editor-card { padding: 0; }
.gye-field { margin-bottom: 20px; }
.gye-field:last-child { margin-bottom: 0; }
.gye-label {
  display: block; font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--color-text-muted); margin-bottom: 8px;
}

/* ---- блок заголовка внутри Editor.js ---- */
.gye-title-block {
  font-family: var(--font-heading); font-size: 1.9rem; font-weight: 800;
  line-height: 1.2; color: var(--color-text); outline: none;
  padding: 4px 0 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--color-border);
}
.gye-title-block:empty::before {
  content: attr(data-placeholder); color: var(--color-text-muted); opacity: .55;
}

.gye-select {
  width: 100%; box-sizing: border-box; padding: 10px 12px; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: 8px;
  font-family: inherit; font-size: 0.95rem;
  background: var(--color-bg); color: var(--color-text); outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.gye-select:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

/* ---- обложка ---- */
.gye-thumb-drop {
  border: 1.5px dashed var(--color-border); border-radius: 12px;
  padding: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  transition: border-color var(--transition);
}
.gye-thumb-drop.has-image { border-style: solid; }
.gye-thumb-drop.is-loading { opacity: 0.6; pointer-events: none; }
.gye-thumb-preview:empty { display: none; }
.gye-thumb-preview img {
  display: block; width: 160px; height: 90px; object-fit: cover; border-radius: 8px;
}
.gye-thumb-pick {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 14px; border-radius: 8px; font-size: 0.88rem; font-weight: 600;
  color: var(--color-accent); background: rgba(37,99,235,0.08);
  transition: background var(--transition);
}
.gye-thumb-pick:hover { background: rgba(37,99,235,0.15); }
.gye-thumb-remove {
  border: none; background: none; cursor: pointer; padding: 6px 10px;
  font-size: 0.82rem; font-weight: 600; color: var(--color-text-muted); border-radius: 6px;
}
.gye-thumb-remove:hover { color: #ef4444; }

/* ---- холдер Editor.js: без рамки, как чистый документ ---- */
.gye-editor-holder {
  min-height: 220px;
}

/* ---- кнопки + индикатор сохранения ---- */
.gye-editor-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 24px;
}
.gye-save-status {
  margin-right: auto; font-size: 0.82rem; color: var(--color-text-muted);
  display: inline-flex; align-items: center; gap: 6px; min-height: 1em;
}
.gye-save-status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: transparent;
}
.gye-save-status.is-saving::before  { background: var(--color-accent); }
.gye-save-status.is-saved::before    { background: #16a34a; }
.gye-save-status.is-unsaved::before  { background: #eab308; }
.gye-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 22px; border-radius: 10px; cursor: pointer;
  font-family: inherit; font-size: 0.92rem; font-weight: 700; border: 1px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
  text-decoration: none;
}
.gye-btn:disabled { opacity: 0.6; cursor: default; }
.gye-btn-primary { background: var(--color-accent); color: #fff; }
.gye-btn-primary:hover:not(:disabled) { background: var(--color-accent-hover); }
.gye-btn-ghost {
  background: transparent; color: var(--color-text); border-color: var(--color-border);
}
.gye-btn-ghost:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }

.gye-editor-error {
  text-align: center; padding: 40px 20px; color: var(--color-text-muted);
}

/* ---- блок заголовка: прячем «+» и настройки тулбара ---- */
.gye-editor-holder.gye-on-title .ce-toolbar__plus,
.gye-editor-holder.gye-on-title .ce-toolbar__settings-btn {
  visibility: hidden; pointer-events: none;
}

/* =========================================================
   EDITOR.JS — подстройка под тему (свет/тьма)
========================================================= */
.gye-editor-holder .codex-editor,
.gye-editor-holder .ce-block { color: var(--color-text); }
.gye-editor-holder .ce-block__content,
.gye-editor-holder .ce-toolbar__content { max-width: 100%; }
.gye-editor-holder .ce-paragraph[data-placeholder]:empty::before,
.gye-editor-holder .ce-header[data-placeholder]:empty::before { color: var(--color-text-muted); opacity: .6; }
.gye-editor-holder a { color: var(--color-accent); }

/* кнопки тулбара слева (+ и настройки) */
.gye-editor-holder .ce-toolbar__plus,
.gye-editor-holder .ce-toolbar__settings-btn { color: var(--color-text); }
.gye-editor-holder .ce-toolbar__plus:hover,
.gye-editor-holder .ce-toolbar__settings-btn:hover { background: var(--color-bg-alt); }

/* всплывающее меню инструментов / настроек */
.gye-editor-holder .ce-popover__container,
.gye-editor-holder .ce-popover {
  background: var(--color-card); border: 1px solid var(--color-border);
  box-shadow: var(--shadow-hover); color: var(--color-text);
}
.gye-editor-holder .ce-popover-item__title,
.gye-editor-holder .ce-popover-item__icon { color: var(--color-text); }
.gye-editor-holder .ce-popover-item:hover .ce-popover-item__icon,
.gye-editor-holder .ce-popover-item--focused {
  background-color: var(--color-bg-alt) !important;
}
.gye-editor-holder .ce-popover-item__icon {
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
}
.gye-editor-holder .cdx-search-field {
  background: var(--color-bg); border: 1px solid var(--color-border);
}
.gye-editor-holder .cdx-search-field__input { color: var(--color-text); }

/* инлайн-тулбар (жирный/курсив/ссылка) */
.gye-editor-holder .ce-inline-toolbar,
.gye-editor-holder .ce-conversion-toolbar {
  background: var(--color-card); border: 1px solid var(--color-border); color: var(--color-text);
}
.gye-editor-holder .ce-inline-tool,
.gye-editor-holder .ce-conversion-tool { color: var(--color-text); }
.gye-editor-holder .ce-inline-tool:hover,
.gye-editor-holder .ce-conversion-tool:hover { background: var(--color-bg-alt); }
.gye-editor-holder .ce-inline-tool--active { color: var(--color-accent); }
.gye-editor-holder .ce-inline-tool-input {
  background: var(--color-bg); color: var(--color-text);
}

/* поля подписей (цитата/картинка) */
.gye-editor-holder .cdx-input {
  border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text);
  box-shadow: none;
}
.gye-editor-holder .cdx-quote__text { background: var(--color-bg); }

/* image tool */
.gye-editor-holder .cdx-button {
  background: var(--color-bg); border: 1px solid var(--color-border); color: var(--color-text);
}
.gye-editor-holder .image-tool__image { background: transparent; }

/* =========================================================
   ПУБЛИЧНЫЙ РЕНДЕР БЛОКОВ (внутри .post-content на странице поста)
   Базовые p/h2/h3/img/ul/ol темы и WordPress используются как есть —
   ниже только то, чего в теме нет (фигуры, чеклисты, цитаты, эмбеды).
========================================================= */
.post-content .gye-figure { margin: 24px 0; }
.post-content .gye-figure figcaption {
  margin-top: 8px; font-size: 0.85rem; color: var(--color-text-muted); text-align: center;
}
.post-content .gye-figure--border img { border: 1px solid var(--color-border); }
.post-content .gye-figure--bg { background: var(--color-bg-alt); padding: 14px; border-radius: var(--radius); }

/* Списки из Editor.js. Глобальный сброс ul,ol{list-style:none} убирает
   маркеры — возвращаем их для маркированного и нумерованного списков. */
.post-content .gye-list { margin: 16px 0; padding-left: 1.6em; }
.post-content .gye-list li { margin: 6px 0; }
.post-content ul.gye-list--unordered { list-style: disc !important; }
.post-content ol.gye-list--ordered  { list-style: decimal !important; }
.post-content .gye-list .gye-list { margin: 6px 0 6px 0; }
.post-content ul.gye-list--unordered ul.gye-list--unordered { list-style: circle !important; }
.post-content ul.gye-list--unordered ul.gye-list--unordered ul.gye-list--unordered { list-style: square !important; }

/* чеклист — кастомная разметка, своих стилей у темы нет */
.post-content .gye-list--checklist { list-style: none; padding-left: 0; }
.post-content .gye-check { display: flex; align-items: flex-start; gap: 10px; margin: 7px 0; }
.post-content .gye-check-box {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 4px; border-radius: 5px;
  border: 1.5px solid var(--color-border); position: relative;
}
.post-content .gye-check.is-checked .gye-check-box {
  background: var(--color-accent); border-color: var(--color-accent);
}
.post-content .gye-check.is-checked .gye-check-box::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.post-content .gye-check.is-checked .gye-check-text { color: var(--color-text-muted); }

.post-content .gye-quote {
  margin: 24px 0; padding: 14px 20px; border-left: 4px solid var(--color-accent);
  background: var(--color-bg-alt); border-radius: 0 10px 10px 0;
}
.post-content .gye-quote p { margin: 0 0 6px; font-style: italic; }
.post-content .gye-quote cite {
  display: block; font-size: 0.85rem; color: var(--color-text-muted); font-style: normal;
}

.post-content .gye-embed { margin: 24px 0; }
/* Подпись под нативным эмбедом */
.post-content .gye-embed-cap {
  margin: 8px 0 0; font-size: 0.85rem; color: var(--color-text-muted); text-align: center;
}

/* Нативный вывод oEmbed (WordPress).
   Адаптив форсим ТОЛЬКО для видео (.wp-has-aspect-ratio), иначе карточки
   reddit/внутренних ссылок (натуральная высота) обрезаются. */
.post-content .wp-block-embed { margin: 24px 0; }
.post-content .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper { position: relative; }
.post-content .wp-embed-aspect-21-9 .wp-block-embed__wrapper { aspect-ratio: 21 / 9; }
.post-content .wp-embed-aspect-18-9 .wp-block-embed__wrapper { aspect-ratio: 18 / 9; }
.post-content .wp-embed-aspect-16-9 .wp-block-embed__wrapper { aspect-ratio: 16 / 9; }
.post-content .wp-embed-aspect-4-3  .wp-block-embed__wrapper { aspect-ratio: 4 / 3; }
.post-content .wp-embed-aspect-1-1  .wp-block-embed__wrapper { aspect-ratio: 1 / 1; }
.post-content .wp-embed-aspect-9-16 .wp-block-embed__wrapper { aspect-ratio: 9 / 16; }
.post-content .wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper iframe {
  width: 100%; height: 100%; border: 0; display: block;
}
/* Прочие эмбеды (reddit, внутренние карточки, твиты) — натуральная высота */
.post-content .wp-block-embed:not(.wp-has-aspect-ratio) iframe,
.post-content p > iframe { max-width: 100%; }

/* Twitter/X и Instagram — клиентские виджеты, центрируем */
.post-content .gye-embed-x,
.post-content .gye-embed-ig { margin: 24px auto; display: flex; justify-content: center; }
.post-content .gye-embed-x .twitter-tweet { margin: 0 auto !important; }
.post-content .gye-embed-ig .instagram-media { margin: 0 auto !important; }

/* Совместимость со старыми постами 2.5.x (ручной iframe в контенте) */
.post-content .gye-embed-frame { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }
.post-content .gye-embed-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.post-content hr.gye-delimiter {
  border: none; text-align: center; margin: 28px 0;
}
.post-content hr.gye-delimiter::before {
  content: "* * *"; letter-spacing: 0.4em; color: var(--color-text-muted); font-size: 1.1rem;
}

/* =========================================================
   СТРАНИЦА ЧЕРНОВИКОВ
========================================================= */
.gye-drafts-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin: 6px 0 22px; flex-wrap: wrap;
}
.gye-drafts-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 4px; color: var(--color-text); }
.gye-drafts-subtitle { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }
.gye-drafts-new { white-space: nowrap; }

.gye-drafts-list { display: flex; flex-direction: column; gap: 12px; }
.gye-draft-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; background: var(--color-card);
  border: 1px solid var(--color-border); border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.gye-draft-card:hover { border-color: var(--color-accent); box-shadow: var(--shadow); }
.gye-draft-main { min-width: 0; flex: 1; }
.gye-draft-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gye-draft-badge {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 6px;
}
.gye-draft-badge--draft { background: var(--color-bg-alt); color: var(--color-text-muted); }
.gye-draft-badge--pending { background: rgba(234,179,8,0.15); color: #b7791f; }
.gye-draft-date { font-size: 0.78rem; color: var(--color-text-muted); }
.gye-draft-title {
  display: block; font-size: 1.05rem; font-weight: 700; color: var(--color-text);
  text-decoration: none; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gye-draft-title:hover { color: var(--color-accent); }
.gye-draft-excerpt {
  margin: 5px 0 0; font-size: 0.85rem; color: var(--color-text-muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.gye-draft-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.gye-draft-btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 8px 12px; border-radius: 8px; font-size: 0.83rem; font-weight: 600;
  border: 1px solid var(--color-border); background: var(--color-bg); color: var(--color-text);
  text-decoration: none; transition: all var(--transition);
}
.gye-draft-btn-edit:hover { border-color: var(--color-accent); color: var(--color-accent); }
.gye-draft-btn-delete:hover { border-color: #ef4444; color: #ef4444; }
.gye-draft-btn:disabled { opacity: 0.5; cursor: default; }

.gye-drafts-empty {
  text-align: center; padding: 56px 20px; color: var(--color-text-muted);
}
.gye-drafts-empty svg { color: var(--color-border); margin-bottom: 14px; }
.gye-drafts-empty p { margin: 0 0 18px; font-size: 0.95rem; }

@media (max-width: 600px) {
  .gye-title-block { font-size: 1.45rem; }
  .gye-draft-card { flex-direction: column; align-items: stretch; }
  .gye-draft-actions { justify-content: flex-end; }
  .gye-draft-del-label { display: none; }
  .gye-editor-actions { flex-wrap: wrap; }
  .gye-save-status { order: -1; width: 100%; margin: 0 0 4px; }
  .gye-editor-actions .gye-btn { flex: 1; justify-content: center; }
}

@media (max-width: 1024px) {
	.btn-notif-bell {width: auto; height: auto; color: var(--color-text-muted);}
	.btn-notif-bell svg {width: 21px; height: 21px;}
}
	
/* кнопки в шапке страницы черновиков */
.gye-drafts-headbtns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* =========================================================
   EDITOR.JS — кастомный embed-инструмент (превью через WP)
========================================================= */
.gye-embed-tool { margin: 6px 0; }

.gye-embed-input { display: flex; gap: 8px; align-items: center; }
.gye-embed-url {
  flex: 1; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg); color: var(--color-text);
  font-family: inherit; font-size: 0.92rem; outline: none;
}
.gye-embed-url:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.gye-embed-go {
  padding: 10px 16px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--color-accent); color: #fff; font-weight: 600; font-size: 0.88rem;
  white-space: nowrap; transition: background var(--transition);
}
.gye-embed-go:hover { background: var(--color-accent-hover); }

.gye-embed-loading {
  padding: 22px; text-align: center; color: var(--color-text-muted);
  font-size: 0.9rem; border: 1px dashed var(--color-border); border-radius: 10px;
}

.gye-embed-bar {
  display: flex; align-items: center; gap: 8px; padding: 6px 4px 8px;
  font-size: 0.78rem; color: var(--color-text-muted);
}
.gye-embed-src { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gye-embed-change {
  flex: 0 0 auto; width: 24px; height: 24px; line-height: 1; cursor: pointer;
  border: 1px solid var(--color-border); border-radius: 6px; background: var(--color-bg);
  color: var(--color-text-muted); font-size: 0.8rem;
}
.gye-embed-change:hover { color: #ef4444; border-color: #ef4444; }

.gye-embed-sandbox {
  width: 100%; border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--color-bg); min-height: 80px; display: block;
}

.gye-embed-link {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-alt);
}
.gye-embed-link a {
  flex: 1; color: var(--color-accent); word-break: break-all; font-size: 0.9rem; text-decoration: none;
}
.gye-embed-link a:hover { text-decoration: underline; }

/* =========================================================
   СТРАНИЦА МОДЕРАЦИИ /alldrafts/ (наследует стиль /drafts/)
========================================================= */
.gye-mod-filters {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px;
  border-bottom: 1px solid var(--color-border); padding-bottom: 14px;
}
.gye-mod-filter {
  padding: 7px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: 600;
  text-decoration: none; color: var(--color-text-muted);
  border: 1px solid var(--color-border); transition: all var(--transition);
}
.gye-mod-filter:hover { color: var(--color-accent); border-color: var(--color-accent); }
.gye-mod-filter.is-active { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.gye-mod-filter .gye-mod-count {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 10px;
  background: rgba(0,0,0,0.12); font-size: 0.78rem;
}
.gye-mod-filter.is-active .gye-mod-count { background: rgba(255,255,255,0.25); }

.gye-draft-badge--publish { background: rgba(22,163,74,0.15); color: #16a34a; }
.gye-draft-author {
  font-size: 0.78rem; color: var(--color-text-muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.gye-draft-author strong { color: var(--color-text); font-weight: 600; }

.gye-draft-btn-approve { color: #16a34a; }
.gye-draft-btn-approve:hover { border-color: #16a34a; color: #16a34a; }
.gye-draft-btn-reject:hover { border-color: #eab308; color: #b7791f; }

/* =========================================================
   НОВЫЕ БЛОКИ EDITOR.JS — фронт + редактор (тёмная тема)
   Table · Warning · Code · Attaches · Gallery · Chart · InlineCode
========================================================= */

/* ---- Inline code ---- */
.post-content code.inline-code,
.codex-editor .inline-code {
  background: rgba(124, 58, 237, 0.14);
  color: #c4b5fd;
  padding: 2px 6px;
  border-radius: 6px;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.9em;
}

/* ---- Блок кода ---- */
.post-content .gye-code {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 24px 0;
  overflow-x: auto;
}
.post-content .gye-code code {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--color-text);
  white-space: pre;
  background: none;
  padding: 0;
}
/* редактор @editorjs/code */
.codex-editor .ce-code__textarea {
  background: var(--color-bg-alt) !important;
  color: var(--color-text) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius) !important;
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace !important;
}

/* ---- Предупреждение (warning) ---- */
.post-content .gye-warning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.35);
  border-left: 4px solid #eab308;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 24px 0;
}
.post-content .gye-warning__icon {
  flex: 0 0 26px;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: #eab308; color: #1a1205;
  border-radius: 50%; font-weight: 800; font-size: 1rem;
}
.post-content .gye-warning__title { font-weight: 700; color: var(--color-text); margin-bottom: 3px; }
.post-content .gye-warning__msg { color: var(--color-text-muted); }
/* редактор @editorjs/warning */
.codex-editor .cdx-warning__title,
.codex-editor .cdx-warning__message {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  box-shadow: none;
}

/* ---- Таблица ---- */
.post-content .gye-table-wrap { overflow-x: auto; margin: 24px 0; }
.post-content .gye-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  display: table;            /* перебиваем глобальный table{display:block} */
}
.post-content .gye-table th,
.post-content .gye-table td {
  border: 1px solid var(--color-border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.post-content .gye-table thead th {
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-weight: 700;
}
.post-content .gye-table tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
/* редактор @editorjs/table */
.codex-editor .tc-wrap {
  --color-background: var(--color-bg-alt);
  --color-border: var(--color-border);
  --color-text-secondary: var(--color-text-muted);
  color: var(--color-text);
}
.codex-editor .tc-cell { border-color: var(--color-border); }
.codex-editor .tc-row::after { border-color: var(--color-border); }
.codex-editor .tc-add-row,
.codex-editor .tc-add-column { color: var(--color-text-muted); }

/* ---- Вложение (attaches) ---- */
.post-content .gye-attach {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin: 24px 0;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), transform var(--transition);
}
.post-content .gye-attach:hover { border-color: var(--color-accent); transform: translateY(-1px); }
.post-content .gye-attach__icon {
  flex: 0 0 44px; width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(37,99,235,0.12); color: var(--color-accent);
  border-radius: 10px;
}
.post-content .gye-attach__body { flex: 1; min-width: 0; }
.post-content .gye-attach__name {
  display: block; color: var(--color-text); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.post-content .gye-attach__meta { display: block; color: var(--color-text-muted); font-size: 0.8rem; margin-top: 2px; }
.post-content .gye-attach__dl { flex: 0 0 auto; color: var(--color-text-muted); }
.post-content .gye-attach:hover .gye-attach__dl { color: var(--color-accent); }
/* редактор @editorjs/attaches */
.codex-editor .cdx-attaches {
  --color-line: var(--color-border);
  --color-bg: var(--color-bg-alt);
  --color-bg-secondary: var(--color-card);
}
.codex-editor .cdx-attaches--with-file .cdx-attaches__file-info,
.codex-editor .cdx-attaches__title { color: var(--color-text); }

/* ---- Галерея (фронт) ---- нативная разметка wp-block-gallery
   (наша новая + галереи из редактора WordPress). Старый формат
   .gye-gallery__item оставлен для уже опубликованных постов.
   !important — чтобы перебить block-library CSS ядра WP
   (там has-nested-images → flex + width:calc(33.33%…), из-за чего
   картинки выходили мелкими). */
.post-content .wp-block-gallery,
.post-content .gye-gallery {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 8px !important;
  margin: 24px 0;
  padding: 0;
  list-style: none;
}
.post-content .wp-block-gallery.columns-1 { grid-template-columns: 1fr !important; }
.post-content .wp-block-gallery.columns-2 { grid-template-columns: repeat(2, 1fr) !important; }

/* ячейки: новая (figure.wp-block-image), старая WP (li) и наш old-формат.
   width:auto!important убирает width:calc(...) из ядра WP. */
.post-content .wp-block-gallery figure.wp-block-image,
.post-content .wp-block-gallery > .wp-block-image,
.post-content .wp-block-gallery > figure,
.post-content .wp-block-gallery > li,
.post-content .gye-gallery__item {
  position: relative;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
  list-style: none;
}
.post-content .wp-block-gallery > li figure { margin: 0; height: 100%; }
.post-content .wp-block-gallery a,
.post-content .gye-gallery__item a { display: block; width: 100%; height: 100%; }
.post-content .wp-block-gallery figure.wp-block-image img,
.post-content .wp-block-gallery img,
.post-content .gye-gallery__item img {
  width: 100% !important; height: 100% !important; object-fit: cover;
  max-width: none !important; cursor: pointer;
  transition: transform var(--transition); display: block;
}
.post-content .wp-block-gallery img:hover,
.post-content .gye-gallery__item:hover img { transform: scale(1.04); }

/* Общая подпись галереи (figcaption у wp-block-gallery) — на всю ширину под сеткой */
.post-content .wp-block-gallery > figcaption {
  grid-column: 1 / -1;
  aspect-ratio: auto !important;
  width: auto !important;
  background: none !important;
  border-radius: 0;
  overflow: visible;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 4px 0 0 !important;
}

/* 1–2 картинки — крупнее */
.post-content .gye-gallery[data-count="1"] { grid-template-columns: 1fr !important; }
.post-content .gye-gallery[data-count="1"] > .wp-block-image,
.post-content .gye-gallery[data-count="1"] .gye-gallery__item { aspect-ratio: 16 / 9; }
.post-content .gye-gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr) !important; }

/* Фолбэк: классическая галерея .gallery (кэш/плагин, если фильтр не сработал) */
.post-content .gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 24px 0;
}
.post-content .gallery.gallery-columns-1 { grid-template-columns: 1fr; }
.post-content .gallery.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.post-content .gallery .gallery-item {
  margin: 0 !important;
  width: auto !important;
  aspect-ratio: 5 / 6;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg-alt);
}
.post-content .gallery .gallery-icon,
.post-content .gallery .gallery-icon a { height: 100%; margin: 0; }
.post-content .gallery .gallery-item img {
  width: 100% !important; height: 100% !important;
  object-fit: cover; border: 0 !important; display: block;
}
.post-content .gallery .gallery-caption { display: none; }

/* ---- Галерея (редактор) ---- */
.gye-gallery-tool { margin: 6px 0; }
.gye-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.gye-gallery-item {
  position: relative; aspect-ratio: 1/1; border-radius: 8px; overflow: hidden;
  background: var(--color-bg-alt); border: 1px solid var(--color-border);
}
.gye-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gye-gallery-rm {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px;
  border: none; border-radius: 6px; cursor: pointer;
  background: rgba(0,0,0,0.6); color: #fff; font-size: 0.78rem; line-height: 1;
}
.gye-gallery-rm:hover { background: #ef4444; }
.gye-gallery-empty {
  grid-column: 1 / -1; padding: 24px; text-align: center;
  color: var(--color-text-muted); border: 1px dashed var(--color-border); border-radius: 10px;
}
.gye-gallery-bar { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.gye-gallery-add {
  padding: 9px 16px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--color-accent); color: #fff; font-weight: 600; font-size: 0.86rem;
  transition: background var(--transition);
}
.gye-gallery-add:hover { background: var(--color-accent-hover); }
.gye-gallery-counter { color: var(--color-text-muted); font-size: 0.82rem; }

/* ---- График (фронт) ---- */
.post-content .gye-chart {
  margin: 24px 0;
  padding: 16px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}
.post-content .gye-chart__title {
  text-align: center; color: var(--color-text); font-weight: 700; margin-bottom: 12px;
}
.post-content .gye-chart__canvas-wrap { position: relative; height: 340px; }

/* ---- График (редактор) ---- */
.gye-chart-tool { margin: 6px 0; }
.gye-chart-ctrls { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.gye-chart-type, .gye-chart-title {
  padding: 9px 12px; border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg); color: var(--color-text); font-family: inherit; font-size: 0.9rem;
}
.gye-chart-type { flex: 0 0 auto; }
.gye-chart-title { flex: 1; min-width: 160px; }
.gye-chart-data {
  width: 100%; box-sizing: border-box; min-height: 110px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg); color: var(--color-text);
  font-family: Menlo, Monaco, Consolas, monospace; font-size: 0.85rem; line-height: 1.5;
}
.gye-chart-preview {
  position: relative; height: 300px; margin-top: 12px;
  background: var(--color-bg-alt); border: 1px solid var(--color-border); border-radius: 10px; padding: 8px;
}

/* =========================================================
   Капча публикации + уведомление о лимите модерации
========================================================= */
.gye-captcha {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--color-border); border-radius: 10px;
  background: var(--color-bg-alt);
}
.gye-captcha-q { font-weight: 700; color: var(--color-text); font-size: 0.95rem; }
.gye-captcha-input {
  width: 80px; padding: 7px 10px; border: 1px solid var(--color-border);
  border-radius: 8px; background: var(--color-bg); color: var(--color-text);
  font-family: inherit; font-size: 0.9rem; outline: none;
}
.gye-captcha-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.gye-limit-note {
  margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius);
  background: rgba(234,179,8,0.08); border: 1px solid rgba(234,179,8,0.35);
  border-left: 4px solid #eab308; color: var(--color-text);
}

/* =========================================================
   Теги в редакторе (чипы + инлайн-инструмент «В теги»)
========================================================= */
.gye-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 8px;
}
.gye-tags:empty { margin-bottom: 0; }
.gye-tag-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 6px 5px 12px; border-radius: 999px;
  background: rgba(37,99,235,0.12); color: var(--color-text);
  font-size: 0.85rem; line-height: 1;
}
.gye-tag-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border: none; border-radius: 50%;
  background: rgba(0,0,0,0.15); color: var(--color-text);
  font-size: 0.95rem; line-height: 1; cursor: pointer; padding: 0;
}
.gye-tag-x:hover { background: #ef4444; color: #fff; }
.gye-tag-input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 8px;
  background: var(--color-bg); color: var(--color-text);
  font-family: inherit; font-size: 0.92rem; outline: none;
}
.gye-tag-input:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

/* Inline-кнопка «Теги» в тулбаре выделения (с подписью) */
.ce-inline-tool.gye-tag-inline-btn {
  width: auto; gap: 4px; padding: 0 8px;
}
.gye-tag-inline-label { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* Блок тегов под редактором — лёгкий разделитель сверху */
.gye-field-tags {
  margin-top: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

