/* ============================================================
   MAGAMERS — critical.css (blocking, above-the-fold shell)
   tokens + fonts + reset + header/nav/footer + story grid +
   featured carousel + sidebar + responsive + dark overrides
   ============================================================ */
/* ============================================================
   MAGAMERS — styles.css
   ============================================================ */
/* ============================================================
   0. CSS REGISTERED PROPERTIES (Houdini)
   ============================================================ */
@property --clr-brand-pulse {
  syntax: '<color>';
  inherits: false;
  initial-value: #ec2e1c;
}

/* ============================================================
   1. CSS CUSTOM PROPERTIES (design tokens)
   ============================================================ */
:root {
  /* Colors */
  --clr-brand:        #ec2e1c;
  --clr-brand-hover:  #d02516;
  --clr-brand-dark:   #c0200f;
  --clr-gold:         #ffb027;
  --clr-gold-light:   #ffd700;

  --clr-dark:         #272727;
  --clr-dark-2:       #21282d;
  --clr-dark-4:       #293239;
  --clr-body:         #444;
  --clr-heading:      #1f252c;
  --clr-link:         var(--clr-brand-dark);
  --clr-muted:        #94999e;
  --clr-text-soft:    #475569;
  --clr-light-muted:  #cdd0d3;
  --clr-border:       #e3e4e6;
  --clr-border-light: #eceded;
  --clr-bg:           #fff;
  --clr-bg-light:     #f4f6f7;
  --clr-bg-dark:      #f8f8f8;

  /* Semantic status colors */
  --clr-info:          #2563eb;
  --clr-info-hover:    #1d4ed8;
  --clr-success:       #27ae60;
  --clr-success-hover: #219a52;
  --clr-danger:        #ef4444;
  --clr-danger-hover:  #b91c1c;
  --clr-warning:       #f59e0b;
  --clr-warning-light: #fbbf24;
  --surface-info-soft:    rgba(37, 99, 235, .08);
  --surface-success-soft: rgba(39, 174, 96, .08);
  --surface-danger-soft:  rgba(239, 68, 68, .06);

  /* Typography */
  --font-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               "Noto Sans", "Liberation Sans", Arial, sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
               "Noto Color Emoji";
  --font-mono: Menlo, Monaco, Consolas, "Courier New", monospace;
  --fs-base:   0.9rem;
  --lh-base:   1.5;
  --fs-xs:     12px;
  --fs-sm:     12px;
  --fs-meta:   13px;
  --fs-body:   14px;
  --fs-md:     16px;
  --fs-lg:     20px;
  --fs-xl:     24px;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  32px;
  --control-min: 44px;

  /* Border radius */
  --r-sm:   2px;
  --r-md:   5px;
  --r-lg:   8px;
  --r-xl:   10px;
  --r-2xl:  12px;
  --r-full: 50%;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.14);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.08);
  --shadow-md:  0 4px 15px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 40px -10px rgba(0,0,0,.3);
  --shadow-nav: 0 0 9px rgba(0,0,0,.4);

  /* Game surface system */
  --mm-page: #f8fafc;
  --game-surface: #fff;
  --game-surface-soft: #f8fafc;
  --game-surface-line: rgba(226, 232, 240, .88);
  --game-surface-shadow: 0 6px 18px rgba(15, 23, 42, .05);
  --game-surface-shadow-hover: 0 9px 22px rgba(15, 23, 42, .07);
  --game-surface-radius: 18px;
  --game-card-padding: 24px;
  --game-section-gap: 24px;

  /* Transitions */
  --t-fast:   .15s ease;
  --t-base:   .2s ease;
  --t-slow:   .3s ease;
  --t-xslow:  .4s ease;

  /* Breakpoint reference (use consistently in @media):
     480px  — mobile phones
     700px  — tablets (max-width) / 700px min
     860px  — small desktops
     1200px — desktops (2-col grid, hero)
  */
}

/* ============================================================
   1a-extra. DARK THEME — token overrides only (toggle in header,
   persisted via localStorage 'mm_theme', FOUC guard in main.tpl head)
   ============================================================ */
html[data-theme="dark"] {
  --clr-heading:      #e8edf3;
  --clr-body:         #c9d1d9;
  --clr-link:         #ff7361;
  --clr-muted:        #9aa4b2;
  --clr-text-soft:    #98a2b3;
  --clr-light-muted:  #67707c;
  --clr-border:       #2c333c;
  --clr-border-light: #262d36;
  --clr-bg:           #1e232a;
  --clr-bg-light:     #232932;
  --clr-bg-dark:      #1a1f26;

  --surface-info-soft:    rgba(96, 165, 250, .12);
  --surface-success-soft: rgba(52, 211, 153, .12);
  --surface-danger-soft:  rgba(248, 113, 113, .12);

  --shadow-xs:  0 1px 2px rgba(0,0,0,.4);
  --shadow-sm:  0 2px 8px rgba(0,0,0,.35);
  --shadow-md:  0 4px 15px rgba(0,0,0,.4);
  --shadow-lg:  0 8px 40px -10px rgba(0,0,0,.6);
  --shadow-nav: 0 0 9px rgba(0,0,0,.6);

  --mm-page:               #15191e;
  --game-surface:          #1e232a;
  --game-surface-soft:     #232932;
  --game-surface-line:     rgba(255, 255, 255, .07);
  --game-surface-shadow:       0 6px 18px rgba(0, 0, 0, .35);
  --game-surface-shadow-hover: 0 9px 22px rgba(0, 0, 0, .45);
}

/* Dark theme: header is always dark; its chrome (--clr-bg-based) must stay light.
   --clr-bg is overloaded as both page surface and header-icon color, so re-pin it here. */
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 16% 0%, rgba(236, 46, 28, .09), transparent 32vw),
    radial-gradient(circle at 84% 10%, rgba(255, 176, 39, .07), transparent 30vw),
    linear-gradient(180deg, var(--mm-page) 0%, #101318 100%);
}
html[data-theme="dark"] .h_btn > .icon        { fill: #e8edf3; }
html[data-theme="dark"] .h_btn:hover > .icon  { fill: var(--clr-brand); }
html[data-theme="dark"] .menu_toggle > i,
html[data-theme="dark"] .icon_close > i       { background-color: #e8edf3; }
html[data-theme="dark"] .header-search button .icon { fill: rgba(255,255,255,.6); }
html[data-theme="dark"] .header-search input,
html[data-theme="dark"] #q_search input,
html[data-theme="dark"] .droptopbar input     { color: #e8edf3; }

/* Theme toggle icon: outline (stroke) glyph, sun/moon swap */
#theme-toggle .icon            { fill: none; stroke: currentColor; width: 20px; height: 20px; }
#theme-toggle                  { color: var(--clr-bg); }
#theme-toggle:hover .icon      { fill: none; stroke: var(--clr-brand); }
#theme-toggle .icon-theme-sun  { display: none; }
html[data-theme="dark"] #theme-toggle          { color: #e8edf3; }
html[data-theme="dark"] #theme-toggle .icon-theme-moon { display: none; }
html[data-theme="dark"] #theme-toggle .icon-theme-sun  { display: inline-block; }

/* ============================================================
   1b. SELF-HOSTED BRAND FONT — Inter (latin subset, woff2)
   Weights 400/700/900 cover body, bold UI, and .ultrabold headers.
   Browser nearest-weight matching maps 500/600→700, 800/850→900.
   ============================================================ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/inter-latin-900.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption,
tbody, tfoot, thead, tr, th, td,
article, aside, canvas, embed, figure, figcaption,
footer, header, hgroup, menu, nav, output, ruby,
section, summary, time, mark, audio, video {
  margin: 0; padding: 0; border: 0;
  font-size: 100%; font: inherit; vertical-align: baseline;
}
article, aside, figcaption, figure, footer,
header, hgroup, menu, nav, section { display: block; }
body            { line-height: 1; }
/* ponytail: 3rd-party fixed widgets (grecaptcha badge with inline right:-186px) inflate scrollWidth; clip stops phantom horizontal scroll without breaking sticky */
html            { overflow-x: clip; }
ol, ul          { list-style: none; }
blockquote, q   { quotes: none; }
blockquote::before, blockquote::after,
q::before, q::after { content: none; }
table           { border-collapse: collapse; border-spacing: 0; }

html            { scrollbar-gutter: stable; }

/* ============================================================
   3. GLOBAL TYPOGRAPHY & BASE ELEMENTS
   ============================================================ */
body, select, input, textarea, button {
  font-family: var(--font-base);
  font-size:   var(--fs-base);
  line-height: var(--lh-base);
  color:       var(--clr-body);
  outline:     none;
}

a {
  color: var(--clr-link);
  text-decoration: none;
}
:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--clr-brand);
  outline-offset: 3px;
}
a:hover    { color: var(--clr-brand-hover); }
a img      { border: 0 none; }
a > img    { vertical-align: bottom; }
.download-action { display: inline-flex; align-items: center; gap: var(--sp-sm); min-height: var(--control-min); text-decoration: none; }

.skip-link { position: absolute; left: -9999px; top: 0; z-index: 9999; background: var(--clr-brand); color: var(--clr-bg); padding: 10px 16px; font-weight: 700; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

h1, h2, h3, h4, h5,
.h1, .h2, .h3, .h4, .h5 {
  margin: 2em 0 .8em;
  letter-spacing: -0.01em;
  line-height: 1.35em;
  font-weight: bold;
  text-rendering: optimizeLegibility;
  text-wrap: pretty;
}
h1, .h1 { font-size: 2em; }
h2, .h2 { font-size: 1.9em; }
h3, .h3 { font-size: 1.6em; }
h4, .h4 { font-size: 1.5em; }
h5, .h5 { font-size: 1.2em; }

strong, b   { font-weight: bold; }
em, cite, i { font-style: italic; }
caption     { text-align: left; }
th, td      { vertical-align: middle; }
small, .small { font-size: .9em; }
sup         { vertical-align: super; font-size: smaller; }
hr {
  height: 0; border: 0;
  border-top: 2px solid var(--clr-border);
  box-sizing: content-box;
  margin: 20px 0;
}
p {
  margin-block-start: .7em;
  margin-block-end:   .7em;
}

ul { padding-left: 40px; list-style: disc outside;    margin: 1em 0; }
ol { padding-left: 40px; list-style: decimal outside; margin: 1em 0; }

.instagram-media,
.twitter-tweet { display: inline-block !important; }

/* ============================================================
   4. UTILITY CLASSES
   ============================================================ */
.strike  { text-decoration: line-through; }
.nobr    { white-space: nowrap; }
 .hidden  { display: none; }
.uline   { text-decoration: underline; }
.ultrabold { font-weight: 900 }
.title_hide {
  position: absolute; overflow: hidden;
  left: -9999px; top: -9999px;
  width: 0; height: 0;
}
.justify { text-align: justify; }
.center  { text-align: center; }
.left    { float: left; }
.right   { float: right; }
.clr     { clear: both; }
.clrfix::after { clear: both; content: ""; display: table; }
.over {
  display: inline-block; vertical-align: middle;
  max-width: 100%; white-space: nowrap;
  text-overflow: ellipsis; overflow: hidden;
}
a .over { cursor: pointer; }

.grey        { color: var(--clr-muted); }
.grey a      { color: inherit; }
.grey a:hover,
a.grey:hover { color: var(--clr-body); }
.red         { color: var(--clr-brand); }

.cover {
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

fieldset        { border: 1px solid rgba(0,0,0,.1); padding: 15px; margin-bottom: 1.5em; }
fieldset legend { font-weight: bold; }

.signature { font-size: .9em; opacity: .5; margin-top: .9em; }

.wseditor table,
.bb-editor table { margin: 0; }
.dlepopupnewsedit { height: 400px !important; }

.grecaptcha-badge { display: none; }

/* ============================================================
   5. COLLAPSE / FADE TRANSITIONS
   ============================================================ */
.fade {
  opacity: 0;
  transition: opacity .15s linear;
}
.fade.in { opacity: 1; }
.collapse {
  overflow: hidden;
  height: 0; width: 100%; display: block;
}
.collapse.in { display: block; width: 100%; height: auto; }
.collapsing {
  position: relative;
  height: 0; overflow: hidden;
  transition: height .2s cubic-bezier(.22, 1, .36, 1);
}

/* ============================================================
   6. DROPDOWN MENUS & FORMS
   ============================================================ */
.dropdown { position: relative; }

.dropdown-menu,
.dropdown-form {
  min-width: 160px;
  padding: 12px 0;
  border-radius: var(--r-sm);
  margin-top: 5px !important;
  display: none;
  z-index: 99;
  position: absolute;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0,0,0,.1);
  background-clip: padding-box;
  background-color: var(--clr-bg);
}
.dropdown-menu { list-style: none; margin: 0; }
.dropdown-form { padding: 25px; }

.dropdown-menu li a {
  padding: 5px 20px;
  border: 0 none; display: block;
  white-space: nowrap; text-decoration: none;
  color: inherit;
  transition: background-color var(--t-base), color var(--t-base);
}
.dropdown-menu li a:hover { background-color: #e05b37; color: var(--clr-bg); }
.open .dropdown-menu,
.open .dropdown-form { display: block; }

/* ============================================================
   7. TABS
   ============================================================ */
.tab-content > .tab-pane { display: none; }
.tab-content > .active   { display: block; }

/* ============================================================
   8. ICONS
   ============================================================ */
.icon {
  display: inline-block;
  width: 1em; height: 1em;
  fill: var(--clr-brand);
  vertical-align: middle;
}
.icon-white {
  display: inline-block;
  width: 1em; height: 1em;
  fill: var(--clr-bg);
  vertical-align: middle;
  flex-shrink: 0;
}
.icon-grey {
  display: inline-block;
  width: 16px; height: 16px;
  margin-top: -5px;
  fill: #7e7e7e;
  vertical-align: middle;
  opacity: .5;
  transition: opacity var(--t-base);
}

.icon-ca               { width: 25px;  height: 25px; }
.icon-arrow_down       { width: 13px;  height: 13px; }
.icon-arrow_left       { width: 13px;  height: 13px; }
.icon-arrow_right      { width: 13px;  height: 13px; }
.icon-fav              { width: 15px;  height: 14px; }
.icon-like             { width: 13px;  height: 11px; }
.icon-meta_date        { width: 17px;  height: 17px; }
.icon-meta_reply       { width: 13px;  height: 13px; }
.icon-meta_views       { width: 17px;  height: 17px; }
.icon-meta_cat         { width: 17px;  height: 17px; }
.icon-meta_user        { width: 15px;  height: 16px; }
.icon-meta_coms        { width: 17px;  height: 17px; }
.icon-meta_mail        { width: 19px;  height: 15px; }
.icon-compl            { width: 13px;  height: 13px; }
.icon-cross            { width: 13px;  height: 13px; }
.icon-next,
.icon-prev             { width: 23px;  height: 23px; }
.icon-sort,
.icon-speedbar,
.icon-meta_pages       { width: 29px; height: 30px; }
.icon-search,
.icon-login            { width: 20px; height: 19px; }
.icon-tags             { width: 17px;  height: 17px; }
.icon-meta_size,
.icon-meta_git,
.icon-meta_release,
.icon-meta_crack,
.icon-translate,
.icon-megaphone,
.icon-download,
.icon-download-circle,
.icon-steam,
.icon-help,
.icon-cloud-download,
.icon-refresh,
.icon-apple            { width: 17px;  height: 17px; }
.icon-shield           { width: 23px; height: 23px; float: left; margin: 2px 0 0 -32px; }

.icon-vk   { width: 10px; height: 1em; }
.icon-tw   { width: 14px; height: 1em; }
.icon-fb   { width: 8px;  height: 1em; }
.icon-gp   { width: 18px; height: 1em; }
.icon-ya   { width: 7px;  height: 1em; }
.icon-od   { width: 10px; height: 1em; }
.icon-mail { width: 16px; height: 1em; }

.meta > li > i[class^="fa-"], 
.meta > li > i[class*=" fa-"] {
    float: left;
    margin: 2px 0 0 -30px;
    width: 17px;
    height: 17px;
    font-size: 17px;
    color: var(--clr-brand);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    text-align: center;
}

.meta > li > i {
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   9. LAYOUT — WRAPPER & GRID
   ============================================================ */
body {
  background:
    radial-gradient(circle at 16% 0%, rgba(236, 46, 28, .07), transparent 32vw),
    radial-gradient(circle at 84% 10%, rgba(255, 176, 39, .09), transparent 30vw),
    linear-gradient(180deg, var(--mm-page) 0%, #eef2f7 100%);
}

.wrp,
.wrp_min {
  max-width: 1380px;
  padding: 0 20px;
  margin: 0 auto;
}
.wrp_min { max-width: 950px; }

#content > .wrp:not(.page_description) { padding-top: 18px; }

.wrp.page_description {
    padding: 0 var(--sp-lg);
    color: var(--clr-muted);
    font-size: var(--fs-body);
    margin-bottom: 20px;
}
.wrp.page_description h3      { margin: 0; }

/* Fixed/Featured post wrapper */
.wrp.fixed_wrap {
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(45deg, var(--clr-gold), var(--clr-gold-light)) border-box;
  border-radius: var(--r-xl);
  box-shadow: 0 4px 15px rgba(255,176,39,.3);
  padding: 20px;
}

.fixed_label {
  position: absolute;
  left: 10px; top: 10px;
  width: 60px; height: 60px;
  background-color: var(--clr-gold);
  border-radius: var(--r-full);
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--clr-bg);
  font-weight: 700;
  font-size: var(--fs-sm);
  text-transform: uppercase;
  box-shadow: 0 2px 5px rgba(0,0,0,.3);
  z-index: 10;
}

.wrp.fixed_wrap .story_icons { margin-top: 20px; }

@media (max-width: 1200px) {
  .wrp.fixed_wrap { margin: 0 10px; padding: 15px; }
  .fixed_label    { display: none; }
}
@media (max-width: 700px) {
  .wrp.fixed_wrap          { margin: 5px; padding: 10px; }
  .fixed_label             { left: 10px; top: 10px; width: 40px; height: 40px; font-size: 8px; }
  .wrp.fixed_wrap .story_icons { margin-top: 15px; }
}

/* Column grid */
@media only screen and (min-width: 700px) {
  .grid_1_2, .grid_1_4, .grid_3_4 {
    float: left;
    margin-right: 3%;
    box-sizing: border-box;
  }
  .grid_1_2.right, .grid_1_4.right, .grid_3_4.right { float: right; }
  .grid_1_2.none,  .grid_1_4.none,  .grid_3_4.none  { float: none; margin-right: 0; }
  .grid_1_2  { width: 48%; }
  .grid_1_4  { width: 22%; }
  .grid_3_4  { width: 74%; }
  .grid_last { margin-right: 0; }

  .grid_list::after { content: ""; display: block; clear: both; }
  .grid_list > .grid_1_2:last-child,
  .grid_list > .grid_1_4:last-child,
  .grid_list.grid_3_4:last-child { margin-right: 0; }

  .grid_1_4.sidebar {
    margin-right: 0;
    position: sticky;
    top: 20px;
    z-index: 10;
  }
}
@media only screen and (max-width: 700px) {
  .grid_1_2, .grid_1_4, .grid_3_4 {
    width: 100%;
    float: none;
    margin-right: 0;
    margin-bottom: 20px;
  }
}

/* ============================================================
   10. HEADER
   ============================================================ */
/* ============================================================
   10. HEADER (sticky glass)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7, 9, 13, 0.94);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 14px 36px rgba(0,0,0,.24);
}

.site-kicker {
  background: linear-gradient(90deg, #0b0d10 0%, #11151a 52%, #0b0d10 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  letter-spacing: .01em;
}
.site-kicker .wrp {
  min-height: 28px;
  display: flex;
  align-items: center;
}
.site-kicker__stats,
.site-kicker__stats .hero-stats__text {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-kicker__stats b,
.site-kicker__stats .hero-stats__text b {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

#header {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo */
.logotype {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--clr-bg);
  text-decoration: none;
  flex-shrink: 0;
  transition: opacity var(--t-base);
}
.logotype:hover { opacity: .75; }
.logo-icon {
  display: block;
  height: 44px;
  width: auto;
  flex-shrink: 0;
  transition: transform var(--t-base);
}
.logotype:hover .logo-icon { transform: scale(.92); }
.logotype:active .logo-icon { transform: scale(.82); }
.brand-wordmark {
  display: grid;
  gap: 1px;
  line-height: 1;
  letter-spacing: .02em;
}
.brand-wordmark b {
  color: var(--clr-bg);
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
}
.brand-accent { color: var(--clr-brand); }
.brand-wordmark small {
  color: rgba(255,255,255,.6);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Header actions (search + login + buttons) */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  position: relative;
}
.header-actions .h_btn {
  float: none;
  width: 40px; height: 40px;
  padding: 0;
  box-sizing: border-box;
  flex-shrink: 0;
}
.header-actions .h_btn::after { display: none; }

/* Profile popover — matches nav dropdown square style */
.header-actions > #loginpane {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: 320px;
  margin-top: 0;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--r-sm);
  background: rgba(13, 15, 18, 0.96);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--t-base), transform var(--t-base);
}
.login_open .header-actions > #loginpane,
.loginf_open .header-actions > #loginpane {
  height: auto; margin-top: 0;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.header-actions > #loginpane > .wrp {
  min-width: 0;
  padding: 14px;
  white-space: normal;
  transition: opacity var(--t-base);
}
.login_open .page::before,
.loginf_open .page::before { height: 0; }
.header-actions > #loginpane .name {
  float: none;
  margin: 0 0 12px;
  font-size: var(--fs-meta);
}
.header-actions > #loginpane .login_menu {
  float: none;
  display: grid;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 12px;
}
.header-actions > #loginpane .login_menu > li {
  display: block;
  margin: 0;
}
.header-actions > #loginpane .login_menu > li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
}
.header-actions > #loginpane .login_menu > li a:hover {
  color: var(--clr-bg);
  background: rgba(255, 255, 255, 0.06);
}
.header-actions > #loginpane .login_form_links {
  float: none;
  display: grid;
  gap: 6px;
  height: auto;
  line-height: 1.3;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.header-actions > #loginpane .login_form_links > a {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  text-decoration: none;
  font-size: var(--fs-sm);
}
.header-actions > #loginpane .login_form_links > a:hover { color: var(--clr-brand); }
.header-actions > #loginpane .login_form {
  float: none;
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}
.header-actions > #loginpane .login_form > li {
  float: none;
  width: auto;
}
.header-actions > #loginpane .login_form > li > input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06) !important;
}
.header-actions > #loginpane .login_form > li > .btn {
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--clr-brand) !important;
}

