/* Aurora Design v5 + scoped scrollbar refinement; no server changes. */
/* Native scrollbars: preserve accessibility and touch scrolling. */
html, body, body * {
  scrollbar-color: #88613b #1a130e;
  scrollbar-width: auto;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: #1a130e; }
::-webkit-scrollbar-thumb {
  background: #88613b;
  border: 3px solid #1a130e;
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: #ba8a4f; }
::-webkit-scrollbar-corner { background: #1a130e; }
@media (forced-colors: active) {
  html, body, body * { scrollbar-color: auto; }
}
:root {
  --aurora-bg: #100c09;
  --aurora-panel: #1a130e;
  --aurora-panel-2: #221810;
  --aurora-line: #503820;
  --aurora-line-soft: rgba(214, 166, 83, .18);
  --aurora-gold: #d6a653;
  --aurora-gold-light: #f0d39a;
  --aurora-text: #dcc9ae;
  --aurora-muted: #aa947b;
  --aurora-shadow: 0 22px 60px rgba(0, 0, 0, .42);
}

html { scroll-behavior: smooth; }

body {
  min-width: 0;
  margin: 0 0 40px;
  background-color: var(--aurora-bg);
  background-image:
    linear-gradient(180deg, rgba(9, 7, 5, .02) 0, rgba(16, 12, 9, .68) 560px, var(--aurora-bg) 980px),
    url('/assets/img/fon.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: max(1920px, 100vw) auto;
  color: var(--aurora-text);
}

* { box-sizing: border-box; }

a, button, input, select { transition: color .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--aurora-gold-light) !important; outline-offset: 3px; }

#main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.header {
  height: 270px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 28px;
}
.header a {
  position: relative;
  top: auto;
  left: auto;
  width: 520px;
  max-width: 72vw;
  transform: none;
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .46));
}
.header img { width: 100%; height: auto; left: 0; top: 0; transform: none; }
.header img:first-child { position: relative; display: block; }
.header a:hover { transform: translateY(-2px); }

#home {
  width: 100%;
  overflow: hidden;
  background: rgba(24, 18, 14, .97);
  border: 1px solid var(--aurora-line);
  border-radius: 18px;
  box-shadow: var(--aurora-shadow);
}
#home:before, .top-background { display: none; }
#home.flex { align-items: stretch; gap: 0; }
#home_top {
  flex: 0 0 330px;
  width: 330px;
  padding-bottom: 20px;
  background: linear-gradient(180deg, #17100c, #120d0a);
  border-right: 1px solid var(--aurora-line);
}
.home_center { flex: 1 1 auto; width: auto; min-width: 0; padding: 6px 8px 24px; }