/* Inline search (desktop) */
.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--r-pill);
  transition: border-color var(--t-base), background var(--t-base), box-shadow var(--t-base);
}
.header-search:hover {
  border-color: rgba(236, 46, 28, 0.35);
  background: rgba(255, 255, 255, 0.065);
}
.header-search:focus-within {
  border-color: var(--clr-brand);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(236, 46, 28, 0.14), 0 10px 30px rgba(236,46,28,.08);
}
.header-search input {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--clr-bg);
  caret-color: var(--clr-brand);
  font-size: var(--fs-meta);
  padding: 8px 12px 8px 14px;
  width: 210px;
}
.header-search input:focus,
.header-search input:focus-visible {
  background: transparent;
  color: var(--clr-bg);
  outline: 0;
}
.header-search input::placeholder { color: rgba(255, 255, 255, 0.45); }
.header-search button {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 8px 12px 8px 8px;
  display: flex;
  align-items: center;
}
.header-search button .icon { width: 16px; height: 16px; fill: rgba(255, 255, 255, 0.6); }

/* ============================================================
   11. TOP NAVIGATION MENU (desktop)
   ============================================================ */
@media only screen and (min-width: 860px) {

  #topmenu { position: relative; z-index: 2; align-self: stretch; min-width: 0; }
  #topmenu ul { list-style: none; padding: 0; margin: 0; }
  #topmenu > ul { display: flex; align-items: center; gap: 4px; height: 100%; }
  #topmenu > ul > li { position: relative; }

  #topmenu > ul > li > :where(a, .menu-parent-toggle) {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: var(--control-min);
    padding: 0 12px;
    border-radius: var(--r-pill);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.78);
    transition: color var(--t-base), background var(--t-base), box-shadow var(--t-base), transform var(--t-base);
    position: relative;
    z-index: 21;
    font-size: var(--fs-body);
    font-weight: 700;
    border: 0;
    background-color: transparent;
    cursor: pointer;
  }
  #topmenu > ul > li > :where(a, .menu-parent-toggle):hover {
    color: var(--clr-bg);
    background: rgba(236, 46, 28, 0.13);
    box-shadow: 0 0 0 1px rgba(236,46,28,.22) inset;
  }
  #topmenu > ul > li > :where(a, .menu-parent-toggle) > .icon { fill: rgba(255, 255, 255, 0.4); margin-left: 2px; width: 12px; height: 12px; }
  #topmenu a, #topmenu { color: rgba(255, 255, 255, 0.85); }

  /* Dropdown container */
  #topmenu > ul > li > ul,
  #topmenu > ul > li > div {
    position: absolute;
    left: 0; top: 100%;
    padding: 10px;
    padding-top: 23px;
    margin-left: 0;
    width: 260px;
    z-index: 20;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translate(0, -6px);
    transition: opacity var(--t-base), transform var(--t-base);
  }
  #topmenu > ul > li > div {
    padding-left: 20px;
    padding-right: 20px;
  }

  /* Dropdown open */
  #topmenu > ul > li:hover > ul,
  #topmenu > ul > li.menu-open > ul,
  #topmenu > ul > li:hover > div {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(0, 0);
  }

  /* Dropdown dark background panel */
  #topmenu > ul > li > ul::after,
  #topmenu > ul > li > div::after {
    content: "";
    background-color: rgba(13, 15, 18, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: absolute;
    top: 13px; left: 0;
    width: 100%; height: calc(100% - 13px);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: var(--shadow-nav);
  }

  /* Dropdown items (z-index above the ::after overlay) */
  #topmenu > ul > li > ul > li,
  #topmenu > ul > li > div > div { position: relative; z-index: 1; }

  /* Active/hover state for parent */
  #topmenu > ul > li.parent:hover > a {
    color: var(--clr-bg);
    background: rgba(236, 46, 28, 0.13);
    box-shadow: 0 0 0 1px rgba(236,46,28,.22) inset;
  }
  #topmenu > ul > li.parent:hover > a > .icon { fill: var(--clr-brand); }

  /* Dropdown link styles */
  #topmenu > ul > li > ul > li a {
    display: block;
    padding: 8px 10px;
    border-radius: var(--r-xl);
    text-decoration: none;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--t-base), background-color var(--t-base), transform var(--t-base);
    white-space: nowrap;
  }
  #topmenu > ul > li > ul > li > a:hover { color: var(--clr-bg); background: rgba(236,46,28,.14); transform: translateX(2px); }

  /* Sub-subcategory links (nested <ul> inside dropdown) */
  #topmenu > ul > li > ul > li > ul {
    position: static;
    padding: 0;
    margin: 0;
    display: block;
    width: auto;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: transparent;
  }

  #topmenu > ul > li > ul > li > ul > li a {
    padding-left: 36px;
    font-size: .92em;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--t-base);
  }
  #topmenu > ul > li > ul > li > ul > li a:hover {
    color: var(--clr-bg);
    background: rgba(255,255,255,.06);
  }

} /* end desktop nav */

#closemenu { display: none; }

/* Desktop: hide mobile-only elements */
@media only screen and (min-width: 860px) {
  #search, #mainmenu, #q_search { display: none; }
}

@media only screen and (min-width: 860px) and (max-width: 1199.98px) {
  #topmenu > ul > li > a { padding: 0 9px; font-size: var(--fs-meta); }
  .brand-wordmark, .header-search { display: none; }
  #search { display: flex; }
  #q_search { display: block; }
  .search_open #q_search { height: 52px; }
  #q_search .wrp { display: flex; align-items: center; gap: 8px; padding: 8px 20px; }
  #q_search input { flex: 1; background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--r-pill); color: var(--clr-bg) !important; caret-color: var(--clr-brand); padding: 8px 14px; font-size: var(--fs-body); }
}

/* ============================================================
   12. ARCHIVE TABS
   ============================================================ */
.arh_tabs {
  list-style: none;
  height: 26px;
  border-radius: 18px;
  margin-bottom: 25px !important;
  overflow: hidden;
  position: relative;
}
.arh_tabs::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--clr-brand);
  border-radius: 13px;
  pointer-events: none;
}
.arh_tabs > li        { float: left; width: 50%; position: relative; z-index: 1; }
.arh_tabs > li > a {
  text-align: center; display: block;
  height: 22px; line-height: 22px;
  padding: 2px 4px;
  color: var(--clr-bg);
  text-decoration: none;
  text-transform: uppercase;
  border-radius: 13px;
  font-size: 10px; font-weight: bold;
}
.arh_tabs > li.active > a { background-color: var(--clr-brand); }

/* ============================================================
   13. MOBILE MENU TOGGLE
   ============================================================ */
@media only screen and (min-width: 860px) {
  #mainmenu.h_btn { display: none; }
}

.menu_toggle,
.icon_close {
  display: inline-block;
  vertical-align: middle;
  width: 19px; height: 19px;
  margin: 0; position: relative;
}

.menu_toggle > i,
.icon_close > i {
  height: 1px; width: 100%;
  background-color: var(--clr-bg);
  position: absolute;
  left: 0; top: 0;
  transition: background var(--t-slow), color var(--t-slow), box-shadow var(--t-slow), transform var(--t-slow), border-color var(--t-slow), opacity var(--t-slow);
}
.icon_close > i { transition: none; }
.mt_1 { margin-top: 1px; }
.mt_2 { margin-top: 9px; }
.mt_3 { margin-top: 17px; }
.menu_toggle__title { display: none; }

#mainmenu.open .mt_1,
.icon_close > i.mt_1 { transform: rotate(-45deg); }
#mainmenu.open .mt_2 { opacity: 0; }
#mainmenu.open .mt_3,
.icon_close > i.mt_2 { transform: rotate(45deg); }

#mainmenu.open .mt_1,
#mainmenu.open .mt_2,
#mainmenu.open .mt_3,
.icon_close > i       { margin-top: 9px; }
#mainmenu.open .menu_toggle { opacity: 1 !important; }
#mainmenu.open i             { background-color: var(--clr-bg); }

/* ============================================================
   14. HEADER BUTTONS (search / login)
   ============================================================ */
.h_btn {
  float: right;
  width: 44px; height: 44px;
  position: relative; z-index: 1;
  background: none; border: 0 none;
  padding: 16px 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform var(--t-fast);
}
.h_btn:active { transform: scale(.95); }

.h_btn::after {
  content: "";
  background-color: var(--clr-dark);
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 66px;
  border-radius: 0 0 var(--r-sm) var(--r-sm);
  opacity: 0; visibility: hidden;
  margin-top: -60px;
  transition: margin-top var(--t-base);
}
.h_btn.open::after {
  opacity: 1; visibility: visible;
  margin-top: 0;
}

.h_btn > *              { position: relative; z-index: 1; }
.h_btn > .icon          { fill: var(--clr-bg); transition: fill var(--t-base); }
.h_btn:hover > .icon    { fill: var(--clr-brand); }
.h_btn .icon_close      { transition: none; }
.h_btn:hover .icon_close > i { transition: background var(--t-slow); background-color: var(--clr-brand); }
.h_btn.open > .icon,
.h_btn > .icon_close,
.h_btn.open > .avatar   { display: none; }
.h_btn.open > .icon_close { display: inline-block; }

/* ============================================================
   15. TOOLS BAR (breadcrumbs, sort, tags)
   ============================================================ */