.auth_title, .rating_title, .pub_title, .guid_title {
  padding: 22px 18px 12px;
  background: none;
  color: var(--aurora-gold-light);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.auth_flex {
  gap: 10px;
  padding: 4px 18px 24px;
  background: none;
}
.auth_flex > a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  width: 100%;
  margin-top: 10px !important;
  padding: 10px 14px;
  background: #261b13;
  border: 1px solid #654726;
  border-radius: 9px;
  color: #f0dcc0;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.auth_flex > a:hover { color: #fff0c7; background: #322318; border-color: #a87938; transform: translateY(-1px); }
.auth_flex > #downloadLink {
  min-height: 52px;
  margin-top: 14px !important;
  background: linear-gradient(180deg, #e4b65d, #bc7e2d);
  border-color: #f0ca7c;
  color: #211407;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(190, 126, 45, .2), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.auth_flex > #downloadLink:hover { color: #211407; filter: brightness(1.07); }
.auth_flex > .rules { margin-bottom: 0 !important; background: transparent; border-color: #413021; color: #bfa98d; }
.auth_flex > span { width: 100%; margin: 2px 0 4px !important; color: var(--aurora-gold-light); text-align: center; overflow-wrap: anywhere; }

.rating_title, .pub_title { border-top: 1px solid var(--aurora-line-soft); }
.rating_flex { gap: 7px; padding: 5px 16px; background: none; }
.rating_flex a {
  flex: 1 1 0;
  width: auto;
  padding: 10px 5px;
  border: 1px solid #3f2d1e;
  border-radius: 8px;
  cursor: pointer;
}
.rating_flex a:hover { background: #2a1e15; border-color: #78532c; }
.rating_flex a div { font-size: 14px; }
#home_top .index_table { min-height: 0; margin-top: 8px; }
#home_top .index_table > div {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  min-height: 40px;
  padding: 9px 16px;
}
#home_top .index_table > div:nth-child(odd) { background: #21170f; }
#home_top .index_table span { height: auto; color: #d9c4a2; font-size: 14px; overflow-wrap: anywhere; }

.pub_flex { padding: 8px 12px 18px; background: none; }
#vk_group_container { width: 100%; max-width: 306px; margin: 0 auto; overflow: hidden; }

.slider_title {
  margin: 24px 0 6px;
  color: var(--aurora-gold-light);
  font-size: 34px;
  line-height: 1.25;
}
.slider_text {
  margin: 0 28px 22px;
  padding: 0;
  background: none;
  border: 0;
  color: #cdb99d;
  font-size: 17px;
  line-height: 1.7;
}
.slider {
  height: 420px;
  margin: 0 20px 28px;
  padding: 12px 12px 50px;
  background: #100c09;
  border: 1px solid var(--aurora-line);
  border-radius: 14px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .26);
}
.slick-slide { height: 345px !important; border-radius: 9px; }
.slick-prev { left: 28px; }
.slick-next { right: 28px; }
.slick-dots { justify-content: center; width: auto; }
.slick-dots li button { background: #705335; }
.slick-active button { background: var(--aurora-gold) !important; }

.first { padding: 24px 28px; }
.first_title, .first_title-general { color: var(--aurora-gold-light); line-height: 1.35; }
.first_title { font-size: 27px; }
.first_title-general { font-size: 32px; }
.first li, .first_text, .classes li span { color: var(--aurora-text); line-height: 1.75; }
.first li { font-size: 17px; }
.first li img { vertical-align: middle; }

.donate {
  height: auto !important;
  min-height: 300px;
  margin: 8px 20px 12px;
  padding: 28px 22px;
  background: linear-gradient(145deg, #281d14, #1b130e);
  border: 1px solid #74502a;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.donate_title { max-width: 100%; color: var(--aurora-gold-light); font-size: 27px; overflow-wrap: break-word; }
.donate_sub-title { color: #e3c48d; font-size: 21px; }
.donate input { border-color: #705033; border-radius: 7px; background: #110d0a; color: #f2dfc4; }
.donate_btn {
  min-height: 48px;
  padding: 12px 18px;
  background: linear-gradient(180deg, #e4b65d, #bc7e2d);
  border: 1px solid #f0ca7c;
  border-radius: 9px;
  color: #211407;
  font-size: 16px;
  font-weight: 800;
}
.donate_btn:hover { color: #211407; filter: brightness(1.08); transform: translateY(-1px); }
.donate_description { width: min(630px, calc(100% - 24px)); border: 1px solid #74502a; box-shadow: 0 18px 45px rgba(0,0,0,.45); }

.classes {
  width: 100%;
  margin: 24px auto 0;
  padding: 34px 36px 42px;
  background: rgba(24, 18, 14, .97);
  border: 1px solid var(--aurora-line);
  border-radius: 18px;
  box-shadow: var(--aurora-shadow);
}
.classes li {
  margin: 0 0 16px;
  padding: 24px 24px 24px 176px;
  background: #21170f;
  border: 1px solid #4c3520;
  border-radius: 12px;
}
.classes li img { left: 12px; border-radius: 8px; }
.classes .first_text { color: var(--aurora-text); line-height: 1.85; }
.kings li { padding-left: 140px !important; }

.home_footer {
  width: 100%;
  margin: 18px auto 0;
  background: transparent;
  border-top: 1px solid rgba(214, 166, 83, .14);
}
.home_footer > span {
  box-sizing: border-box;
  width: 100%;
  padding: 24px 20px;
  color: #8f7b66;
  font-size: 13px;
  line-height: 1.65;
}

/* Login, registration and account pages */
#home.full { width: min(1060px, 100%); margin: 0 auto; background: rgba(24, 18, 14, .98); }
#home_about, #home_about1 { background: transparent; }
#log_menu, #reg_menu, #vost_menu { width: min(560px, 100%); }
#log_menu .title, #reg_menu .title, #vost_menu .title { color: var(--aurora-gold-light); }
#log_menu input:not([type='submit']):not([type='checkbox']),
#reg_menu input:not([type='submit']):not([type='checkbox']),
#vost_menu input:not([type='submit']):not([type='checkbox']),
.lk-form input:not([type='submit']):not([type='checkbox']), .lk-form select, .account_select {
  min-height: 42px;
  border: 1px solid #604326;
  border-radius: 8px;
  background: #110d0a;
  color: #f0ddc1;
}
#log_menu input[type='submit'], #reg_menu input[type='submit'], #vost_menu input[type='submit'], .lk-form input[type='submit'] {
  min-height: 46px;
  background: linear-gradient(180deg, #e4b65d, #bc7e2d);
  border: 1px solid #f0ca7c;
  border-radius: 9px;
  color: #211407;
  font-size: 16px;
  font-weight: 800;
}
.emailLink { border: 1px solid #604326; border-radius: 7px; background: #2a1d13; color: #e8cc98; }
.nav { gap: 10px; padding: 18px 20px 8px; }
.nav a { width: 25%; }
.lk_title { padding: 14px 8px; background: #241a12; border: 1px solid #49331f; border-radius: 9px; }
.lk_title.settingsActive { background: #49321c; border-color: #a9783c; color: #f2d69f; filter: none; }
.info-nav { margin: 12px 20px 24px; padding: 18px; background: #110d0a; border: 1px solid #3d2b1c; border-radius: 10px; }
.lk-form { width: min(600px, 100%); padding: 22px; background: #1e160f; border: 1px solid #46311e; border-radius: 12px; }
.lk-form-title { color: var(--aurora-gold-light); }
#pers { background: #1e160f; border-color: #4b341f; border-radius: 12px; }
.sklad_item { background: #1e160f; border-color: #4b341f; border-radius: 10px; }

/* Aurora: responsive overrides. */
@media (max-width: 1040px) {
  html { -webkit-text-size-adjust: 100%; }
  body { margin-bottom: 24px; background-position: center top; background-size: auto 650px; }
  #main, #header, #home, .home_footer, .classes { width: 100%; max-width: 100%; box-sizing: border-box; }
  #main { padding: 0 12px; }
  #home > *, .home_center, #home_top { min-width: 0; }
  .header { height: 205px; }
  .header a { top: 120px; width: min(90%, 450px); }
  .header img { width: 100%; height: auto; }
  #head-line { width: 100%; height: auto; flex-wrap: wrap; }
  #head-line a { padding: 14px 16px; }
  .classes { padding: 16px; }
  .classes li { margin-left: 0; margin-right: 0; }
  .home_footer > span { box-sizing: border-box; width: 100%; padding: 24px 16px; font-size: 16px; line-height: 1.6; }
  .home_footer img { position: static; display: block; max-width: 100%; margin: 0 auto; }
  .lk-form { width: 100%; max-width: 620px; box-sizing: border-box; }
  #pers { margin: 16px; flex-wrap: wrap; padding: 16px; }
  #pers_info { min-width: 0; flex: 1 1 360px; }
  #pers_info_name { margin: 0 26px 12px 0; overflow-wrap: anywhere; }
  #pers table tbody { flex-wrap: wrap; }
  #pers table tr { flex: 1 1 180px; margin: 0; }
  #pers table td { overflow-wrap: anywhere; }
  #history { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #history th, #history td { padding: 10px 8px; }
  .sklad_item { margin: 12px 16px; padding-right: 56px; }
  .sklad_flex, .sklad_item_text { min-width: 0; }
  .sklad_img { flex: 0 0 50px; }
  .sklad_item_text { flex-wrap: wrap; gap: 8px 16px; overflow-wrap: anywhere; }
  .sklad_item_text div:nth-child(n) { width: auto; max-width: 100%; }
  .sklad_item_text div:first-child { flex-basis: 100%; }
  .sklad_title span, .donate_description, .hidd, #reg_menu span span .hidden,
  .lk-form span span .hidden, .lk-form .span2 .hidden { box-sizing: border-box; max-width: calc(100vw - 56px); }
  .hidden_rules { box-sizing: border-box; position: fixed; top: 12px; left: 12px; width: calc(100% - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 60px 20px 24px; z-index: 10001; }
  .hidden_rules.active { height: auto; }
  .hidden_black.active { z-index: 10000; }
  .hidden_rules > svg { top: 12px; right: 12px; width: 36px; height: 36px; }
  .hidden_rules .rules_general-title { font-size: 24px; }
  .hidden_rules .rules_title { font-size: 20px; margin-top: 24px; }
  .hidden_rules b, .hidden_rules .rules_text { font-size: 16px; overflow-wrap: anywhere; }
}
@media (max-width: 760px) {
  body { font-size: 16px; line-height: 1.5; }
  #main { padding: 0 10px; }
  .header { height: 170px; }
  .header a { top: 100px; max-width: 360px; }
  #home.flex { flex-direction: column; }
  #home_top, .home_center { width: 100%; box-sizing: border-box; }
  .top-background { left: 0; width: 100%; }
  .auth_flex { padding: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .auth_flex > a { box-sizing: border-box; margin: 0 !important; padding: 12px 8px; min-height: 48px; font-size: 16px; overflow-wrap: anywhere; }
  .auth_flex > span { grid-column: 1 / -1; overflow-wrap: anywhere; }
  .rating_flex { padding: 4px 12px; }
  .rating_flex a { min-width: 64px; padding: 12px 4px; }
  #home_top .index_table { min-height: 0; }
  #home_top .index_table > div { height: auto; min-height: 40px; padding: 8px 12px; width: 100%; box-sizing: border-box; }
  #home_top .index_table span { height: auto; overflow-wrap: anywhere; }
  #vk_group_container { max-width: 100%; overflow-x: auto; }
  .slider_title, .first_title, .first_title-general, .donate_title { font-size: 24px; line-height: 1.3; }
  .slider_text, .donate { margin: 12px; padding: 16px 12px; font-size: 16px; }
  .slider { margin: 12px; padding: 10px 10px 48px; height: auto; }
  .slick-slide { height: clamp(170px, 52vw, 340px) !important; }
  .slick-prev { left: 12px; }
  .slick-next { right: 12px; }
  .slick-arrow { width: 44px; height: 40px; }
  .slick-dots { width: auto; justify-content: center; margin-top: 12px; }
  .slick-dots li { width: 24px; height: 24px; margin: 0 2px; }
  .slick-dots li button { width: 12px; height: 12px; top: 6px; left: 6px; }
  .first { padding: 16px; }
  .first li, .classes .first_text, .classes li span { font-size: 16px; }
  .classes li, .kings li { padding: 16px !important; }
  .classes li img, .kings li img { position: static; transform: none; display: block; margin: 0 auto 12px; }
  .donate_calculator { width: 100%; }
  .donate_calculator input { max-width: 100%; box-sizing: border-box; }
  .donate_btn { box-sizing: border-box; max-width: 100%; min-height: 48px; padding: 12px; }
  .donate_sub-title, .donate_bonus { font-size: 20px; }
  #home_about { padding: 16px; min-height: 0; }
  #log_menu, #reg_menu, #vost_menu { width: 100%; max-width: 500px; box-sizing: border-box; margin-top: 24px; min-height: 0; padding-bottom: 24px; }
  #log_menu label:not(.checkbox-label), #reg_menu label:not(.checkbox-label),
  #vost_menu label:not(.checkbox-label), .lk-form label:not(.checkbox-label) { flex-direction: column; align-items: stretch; gap: 8px; margin-top: 16px; }
  #log_menu span, #reg_menu span, #vost_menu span,
  .lk-form span:not(.no-align):not(:last-child) { width: auto; text-align: left; }
  #log_menu .title, #reg_menu .title, #vost_menu .title { width: 100%; text-align: center; }
  #log_menu input:not([type="checkbox"]), #reg_menu input:not([type="checkbox"]),
  #vost_menu input:not([type="checkbox"]), .lk-form input:not([type="checkbox"]),
  .lk-form select, .account_select { box-sizing: border-box; width: 100% !important; max-width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; }
  .emailLink { display: inline-block; box-sizing: border-box; width: auto; padding: 10px 12px; min-height: 44px; }
  .lk-form .span2 { min-width: 0; max-width: 100%; }
  .lk-form-title { font-size: 22px; line-height: 1.4; }
  .nav { flex-wrap: wrap; }
  .nav a { width: 50%; }
  .lk_title { font-size: 14px; padding: 14px 0; }
  .info-nav { flex-wrap: wrap; gap: 16px; padding: 16px; }
  .info-nav > div { width: calc(50% - 8px); font-size: 14px; overflow-wrap: anywhere; }
  #settingsDiv { padding: 0 16px 20px; }
  .notification-block, .notification-block-lk { width: 100%; overflow-wrap: anywhere; }
  .checkbox-label { flex-shrink: 0; min-width: 28px; height: 28px; }
  #pers { margin: 12px; padding: 12px; }
  #pers_info { flex-basis: 100%; }
  #pers table tr { flex-basis: 50%; }
  #pers table td { padding: 6px; font-size: 14px; }
  .sklad-message .lk-form { width: calc(100% - 32px); }
  .sklad-message-empty, .empty-person { padding: 48px 16px; }
  #home_guid_l { width: 100%; float: none; }
  #home_guid_l a { padding: 8px 16px; }
  [id^="home_guid_r_pp"] { margin-left: 0 !important; }
}

/* Version 4: precise UI fixes and account polish. */

/* Keep the gallery stable before Slick finishes loading. */
.slider {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: hidden;
}
.slider:not(.slick-initialized) {
  aspect-ratio: 16 / 9;
  padding: 12px;
}
.slider:not(.slick-initialized) .slide {
  display: none;
}
.slider:not(.slick-initialized) .slide:first-child {
  display: block;
}
.slider .slick-list,
.slider .slick-track {
  min-width: 0;
}
.slider .slide,
.slider .slick-slide {
  width: 100%;
  height: auto !important;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  object-position: center;
  background: #090705;
  border-radius: 9px;
}

/* One clean, symmetric chevron for each direction. */
.slider .slick-arrow {
  z-index: 4;
  top: 50%;
  bottom: auto;
  width: 42px;
  height: 42px;
  margin-top: -21px;
  padding: 0;
  border: 1px solid rgba(240, 211, 154, .42);
  border-radius: 50%;
  background: rgba(15, 10, 7, .76);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .34);
  transform: none;
}
.slider .slick-prev { left: 20px; }
.slider .slick-next { right: 20px; }
.slider .slick-arrow:before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -6px 0 0 -7px;
  border: solid #f0d39a;
  border-width: 2px 2px 0 0;
  background: transparent;
  border-radius: 0;
  transform: rotate(45deg);
}
.slider .slick-prev:before {
  margin-left: -4px;
  transform: rotate(-135deg);
}
.slider .slick-arrow:after { display: none; content: none; }
.slider .slick-arrow:hover,
.slider .slick-arrow:focus-visible {
  border-color: #efc97c;
  background: rgba(45, 31, 20, .94);
  transform: translateY(-1px);
}

/* VK sometimes injects a narrower iframe; center both wrapper and iframe. */
.pub_flex {
  display: flex;
  justify-content: center;
}
#vk_group_container,
#vk_group,
#vk_group iframe {
  margin-right: auto !important;
  margin-left: auto !important;
}
#vk_group { display: flex; justify-content: center; width: 100%; }
#vk_group iframe { display: block; max-width: 100%; }

/* Secondary authorization actions are small buttons, not loose text. */
#log_menu > a#log_btn,
#vost_menu > a#reg_btn,
#reg_menu > a#reg_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 8px 4px 0 !important;
  padding: 8px 14px;
  border: 1px solid #55402d;
  border-radius: 8px;
  background: #241a13;
  color: #d9c3a2;
  font-size: 14px;
  line-height: 1.25;
}
#log_menu > a#log_btn:hover,
#vost_menu > a#reg_btn:hover,
#reg_menu > a#reg_btn:hover {
  border-color: #9a6d37;
  background: #302117;
  color: #f3dbaf;
  transform: translateY(-1px);
}

/* Consistent hover: the surface lifts slightly; text stays readable. */
#log_menu input[type='submit']:hover,
#reg_menu input[type='submit']:hover,
#vost_menu input[type='submit']:hover,
.lk-form input[type='submit']:hover,
.donate_btn:hover,
.auth_flex > #downloadLink:hover {
  color: #211407 !important;
  filter: brightness(1.06);
  box-shadow: 0 10px 24px rgba(190, 126, 45, .24), inset 0 1px 0 rgba(255, 255, 255, .25);
  transform: translateY(-2px);
}

.captcha-box {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: 170px !important;
  text-align: center !important;
}
.captcha-box img {
  display: block;
  width: 150px;
  height: 50px;
  border: 1px solid #705033;
  border-radius: 8px;
  cursor: pointer;
}
.captcha-box small { color: #aa947b; font-size: 11px; line-height: 1.2; }

.account-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 20px;
  padding: 24px 2px 12px;
  border-bottom: 1px solid rgba(214, 166, 83, .16);
}
.account-heading h1 { margin: 3px 0 0; color: #f0d39a; font-size: 29px; line-height: 1.2; }
.account-heading p { max-width: 430px; margin: 0; color: #aa947b; font-size: 14px; line-height: 1.55; text-align: right; }
.account-eyebrow { color: #b88646; font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }

#pers_country {
  width: 52px;
  height: 52px;
  right: 16px;
  top: 16px;
  background-size: contain !important;
  background-position: center;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .4));
}
#pers_info_name { padding-right: 64px; }
.character-server {
  display: inline-block;
  margin-left: 8px;
  padding: 4px 8px;
  border: 1px solid #634627;
  border-radius: 999px;
  color: #d7bb89;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

.referral-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px 20px;
}
.referral-card { background: linear-gradient(145deg, #241a12, #18110c); }
.referral-lead { margin: -4px 0 18px; color: #bba68a; line-height: 1.55; text-align: center; }
.referral-help {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid #46311e;
  border-radius: 8px;
  background: #17100c;
  color: #d6bea0;
}
.referral-count {
  margin: 16px 0 !important;
  padding: 12px;
  border-radius: 8px;
  background: rgba(214, 166, 83, .08);
}
.referral-count b { color: #f0d39a; }

.admin-tools-heading {
  width: min(600px, calc(100% - 40px));
  margin: 8px auto 18px;
  padding: 16px 18px;
  border: 1px solid #72502c;
  border-radius: 10px;
  background: #281c13;
  color: #f0d39a;
  font-size: 18px;
  font-weight: 700;
}
.admin-tools-heading small { display: block; margin-top: 5px; color: #aa947b; font-size: 12px; font-weight: 400; }

@media (max-width: 760px) {
  #vk_group_container { width: min(306px, 100%); overflow: hidden; }
  .slider { margin-right: 10px; margin-left: 10px; padding: 8px 8px 46px; }
  .slider:not(.slick-initialized) { padding: 8px; }
  .slider .slick-prev { left: 10px; }
  .slider .slick-next { right: 10px; }
  .slider .slick-arrow { width: 38px; height: 38px; margin-top: -38px; }
  .captcha-box { width: 100% !important; }
  .account-heading { display: block; margin: 0 12px; padding: 20px 4px 12px; text-align: center; }
  .account-heading h1 { font-size: 25px; }
  .account-heading p { margin: 10px auto 0; font-size: 13px; text-align: center; }
  #pers_info_name { margin-left: 0; padding: 0 54px 0 0; text-align: left; }
  #pers_country { width: 44px; height: 44px; right: 12px; top: 12px; }
  .character-server { display: block; width: max-content; max-width: 100%; margin: 6px 0 0; }
  .referral-wrap { padding: 0 12px 18px; }
  .referral-card { padding: 18px 14px; }
  .admin-tools-heading { width: calc(100% - 24px); }
}

/* Version 5: desktop balance, compact gallery and readable long dialogs. */

.account-heading {
  display: block;
  margin: 0 20px;
  padding: 24px 0 14px;
  text-align: center;
}
.account-heading h1 { margin: 0; }

.referral-card { background: #1e160f; }
.referral-help {
  display: inline-block;
  width: auto;
  margin: 7px 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d6bea0;
}
.referral-help > span { position: relative; }

@media (min-width: 761px) {
  #log_menu > a#log_btn,
  #vost_menu > a#reg_btn,
  #reg_menu > a#reg_btn {
    align-self: center;
    width: min(180px, 55%) !important;
    min-height: 32px;
    padding: 6px 12px;
    font-size: 13px;
  }
}

.slider {
  padding: 0;
  background: #090705;
}
.slider:not(.slick-initialized) { padding: 0; }
.slider .slide,
.slider .slick-slide {
  margin: 0;
  border-radius: 12px;
}
.slider .slick-dots {
  position: absolute;
  z-index: 5;
  bottom: 12px;
  left: 50%;
  width: auto;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(240, 211, 154, .2);
  border-radius: 999px;
  background: rgba(10, 7, 5, .74);
  transform: translateX(-50%);
  backdrop-filter: blur(4px);
}
.slider .slick-dots li { margin: 0 4px; }
.slider .slick-arrow { margin-top: -21px; }

.hidden_rules {
  position: fixed;
  top: 24px;
  left: 50%;
  width: min(1040px, calc(100% - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  padding: 64px 32px 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #211810;
  border: 1px solid #805b36;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .72);
  transform: translateX(-50%);
  z-index: 10001;
}
.hidden_rules.active { height: auto; }
.hidden_black.active { z-index: 10000; }

@media (max-width: 760px) {
  .account-heading { margin: 0 12px; padding: 20px 0 12px; }
  .referral-card { padding: 18px 14px; }
  .referral-help { margin: 8px 0; }

  .slider {
    margin: 0 10px 18px;
    padding: 0;
  }
  .slider:not(.slick-initialized) { padding: 0; }
  .slider .slide,
  .slider .slick-slide { border-radius: 10px; }
  .slider .slick-dots { bottom: 8px; padding: 5px 7px; }
  .slider .slick-dots li { width: 18px; height: 18px; margin: 0 2px; }
  .slider .slick-dots li button { top: 4px; left: 4px; width: 10px; height: 10px; }
  .slider .slick-arrow { margin-top: -19px; }

  /* Intro and screenshots come before the rating on phones. */
  #home.flex > .home_center { display: contents; }
  #home.flex > #home_top > .auth_title,
  #home.flex > #home_top > .auth_flex { order: 1; }
  #home.flex > .home_center > .slider_title,
  #home.flex > .home_center > .slider_text,
  #home.flex > .home_center > .slider { order: 2; }
  #home.flex > #home_top > .rating_title,
  #home.flex > #home_top > .rating_flex,
  #home.flex > #home_top > .index_table { order: 3; }
  #home.flex > .home_center > .first,
  #home.flex > .home_center > .donate { order: 4; }
  #home.flex > #home_top > .pub_title,
  #home.flex > #home_top > .pub_flex { order: 5; }
  #home.flex > #home_top > .rating_title {
    margin-top: 14px;
    border-top: 1px solid #493321;
  }

  .hidden_rules {
    top: 12px;
    left: 12px;
    width: calc(100% - 24px);
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    padding: 58px 18px 24px;
    transform: none;
  }
}

/* Version 2: mobile art direction — dark bronze, clear gold actions. */
@media (max-width: 760px) {
  body { background-color: #120e0b; background-image: linear-gradient(180deg, rgba(18,14,11,.1), #120e0b 420px), url('/assets/img/fon.jpg'); background-position: center top; background-size: auto 520px; }
  #main { padding: 0 14px; }
  .header { height: auto; min-height: 158px; display: flex; align-items: center; justify-content: center; padding: 28px 0 20px; box-sizing: border-box; }
  .header a { position: relative; top: auto; left: auto; transform: none; display: block; width: 100%; max-width: 360px; }
  .header img { width: 100%; height: auto; transform: none; left: 0; top: 0; }
  .header img:first-child { position: relative; display: block; opacity: 1 !important; }
  .header img:nth-child(2) { display: none; }
  #home, #home.full { background: #1c1510; border: 1px solid #493321; border-radius: 16px; box-shadow: 0 12px 36px rgba(0,0,0,.28); }
  #home:before, .top-background { display: none; }
  #home_top { background: transparent; border-radius: 16px 16px 0 0; }
  .auth_title, .rating_title, .pub_title { background: none; color: #d8bc8b; font-size: 14px; font-weight: 700; letter-spacing: .08em; padding: 20px 16px 10px; }
  .auth_flex { background: none; padding: 8px 16px 20px; gap: 10px; align-items: stretch; }
  .auth_flex > a { background: #2b2018; border: 1px solid #64472c; border-radius: 10px; color: #f1dec0; font-weight: 600; font-size: 16px; text-align: center; min-height: 50px; padding: 12px 8px; display: flex; align-items: center; justify-content: center; line-height: 1.5; box-shadow: inset 0 1px 0 rgba(255,255,255,.04); }
  .auth_flex > #downloadLink { grid-column: 1 / -1; background: linear-gradient(180deg, #e5b861, #c9903d); border-color: #efc97c; color: #24170b; font-weight: 800; min-height: 54px; }
  .auth_flex > .downloadLink, .auth_flex > .rules, .auth_flex > a[href='/account'] { grid-column: 1 / -1; }
  .auth_flex > .rules { color: #cdb896; background: transparent; border-color: #493321; }
  .auth_flex > span { text-align: center; color: #f1dec0; margin: 0 !important; }
  .rating_title { border-top: 1px solid #493321; }
  .rating_flex { background: none; gap: 6px; justify-content: center; padding: 6px 16px; }
  .rating_flex a { box-sizing: border-box; flex: 1; max-width: 150px; border: 1px solid #493321; border-radius: 8px; padding: 10px 4px; text-align: center; }
  #home_top .index_table { margin-top: 8px; font-size: 14px; }
  #home_top .index_table > div { padding: 10px 16px; }
  #home_top .index_table > div:nth-child(odd) { background: #261c14; }
  #home_top .index_table > div > span { color: #e2cbaa; }
  .pub_flex { background: none; padding: 10px 0 18px; }
  .slider_title { font-size: 26px; padding: 0 16px; margin: 24px 0 12px; color: #f1d49e; }
  .slider_text { background: none; border: 0; padding: 0 8px; margin: 0 16px 20px; color: #dfcbb3; font-size: 16px; line-height: 1.65; }
  .slider { padding: 0 0 52px; margin: 0 12px 20px; border-radius: 12px; background: #120e0b; border: 1px solid #493321; }
  .slick-slide { border-radius: 8px; }
  .slick-dots li button { background: #6e5438; }
  .slick-dots .slick-active button { background: #e5b861 !important; }
  .first { padding: 20px 16px; }
  .first_title, .first_title-general, .classes .first_title { color: #f1d49e; font-size: 23px; line-height: 1.4; }
  .first li, .first_text, .classes li span { color: #dfcbb3; line-height: 1.7; }
  .classes { background: #1c1510; border: 1px solid #493321; border-radius: 16px; margin-top: 16px; }
  .classes li { background: #241b14; border-color: #493321; border-radius: 12px; }
  .donate { background: #241b14; border: 1px solid #674929; border-radius: 12px; padding: 20px 14px; }
  .donate_title { color: #f1d49e; }
  .donate_btn, #log_menu input[type='submit'], #reg_menu input[type='submit'], #vost_menu input[type='submit'], .lk-form input[type='submit'] { background: linear-gradient(180deg, #e5b861, #c9903d); border: 1px solid #efc97c; border-radius: 10px; color: #24170b; font-size: 16px; font-weight: 700; text-align: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
  .donate_btn:hover, #log_menu input[type='submit']:hover, #reg_menu input[type='submit']:hover, #vost_menu input[type='submit']:hover, .lk-form input[type='submit']:hover { color: #24170b !important; filter: brightness(1.08); }
  .donate_btn { display: block; width: 100%; margin: 12px auto 0; }
  .lk-form input:not([type='checkbox']):not([type='submit']), .lk-form select,
  #log_menu input:not([type='submit']):not([type='checkbox']), #reg_menu input:not([type='submit']):not([type='checkbox']), #vost_menu input:not([type='submit']):not([type='checkbox']) { border: 1px solid #705033; border-radius: 8px; background: #140f0b; color: #f1dec0; }
  .emailLink { background: #33251a; border: 1px solid #705033; border-radius: 8px; color: #f1d49e; font-size: 14px; text-align: center; }
  .nav { padding: 12px; gap: 8px; }
  .nav a { width: calc(50% - 4px); }
  .lk_title { box-sizing: border-box; background: #291e15; border: 1px solid #493321; border-radius: 8px; color: #dcc4a2; }
  .lk_title.settingsActive { background: #4a321b; border-color: #bd8847; color: #ffe0a3; filter: none; }
  .info-nav { margin: 0 12px 20px; padding: 16px 12px; background: #140f0b; border-radius: 10px; }
  .info-nav > div { color: #d8bc98; }
  .home_footer { background: none; }
  .home_footer > span { color: #baa58d; font-size: 14px; }
  .hidden_rules { background: #211810; border: 1px solid #805b36; border-radius: 14px; }
  a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #f1c875 !important; outline-offset: 3px; }
}
@media (max-width: 1040px) {
  .donate_description { width: calc(100% - 24px); }
  .donate_title { max-width: 100%; overflow-wrap: break-word; }
  #donate { height: auto !important; min-height: 300px; }
  #reg_menu > div, #vost_menu > div, #log_menu > div { box-sizing: border-box; max-width: 100%; }
}
@media (max-width: 760px) {
  #main, #main * { font-family: 'Open Sans', Arial, sans-serif; }
  .lk-form-title, .donate_title { overflow-wrap: anywhere; }

  /* On phones the community widget follows the useful page content. */
  #home.flex { flex-direction: column; }
  #home.flex > #home_top { display: contents; }
  #home.flex > #home_top > * { width: 100%; }
  #home.flex > #home_top > .auth_title,
  #home.flex > #home_top > .auth_flex,
  #home.flex > #home_top > .rating_title,
  #home.flex > #home_top > .rating_flex,
  #home.flex > #home_top > .index_table { order: 1; }
  #home.flex > .home_center { order: 2; }
  #home.flex > #home_top > .pub_title,
  #home.flex > #home_top > .pub_flex { order: 3; }
  #home.flex > #home_top > .pub_title { margin-top: 12px; }
  #home.flex > #home_top > .pub_flex { padding-bottom: 24px; }
}

/* Final mobile cascade for v5 (must follow the legacy mobile rules). */
@media (max-width: 760px) {
  .slider,
  .slider:not(.slick-initialized) {
    margin: 0 10px 18px;
    padding: 0;
  }
  .slider .slide,
  .slider .slick-slide {
    height: auto !important;
    margin: 0;
    border-radius: 10px;
  }
  .slider .slick-dots {
    position: absolute;
    z-index: 5;
    bottom: 8px;
    left: 50%;
    width: auto;
    margin: 0;
    padding: 5px 7px;
    border: 1px solid rgba(240, 211, 154, .2);
    border-radius: 999px;
    background: rgba(10, 7, 5, .74);
    transform: translateX(-50%);
  }
  .slider .slick-dots li { width: 18px; height: 18px; margin: 0 2px; }
  .slider .slick-dots li button { top: 4px; left: 4px; width: 10px; height: 10px; }
  .slider .slick-arrow { margin-top: -19px; }

  #home.flex > .home_center { display: contents; }
  #home.flex > #home_top > .auth_title,
  #home.flex > #home_top > .auth_flex { order: 1; }
  #home.flex > .home_center > .slider_title,
  #home.flex > .home_center > .slider_text,
  #home.flex > .home_center > .slider { order: 2; }
  #home.flex > #home_top > .rating_title,
  #home.flex > #home_top > .rating_flex,
  #home.flex > #home_top > .index_table { order: 3; }
  #home.flex > .home_center > .first,
  #home.flex > .home_center > .donate { order: 4; }
  #home.flex > #home_top > .pub_title,
  #home.flex > #home_top > .pub_flex { order: 5; }
  #home.flex > #home_top > .rating_title {
    margin-top: 14px;
    border-top: 1px solid #493321;
  }
}

/* v7: GM history must stay inside its panel at every screen size. */
#loginHistoryForm { min-width:0; max-width:100%; box-sizing:border-box; }
#loginHistoryForm label.jk-center { display:block; max-width:100%; width:100%; min-width:0; overflow:auto; box-sizing:border-box; }
#loginHistoryForm #history { min-width:780px; width:100%; border-collapse:collapse; }
#loginHistoryForm #history td, #loginHistoryForm #history th { padding:10px; white-space:nowrap; }
.gm-log-links { display:flex; flex-wrap:wrap; align-items:center; gap:12px; width:100%; box-sizing:border-box; padding:18px; margin:16px 0 24px; border:1px solid #705335; border-radius:8px; background:#241c16; }
.gm-log-links strong { width:100%; color:#dfc696; }
.gm-log-links a { padding:8px 12px; border:1px solid #715334; border-radius:5px; color:#ddba7c; text-decoration:none; }
.gm-log-links a:hover { background:#37291c; }