#tools {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.055);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  font-size: .84em;
}
.tools { min-height: 42px; }
.tools > .wrp {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.tools > .wrp::after { content: none; }
.tools .grid_3_4,
.tools .grid_1_4 {
  float: none !important;
  width: auto !important;
  margin-right: 0 !important;
  margin-bottom: 0 !important;
}
.utility-row__sort { flex: 1 1 auto; min-width: 0; }
.utility-row__tags { flex: 0 0 auto; }

/* Sort */
#sort, #breadcrumbs { padding: 0; }
#sort > .icon,
#breadcrumbs > .icon { display: none; }

#sort {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #687079;
}
.sort_label             { flex: 0 0 auto; font-weight: 700; text-transform: none; margin-right: 10px; color: #8b9299; }
#sort form              { min-width: 0; }
#sort form,
ul.sort                 { display: inline-flex; align-items: center; gap: 12px; }
ul.sort                 { list-style: none; padding: 0; margin: 0; }
ul.sort > li            { margin-left: 0; }
ul.sort > li > a        { color: inherit; text-decoration: none; }
ul.sort > li > a:hover,
.sort > li.asc a,
.sort > li.desc a       { color: var(--clr-link); }

.sort > li.asc a::before,
.sort > li.desc a::before {
  content: "";
  display: inline-block; vertical-align: middle;
  background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAoAQMAAADNFOjiAAAABlBMVEUAAAD/SFvf5sBTAAAAAXRSTlMAQObYZgAAACBJREFUCNdj+P8fhJDB/w9AhCoCQijgAwJhqsRvGsRGAIL/F3G3R2gKAAAAAElFTkSuQmCC);
  margin: 0 .4em 0 0;
  width: 8px; height: 10px;
  background-position: 0 -10px;
  background-size: 8px auto;
}
.sort > li.asc a::before { background-position: 0 0; }

/* Breadcrumbs */
#breadcrumbs { color: var(--clr-text-soft); line-height: 1.35; }

/* Tags btn */
.tags_btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: var(--r-pill);
  background: var(--clr-bg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  text-decoration: none;
  color: var(--clr-link);
}
.tags_btn:hover                    { border-color: rgba(236, 46, 28, 0.24); background: var(--clr-bg); }
.tags_btn.collapsed                { color: #64748b; }
.tags_btn > .icon-tags             { margin: 0; }
.tags_btn > .icon                  { width: 14px; height: 14px; fill: #b1b7bd; }
.tags_btn > .icon-arrow_down       { margin: 0 0 0 6px; }
#toptags                           { width: 100%; }
#toptags > .wrp                    { padding-bottom: 0; }
#toptags.in > .wrp,
#toptags.collapsing > .wrp         { padding-bottom: 18px; }
#toptags .tag_list > span > a      { background-color: var(--clr-bg); }

/* ============================================================
   16. SEARCH / LOGIN DROPBAR
   ============================================================ */
.droptopbar {
  width: 100%; height: 0; overflow: hidden;
  background-color: var(--clr-dark);
  position: relative; z-index: 21;
  transition: height var(--t-base);
  font-size: .9em;
}
.droptopbar .wrp {
  opacity: 0;
  transition: opacity 1s ease;
}
.search_open #q_search,
.login_open  #loginpane,
.loginf_open #loginpane            { height: 59px; }
.search_open #q_search .wrp,
.login_open  #loginpane .wrp,
.loginf_open #loginpane .wrp       { opacity: 1; }

.droptopbar .btn { height: 33px; padding: 6px 14px; }

.q_search { position: relative; }
.q_search > input {
  width: 100%; height: 59px;
  line-height: 23px;
  padding: 18px 130px 18px 0;
  border-radius: 0;
  background: none !important;
  color: var(--clr-bg) !important;
  display: block;
  border: 0 none;
  font-size: 1em;
  box-shadow: none;
  box-sizing: border-box;
}
.q_search input::placeholder { color: var(--clr-bg); }
.q_search > .btn {
  position: absolute; right: 0; top: 0;
  margin: 13px 0 0;
  background: none;
  color: var(--clr-bg) !important;
  box-shadow: inset 0 0 0 1px #383e42;
  cursor: pointer;
}
.q_search > .btn:hover { box-shadow: inset 0 0 0 1px #64696c; }

/* ============================================================
   17. USER AUTH / LOGIN PANEL
   ============================================================ */
.login > .avatar {
  display: inline-block;
  padding: 5px;
  position: relative;
  border-radius: var(--r-full);
  border: 1px solid var(--clr-bg);
  transition: border-color var(--t-base), transform var(--t-base);
}
.login:hover > .avatar {
  border-color: var(--clr-brand);
  transform: scale(1.05);
}
.login > .cover {
  border-radius: var(--r-full);
  overflow: hidden;
}
.login > .avatar > .cover,
.login > .avatar { width: 31px; height: 31px; }

.pmnum_0 > .num { display: none; }
.num {
  background: var(--clr-bg);
  color: var(--clr-body);
  font-weight: bold;
  height: 12px; line-height: 11px;
  min-width: 8px; padding: 1px 3px;
  display: inline-block; vertical-align: top;
  text-align: center; font-size: 9px;
  border-radius: 7px;
}
.login > .avatar > .num { position: absolute; left: 0; bottom: 0; margin: 0 0 -1px -1px; }

/* Login pane */
#loginpane {
  color: var(--clr-bg);
  position: absolute;
  left: 0; top: 0;
  margin-top: -59px;
}

.page::before {
  content: "";
  display: block;
  width: 100%; height: 0;
  background-color: var(--clr-dark-2);
  transition: height var(--t-base);
}

/* Login form */
ul.login_form {
  list-style: none; padding: 0;
  border-radius: var(--r-sm);
  border: 1px solid #383e42;
  float: left;
  margin: 13px 20px 0 0;
}
.login_form::after { clear: both; display: block; content: ""; }
.login_form > li   { float: left; width: 160px; margin: 0; padding: 0; }
.login_form > li > label { display: none; }
.login_form > li > input {
  font-size: 1em;
  height: 33px; padding: 6px 14px;
  background: none !important;
  border: 0 none;
  border-left: 1px solid #383e42;
  border-radius: 0;
  color: var(--clr-bg);
}
.login_form > li:first-child > input         { border-left-width: 0; }
.login_form > li > input::placeholder { color: var(--clr-bg); }
.login_form > li > .btn                      { background: none !important; border-radius: 0; border-left: 1px solid #383e42; }
.login_form > li > .btn:hover                { color: var(--clr-brand) !important; }

.login_form_links { float: right; margin-top: 17px; height: 23px; line-height: 23px; }
.login_form_links > a { margin-left: 20px; }

#loginpane .name              { float: left; margin: 20px 30px 0 0; }
#loginpane .name > a          { color: var(--clr-bg); text-decoration: none; }
#loginpane .name > a:hover    { color: var(--clr-brand); }
#loginpane .login_menu        { float: left; list-style: none; padding: 0; margin: 20px 0 0; }
#loginpane .login_menu > li   { display: inline; margin-right: 20px; }
#loginpane .login_menu > li a { color: #bebfc0; text-decoration: none; }
#loginpane .login_menu > li a:hover { color: var(--clr-bg); }

.lm_num {
  background: var(--clr-dark-4);
  font-weight: bold;
  height: 16px; line-height: 16px;
  min-width: 16px; padding: 3px;
  display: inline-block; vertical-align: middle;
  text-align: center; font-size: var(--fs-sm);
  border-radius: 11px;
  margin: -.2em .4em 0 0;
  color: var(--clr-bg);
}

/* Social links in header */
.soc_links {
  float: left;
  display: flex;
  justify-content: space-between;
  padding: 1px;
  margin: 13px 0 0;
}
.soc_links > a {
  display: inline-block;
  width: 31px; height: 31px; line-height: 31px;
  border-radius: var(--r-full);
  background-color: var(--clr-dark-4);
  text-align: center;
  margin-left: 6px;
  opacity: .5;
  transition: background var(--t-fast),color var(--t-fast),box-shadow var(--t-fast),transform var(--t-fast),border-color var(--t-fast),opacity var(--t-fast);
}
.soc_links > a:hover             { opacity: 1; }
.soc_links > a > .icon           { fill: var(--clr-bg); vertical-align: middle; margin: -3px 0 0; }

.soc_vk:hover   { background-color: #5486ca; }
.soc_tw:hover   { background-color: #60bbf5; }
.soc_fb:hover   { background-color: #4268ca; }
.soc_gp:hover   { background-color: #de553a; }
.soc_ya:hover   { background-color: #ff0000; }
.soc_od:hover   { background-color: #ff7800; }
.soc_mail:hover { background-color: #006cff; }

/* ============================================================
   18. FOOTER — compact gaming layout
   ============================================================ */
#footer {
  position: relative;
  padding: 22px 0 12px;
  overflow: hidden;
  background: rgba(7, 9, 13, 0.97);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 -12px 30px rgba(0, 0, 0, 0.20);
  color: rgba(255, 255, 255, 0.68);
}

#footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 0%, rgba(236, 46, 28, 0.075), transparent 34vw),
    radial-gradient(circle at 94% 100%, rgba(255, 176, 39, 0.035), transparent 28vw);
  pointer-events: none;
}

#footer > .wrp {
  position: relative;
  z-index: 1;
}

.footer_main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 30px);
  padding-bottom: 14px;
}

.footer_brand {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: fit-content;
  max-width: 280px;
  color: inherit;
  text-decoration: none;
}

.footer_logo {
  display: block;
  width: auto;
  height: 28px;
  flex: 0 0 auto;
  transition: transform 160ms ease-out, opacity 160ms ease-out;
}

.footer_brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.footer_brand-name {
  color: #fff;
  font-size: var(--fs-meta);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.footer_brand-tagline {
  max-width: 28ch;
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-sm);
  line-height: 1.45;
  text-wrap: pretty;
}

.footer_nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px 22px;
  min-width: 0;
}

.footer_nav a {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 255, 255, 0.60);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
  transition: color 160ms ease-out, transform 160ms ease-out;
}

.footer_nav a:focus-visible,
.footer_brand:focus-visible {
  outline: 2px solid var(--clr-brand);
  outline-offset: 4px;
  border-radius: 4px;
}

.footer_nav a:active {
  transform: scale(0.97);
}

.footer_brand:active .footer_logo {
  transform: scale(0.96);
}

.footer_bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.footer_social {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.footer_social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--fs-meta);
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease-out, color 160ms ease-out, background 160ms ease-out, border-color 160ms ease-out;
}

.footer_social a:active {
  transform: scale(0.96);
}

.footer_social a:focus-visible {
  outline: 2px solid var(--clr-brand);
  outline-offset: 2px;
}

@media (hover: hover) and (pointer: fine) {
  .footer_nav a:hover {
    color: var(--clr-brand);
    transform: translateX(2px);
  }

  .footer_brand:hover .footer_logo {
    opacity: 0.82;
    transform: scale(0.96);
  }

  .footer_social a:hover {
    color: #fff;
    background: rgba(236, 46, 28, 0.16);
    border-color: rgba(236, 46, 28, 0.5);
    transform: translateY(-1px);
  }
}

@media only screen and (max-width: 860px) {
  .footer_main {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer_nav {
    justify-content: flex-start;
  }

  .footer_brand {
    max-width: 420px;
  }
}

@media only screen and (max-width: 700px) {
  #footer {
    padding: 20px 0 14px;
  }

  .footer_main {
    gap: 20px;
    padding-bottom: 12px;
  }

  .footer_logo {
    height: 28px;
  }

  .footer_brand {
    gap: 10px;
  }

  .footer_brand-copy {
    gap: 4px;
  }

  .footer_brand-tagline {
    font-size: var(--fs-sm);
  }

  .footer_nav {
    gap: 6px 16px;
  }

  .footer_nav a {
    min-height: 44px;
    font-size: var(--fs-body);
  }

  .footer_bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-top: 14px;
  }

  .footer_social a {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .footer_nav a,
  .footer_logo,
  .footer_social a {
    transition: color 120ms linear, opacity 120ms linear;
  }

  .footer_nav a:hover,
  .footer_nav a:active,
  .footer_brand:hover .footer_logo,
  .footer_brand:active .footer_logo,
  .footer_social a:hover,
  .footer_social a:active {
    transform: none;
  }
}

/* ============================================================
   20. GAME BLOCKS (game poster images, badges)
   ============================================================ */
.mm-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: var(--r-md);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.mm-badge--brand { background: rgba(236,46,28,.1); border-color: rgba(236,46,28,.22); color: var(--clr-brand-dark); }
.mm-badge--info { background: var(--surface-info-soft); border-color: rgba(37,99,235,.2); color: #1d4ed8; }
.mm-badge--success { background: var(--surface-success-soft); border-color: rgba(39,174,96,.2); color: #19703d; }
.mm-badge--dark { background: var(--clr-dark-2); border-color: var(--clr-dark-2); color: var(--clr-bg); }
.mm-badge--gold { background: rgba(255,176,39,.16); border-color: rgba(255,176,39,.35); color: #8a5200; }
.mm-badge--neutral { background: var(--game-surface-soft); border-color: var(--game-surface-line); color: var(--clr-body); }
.mm-badge svg { width: 14px; height: 14px; flex: 0 0 auto; }

.quote_block { margin: 14px 0; }
.quote .quote { margin: 14px 0 0; background: var(--clr-bg); }
.quote_body { overflow-wrap: anywhere; }
.game-poster,
.reloaded-image {
  display: flex; justify-content: center; align-items: center; margin: 0;
}
.shortstory .game-poster {
  overflow: hidden;
  border-radius: 16px;
  background: #e8edf3;
}
.game-poster img,
.reloaded-image img { max-width: 100%; height: auto; }
.shortstory .game-poster img { width: 100%; transition: transform .45s ease; }
.shortstory:hover .game-poster img { transform: scale(1.04); }
.reloaded-image     { margin-bottom: 10px; }

.game-bad {
  display: flex; justify-content: center;
  flex-wrap: wrap; list-style-type: none;
  padding: 0; margin: 20px; font-weight: 500;
  gap: 8px;
}
.game-bad li { margin: 0; padding: 4px 9px; border-radius: var(--r-md); white-space: nowrap; border: 1px solid var(--clr-border); font-size: .75em; font-weight: 700; letter-spacing: .05em; line-height: 1.2; text-transform: uppercase; }
.game-bad li, .mod-page .mod-badge, .torrent-badge, .du-status, .steam-card__badge, .mm-badge { transition: background var(--t-fast), color var(--t-fast), opacity var(--t-fast); }
.game-bad-tech { background: var(--clr-bg-light); color: var(--clr-text-soft); }
.game-bad-tech--version { background: rgba(236, 46, 28, .08); color: var(--clr-brand); border-color: rgba(236, 46, 28, .2) !important; }
.game-bad-tech--torrent { background: rgba(37, 99, 235, .08); color: #315f9c; border-color: rgba(37, 99, 235, .18) !important; }
.game-bad-tech--direct { background: rgba(71, 85, 105, .08); color: #526173; border-color: rgba(71, 85, 105, .18) !important; }
.game-bad-tech--download { background: rgba(39, 174, 96, .08); color: #287a4b; border-color: rgba(39, 174, 96, .18) !important; }
li.game-bad-release { background: var(--clr-dark-2); color: var(--clr-bg); border-color: var(--clr-dark-2); }
.game-bad-status { border-color: transparent; }
.game-bad-status--new { background: var(--clr-brand); color: var(--clr-bg); }
.game-bad-status--updated { background: var(--clr-dark); color: var(--clr-bg); }
.game-bad-status--upcoming { background: var(--clr-gold); color: var(--clr-dark); }

.text.description h2,
.text.description h3,
.text.description h4,
.text.description h5 { margin: .8em 0 .5em; }

.grid_1_4 .relgames-images { width: 100%; height: auto; overflow: hidden; }
.grid_1_4 .relgames-images img { width: 100%; height: auto; max-width: 100%; object-fit: cover; margin-bottom: 10px; }

/* Section 21 — DAILY UPDATES (moved below sidebar block for specificity) */

/* ============================================================
   31. STORY (article list)
   ============================================================ */
.story { background-color: var(--clr-bg); padding: 50px 0; }
.story_list {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
}
.story_list > .shortstory,
.story_list > .fullstory {
  min-width: 0;
  background: var(--game-surface);
  border: 1px solid var(--game-surface-line);
  border-radius: var(--game-surface-radius);
  box-shadow: var(--game-surface-shadow);
  padding: var(--game-card-padding);
}
/* wide embeds (comment editor, legacy iframes) must never blow out the grid column */
.main-content-col iframe { max-width: 100%; }
.story_list > .shortstory {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.story_list > .shortstory .story_cont { flex: 1; }
.story_list > .shortstory:hover {
  border-color: rgba(236, 46, 28, .18);
  box-shadow: var(--game-surface-shadow-hover);
}
.story_list > .shortstory::before { display: none; }
/* denser listings on wide desktop: 2 cards per row; stats/fullstory stay single column */
@media (min-width: 1200px) {
  .main-content-col .story_list:has(.shortstory) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-content-col .story_list:has(.shortstory) > .navigation { grid-column: 1 / -1; }
  /* card tags in 2-col: one line, category truncates, update stays visible */
  .main-content-col .story_list:has(.shortstory) .card-tags { flex-wrap: nowrap; overflow: hidden; margin-bottom: 10px; }
  .main-content-col .story_list:has(.shortstory) .cat-chip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  /* badges in 2-col cards: compact so they fit without bloating */
  .main-content-col .story_list:has(.shortstory) .game-bad li { padding: 3px 7px; font-size: .72em; }
  .main-content-col .story_list:has(.shortstory) .game-bad { gap: 5px; margin-top: 0; }
}
/* Short story excerpt — truncated server-side via {short-story limit} */
.shortstory .story-short {
  margin: 0;
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--clr-text-soft);
  overflow-wrap: anywhere;
  text-wrap: pretty;
}
/* uniform card heights on catalog: title capped at 2 lines */
body.mm-catalog .shortstory .head .title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.main-content-col .story_list > .shortstory:first-of-type,
.main-content-col .story_list > .fullstory:first-of-type { padding: var(--game-card-padding); }
.story_list > .fullstory {
  margin-top: 0;
  margin-bottom: 18px;
}
.shadow { position: relative; border-bottom: none; }
.shadow::after { position: static; background-image: none; }

.story_list > .story:not(:last-child)::before {
  content: "";
  display: block; position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px); height: 1px;
  background: linear-gradient(to right, transparent, var(--clr-border) 20%, var(--clr-border) 80%, transparent);
}

.story > .wrp::after { clear: both; display: block; content: ""; }
.story > .wrp        { position: relative; }
.story .head         { position: relative; margin-bottom: 1.5em; }
.story .head .title  { margin-top: -.2em; margin-bottom: 0; font-size: 1.9em; }
.story .head .title > a {
  display: block; color: inherit; text-decoration: none;
}
.story .head .title > a:hover {
  color: #969fa7;
  transition: color var(--t-base);
}

.shortstory > .head,
.shortstory > .story_cont {
  position: relative;
  z-index: 1;
}
.story_list > .shortstory > .head {
  margin: 0 0 18px;
  padding-right: 0;
}
/* logged-in users get fav/edit icons top-right: reserve space only then */
.shortstory .head .title {
  margin: 0 0 10px;
  padding-right: 52px;
  font-size: clamp(1.25rem, 1.8vw, 1.55rem);
  line-height: 1.18;
}
.shortstory .head .title > a { color: var(--clr-heading); }
.shortstory .head .title > a:hover { color: var(--clr-brand); }
.shortstory .version-tag { display: inline-flex; vertical-align: middle; margin-left: 8px; transform: translateY(-1px); }
.shortstory .story-post-meta { gap: 4px; margin-top: 0; padding-top: 0; }
.shortstory .story-post-meta::before { display: none; }
.shortstory .story-post-meta .meta-item { min-height: 24px; padding: 0 6px; border-radius: var(--r-pill); background: var(--game-surface-soft); color: var(--clr-text-soft); font-size: var(--fs-xs); font-weight: 700; }
.shortstory .story_cont { margin-top: 0; display: grid; gap: 14px; }
.shortstory .text { display: grid; gap: 12px; }
.shortstory > .story_cont { display: flex; flex-direction: column; }
.shortstory .text { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.shortstory .text > .more { margin-top: auto; }
.shortstory .text::after { content: none; }
.shortstory .text > p:last-of-type { margin-block-end: 0; }
.shortstory .game-bad { justify-content: flex-start; margin: 2px 0 0; }
.shortstory .short-alert { margin: 0; }
.shortstory .short-alert:hover { transform: none; }
.shortstory .alert-icon { width: 16px; height: 16px; }

.fullstory .game-page,
.fullstory .story_cont { min-width: 0; }
.fullstory > .game-page > .head { margin: 0 0 var(--game-section-gap); padding-right: 58px; }
.fullstory .head .title { margin: 0 0 12px; }
.fullstory .game-header { margin-bottom: var(--game-section-gap); }
.fullstory .text.description { padding-bottom: 2px; font-size: 16px; line-height: 1.65; }
/* breathing room between fullstory sections (h2 default margin does the rest) */
.fullstory .text.description > section + section { margin-top: 8px; }
/* Story actions (fav / edit) — frosted circles over the card corner */
.story_icons {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  display: flex; flex-direction: row; gap: 6px;
}
.shortstory > .story_icons { top: 12px; right: 12px; }
.story .head { padding-right: 70px; }

.fav_btn > a,
.edit_btn > a {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-full);
  background: #fff;
  border: 1px solid var(--clr-border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
  transition: background var(--t-base), border-color var(--t-base), transform var(--t-fast);
}
.fav_btn > a:hover,
.edit_btn > a:hover { border-color: rgba(236, 46, 28, .45); transform: scale(1.07); }
.fav_btn > a:active,
.edit_btn > a:active { transform: scale(.94); }
.icon-fav-o { width: 17px; height: 17px; fill: none; stroke: #39414d; }
/* favorited state: filled gold star */
.fav_btn > a[href*="del"] .icon-fav-o { fill: var(--clr-gold); stroke: var(--clr-gold); }
.icon-edit { width: 15px; height: 15px; fill: none; stroke: #39414d; }
.edit_btn > a > i { display: flex; align-items: center; justify-content: center; font-style: normal; }
.story_left_icons .edit_btn > a { margin-bottom: 14px; }
/* dark theme: glass buttons with white icons */
html[data-theme="dark"] .fav_btn > a,
html[data-theme="dark"] .edit_btn > a {
  background: rgba(13, 15, 18, .55);
  border-color: rgba(255, 255, 255, .14);
  backdrop-filter: blur(6px) saturate(1.4);
  -webkit-backdrop-filter: blur(6px) saturate(1.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .fav_btn > a:hover,
html[data-theme="dark"] .edit_btn > a:hover { background: rgba(13, 15, 18, .82); border-color: rgba(255, 255, 255, .26); }
html[data-theme="dark"] .icon-fav-o { stroke: rgba(255, 255, 255, .92); }
html[data-theme="dark"] .icon-edit { stroke: rgba(255, 255, 255, .92); }

@media only screen and (max-width: 700px) {
  .story .head         { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .com_list div.comment, .comment .com_tools_links > a { transition: none; }
  .com_list div.comment:hover { transform: none; }
}

/* Story info (meta) */
.story_info { float: right; margin-right: 0; font-size: .92em; }

@media only screen and (min-width: 700px) {
  .storyinfo_link { display: none; }
  .storyinfo      { display: block !important; height: auto !important; width: auto !important; }
}

.storyinfo_link {
  cursor: pointer; position: relative;
  padding-left: 30px; padding-bottom: 1.5em;
  margin-bottom: 1.5em;
  border-bottom: 1px solid var(--clr-border);
}
.storyinfo_link > .icon { float: left; margin: 2px 0 0 -30px; }
.storyinfo_link .arrow  { position: absolute; right: 0; top: 0; margin: .75em 3px 0 0; width: 12px; }
.storyinfo_link .arrow::after,
.storyinfo_link .arrow::before {
  content: ""; position: absolute;
  width: 9px; height: 1px;
  background-color: var(--clr-brand);
  border-radius: var(--r-sm);
  transition: background var(--t-slow),color var(--t-slow),box-shadow var(--t-slow),transform var(--t-slow),border-color var(--t-slow),opacity var(--t-slow);
}
.storyinfo_link .arrow::after { margin-left: 6px; }
.storyinfo_link.collapsed .arrow::after,
.storyinfo_link.collapsed .arrow::before { background-color: #c7c9cc; }
.storyinfo_link.collapsed .arrow::after  { transform: rotate(-45deg); }
.storyinfo_link.collapsed .arrow::before { transform: rotate(45deg); }

@media only screen and (max-width: 700px) {
  .storyinfo_link { margin-top: 20px; }
  .storyinfo      { margin-bottom: 25px; }
}

/* Star rating */
.rate_stars { margin-bottom: 1.5em; }

/* Like button */
.rate_like > a { display: block; text-decoration: none; }
.rate_like_icon {
  display: block; width: 27px; height: 27px;
  border-radius: var(--r-full); border: 1px solid #404549;
  text-align: center;
}
.rate_like_icon .icon { fill: #404549; width: 13px; height: 13px; display: block; margin: 7px auto 0; }
.rate_like > a > .grey { display: block; font-size: .85em; text-align: center; margin-top: .3em; }
.comment .rate_like > a             { display: inline-block; }
.comment .rate_like > a > *         { display: inline-block; vertical-align: middle; }
.comment .rate_like > a > .grey     { margin: .1em 0 0 6px; }
.rate_like > a:hover .rate_like_icon        { border-color: var(--clr-brand); }
.rate_like > a:hover .rate_like_icon .icon  { fill: var(--clr-brand); }

/* Like-dislike */
.rate_like-dislike > .grey { display: block; font-size: .85em; text-align: center; margin-top: .3em; }
.rate_like-dislike_in      { position: relative; width: 27px; height: 55px; border-radius: 15px; border: 1px solid #404549; }
.rate_like-dislike_in > a  { display: block; height: 27px; text-align: center; }
.rate_like-dislike_in > a:first-child:hover .plus_icon > span::before,
.rate_like-dislike_in > a:first-child:hover .plus_icon > span::after { background-color: var(--clr-brand); }
.rate_like-dislike_in > a:last-child .plus_icon { padding: 3px; margin: 4px; border: 0 none; border-radius: var(--r-full); background-color: #404549; }
.rate_like-dislike_in > a:hover:last-child .plus_icon { background-color: var(--clr-brand); }
.rate_like-dislike_in > a:last-child .plus_icon > span { margin: 3px 0 0 3px; }
.rate_like-dislike_in > a:last-child .plus_icon > span::after,
.rate_like-dislike_in > a:last-child .plus_icon > span::before { background-color: var(--clr-bg); }
.comment .rate_like-dislike             { display: inline-block; }
.comment .rate_like-dislike > *         { display: inline-block; vertical-align: middle; }
.comment .rate_like-dislike > .grey     { margin: .1em 0 0 6px; }
.comment .rate_like-dislike_in          { height: 27px; width: 55px; }
.comment .rate_like-dislike_in > *      { float: left; }

/* Plus/minus icons */
.plus_icon, .plus_icon > span { width: 13px; height: 13px; }
.plus_icon {
  border: 7px solid transparent;
  display: inline-block; vertical-align: middle; position: relative;
}
.plus_icon > span,
.plus_icon > span::before,
.plus_icon > span::after { overflow: hidden; text-indent: -9999px; white-space: nowrap; position: absolute; }
.plus_icon > span::before,
.plus_icon > span::after { background-color: #1a1a1a; content: ""; }
.plus_icon > span        { left: 0; top: 0; }
.plus_icon > span::after { left: 0; top: 0; width: 100%; height: 1px; margin-top: 6px; }
.plus_icon > span::before { left: 0; top: 0; width: 1px; height: 100%; margin-left: 6px; }
.plus_icon.minus > span::before { display: none; }

/* Meta list */
.meta { list-style: none; padding: 0 0 0 30px; margin: 0; }
.meta > li                       { margin: 0 0 .6em; }
.meta > li > .icon               { float: left; margin: 2px 0 0 -30px; }
.meta > li.meta_date a           { color: inherit; }
li.story_tags                    { margin-top: 1.5em; }
li.story_tags > .icon            { fill: var(--clr-light-muted); float: left; margin: 4px 0 0 -30px; }
.story:nth-child(2n) .tag_list > span > a { background-color: var(--clr-bg); }

/* Tags */
.tag_list > span                 { margin: 0 2px 2px 0; }
.tag_list > span,
.tag_list > span > a             { display: inline-block; }
.tag_list > span > a {
  color: inherit; text-decoration: none;
  padding: 3px 6px; border-radius: var(--r-sm);
  background-color: var(--clr-bg-light); margin-bottom: 5px;
}
.tag_list > span > a:hover { background-color: var(--clr-brand) !important; color: var(--clr-bg); position: relative; }

/* Story text */
.story .more { margin-top: 1.5em; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; row-gap: 8px; }
.shortstory .more { margin-top: 0; gap: 8px; row-gap: 8px; }
/* keep Download / size / rating on ONE line inside cards */
.shortstory .more .btn { padding: 0 16px; }
.shortstory .story-size { padding: 0 10px; gap: 5px; }
.shortstory .more .mini-rating .rating-votes { display: none; }
.story .more .btn {
  flex-shrink: 0;
  border-radius: 20px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  letter-spacing: -0.1px;
}
/* card CTA when no files are uploaded yet: neutral, no download promise */
.btn--pending, .btn--pending:hover, .btn--pending:active {
  background: var(--clr-dark-2);
  box-shadow: none;
}
.btn--pending:hover { background: var(--clr-dark-4); }
.story .text::after { content: ""; display: block; clear: both; }
.story .text > img[style*="left"],
.story .text > .highslide img[style*="left"]  { margin: 4px 20px 20px 0; }
.story .text > img[style*="right"],
.story .text > .highslide img[style*="right"] { margin: 4px 0 20px 20px; }
.story .text img { max-width: 100%; aspect-ratio: auto; height: auto; }

/* Editdate */
.editdate         { padding: 15px; overflow: hidden; position: relative; border: 2px dotted var(--clr-dark); margin-bottom: 20px; border-radius: var(--r-md); }
span.editgame-text { font-weight: 700; color: var(--clr-brand); }

/* Story size / genre badges */
.story-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  color: var(--clr-text-soft);
  font-weight: 600;
  height: 36px;
  padding: 0 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fefefe, #f8f9fb);
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: background,color,box-shadow,transform,border-color,opacity 0.25s ease;
  flex-shrink: 0;
  letter-spacing: -0.1px;
  font-variant-numeric: tabular-nums;
}
.story-size:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.story-size .icon {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}
.story-genre { gap:6px}
.story-genre a              { color: inherit; text-decoration: none; transition: color var(--t-base); }
.story-genre a:hover        { color: var(--clr-brand-hover); }

@media only screen and (max-width: 700px) {
  .story .more           { flex-direction: column; align-items: flex-start; gap: 10px; }
  .story .more .btn      { width: 100%; text-align: center; }
  .story-size,
  .story-genre           { font-size: .85em; }
}

/* ============================================================
   34. FEATURED GAMES CAROUSEL
   ============================================================ */
.featured-games {
  margin: 0 0 var(--game-section-gap); padding: 20px;
  background: var(--game-surface); border: 1px solid var(--game-surface-line); border-radius: var(--game-surface-radius); overflow: visible;
  box-shadow: var(--game-surface-shadow);
  width: 100%; box-sizing: border-box;
}
.featured-games--lead { margin-top: 0; }
.featured-games__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.featured-games__controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.featured-games__control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(25, 29, 33, .1);
  border-radius: var(--r-pill);
  background: var(--clr-bg);
  color: #191d21;
  box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
  cursor: pointer;
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1;
  transition: background var(--t-base), border-color var(--t-base), color var(--t-base), opacity var(--t-base), transform var(--t-base);
}
.featured-games__control:hover:not(:disabled),
.featured-games__control:focus-visible:not(:disabled) {
  background: var(--clr-brand);
  border-color: var(--clr-brand);
  color: var(--clr-bg);
  transform: translateY(-1px);
}
.featured-games__control:disabled {
  cursor: default;
  opacity: .35;
  box-shadow: none;
}
.content-title {
  position: relative;
  margin: 26px 0 14px;
  padding-left: 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--clr-heading);
  font-size: clamp(1.15rem, 1.45vw, 1.45rem);
  font-weight: 850;
  line-height: 1.18;
  letter-spacing: -0.025em;
  text-transform: none;
}
.content-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .16em;
  bottom: .12em;
  width: 3px;
  border-radius: var(--r-pill);
  background: var(--clr-brand);
}
.content-title--page {
  margin-top: 0;
  font-size: clamp(1.35rem, 1.85vw, 1.8rem);
}
.featured-games__title { margin: 0; }
.featured-games--lead .featured-games__title {
  margin-top: 0;
}
#home-title {
  margin: 0 0 1.1rem;
  line-height: 1.12;
}
.featured-games__heading { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.featured-games__heading #home-title { margin: 0; }
.featured-games__subtitle { margin: 0; color: var(--clr-text-soft); font-size: .9rem; line-height: 1.4; }

.featured-games__carousel {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;

  gap: 14px;
  padding: 0 2px 12px; scroll-padding: 20px;
  scrollbar-gutter: stable; touch-action: pan-x;
}
.featured-games__carousel::-webkit-scrollbar       { height: 6px; }
.featured-games__carousel::-webkit-scrollbar-track { background: transparent; }
.featured-games__carousel::-webkit-scrollbar-thumb { background: var(--clr-brand); border-radius: 4px; }
.featured-games__carousel::-webkit-scrollbar-thumb:hover { background: var(--clr-brand-hover); }

.featured-game-item {
  flex: 0 0 180px; scroll-snap-align: start;
  background: var(--game-surface-soft); border: 0; border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column;
  contain: layout style paint; will-change: transform;
}
.featured-game-item:hover { transform: translateY(-2px); background:#fff; box-shadow: 0 12px 26px rgba(15,23,42,.09); }
.featured-game-item a     { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }

.featured-game-item__image { position: relative; height: 240px; overflow: hidden; background:#e8edf3; }
.featured-game-item__image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease;
  will-change: transform;
}
.featured-game-item:hover .featured-game-item__image img { transform: scale(1.035); }

.featured-game-item__content { padding: 12px 14px 14px; flex-grow: 1; display: flex; flex-direction: column; text-align: left; }
.featured-game-item__title   { font-size: 1em; font-weight: 800; margin-bottom: 2px; line-height: 1.2; color: var(--clr-heading); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.featured-game-item__date    { font-size: .75em; color: var(--clr-text-soft); line-height: 1.2; }

@media (max-width: 860px) { .featured-game-item { flex: 0 0 160px; } .featured-game-item__image { height: 220px; } }
@media (max-width: 700px)  { .featured-games__carousel { gap: clamp(8px, 1.5vw, 10px); } .featured-game-item { flex: 0 0 140px; } .featured-game-item__image { height: 190px; } .featured-game-item__title { font-size: .9em; } }
@media (max-width: 480px)  { .featured-games__carousel { padding: 0 10px 8px; } .featured-game-item { flex: 0 0 120px; } .featured-game-item__image { height: 160px; } .featured-game-item__title { font-size: .85em; } .featured-games__carousel::-webkit-scrollbar { height: 5px; } }
@media (max-width: 700px) {
  .featured-games--lead { margin-top: 0; }
  .featured-games { margin-bottom: 18px; }
  .featured-games__head { gap: 10px; }
  .featured-games__control { width: 32px; height: 32px; font-size: 21px; }
  .content-title { margin: 20px 0 12px; padding-left: 11px; font-size: 1.08rem; }
  .content-title--page { font-size: 1.32rem; }
  .content-title::before { width: 3px; top: .18em; bottom: .14em; }
  .page-header { margin: 1rem 0 .9rem; }
}

/* ============================================================
   35. PAGINATION
   ============================================================ */
.navigation                    { padding: 25px 0; font-size: 1.1em; }
.navigation > .wrp             { position: relative; }
.navigation > .wrp::after      { clear: both; display: block; content: ""; }
.navigation > .wrp > .icon     { position: absolute; left: 0; margin-left: 20px; fill: var(--clr-light-muted); margin-top: 2px; }

.pages { padding-left: 60px; float: left; font-variant-numeric: tabular-nums; }
.pages > * {
  color: inherit; display: inline-block; position: relative;
  padding: 6px 4px; min-width: 22px; height: 22px; line-height: 22px;
  border-radius: var(--r-sm); text-align: center; text-decoration: none;
}
.pages span {
  color: var(--clr-bg);
  background-color: var(--clr-brand);
  box-shadow: var(--shadow-xs);
}
.pages span.nav_ext { background: none; color: inherit; }
.pages a:hover      { color: var(--clr-brand); }

.page_next-prev { float: left; margin-left: 30px; }
.page_next-prev > span > * { padding: 6px 16px; height: 22px; line-height: 22px; display: inline-block; }
.page_next-prev > span .icon { margin: -.2em 0 0; }

.splitnewsnavigation {
  margin: 1.5em 0; padding: 15px 0;
  font-weight: bold;
  border: 0 dashed var(--clr-border-light);
  border-width: 1px 0;
  text-transform: uppercase;
}
.splitnewsnavigation > div { display: inline; margin-left: 1em; }
.splitnewsnavigation a     { color: inherit; }
.splitnewsnavigation a,
.splitnewsnavigation span  { padding: 6px 10px; }
.splitnewsnavigation span  { color: var(--clr-brand); }

/* ============================================================
   36. POPULAR / RELATED (col_news block)
   ============================================================ */
.block { padding: 50px 0; }
.block_title           { margin: 0 0 1.5em; color: var(--clr-heading); }
.block_title > *       { margin: 0; }
h2.block_title         { font-size: 1.3em; font-weight: 900; }

.block.comments {
  padding: 28px;
  margin-top: 22px; margin-bottom: 0;
  background: var(--game-surface);
  border: 1px solid var(--game-surface-line);
  border-radius: var(--game-surface-radius);
  box-shadow: var(--game-surface-shadow);
}

.col_news .grid_list > div > a {
  display: block; text-decoration: none;
  transition: padding-left var(--t-xslow);
  position: relative; color: inherit;
  width: 90%; padding-right: 20px;
}
.col_news .grid_list > div > a *       { cursor: pointer; }
.col_news .grid_list > div > a:hover   { padding-left: 30px; }
.col_news .grid_list > div > a .title  { display: block; margin-bottom: 1em; }
.col_news .grid_list > div > a:hover .title { color: var(--clr-brand); }
.col_news .grid_list > div > a .hover_arrow { position: absolute; left: 0; top: 0; margin-top: .25em; }
.col_news .grid_list > div > a .text   { font-size: .9em; }
.block.col_news.popular_maingame       { background: var(--clr-dark); color: var(--clr-muted); }

.hover_arrow {
  position: relative; width: 20px; height: 0;
  border-left: 1px solid var(--clr-brand);
  overflow: hidden; display: block; opacity: 0;
}
.hover_arrow,
.hover_arrow::after,
.hover_arrow > .icon { transition: background var(--t-slow),color var(--t-slow),box-shadow var(--t-slow),transform var(--t-slow),border-color var(--t-slow),opacity var(--t-slow); }
.hover_arrow > .icon { position: absolute; left: 0; top: 0; margin-left: -10px; }
.hover_arrow::after  { content: ""; position: absolute; left: 0; top: 0; margin-top: 6px; width: 0; height: 1px; background-color: var(--clr-brand); }
a:hover .hover_arrow          { height: 26%; opacity: 1; }
a:hover .hover_arrow > .icon  { margin-left: 10px; }
a:hover .hover_arrow::after   { width: 19px; }

/* ============================================================
   40. PAGE TITLE / HEADER
   ============================================================ */
.page-header { margin: 1.35rem 0 1.1rem; }
.page-title {
  margin: 0;
}

/* ============================================================
   41. STORY POST META
   ============================================================ */
.story-post-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 15px; margin-top: 10px; padding: 10px 0 0;
  position: relative;
}
.story-post-meta::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(to right, rgba(0,0,0,.1), transparent);
}
.story-post-meta .meta-item  { display: flex; align-items: center; font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: .02em; color: var(--clr-text-soft); }
.story-post-meta .icon       { width: 14px; height: 14px; margin-right: 8px; opacity: .7; }
.story-post-meta b           { color: var(--clr-heading); font-weight: 600; }

@media (max-width: 700px) {
  .story-post-meta        { padding: 10px 0 0; margin-top: 10px; gap: 15px; }
  .story-post-meta::before { display: none; }
  .story-post-meta .meta-item { font-size: var(--fs-xs); }
}

/* ============================================================
   42. RIGHT SIDEBAR LAYOUT
   ============================================================ */
.content-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 30px;
  align-items: start;
  padding: 0 0 36px;
}
.content-with-sidebar:not(:has(> .right-sidebar)),
.content-with-sidebar:has(.tut-nav-wrap) {
  grid-template-columns: 1fr;
}
.content-with-sidebar:has(.tut-nav-wrap) > .right-sidebar { display: none; }
.main-content-col { min-width: 0; }
.right-sidebar { min-width: 0; overflow: visible; }
.main-content-col .story:first-of-type {
    padding-top: 0;
}

/* Sidebar block */
.sidebar-block {
  background: var(--game-surface);
  border: 1px solid var(--game-surface-line); border-radius: var(--game-surface-radius);
  padding: 20px; margin-bottom: 20px;
  box-shadow: var(--game-surface-shadow);
  transition: box-shadow var(--t-slow);
}
.sidebar-block:hover { box-shadow: var(--game-surface-shadow-hover); }

.sidebar-block-title {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 16px; padding-bottom: 12px;
  font-size: 1.05em; font-weight: 700; color: var(--clr-heading);
  text-transform: uppercase; letter-spacing: .02em;
  border-bottom: 2px solid var(--clr-brand);
}
.sidebar-block-title .icon { width: 18px; height: 18px; fill: var(--clr-brand); flex-shrink: 0; }
.sidebar-block-title span  { flex-grow: 1; }

/* Shared gradient hover for sidebar cards */
.sidebar-game-item::before,
.sidebar-update-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--clr-brand), var(--clr-brand-hover));
  opacity: 0;
  transition: opacity var(--t-base);
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
}
.sidebar-game-item:hover::before,
.sidebar-update-item:hover::before { opacity: 1; }
.sidebar-game-item > *,
.sidebar-update-item > * { position: relative; z-index: 1; }

/* Popular games */
.sidebar-games-list { display: flex; flex-direction: column; gap: 12px; }

.sidebar-game-item {
  display: flex; gap: 12px; padding: 10px;
  border-radius: 16px;
  background: var(--game-surface-soft);
  transition: transform var(--t-base), color var(--t-base);
  text-decoration: none; color: inherit;
  border: 0; align-items: center;
  position: relative; overflow: hidden;
}
.sidebar-game-item:hover { background: rgba(236,46,28,.06); }

.sidebar-game-thumb { width: 60px; height: 60px; flex-shrink: 0; border-radius: var(--r-2xl); overflow: hidden; background: #e8edf3; }
.sidebar-game-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.sidebar-game-item:hover .sidebar-game-thumb img { transform: scale(1.035); }

.sidebar-game-info  { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.sidebar-game-title { font-size: .92em; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--clr-heading); }
.sidebar-game-meta  { display: flex; align-items: center; gap: 8px; font-size: .8em; color: var(--clr-text-soft); opacity: .8; }
.sidebar-game-meta .icon { width: 12px; height: 12px; opacity: .7; }
.sidebar-game-item:hover .sidebar-game-meta        { opacity: 1; color: var(--clr-bg); }
.sidebar-game-item:hover .sidebar-game-meta .icon  { opacity: 1; }
.sidebar-game-item:hover .sidebar-game-title        { color: var(--clr-bg); }

/* Category nav — light text grid with dot markers */
.sidebar-cat-nav     { display: flex; flex-direction: column; gap: 4px; }
.sidebar-cat-nav ul  {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px;
}
.sidebar-cat-nav li  { margin: 0; padding: 0; min-width: 0; }
.sidebar-cat-nav a {
  display: flex; align-items: center;
  padding: 8px 6px;
  border-radius: var(--r-md);
  color: var(--clr-text-soft);
  text-decoration: none;
  font-size: .9em; font-weight: 500;
  background: transparent;
  border: 0;
  min-width: 0;
  overflow: hidden;
  transition: background var(--t-fast), color var(--t-fast);
}
.sidebar-cat-nav a::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: var(--r-full);
  background: var(--clr-light-muted);
  margin-right: 9px;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.sidebar-cat-nav a span { display: none; }
.sidebar-cat-nav a:hover {
  background: rgba(236, 46, 28, .06);
  color: var(--clr-brand);
  transform: none;
}
.sidebar-cat-nav a:hover::before { background: var(--clr-brand); }
.sidebar-block.sidebar-categories .sidebar-cat-nav a.active {
  background: rgba(236, 46, 28, .09);
  color: var(--clr-brand);
  font-weight: 700;
}
.sidebar-block.sidebar-categories .sidebar-cat-nav a.active::before { background: var(--clr-brand); }
.sidebar-cat-nav .icon { display: none; }

/* Tags cloud */
.sidebar-tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.sidebar-tag {
  display: inline-block; padding: 6px 12px;
  background: #f0f0f0; border-radius: 20px;
  font-size: .85em; color: #555; text-decoration: none;
  transition: filter var(--t-slow), color var(--t-slow), box-shadow var(--t-slow), transform var(--t-slow); border: 1px solid transparent; font-weight: 500;
}
.sidebar-tag:hover { background: var(--clr-brand); color: #fff; transform: translateX(3px); box-shadow: 0 2px 6px rgba(236,46,28,.3); border-color: var(--clr-brand); }

/* Updates list */
.sidebar-updates-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-update-item {
  display: flex; flex-direction: column; gap: 6px; padding: 10px;
  border-radius: var(--r-md); background: #f8f9fa;
  transition: transform var(--t-base), color var(--t-base); text-decoration: none; color: inherit;
  border: 1px solid transparent;
  position: relative; overflow: hidden;
}
.sidebar-update-item:hover { transform: translateX(3px); }
.sidebar-update-title { font-size: .9em; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-update-date  { font-size: .8em; opacity: .7; display: flex; align-items: center; gap: 6px; }
.sidebar-update-date .icon { width: 12px; height: 12px; }
.sidebar-update-item:hover .sidebar-update-date { opacity: 1; }

/* Latest Comments Sidebar */
.lcs-item {
  border: 1px solid var(--game-surface-line);
  border-radius: var(--r-2xl);
  background: var(--game-surface-soft);
  overflow: hidden;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast);
}
.lcs-item:hover { background: var(--clr-bg); border-color: rgba(236, 46, 28, .22); box-shadow: var(--game-surface-shadow); }
.lcs-link {
  display: flex; flex-direction: column; gap: 7px;
  padding: 12px; text-decoration: none; color: inherit;
}
.lcs-header {
  display: flex; align-items: center; gap: 9px;
}
.lcs-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--game-surface-line);
  background: var(--clr-bg);
}
.lcs-author {
  font-size: var(--fs-meta); font-weight: 800;
  color: var(--clr-brand); flex-grow: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lcs-item:hover .lcs-author { color: var(--clr-brand-hover); }
.lcs-date {
  font-size: var(--fs-xs); color: var(--clr-muted); white-space: nowrap; flex-shrink: 0;
}
.lcs-text {
  font-size: var(--fs-sm); line-height: 1.45; margin: 0; color: var(--clr-body);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.lcs-news-title {
  font-size: var(--fs-xs); font-weight: 600; color: var(--clr-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lcs-item:hover .lcs-news-title { color: var(--clr-brand); }

/* Sidebar responsive */
@media only screen and (max-width: 1200px) {
  .content-with-sidebar { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .sidebar-block         { padding: 16px; }
  .sidebar-game-thumb    { width: 50px; height: 50px; }
}
@media only screen and (max-width: 860px) {
  .content-with-sidebar  { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px 0 24px; }
  .right-sidebar         { overflow: visible; position: static; max-height: none; overflow-y: visible; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .sidebar-block         { margin-bottom: 0; }
  .sidebar-game-item     { flex-direction: column; text-align: center; }
  .sidebar-game-thumb    { width: 100%; height: 120px; }
}
@media only screen and (max-width: 700px) {
  .right-sidebar         { grid-template-columns: minmax(0, 1fr); }
  .sidebar-block         { padding: 14px; }
  .sidebar-block-title   { font-size: .95em; }
}

/* Sidebar states */
.sidebar-empty-state     { padding: 20px; text-align: center; color: #999; font-size: .9em; }
.sidebar-empty-state .icon { width: 32px; height: 32px; margin: 0 auto 10px; opacity: .3; }
.sidebar-loading         { display: flex; justify-content: center; align-items: center; padding: 30px; }
.sidebar-loading::after  { content: ""; width: 24px; height: 24px; border: 3px solid #f3f3f3; border-top: 3px solid var(--clr-brand); border-radius: 50%; animation: sidebar-spin 1s linear infinite; }
@keyframes sidebar-spin  { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ============================================================
   DAILY UPDATES (sidebar block)
   ============================================================ */
.sidebar-block.daily-updates-card {
  background: linear-gradient(180deg, rgba(18,21,27,.98), rgba(10,12,16,.98));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.sidebar-block.daily-updates-card .sidebar-block-title {
  color: #f3f4f6;
  border-bottom-color: rgba(255,255,255,.12);
}
.sidebar-block.daily-updates-card .sidebar-block-title i {
  color: var(--clr-brand);
  font-size: var(--fs-md);
  font-style: normal;
}
.du-subtitle {
  margin: -8px 0 10px;
  color: rgba(255,255,255,.48);
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.du-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 0 0 14px;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.du-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.du-legend-dot { width: 6px; height: 6px; border-radius: 50%; }
.du-legend-dot--new { background: #f3b544; }
.du-legend-dot--updated { background: var(--clr-brand); }
.du-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: min(620px, 56vh);
  overflow-y: auto;
  padding-right: 8px;
}
.du-list::-webkit-scrollbar { width: 5px; }
.du-list::-webkit-scrollbar-track { background: rgba(255,255,255,.05); border-radius: var(--r-md); }
.du-list::-webkit-scrollbar-thumb { background: rgba(236,46,28,.75); border-radius: var(--r-md); }
.du-list::-webkit-scrollbar-thumb:hover { background: var(--clr-brand); }

.du-item {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 76px;
  padding: 8px 10px 8px 12px;
  color: rgba(255,255,255,.9);
  text-decoration: none;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 14px;
  overflow: hidden;
  transition: background var(--t-base), border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.du-item::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--clr-brand);
  opacity: .82;
}
.du-item:hover {
  color: var(--clr-bg);
  background: rgba(236,46,28,.10);
  border-color: rgba(236,46,28,.42);
  transform: translateX(3px);
}
.du-thumb {
  display: block;
  width: 58px;
  height: 58px;
  border-radius: var(--r-2xl);
  overflow: hidden;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.du-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow), filter var(--t-base);
}
.du-item:hover .du-thumb img { transform: scale(1.06); filter: brightness(1.08); }
.du-content {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.du-meta {
  color: rgba(255,255,255,.64);
  font-size: var(--fs-xs);
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.du-event { min-height: 12px; }
.du-status {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: .06em;
}
.du-status--new { color: #f3c45f; }
.du-status--updated { color: #ff796c; }
.du-title {
  color: rgba(255,255,255,.92);
  font-size: var(--fs-meta);
  font-weight: 800;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media only screen and (max-width: 860px) {
  .du-list { max-height: none; overflow-y: visible; }
}

/* ============================================================
   46. MEDIA QUERIES — RESPONSIVE LAYOUT
   ============================================================ */
@media only screen and (max-width: 860px) {
  .tools .grid_last,
  .tools #toptags          { display: none; }
  .tools .grid_3_4         { width: auto; float: none; margin-right: 0; }
}

@media only screen and (max-width: 860px) {
  #header { height: 54px; gap: 8px; }
  .logo-icon { height: 36px; width: auto; }
  .brand-wordmark b { font-size: var(--fs-meta); }
  .brand-wordmark small { font-size: 9px; }
  .header-search { display: none; }
  #search { display: flex; }

  .site-kicker { font-size: 12px; }
  .site-kicker .wrp { min-height: 26px; }
  /* Search dropdown below header */
  #q_search {
    position: static;
    z-index: 99;
  }
  .search_open #q_search { height: 52px; }
  #q_search .wrp { display: flex; align-items: center; gap: 8px; padding: 8px 16px; }
  #q_search input { flex: 1; background: rgba(255,255,255,0.06) !important; border: 1px solid rgba(255,255,255,0.08); border-radius: var(--r-pill); color: var(--clr-bg) !important; caret-color: var(--clr-brand); padding: 8px 14px; font-size: var(--fs-body); }
  #q_search input:focus { background: rgba(255, 255, 255, 0.06) !important; color: var(--clr-bg) !important; }
  #q_search .btn { padding: 8px 12px; }

  .h_btn { width: 40px; height: 40px; padding: 0; }
  .h_btn::after { width: 100%; height: 40px; border-radius: 0; margin-top: -40px; }
  .login > .avatar { padding: 3px; border: 0 none; }
  ul.login_form, .soc_links,
  .login_form_links { vertical-align: top; display: inline-block; float: none; }
  #loginpane { overflow-y: hidden; overflow-x: auto;}
  .header-actions > #loginpane { top: calc(100% + 7px); width: 280px; }
  #loginpane > .wrp { white-space: nowrap; min-width: 960px; }

  /* Mobile menu: slide-down panel */
  .mainmenu_open,
  .mainmenu_open body,
  .mainmenu_open .page { width: 100%; height: 100%; overflow: hidden; }

  #topmenu {
    position: absolute; top: 54px; left: 0; right: 0;
    background: rgba(7, 9, 13, 0.98);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 99;
    max-height: 0; overflow: hidden;
    opacity: 0;
    transition: max-height var(--t-slow), opacity var(--t-base);
  }
  .mainmenu_open #topmenu {
    max-height: calc(100vh - 54px);
    overflow-y: auto;
    opacity: 1;

  }
  #topmenu :where(a, .menu-parent-toggle) { color: rgba(255,255,255,0.85); display: flex; width: 100%; align-items: center; border: 0; background: transparent; text-align: left; cursor: pointer; }
  #topmenu ul { list-style: none; padding: 0; margin: 0; }
  #topmenu > ul { padding: 10px; }
  #topmenu > ul > li > :where(a, .menu-parent-toggle) { min-height: var(--control-min); padding: 10px 14px; font-size: 15px; text-decoration: none; border-radius: var(--r-lg); font-weight: 700; }
  #topmenu ul ul > li > a { min-height: var(--control-min); padding: 9px 14px 9px 28px; font-size: var(--fs-body); color: rgba(255,255,255,0.62); text-decoration: none; border-radius: var(--r-lg); }
  #topmenu > ul > li > :where(a, .menu-parent-toggle):hover,
  #topmenu ul ul > li > a:hover { color: var(--clr-bg); background: rgba(236,46,28,.14); }
  #topmenu .icon-arrow_down { display: none; }
  .block_archives { display: none; }

  /* Close overlay */
  #closemenu {
    position: fixed; inset: 0;
    z-index: 98;
    display: none;
    cursor: pointer;
  }
  .mainmenu_open #closemenu { display: block; }
  #closemenu::after { content: ""; display: block; width: 100%; height: 100%; background-color: #000; opacity: .5; }
  #closemenu * { cursor: pointer; }
  #closemenu > span { display: none; }

  .addcomments_form .grid_3_4,
  .addcomments_form .grid_1_4 { float: none; margin: 0; width: auto; }
  .addcomments_form .grid_1_4 { margin-bottom: 20px; }
}

@media only screen and (max-width: 700px) {
  h1, .h1 { font-size: 1.6em; }
  h2, .h2 { font-size: 1.4em; }
  h3, .h3 { font-size: 1.3em; }
  h4, .h4 { font-size: 1.2em; }
  h5, .h5 { font-size: 1.1em; }
  body, select, input, textarea, button { font-size: var(--fs-body); }
  .vtitle { margin-left: 145px; }
  .story, .block { padding: 30px 0; }
  .story .head .title      { font-size: 1.4em; }
  .navigation, .navigation > .wrp { padding: 0; }
  .navigation > .wrp > .icon  { display: none; }
  .pages { padding: 20px 0; float: none; padding-left: 0; overflow-x: auto; white-space: nowrap;}
  .pages > *:first-child       { margin-left: 20px; }
  .pages > *:last-child        { margin-right: 20px; }
  .page_next-prev              { float: none; display: block; padding: 0; margin: 0; }
  .page_next-prev::after       { clear: both; display: block; content: ""; }
  .page_next-prev > *          { float: left; width: 50%; }
  .page_next-prev > *:last-child { text-align: right; }
  .page_next-prev > span > *   { display: block; padding: 10px 20px; }
}

@media only screen and (max-width: 700px) {
  h1, .h1 { font-size: 1.5em; }
  h2, .h2 { font-size: 1.4em; }
  h3, .h3 { font-size: 1.3em; }
  h4, .h4 { font-size: 1.2em; }
  h5, .h5 { font-size: 1.1em; }
  body, select, input, textarea, button { font-size: var(--fs-meta); }
  #tools, .footer_bottom, .droptopbar,
  .com_info, .com_tools,
  .vote_line_form .dropdown .dropdown-form .vote_list { font-size: 1em; }
  #loginpane > .wrp            { min-width: 0; }
  ul.login_form, .soc_links,
  .login_form_links            { display: block; margin-right: 0; margin-left: 0; }
  .login_form > li             { float: none; width: auto; }
  .login_form > li > input,
  .login_form > li > .btn      { border-left-width: 0; border-top: 1px solid #383e42; }
  .login_form > li:first-child > input { border-top-width: 0; }
  .login_form > li > .btn      { width: 100%; color: var(--clr-brand) !important; }
  .loginf_open #loginpane      { margin-top: 0; height: auto; }
  ul.login_form                { margin-top: 20px; }
  .loginf_open .page::before   { height: 0; }
  #loginpane .soc_links,
  .login_form_links            { text-align: center; }
  .login_form_links > a:first-child { margin-left: 0; }
  #loginpane .name,
  #loginpane .login_menu,
  .loggedpane .login_form_links { display: inline; float: none; }
  .loggedpane > .wrp           { padding-top: 20px; }
  .loggedpane .login_form_links { padding-right: 20px; }

  .hero-section                 { padding: 40px 0; }
  .hero-title                   { font-size: 2.1em; }
  .hero-subtitle                { font-size: 1.2em; }
  .tools                       { height: 42px; min-height: 42px; overflow-y: hidden; overflow-x: auto; white-space: nowrap;}
  #sort, #breadcrumbs          { padding: 0; display: inline-flex; align-items: center; }
  #sort > .icon, #breadcrumbs > .icon { display: none; }
  .tools .grid_3_4, .tools .speedbar { display: inline; padding-right: 20px; }
  .feedback .grid_1_4          { margin-bottom: 20px; }
  .map_resp                    { padding-top: 60%; }
  .story, .block               { padding: 20px 0; }
  .addcomments_form            { padding: 20px 15px; }
  .story_info                  { float: none; font-size: 1em; }
  .story_icons                 { flex-direction: row; gap: 8px; }
  .story.lefticons .title      { padding-left: 0; }
  .story.lefticons .text,
  .modern-rating-box:not(.game-header__rating-card) { margin-left: 0; }
  .poll_block                  { margin: 20px 0; }
  .meta_date                   { display: none; }
  .storyinfo_link              { margin-bottom: 0; }
  .storyinfo_box               { padding-top: 20px; }
  .story_cont                  { margin-top: 20px; }
  .story .head                 { margin-bottom: 10px; }
  .story .head .title          { margin-top: 0; }
  .comments-tree-list .comments-tree-list,
  .comments-tree-list .comments-tree-list .comments-tree-list { padding-left: 23px; }
  .comment .rate               { margin-left: 10px; }
  .comment .rate_stars         { margin: 6px 0 0; }
  .block_title                 { margin-bottom: 1em; }
  .col_news .grid_list .grid_1_4 { margin-top: 20px; }
  .col_news .grid_list > div > a .title { margin-bottom: .5em; }
  .col_news .grid_list > div > a { padding: 0; width: 90%; }
  .vote_line                   { text-align: center; }
  .vote_line_title             { display: inline-block; font-size: 1.2em; color: var(--clr-bg); background-color: var(--clr-body); padding: 10px; margin-top: 0; position: relative; width: 80px; text-align: center; }
  .vote_line_title::after      { content: ""; position: absolute; left: 0; top: 100%; border: solid transparent; border-top-color: var(--clr-body); border-width: 5px 50px 0 50px; }
  .vtitle                      { margin-left: 0; font-weight: bold; color: var(--clr-bg); }
  .vote_line_title .vote_icon,
  .vote_line_form .dropdown > .btn { display: none; }
  .vote_line_form .dropdown .dropdown-form { position: static; margin: 0 auto; display: block; text-align: left; }
  .more_votes                  { display: block; }
  .bb-pane                     { width: 100%; box-sizing: border-box; white-space: nowrap;}
  #comment-editor .bb-editor textarea { height: 240px; }
  .bb-btn                      { float: none; display: inline-block; margin-left: -.3em !important; }
  .mass_comments_action        { margin-top: 20px; }
  .comments_box_in .mass_comments_action { margin-top: 20px; padding-top: 0; }
  .pm_status                   { padding: 20px; }
  #pm-menu                     { white-space: nowrap; overflow-y: hidden; overflow-x: auto;}
  #pm-menu > a                 { display: inline-block; float: none; padding: 10px 20px; }
  .pmlist                      { width: 100%; margin: 0 -20px; padding: 0 20px; overflow-y: hidden; overflow-x: auto;}
  .pmlist > form               { min-width: 800px; padding-right: 20px; }
  .stats_head > ul             { font-size: 1em; margin-bottom: 20px; }
  .block_table_top_users       { padding: 0; margin-top: 40px; }
  .block_table_top_users > .title { padding: 0 20px; }
  .table_top_users             { padding-bottom: 20px; overflow-y: hidden; overflow-x: auto;}
  .table_top_users > table     { width: 800px; }
  .form_submit .c-capcha       { float: none; margin-bottom: 20px; padding-left: 100px; position: relative; }
  .form_submit .c-capcha img   { position: absolute; left: 0; }
  .form_submit .c-capcha input { width: 100%; }
  #dofullsearch                { display: none; }
  #add_news_preview            { display: none; }
  .ui-dialog                   { width: auto !important; left: 10px !important; right: 10px; }
  .ui-dialog-buttonset > .ui-button { margin: 2px; }
  .dle-popup-userprofile      { left: 10px !important; right: 10px !important; width: auto !important; max-width: calc(100vw - 20px) !important; }
  .popup_userinfo             { padding: 12px; }
  .popup_header               { padding: 16px 16px 12px; }
  .popup_avatar img           { width: 48px; height: 48px; }
  .popup_menu_item            { padding: 9px 16px; font-size: var(--fs-meta); }
  .popup_meta                 { padding: 8px 16px; }
  .popup_signature            { padding: 10px 16px; }
  .popup_status_bar           { padding: 10px 16px 14px; }
}

@media only screen and (max-width: 700px) {
  .mejs-container              { max-width: 100%; }
  .story video, .story iframe  { max-width: 100%; }
  .mass_comments_action > select,
  .mass_comments_action > input { display: block; width: 100%; margin: 0; }
  .mass_comments_action > select { margin: 5px 0; }
  .hero-title                   { font-size: 1.6em; }
  .hero-subtitle                { font-size: 1em; }
  .com_tools_links > a > span  { display: none; }
}

@media (max-width: 480px) {
  body { -webkit-text-size-adjust: 100%; }
}

/* ============================================================
   47. FIGURE / IMAGE CAPTIONS
   ============================================================ */
figure.image             { display: table; margin: 1rem auto; }
figure.image:first-child { margin-top: 0; }
figure.image:last-child  { margin-bottom: 0; }
figure.align-left        { float: left; margin-right: .5rem; }
figure.align-right       { float: right; margin-left: .5rem; }
figure.image.align-center { display: table; margin-left: auto; margin-right: auto; }
figure.image figcaption  { padding: 1rem; background-color: #fafafa; font-size: .8rem; caption-side: bottom; word-break: break-word; text-align: center; }
figure.image.align-center figcaption { display: table-caption; }

/* ============================================================
   48. LESS / SHADOW UTILITY
   ============================================================ */
.less { box-shadow: 0 0 0 1px rgba(0,0,0,.06), 0 10px 20px -5px rgba(0,0,0,.4); }

/* ============================================================
   50. FINAL RESPONSIVENESS REFINEMENTS
   ============================================================ */
@media only screen and (max-width: 700px) {
  #content > .wrp:not(.page_description) { padding-top: 14px; }
  #content > .wrp.page_description { margin-bottom: 16px; }
  .story_list { gap: 16px; }
  .story_list > .shortstory,
  .story_list > .fullstory,
  .main-content-col .story_list > .shortstory:first-of-type,
  .main-content-col .story_list > .fullstory:first-of-type { padding: 16px; }
  .shortstory > .head,
  .fullstory > .game-page > .head { padding-right: 0; }

  /* Grid & Layout */
  .wrp, .wrp.fixed_wrap { padding-left: 15px !important; padding-right: 15px !important; }
  
  /* Comments Section */
  .comments-tree-list { padding-right: 0 !important; }
  .comments-tree-list .comments-tree-list { padding-left: 15px !important; margin-left: 0 !important; }
  
  /* BB Editor */
  .addcomments_form { padding: 20px 15px !important; }
  .bb-editor { width: 100% !important; max-width: 100vw; overflow-x: hidden; }
  .bb-pane { overflow-x: auto !important; padding-bottom: 5px;display: flex !important; flex-wrap: nowrap !important; }
  .bb-btn { flex: 0 0 auto !important; }
  
  /* Rating Box Mobile */
  .modern-rating-box:not(.game-header__rating-card) { border-radius: var(--r-2xl) !important; margin: 20px 0 !important; }
}
/* ============================================================
   MINI RATING — Premium Compact Badge (shortstory)
   Unified design language with the full-page rating circle
   ============================================================ */

.mini-rating {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  text-decoration: none;
  flex-shrink: 0;
  height: 36px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fefefe, #f8f9fb);
  border: 1px solid #e5e7eb;
  padding: 0 12px 0 4px;
  transition: background,color,box-shadow,transform,border-color,opacity 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.mini-rating:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

/* Mini circle score — echoes the full-page progress-circle */
.mini-rating .mini-circle {
  position: relative;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mini-rating .mini-circle svg {
  width: 28px;
  height: 28px;
  transform: rotate(-90deg);
}
.mini-rating .mini-circle .mini-bg {
  fill: none;
  stroke: #e5e7eb;
  stroke-width: 2.5;
}
.mini-rating .mini-circle .mini-bar {
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  transition: stroke-dashoffset .45s cubic-bezier(.22, 1, .36, 1), stroke var(--t-base);
}
.mini-rating .mini-circle .mini-score-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: var(--clr-heading);
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
}

/* Star icon */
.mini-rating .fa-star {
  color: var(--clr-warning);
  font-size: var(--fs-sm);
  margin-left: 6px;
  filter: drop-shadow(0 0 2px rgba(245, 158, 11, 0.3));
}

/* Score text */
.mini-rating .rating-score {
  font-weight: 700;
  font-size: var(--fs-meta);
  color: var(--clr-heading);
  margin-left: 4px;
  letter-spacing: -0.2px;
}

/* Votes count */
.mini-rating .rating-votes {
  color: #9ca3af;
  font-size: var(--fs-xs);
  font-weight: 500;
  margin-left: 4px;
  white-space: nowrap;
}

/* Responsive adjustments */
@media (max-width: 700px) {
  .mini-rating {
    min-height: var(--control-min);
    padding: 0 10px 0 3px;
    border-radius: 16px;
  }
  .mini-rating .mini-circle {
    width: 24px;
    height: 24px;
  }
  .mini-rating .mini-circle svg {
    width: 24px;
    height: 24px;
  }
  .mini-rating .mini-circle .mini-score-text {
    font-size: 8px;
  }
  .mini-rating .fa-star {
    font-size: var(--fs-xs);
    margin-left: 4px;
  }
  .mini-rating .rating-score {
    font-size: var(--fs-sm);
  }
  .mini-rating .rating-votes {
    display: none;
  }
}
@media (max-width: 480px) {
  .mini-rating .fa-star {
    display: none;
  }
}

/* ============================================================
   51. ACCESSIBILITY — REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

   P2 CONTRAST — muted text on light surfaces lifted to AA
   #64748b = 4.7:1 on white; --clr-muted kept as-is (used on dark surfaces)
   ============================================================ */
.grey,
.wrp.page_description,
.game-bad-tech,
.steam-card__stats,
.lcs-date,
.lcs-news-title,
.stats_head > ul > li > b,
table.userstop thead tr td,
table.userstop tbody tr td a[href*="doaction=newpm"],
.mod-card .mod-tag--tech,
.game-card-category,
.game-card-stats,
.torrent-block h3,
.user-tab,
.user-info-label,
.text-muted,
.status-offline,
.dsg-sub,
.profile-max { color: var(--clr-text-soft); }

/* ============================================================
   P3 DARK COMPONENT OVERRIDES — hardcoded-light components
   (torrent table, rating boxes, download blocks, toc, badges)
   ============================================================ */
/* Torrent table */
html[data-theme="dark"] .torrent-header .torrent-cell { background: var(--clr-bg-light); color: var(--clr-heading); border-bottom-color: var(--clr-border); }
html[data-theme="dark"] .torrent-cell { border-bottom-color: var(--clr-border-light); color: var(--clr-text-soft); }
html[data-theme="dark"] .torrent-row:hover .torrent-cell { background: var(--clr-bg-dark); color: var(--clr-heading); }
html[data-theme="dark"] .torrent-cell::before { color: var(--clr-heading); }
html[data-theme="dark"] .torrent-footer { --torrent-text-primary: var(--clr-body); --torrent-text-secondary: var(--clr-muted); }
html[data-theme="dark"] .size-torrent { color: var(--clr-text-soft); }

/* How-to pills under download block */
html[data-theme="dark"] .howto_d,
html[data-theme="dark"] .howto_do { background: var(--clr-bg-light); color: var(--clr-text-soft); border-color: var(--clr-border); }
html[data-theme="dark"] .howto_d:hover,
html[data-theme="dark"] .howto_do:hover { background: #2b333e; border-color: var(--clr-border); color: var(--clr-heading); }

/* Badges: dark text colors unreadable on dark, brighten them */
html[data-theme="dark"] .mm-badge--info,
html[data-theme="dark"] .game-bad li.mm-badge--info,
html[data-theme="dark"] .mod-page .mod-badge.mm-badge--info { color: #93c5fd; }
html[data-theme="dark"] .mm-badge--success,
html[data-theme="dark"] .game-bad li.mm-badge--success { color: #6ee7a8; }
html[data-theme="dark"] .mm-badge--gold { color: #fcd34d; }
html[data-theme="dark"] .mm-badge--brand { color: var(--clr-link); }

/* Rating boxes */
html[data-theme="dark"] .modern-rating-box:not(.game-header__rating-card) { background: var(--game-surface); border-color: var(--game-surface-line); box-shadow: var(--game-surface-shadow); }
html[data-theme="dark"] .game-header__rating-card { background: var(--game-surface); border-color: var(--game-surface-line); box-shadow: var(--game-surface-shadow); }
html[data-theme="dark"] .progress-circle-wrapper { background: var(--game-surface); }
html[data-theme="dark"] .rating-title { color: var(--clr-heading); }
html[data-theme="dark"] .rating-meta b { color: var(--clr-heading); }

/* TOC pills */
html[data-theme="dark"] .toc-list li a { color: var(--clr-text-soft); }

/* Direct-link download section */
html[data-theme="dark"] .download-section { color: var(--clr-body); }
html[data-theme="dark"] .source-name,
html[data-theme="dark"] .file-info { color: var(--clr-text-soft); }
html[data-theme="dark"] .guides-section .section-title { color: var(--clr-heading); }

/* Featured carousel controls */
html[data-theme="dark"] .featured-games__control { color: var(--clr-heading); border-color: var(--clr-border); }

/* Pending CTA blends into dark card otherwise */
html[data-theme="dark"] .btn--pending { background: #2f3944; box-shadow: none; }
html[data-theme="dark"] .btn--pending:hover { background: #38434f; }

/* ============================================================
   P4 DARK FIXES — reported round 2
   (menu hover, steam bar text, torrent name/btn, tools bar)
   ============================================================ */
/* Header dropdown hover used var(--clr-bg) as "white" — in dark it is a surface color */
html[data-theme="dark"] #topmenu > ul > li > :where(a, .menu-parent-toggle):hover,
html[data-theme="dark"] #topmenu > ul > li.parent:hover > a,
html[data-theme="dark"] #topmenu > ul > li > ul > li > a:hover,
html[data-theme="dark"] #topmenu > ul > li > ul > li > ul > li a:hover { color: #fff; }

/* Steam rating bar: white text-shadow glow made text blurry on dark */
html[data-theme="dark"] .steam-card__bar-text { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.65); }

/* Torrent file name / buttons / badges */
html[data-theme="dark"] .torrent-name { color: var(--clr-heading); }
html[data-theme="dark"] .torrent-btn { color: #fff; }
html[data-theme="dark"] .torrent-badge-fast { color: #fff; }
html[data-theme="dark"] .torrent-icon { color: #fff; }

/* Tools bar (sort + popular tags) */
html[data-theme="dark"] #sort { color: var(--clr-text-soft); }
html[data-theme="dark"] .tags_btn.collapsed { color: var(--clr-text-soft); }

/* ============================================================
   P5 DARK FIXES — reported round 3
   ============================================================ */
/* Tools/breadcrumbs strip: hardcoded white band */
html[data-theme="dark"] #tools {
  background: rgba(21, 25, 30, .92);
  border-bottom-color: var(--clr-border);
  box-shadow: none;
}

/* Slow-server badge: P3 gold override washed out its dark text on light orange */
html[data-theme="dark"] .torrent-badge-slow { color: #4b4b4b; }

/* Related Games cards */
html[data-theme="dark"] .rel-card { color: var(--clr-body); }
html[data-theme="dark"] .rel-card:hover { background: #28303a; box-shadow: 0 12px 26px rgba(0,0,0,.45); }
html[data-theme="dark"] .rel-card:hover .rel-card__title { color: var(--clr-link); }

/* ============================================================
   P6 DARK FIXES — TinyMCE comment editor chrome + textareas
   ============================================================ */
html[data-theme="dark"] .tox.tox-tinymce { background: var(--game-surface); border-color: var(--game-surface-line); }
html[data-theme="dark"] .tox .tox-toolbar-overlord,
html[data-theme="dark"] .tox .tox-toolbar__primary,
html[data-theme="dark"] .tox .tox-toolbar__overflow { background: var(--clr-bg-light); border-bottom-color: var(--clr-border); }
html[data-theme="dark"] .tox .tox-tbtn { color: var(--clr-text-soft); }
html[data-theme="dark"] .tox .tox-tbtn svg { fill: var(--clr-text-soft); }
html[data-theme="dark"] .tox .tox-tbtn:hover,
html[data-theme="dark"] .tox .tox-tbtn:focus,
html[data-theme="dark"] .tox .tox-tbtn--enabled { background: var(--clr-bg-dark); color: var(--clr-heading); }
html[data-theme="dark"] .tox .tox-tbtn:hover svg,
html[data-theme="dark"] .tox .tox-tbtn:focus svg,
html[data-theme="dark"] .tox .tox-tbtn--enabled svg { fill: var(--clr-heading); }
html[data-theme="dark"] .tox .tox-tbtn--disabled,
html[data-theme="dark"] .tox .tox-tbtn--disabled svg { opacity: .4; }
html[data-theme="dark"] .tox .tox-toolbar__group:not(:last-of-type) { border-color: var(--clr-border); }
html[data-theme="dark"] .tox .tox-edit-area__iframe { background: var(--game-surface); }
html[data-theme="dark"] .tox .tox-editor-header { background: var(--clr-bg-light); }
html[data-theme="dark"] .tox.tox-edit-focus { border-color: rgba(236, 46, 28, .45); }

/* BB-editor / plain textareas in comment & PM forms */
html[data-theme="dark"] .bb-editor textarea,
html[data-theme="dark"] .addcomments_form textarea,
html[data-theme="dark"] .addpm textarea { background: var(--game-surface); color: var(--clr-body); border-color: var(--game-surface-line); }

/* ============================================================
   P7 DARK FIXES — profile page (user hero, group pill, stars)
   ============================================================ */
html[data-theme="dark"] .user-hero-name { color: var(--clr-heading); }
html[data-theme="dark"] .user-hero-group { color: #fff !important; }
html[data-theme="dark"] .profile-stars {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%2339424e' d='M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .user-info-value { color: var(--clr-heading); }

/* ============================================================
   P8 DARK FIXES — sweep of color: var(--clr-dark) text leftovers
   ============================================================ */
html[data-theme="dark"] .game-card-title,
html[data-theme="dark"] .stats_head > ul > li > span,
html[data-theme="dark"] .stat_group > h5,
html[data-theme="dark"] .stat_group > ul > li b.right,
html[data-theme="dark"] table.userstop tbody tr td a:not([href*="doaction=newpm"]),
html[data-theme="dark"] .user-section-heading,
html[data-theme="dark"] .donation-text { color: var(--clr-heading); }

/* Dark badges used var(--clr-bg) as white text — in dark it turns dark-on-dark */
html[data-theme="dark"] .mm-badge--dark,
html[data-theme="dark"] .game-bad li.mm-badge--dark,
html[data-theme="dark"] li.game-bad-release { color: #fff; }

/* ============================================================
   P9 DARK TPL AUDIT — forms, modals, PM, spoilers, suggestions
   ============================================================ */
/* A. Global form controls (engine.css base) */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: var(--game-surface-soft);
  border-color: var(--game-surface-line);
  color: var(--clr-body);
}
html[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2398a2b3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}
html[data-theme="dark"] textarea:focus-visible,
html[data-theme="dark"] select:focus-visible,
html[data-theme="dark"] input:focus-visible { background-color: var(--game-surface); }
/* header search stays on dark glass */
html[data-theme="dark"] .header-search input { background: transparent; border: 0; color: #e8edf3; }

/* B. User popup modal (profile_popup.tpl) */
html[data-theme="dark"] .popup_userinfo_card { background: var(--game-surface); border-color: var(--game-surface-line); box-shadow: 0 8px 32px rgba(0,0,0,.5); }
html[data-theme="dark"] .popup_name { color: var(--clr-heading); }
html[data-theme="dark"] .popup_avatar img { background-color: var(--clr-bg-dark); border-color: var(--game-surface); }
html[data-theme="dark"] .popup_status_dot { border-color: var(--game-surface); }
html[data-theme="dark"] .popup_divider { background: linear-gradient(90deg, transparent, var(--clr-border) 20%, var(--clr-border) 80%, transparent); }
html[data-theme="dark"] .popup_menu_item { color: var(--clr-body); }
html[data-theme="dark"] .popup_menu_item:hover { background: var(--clr-bg-dark); color: var(--clr-heading); }
html[data-theme="dark"] .popup_menu_item > i { color: var(--clr-muted); }
html[data-theme="dark"] .popup_menu_item > span:first-of-type { color: var(--clr-body); }
html[data-theme="dark"] .popup_menu_item:hover > span:first-of-type { color: var(--clr-heading); }
html[data-theme="dark"] .popup_menu_count { background: rgba(236,46,28,.14); color: var(--clr-link); border-color: rgba(236,46,28,.25); }
html[data-theme="dark"] .popup_menu_item:hover .popup_menu_count { background: var(--clr-brand); color: #fff; border-color: var(--clr-brand); }
html[data-theme="dark"] .popup_menu_disabled .popup_menu_count { background: var(--clr-bg-dark); color: var(--clr-muted); border-color: var(--clr-border); }
html[data-theme="dark"] .popup_meta { color: var(--clr-text-soft); }
html[data-theme="dark"] .popup_meta > i { color: var(--clr-muted); }
html[data-theme="dark"] .popup_signature { background: var(--clr-bg-dark); border-top-color: var(--clr-border); color: var(--clr-text-soft); }
html[data-theme="dark"] .popup_status_bar { background: var(--clr-bg-dark); border-top-color: var(--clr-border); }

/* C. DLE ui-dialog modals (quick edit, confirms, loginbox) */
html[data-theme="dark"] .ui-dialog { background-color: var(--game-surface); border-color: var(--clr-border); }
html[data-theme="dark"] .ui-dialog-titlebar { border-bottom-color: var(--clr-border); color: var(--clr-heading); }
html[data-theme="dark"] .ui-dialog label { color: var(--clr-text-soft); }
html[data-theme="dark"] .ui-dialog-content { border-color: transparent; color: var(--clr-body); }
html[data-theme="dark"] .ui-dialog .ui-dialog-buttonpane { border-top-color: var(--clr-border); }

/* D. Search suggestions dropdown */
html[data-theme="dark"] #searchsuggestions { background: var(--game-surface); border-color: var(--clr-border); }
html[data-theme="dark"] #searchsuggestions a,
html[data-theme="dark"] #searchsuggestions span.notfound { border-bottom-color: var(--clr-border-light); color: var(--clr-body); }
html[data-theme="dark"] #searchsuggestions a:hover { background-color: var(--clr-bg-dark); }

/* E. PM navigation & tables */
html[data-theme="dark"] .pm_navigation .navigation { background-color: var(--clr-bg-light); color: var(--clr-body); }
html[data-theme="dark"] .pm_navigation .navigation a { color: var(--clr-body); }
html[data-theme="dark"] .pm_navigation .navigation a:hover { background-color: var(--clr-bg-dark); }
html[data-theme="dark"] .pm td.pm_list,
html[data-theme="dark"] .pm th.pm_head,
html[data-theme="dark"] .userstop thead td,
html[data-theme="dark"] .userstop td { border-color: var(--clr-border-light); }

/* F. Spoilers & hide/scriptcode */
html[data-theme="dark"] .title_spoiler svg { background: var(--clr-bg-dark); }
html[data-theme="dark"] .text_spoiler { background: rgba(21, 25, 30, .5); }
html[data-theme="dark"] .hide { background-color: var(--clr-bg-dark); color: #8ab860; }
html[data-theme="dark"] .scriptcode { color: #8ab860; }

/* G. Poll/vote progress track */
html[data-theme="dark"] .voteprogress,
html[data-theme="dark"] .pollprogress { background-color: var(--clr-bg-dark); }

/* ============================================================
   P10 DARK — dle-popup-userprofile (!important overrides)
   ============================================================ */
html[data-theme="dark"] .dle-popup-userprofile.ui-dialog { background: var(--game-surface) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-titlebar { background: var(--game-surface) !important; border-bottom: 1px solid var(--clr-border) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-title { color: var(--clr-heading) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-titlebar-close { background: var(--clr-bg-dark) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-titlebar-close .ui-icon,
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-titlebar-close span.ui-button-text { filter: invert(1) brightness(1.15) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-content { background: var(--clr-bg-dark) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-buttonpane { background: var(--game-surface) !important; border-top: 1px solid var(--clr-border) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-buttonset button:first-child { background: var(--clr-bg-dark) !important; color: var(--clr-text-soft) !important; }
html[data-theme="dark"] .dle-popup-userprofile .ui-dialog-buttonset button:first-child:hover { background: var(--clr-bg-light) !important; color: var(--clr-heading) !important; }

/* ============================================================
   P11 — heading unification (both themes) + mod-page tokens
   ============================================================ */
/* Content headings: one consistent color; !important overrides legacy inline colors in static-page DB content */
.block.story h2,
.block.story h3,
.fullstory .text.description h2,
.fullstory .text.description h3 { color: var(--clr-heading) !important; }
.fullstory .head .title,
h2.section-title { color: var(--clr-heading); }

/* Mods section: local light token set → dark overrides */
html[data-theme="dark"] .mod-page,
html[data-theme="dark"] .mod-card {
  --mod-accent: #ff7361;
  --mod-accent-hover: #ff7361;
  --mod-accent-light: rgba(236, 46, 28, .1);
  --mod-accent-border: rgba(236, 46, 28, .3);
  --mod-surface: var(--game-surface);
  --mod-border: var(--game-surface-line);
  --mod-text: var(--clr-heading);
  --mod-muted: var(--clr-muted);
  --mod-badge-bg: #2f3944;
  --mod-badge-text: #fff;
}

/* ============================================================
   P12 DARK — card footer pills (story-size + mini-rating)
   ============================================================ */
html[data-theme="dark"] .story-size { background: var(--game-surface-soft); border-color: var(--game-surface-line); box-shadow: none; }
html[data-theme="dark"] .story-size:hover { border-color: var(--clr-border); box-shadow: none; }
html[data-theme="dark"] .mini-rating { background: var(--game-surface-soft); border-color: var(--game-surface-line); box-shadow: none; }
html[data-theme="dark"] .mini-rating:hover { border-color: var(--clr-border); box-shadow: none; }
html[data-theme="dark"] .mini-rating .mini-circle .mini-bg { stroke: var(--clr-border); }
html[data-theme="dark"] .mini-rating .rating-votes { color: var(--clr-muted); }

/* Download interstitial page (.odp) */
html[data-theme="dark"] .odp { color: var(--clr-body); }
html[data-theme="dark"] .odp-widget { background: var(--game-surface); border-color: var(--game-surface-line); }
html[data-theme="dark"] .odp-n { background: var(--clr-bg-dark); color: var(--clr-muted); }
html[data-theme="dark"] .odp-step-name { color: var(--clr-heading); }
html[data-theme="dark"] .odp-step p { color: var(--clr-text-soft); }
html[data-theme="dark"] .odp-arrow { background: var(--game-surface); border-color: var(--game-surface-line); }
html[data-theme="dark"] .btn-off { background: var(--clr-bg-dark); color: var(--clr-muted); }
html[data-theme="dark"] .odp-gi-img { background: var(--clr-bg-dark); border-color: var(--game-surface-line); }
html[data-theme="dark"] .odp-bar { background: var(--clr-bg-dark); border-top-color: var(--game-surface-line); }
html[data-theme="dark"] .odp-visual-head a { color: var(--clr-link); }

/* ============================================================
   P13 DARK — header foregrounds that use --clr-bg as "white"
   (header is dark in both themes; --clr-bg flips in dark)
   ============================================================ */
html[data-theme="dark"] .logotype,
html[data-theme="dark"] .brand-wordmark b,
html[data-theme="dark"] .header-actions > #loginpane .login_menu > li a:hover,
html[data-theme="dark"] .arh_tabs > li > a { color: #fff; }

/* ============================================================
   P14 DARK — download steps guide (.dsg) + vpn-alert
   ============================================================ */
html[data-theme="dark"] .dsg-head,
html[data-theme="dark"] .dsg-note a,
html[data-theme="dark"] .dsg-timer,
html[data-theme="dark"] .dsg-sub.hi,
html[data-theme="dark"] .dsg-ic.active { color: #60a5fa; }
html[data-theme="dark"] .dsg-ic.done,
html[data-theme="dark"] .dsg-sub.ok { color: #34d399; }
html[data-theme="dark"] .dsg-ic.error,
html[data-theme="dark"] .dsg-sub.err,
html[data-theme="dark"] .dsg-timer.urgent { color: #f87171; }
html[data-theme="dark"] .dsg-ic.pending,
html[data-theme="dark"] .dsg-ic.wait { background: var(--clr-bg-dark); border-color: var(--clr-border); color: var(--clr-muted); }
html[data-theme="dark"] .dsg-lbl,
html[data-theme="dark"] .dsg-sub em,
html[data-theme="dark"] .vpn-alert-text strong { color: var(--clr-heading); }
html[data-theme="dark"] .dsg-ctx { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .3); color: #fcd34d; }
html[data-theme="dark"] .dsg-ctx em { color: #fcd34d; }
html[data-theme="dark"] .dsg-err-ctx { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
html[data-theme="dark"] .vpn-alert { color: #f87171; }
html[data-theme="dark"] .dsg-arr line,
html[data-theme="dark"] .dsg-arr polyline { stroke: #3f4a58; }

/* ============================================================
   P15 CONSISTENCY SWEEP — results of full dark-theme audit
   ============================================================ */
/* Brand-red small text on dark surfaces (3.5:1) -> bright coral (5.5:1) */
html[data-theme="dark"] .lcs-author,
html[data-theme="dark"] .upd-chip,
html[data-theme="dark"] .game-card-size,
html[data-theme="dark"] .user-tab.active { color: var(--clr-link); }

/* Static-page DB content: divs with inline light backgrounds */
html[data-theme="dark"] .text.clrfix div[style*="background:#f8f9fa"] { background: var(--game-surface-soft) !important; border-color: var(--game-surface-line) !important; }
html[data-theme="dark"] .text.clrfix div[style*="background:#e8f5e9"] { background: rgba(67, 160, 71, .1) !important; }

/* Fails in BOTH themes: light Steam badge fills with white text (2.0:1) */
.steam-card__badge--excel,
.steam-card__badge--high { color: #063a54; }
/* white on #28a745 = 3.13 -> darkened green (5.0) */
.torrent-badge-fast { background: #1e8038; }

html[data-theme="dark"] .rutor-empty { color: var(--clr-muted); }

/* Brand-red CTAs: white on #ec2e1c = 4.22 -> #d02516 = 5.31 (both themes) */
.torrent-btn { background: var(--clr-brand-hover); }
.tut-tab.is-active { background: var(--clr-brand-hover); }

/* ============================================================
   P16 FINAL AUDIT SWEEP
   ============================================================ */
html[data-theme="dark"] .update-meta time,
html[data-theme="dark"] .update-meta b { color: var(--clr-link); }
/* DB-content "Next step" box: white on #607d8b = 4.37 (fails AA in both themes) */
.text.clrfix [style*="background:#607d8b"] { background: #546e7f !important; }

/* ============================================================
   48. CARD V2 — image-top cards, hero lead, author byline
   ============================================================ */
.story_list > .shortstory:not(.mod-card) {
  display: flex; flex-direction: column;
  padding: 0;
}
.shortstory .scard-media {
  position: relative; display: block; flex-shrink: 0;
  aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--game-surface-soft);
}
.shortstory .scard-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 0;
  transition: transform var(--t-slow);
}
.shortstory:hover .scard-media img { transform: scale(1.03); }
/* badges over the image — reserve top-right space for fav/edit buttons */
.shortstory .scard-flags {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0;
  max-width: calc(100% - 104px);
}
.shortstory .scard-flags .mm-badge { box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

.shortstory .scard-body {
  display: flex; flex-direction: column; flex: 1; gap: 10px;
  padding: 16px 18px 18px; min-width: 0;
}
.shortstory .scard-body .head { margin: 0; }
.shortstory .scard-body .title {
  margin: 0 0 8px; padding-right: 0;
  font-size: 19px; line-height: 1.3;
}
.shortstory .scard-excerpt {
  margin: 0; color: var(--clr-text-soft);
  font-size: var(--fs-body); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
}
.shortstory .scard-body .story-post-meta { flex-wrap: wrap; }
.shortstory .scard-body .card-tags { margin: 0; }
.shortstory .scard-body .more { margin-top: auto; padding-top: 6px; }
/* byline link inside meta */
.story-post-meta .meta-item a { color: inherit; text-decoration: none; }
.story-post-meta .meta-item a:hover { color: var(--clr-brand); }

/* Hero lead: first card on page 1 spans both columns on wide desktop */
@media (min-width: 1200px) {
  .story_list--hero > .shortstory:first-child { grid-column: span 2; flex-direction: row; }
  .story_list--hero > .shortstory:first-child .scard-media {
    width: 55%; aspect-ratio: auto;
  }
  .story_list--hero > .shortstory:first-child .scard-media img {
    position: absolute; inset: 0; height: 100%;
  }
  .story_list--hero > .shortstory:first-child .scard-body {
    width: 45%; padding: 24px 28px 26px;
    justify-content: center; gap: 12px;
  }
  .story_list--hero > .shortstory:first-child .title {
    font-size: clamp(22px, 2vw, 28px); line-height: 1.2;
  }
  .story_list--hero > .shortstory:first-child .scard-excerpt {
    -webkit-line-clamp: 4;
  }
}

/* ============================================================
   49. PRIMARY CATEGORY CHIP
   ============================================================ */
/* Card category chip: show the primary (first sub-)category only,
   instead of a truncated chain. font-size:0 collapses the " / " text
   separators; all links hidden except the first subcategory. */
.card-tags .cat-chip { font-size: 0; }
.card-tags .cat-chip a { display: none; }
.card-tags .cat-chip a:nth-of-type(2),
.card-tags .cat-chip a:only-of-type { display: inline; font-size: var(--fs-sm); }

/* ============================================================
   P17 DARK — featured carousel hover + image placeholder
   ============================================================ */
html[data-theme="dark"] .featured-game-item:hover { background: #28303a; box-shadow: 0 12px 26px rgba(0, 0, 0, .45); }
html[data-theme="dark"] .featured-game-item__image { background: var(--game-surface); }


/* ============================================================
   50. MICRO-ANIMATIONS — scroll reveal + title hover accent
   (JS adds .js-reveal; no-JS and reduced-motion stay static)
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal {
    opacity: 0;
    transition: opacity .45s cubic-bezier(.22, 1, .36, 1),
                transform .45s cubic-bezier(.22, 1, .36, 1),
                box-shadow var(--t-base), border-color var(--t-base);
  }
  .js-reveal:not(.revealed) { transform: translateY(14px); }
  .js-reveal.revealed { opacity: 1; }
  .story_list > .shortstory .title a { transition: color var(--t-base); }
  .story_list > .shortstory:hover .title a { color: var(--clr-brand); }
}

/* ============================================================
   51. MENU — active category highlight (JS: .mm-menu-active)
   ============================================================ */
#topmenu > ul > li ul a.mm-menu-active {
  background: rgba(236, 46, 28, .14);
  color: #fff;
}
#topmenu > ul > li.mm-menu-section-active > :where(a, .menu-parent-toggle) { color: #fff; }
#topmenu > ul > li.mm-menu-section-active > :where(a, .menu-parent-toggle)::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 7px;
  height: 2px; border-radius: 2px;
  background: var(--clr-brand);
}
