﻿@charset "UTF-8";

/* ----------------------------------------------------------------------------------------------------- Unsimple Group */
/* King / Regular / Bold */
/* -------------------------------------------------------------------------------------------------------------------- */

@font-face {
	font-family: 'King';
	src: url('../fonts/SPSLOldKingC.eot');
	src: local('☺'), url('../fonts/SPSLOldKingC.woff') format('woff'), url('../fonts/SPSLOldKingC.ttf') format('truetype'), url('../fonts/SPSLOldKingC.svg') format('svg');
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'King Bold';
	src: url('../fonts/SPSLOldKingC-Bold.eot');
	src: local('☺'), url('../fonts/SPSLOldKingC-Bold.woff') format('woff'), url('../fonts/SPSLOldKingC-Bold.ttf') format('truetype'), url('../fonts/SPSLOldKingC-Bold.svg') format('svg');
	font-weight: bold;
	font-style: normal;
	font-display: swap;
}

.form-control{
    background-color: #d6d4cf;
    color: #675b5b;
    box-shadow: none;
}

.form-control:focus {
    border-color: #ab7f58;
    -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px rgba(236, 156, 89, 0.6);
    box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%), 0 0 8px rgba(236, 156, 89, 0.6);
}

.header{
    margin-top: 20px;
    z-index: 100;
    position: absolute;
}

strong{
    color: #804f1c !important;
}

.pic {
    width: 100%;
}

body{
    color: #3d3934;
    background: #ddd7ce;
    /* 2026-08-18: фоновые PNG (6.24 МБ) удалены — их перекрывал инлайновый фон в Layout, браузер их не запрашивал ни разу */
    background: #e6e6e6;
}

main, .scene{
    position: relative;
}

.scene{
    background: #f3f0ed;
    margin-top: 350px;
    margin-bottom: 100px;
    border-radius: 8px;
}

a {
    color: #3d3934;
}

a:hover, a:focus{
    color: #9d540c;
}

.hr{
    width: 100%;
    height: 1px;
    opacity: 0.3;
    padding: 0px;
}

.logo{
    width: 90px;
    padding: 5px 0px;
    transform: translateY(-3px);
}

.toptab {
    margin-top: 55px;
    background-color: #e2deda;
    border: solid 1px #c1b8b4;
    padding: 20px;
    border-radius: 0px;
    position: sticky;
    top: 20px;
}

@media (min-width: 992px){
    .container.calculator {
        display: flex;
    }
}

.container.calculator .col-md-4{
    align-self: stretch;
}

.table > tbody > tr > td {
    vertical-align: middle;
}

.mainmenulink{
    display: inline-block;
    padding: 10px;
    color: #3d3934;
    margin-top: 15px;
    font-size: 14px;
}

.dbfilterbtn:before{
    content: url('../img/ico-tab.png');
    position: relative;
    top: 15px;
}

.dbfilterbtn:hover, .dbfilterbtn:focus{
    color: #9d540c;
}

.dbfilter, .monsterlvl, .dbskill{
    margin-top: 25px;
}

.dbfilterbtn{
    min-width: 120px;
    margin-right: 15px;
    margin-bottom: 10px;
    background-image: none !important;
    text-shadow: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #8d6930;
}

.dbh1{
    font-family: 'King';
}

.dbh3{
    font-family: 'King';
    display: inline-block;
    font-size: 24px;
    padding-top: 30px;
}

.dbh1 a{
    color: #8d6930;
}

.dbhr {
    border: none;
    background-color: #b0aca7;
    height: 1px;
    margin-bottom: 10px;
}

.dbfilterbtn2{
    min-width: 110px;
}

.dbcont{
    border: solid 1px #c1b8b4;
}

.dbcont > img{
    display: inline-block;
    margin-right: 10px;
    margin-top: 4px;
}

.dbcont div{
    display: inline-block;
    font-size: 1.2em;
    color: #804f1c;
    font-weight: bold;
}

.dbcont span{
    display: block;
    margin-top: 7px;
}

.dbinfo{
    font-size: 0.9em;
    display: inline-block;
    margin-top: 7px;
}

.dbinfo img{
    width: 22px;
    padding: 3px;
}

.dbcont{
    display: block;
    padding: 5px;
    background-color: #e2deda;
    margin-bottom: 15px;
}
.dbcont:nth-child(odd){
    background-color: #d6d2ce;
}

.dbcont:hover{
    text-decoration: none;
    background-color: #f1eeea;
}

.setheader{
    padding: 5px;
    margin-bottom: 15px;
}

h3, h2{
    font-family: 'King';
}

.setheaderh3{
    padding: 5px;
    color: #3d3934;
    margin: 0;
}

.setcont{
    border: solid 1px #c1b8b4;
    margin-bottom: 30px;
    background-color: #e2deda;
    padding: 15px;
}

.arcont{
    position: relative;
}

.arleft{
    position: absolute;
    top: 30%;
    left: 0;
    width: 120px;
    margin-left: 20px;
}

.arright{
    position: absolute;
    top: 30%;
    right: 0;
    width: 120px;
    margin-right: 50px;
}

.smallarr{
    width: 50px;
    margin: 0;
    top: 50%;
}

.racer, .sexer{
    width: 40%;
    float: left;
    margin:15px;
}

.monsterstab{
    margin-top: 25px;
}

.monsterabi{
    width: 30px;
    padding: 3px;
}

.red{
    color: #ff3331;
}

.blue{
    color: #4778a2;
}

.monsterabi2{
    width: 21px;
    padding: 3px;
    margin-top: 3px;
}

.classesContainer {
    padding: 15px;
    border: solid 1px #bdae98;
    font-size: 1.3em;
    margin-bottom: 40px;
}

.classesContainer a {
    text-decoration: none;
}

.classesContainer2 {
    float: left;
    width: 50%;
}

.classesCell2 {
    width: 50%;
    float: left;
}

.classesCell3 {
    width: 33%;
    float: left;
}

.classesItem {
    white-space: nowrap;
    display: block;
}

.classesItem span {
    display: block;
    margin-bottom: 3px;
    text-decoration: underline;
}

.classesItem:hover {
    color: #9d540c;
}

.classesItemContainer {
    text-align: center;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.classesItem2 {
    float: left;
    width: 50%;
}

.classesItem3 {
    float: left;
    width: 33%;
}

.classesItem img {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 4px;
    border-radius: 8px;
}

.classesItemText2 {
    display: block;
    font-size: 0.7em;
}

.classesItemText2 .wikia{
    text-decoration: underline;
    color: #ad8534;
}

.classesItemText2 .wikia:hover{
    color: #9d540c;
}

.clar {
    width: 100%;
    margin-top: 5px;
    margin-bottom: 5px;
}

.clarsolo {
    padding: 5px;
}

.classgrp {
    margin-bottom: 30px;
}

.skillisttab {
    margin-bottom: 40px;
}

.skillisttab td {
    padding: 5px;
    border: solid 1px rgba(128, 183, 226, 0.2);
    font-size: 16px;
    text-align: center;
}

.skillisttab img {
    border: solid 1px rgba(128, 183, 226, 0.2);
}

.skillvl {
    margin-top: 40px;
    background-color: rgba(128, 183, 226, 0.2);
    text-align: center;
    padding: 5px;
    font-size: 18px;
    margin-left: -1px;
}

.nopad {
    padding: 0 !important;
    border: none !important;
}

.skillh1 {
    margin-bottom: 0;
}

.skilltext {
    font-size: 14px;
    color: #999999;
}

.wikih2 {
    text-align: center;
    background-color: #bdae98;
    margin: 0;
    padding: 5px;
}

.dbtab {
    border: none;
    width: 100%;
    margin: 0px 0px 30px;
}

.dbtab td {
    width: 50%;
    border: solid 1px #c1b8b4;
    padding: 7px;
    vertical-align: middle;
}

.dbtab td img {
    max-width: 20px;
    margin-right: 10px;
    border: solid 1px #9fafff;
    float: left;
}

.iteminfo {
    padding: 15px;
    margin-top: 15px;
    background-color: #bdae98;
}

.dbh2 {
    font-size: 1.3em;
    padding: 20px 0px 0px;
}

.craftheader {
    background-color: #bdae98;
    padding: 5px;
    font-size: 1.4em;
    text-align: center;
    border-bottom: none;
}

.craftcont {
    border: solid 1px #bdae98;
    margin-bottom: 30px;
}

.craftcont a {
    display: block;
    padding: 10px;
    font-size: 1.1em;
}

.craftcont span {
    color: #c16523;
}

.craftcont img {
    margin-right: 5px;
}

.droplistitem img {
    margin-top: -3px;
}

.droplistitem span {
    display: inline-block;
    padding: 3px 7px 0px;
    text-decoration: inherit;
    color: #c16523;
}


.npclink {
    min-height: auto;
    padding: 7px;
    font-size: 1.2em;
}

.npclink span {
    display: inline;
    margin-left: 3px;
}

.npclink img {
    margin-right: 10px;
    margin-top: 0;
}

.npcinfo img {
    float: left;
    margin-right: 10px;
    margin-top: 4px;
}

.npcinfo {
    margin-bottom: 30px;
}

.npcimg {
    max-width: 100%;
}

.npcimgcont {
    text-align: center;
    margin-bottom: 30px;
}

.npcmapcont {
    text-align: center;
}

.npcmap {
    width: 90%;
    height: 317px;
    position: relative;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.npcposition {
    position: absolute;
    width: 35px;
}


.monsterstab th {
    padding: 7px;
    text-align: center;
    background-color: #bdae98;
    border: solid 1px #bdae98;
    border-bottom: none;
}

.monsterstab td {
    padding: 7px;
    border: solid 1px #bdae98;
    text-align: center;
}

.npclink{
    margin-bottom: 5px;
    padding: 0px;
}

.npclink img{
    padding: 5px;
    float: none;
    margin: 0px;
}

.npclink span{
    display: inline;
}

.monsterskill img{
    float: none;
    padding: 3px;
}

.dropdown-toggle:focus, .dropdown-toggle:hover{
    border: none;
    text-decoration: none !important;
}

.dropdown-menu{
    background: #f7f6f3;
    border: solid 1px #fffdf7;
}

.dropdown-menu > li > a{
    color: #4b433f !important;
}

.dropdown-menu > li > a:focus, .dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus, .dropdown-menu > li > a:focus{
    background: none;
    background-color: #e0dfdc;
}

.wikia, legend{
    color: #8d6930;
}

.raiddrops{
    margin-top: 3px;
}

.manor td:nth-child(2), .manor td:nth-child(3){
    color: #804f1c;
}

td:nth-child(2){
    color: #804f1c !important;
}

.alignleft{
     text-align: left;
 }
.aligncenter{
    text-align: center;
}
.alignright{
    text-align: right;
}
.page{
    padding: 30px;
    line-height: 30px;
}

.page u{
    color: #fdc52e;
    text-decoration: none;
    font-size: 1.2em;
}
.page h2{
    color: #fdc52e;
    text-decoration: none;
    font-size: 1.2em;
}
.nohref{
    color: #d6c594 !important;
}

#p63789-4, #p69276-4, #p20266-4, #p14735-4, #p35632-4, #p70570-4б, #p11866-4, #p28665-4, #p11568-4, #p12440-4, #p10176-4, #p18862-4, #p38907-4, #p83848-4, #p14801-4, #p20145-4, #p16666-4, #p20259-4, #p12645-4, #p10551-4, #p59493-4, #p99910-4, #p51800-4, #p19143-4, #p69275-4, #p18000-4, #p20543-4, #p80818-4, #p20898-4, #p11379-14, #p11303-14{
    display: none;
}

.table-bordered, .table-bordered > tbody > tr > td, .table-bordered > tbody > tr > th{
    border: 1px solid #988a75 !important;
}

.skillstrip{
    background-color: #e4dfda !important;
}

.questp{
    padding: 20px;
    border-left: 3px solid rgba(128, 183, 226, 0.3);
}

.dbitemicon{
    padding: 5px;
}
.dbitemiconnpc{
    max-width: 40px;
    padding: 5px;
}
.top{
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: none;
}

.tabber{
    display: none;
}

.activetab{
    display: block;
}

.nav-tabs > li{
    margin-bottom: 0px;
}

.nav-tabs > li > a{
    color: #8c5b34;
    cursor: pointer;
    border-bottom: none;
}

.nav-tabs > li > a:hover, .active{
    border-color: #bdae98;
    background-color: #d8d5cd;
}

.nav-tabs{
    border-bottom: none;
}

.questtab tr{
    display: none;
}

.indexquests{
    padding: 10px;
}

.indexquests img{
    margin-right: 7px;
}

.indexquests li{
    padding: 4px;
    list-style: none;
}

.indexquests li:before{
    content: "■";
    color: #9c796a;
    padding-right: 10px;
    border-radius: 10px;
}

h3{
    color: #3d3934;
    text-decoration: underline;
}
.btn-start{
    display: inline-block;
    padding-top: 26px;
    width: 210px;
}
.btn-start:hover{
    text-decoration: none;
    -webkit-filter: brightness(110%);
    filter: brightness(110%);
}
.btn-start img{
    position: absolute;
    display: block;
}
.btn-start span{
    display: block;
    width: 100%;
    position: relative;
    z-index: 2;
    font-family: "King Bold";
    font-size: 16px;
    line-height: 43px;
    color: #332f2f;
    text-align: center;
    text-shadow: 0px 1px 2px rgb(255 255 255 / 60%);
}

@media (min-width: 2560px) {
    .scene {margin-top: 705px;}
    .container {
        width: 1920px;
    }
}

@media (min-width: 3840px) {
    .scene {margin-top: 809px;}
    .container {
        width: 1920px;
    }
}

/* ---- добавлено 2026-08-18: ничего выше не переопределяется ---- */
.dbfilter-note {
    margin-top: 6px;
    font-size: 13px;
    color: #7a6a49;
    min-height: 18px;
}
@media (max-width: 767px) {
    .monsterstab td, .monsterstab th { font-size: 12px; padding: 4px 6px; }
    .dbh1 { font-size: 22px; }
    .logo { max-width: 62%; height: auto; }
}

/* ---- интерфейс базы: поиск, кнопка наверх, футер, мобильные ---- */
/* --- поиск на каждой странице --- */
.wikisearch { max-width: 720px; margin: 14px auto 6px; }
.wikisearch input[type="search"] { font-size: 15px; height: 40px; }
.wikisearch #search { margin-top: 8px; }

/* --- кнопка наверх: разметка была потеряна, стиль .top уже есть в style.css --- */
.top {
  width: 44px; height: 44px; line-height: 42px; text-align: center;
  font-size: 22px; text-decoration: none; color: #fff;
  background: #c9a24b; border: 1px solid #a8842f; border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.25); z-index: 50;
}
.top:hover, .top:focus { background: #a8842f; color: #fff; text-decoration: none; }

/* --- футер: мост к фирстилю игрового сайта --- */
.wikifoot {
  margin: 36px -15px 0; padding: 26px 22px;
  background: #000c01; color: #cfd6cf;
  display: flex; flex-wrap: wrap; gap: 18px 28px;
  align-items: center; justify-content: space-between;
  border-top: 2px solid #d1a029; font-size: 14px;
}
.wikifoot b { color: #d1a029; font-size: 16px; }
.wikifoot-brand span { display: block; color: #8d9a8d; font-size: 13px; margin-top: 3px; }
.wikifoot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.wikifoot-links a { color: #cfd6cf; text-decoration: none; }
.wikifoot-links a:hover { color: #d1a029; text-decoration: underline; }
.wikifoot-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.wikibtn {
  display: inline-block; padding: 9px 18px; border-radius: 4px;
  border: 1px solid #d1a029; color: #d1a029; text-decoration: none;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.wikibtn:hover, .wikibtn:focus { background: #d1a029; color: #000c01; text-decoration: none; }
.wikibtn--primary { background: #d1a029; color: #000c01; }
.wikibtn--primary:hover, .wikibtn--primary:focus { background: #e0b445; color: #000c01; }

/* --- телефон: .scene отодвинут на 350px под десктопный фон, контент уезжал за сгиб --- */
@media (max-width: 767px) {
  .scene { margin-top: 12px; margin-bottom: 20px; }
  .wikifoot { margin: 26px -15px 0; padding: 20px 16px; }
  .top { right: 14px; bottom: 14px; }
}
@media (min-width: 768px) and (max-width: 991px) {
  .scene { margin-top: 120px; }
}

/* ---- каталоги: не рендерить то, что за экраном ----
   Каталог мобов — 2.3 МБ и почти 30 тысяч узлов DOM в одной странице.
   content-visibility позволяет браузеру пропускать разметку вне вьюпорта,
   contain-intrinsic-size задаёт ожидаемую высоту, чтобы полоса прокрутки не прыгала.
   Разметка не меняется — только подсказка браузеру. */
.monstercont, .dbcont, .raidcontainer {
    content-visibility: auto;
    contain-intrinsic-size: 0 44px;
}

/* Классы, которые уже были в разметке, но не имели ни одного правила: без них
   браузер рисовал элементы дефолтом — заголовок наборов как обычный h2, английское
   имя в H1 как обычную ссылку, широкие таблицы классов уезжали за экран.
   Добавляем только новые селекторы, существующие правила не трогаем. */

/* английское имя рядом с русским в заголовке карточки */
.il-en {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.5em;
    font-weight: normal;
    color: #7d7671;
    white-space: nowrap;
}
.dbh1 .il-en { display: inline-block; margin-left: 6px; }

/* заголовок грейда на страницах наборов — тот же вид, что у обычных разделов */
.dbsetsheader {
    text-align: center;
    background-color: #bdae98;
    font-family: 'King';
    font-size: 22px;
    margin: 0 0 15px;
    padding: 5px;
}
.dbsets { margin-bottom: 20px; }

/* широкая таблица не должна распирать страницу на телефоне */
.scroll-x {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* разрыв числа вида 100-150 посреди строки читается как две разные величины */
.nobr { white-space: nowrap; }

/* ячейки с иконкой в таблицах лавок */
.tablerow1, .tablerow2 {
    text-align: center;
    vertical-align: middle !important;
    padding: 4px !important;
}

/* выпадающие списки примерочной */
.Fashion_SelectBox {
    background-color: #e2deda;
    border: solid 1px #c1b8b4;
    color: #4a4441;
    padding: 4px 6px;
    margin: 0 6px 8px 0;
    max-width: 100%;
}

/* название предмета, для которого у нас пока нет отдельной страницы */
.missingpage { font-weight: bold; }

/* разметка местами использует утилиты Bootstrap 4, а подключён Bootstrap 3 */
.p-2 { padding: 0.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }

/* ---- шапка: логотип и меню (2026-10-03) ----
   Логотип белый с розовым — нарисован под тёмную тему игрового сайта, и на светлом
   пергаменте вики белая часть пропадала. Даём ему тёмную подложку в цвет подвала. */
.logo {
    width: 112px;
    padding: 6px 10px;
    background: #000c01;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* На телефоне меню из 13 пунктов разбивалось на пять высоких строк и занимало весь первый
   экран: заголовок страницы начинался примерно через 600 пикселей. Теперь оно свёрнуто
   под кнопку. Без JavaScript (нет класса js на <html>) меню остаётся открытым. */
.navtoggle { display: none; }
@media (max-width: 767px) {
    .navtoggle {
        display: block;
        width: 100%;
        margin: 10px 0 2px;
        padding: 10px 14px;
        font-size: 16px;
        font-weight: 700;
        text-align: left;
        color: #3d3934;
        background: #f3ecdd;
        border: 1px solid #c9a24b;
        border-radius: 6px;
    }
    .navtoggle::after { content: "\25BE"; float: right; }
    .navtoggle[aria-expanded="true"]::after { content: "\25B4"; }
    .js .mainnav { display: none; }
    .js .mainnav.open { display: block; }
    .mainnav .mainmenulink {
        display: block;
        margin-top: 0;
        padding: 10px 6px;
        border-bottom: 1px solid #e5dccb;
    }
    .mainnav .dropdown-menu {
        position: static;
        float: none;
        box-shadow: none;
        border: 0;
        background: transparent;
    }
    /* заголовок шапки в две строки по 34 пикселя — уменьшаем */
    .aligncenter .dbh3 { font-size: 20px; padding-top: 12px; }
}

/* ---- доступность и навигация (2026-11-08) ----
   Добавочный блок: прежние правила не переписываются, только уточняются цвета до
   контраста WCAG AA и появляются новые элементы. */

/* разделитель под шапкой: раньше картинка hr.jpg (70 КБ) ради линии в 1 пиксель */
.scene-hr {
    margin: 0;
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(61, 57, 52, .35) 12%, rgba(61, 57, 52, .35) 88%, transparent);
}

/* хлебные крошки: путь наверх с любой карточки */
.crumbs { margin: 6px 0 0; padding: 0 15px; font-size: 13px; }
.crumbs ol {
    display: flex; flex-wrap: wrap; align-items: center;
    margin: 0; padding: 0; list-style: none; color: #6a6560;
}
.crumbs li { display: inline-flex; align-items: center; min-height: 32px; }
.crumbs li + li::before { content: "\203A"; margin: 0 8px; color: #a39a8f; }
.crumbs a { color: #7a5a17; text-decoration: none; }
.crumbs a:hover, .crumbs a:focus { color: #5e4510; text-decoration: underline; }
.crumbs [aria-current="page"] {
    color: #3d3934; font-weight: 600;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 767px) {
    /* на телефоне цепочка в одну строку с прокруткой, а не в три строки над заголовком */
    .crumbs ol { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .crumbs ol::-webkit-scrollbar { display: none; }
    .crumbs li { white-space: nowrap; }
}

/* поле поиска: #675b5b на #d6d4cf давало 4.39 — светлее фон, явная рамка */
.wikisearch input[type="search"] {
    background-color: #fbf8f2;
    color: #3d3934;
    border: 1px solid #c1b8b4;
}
.wikisearch input[type="search"]::placeholder { color: #6b6158; opacity: 1; }

/* английское имя в заголовке карточки: #7d7671 давало 3.93 */
.il-en { color: #6a6560; }

/* видимый фокус для клавиатуры — у Bootstrap 3 его почти нет */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, .chr-btn:focus-visible, .lang-btn:focus-visible {
    outline: 2px solid #8a6416;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; }
}

/* ---- главная базы знаний: хаб (2026-11-08) ---- */
.hub { padding: 8px 15px 0; }
.hub-hero { max-width: 780px; margin: 0 auto; padding: 18px 0 6px; text-align: center; }
.hub-title { font-size: 42px; margin: 6px 0 10px; }
.hub-lead { font-size: 17px; line-height: 1.55; color: #4a4441; max-width: 660px; margin: 0 auto 18px; }

.wikisearch--hero { max-width: 680px; margin: 0 auto; }
.wikisearch--hero input[type="search"] {
    height: 54px; font-size: 17px; padding: 0 18px;
    border: 2px solid #b89a5e; border-radius: 10px;
    box-shadow: 0 2px 10px rgba(61, 57, 52, .08);
}
.wikisearch--hero input[type="search"]:focus { border-color: #8a6416; box-shadow: 0 0 0 4px rgba(138, 100, 22, .15); }
.wikisearch--hero #search { text-align: left; }

.hub-popular { margin: 14px auto 0; font-size: 14px; color: #6a6560; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.hub-popular a {
    display: inline-flex; align-items: center; min-height: 34px; padding: 4px 12px;
    background: #f3ecdd; border: 1px solid #d9cdb5; border-radius: 17px;
    color: #5e4510; text-decoration: none; transition: background-color .15s, border-color .15s;
}
.hub-popular a:hover, .hub-popular a:focus { background: #eaddbf; border-color: #8a6416; color: #3d3934; }

.hub-h2 { font-size: 26px; margin: 34px 0 14px; }

.hub-chronicles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.hub-chr {
    display: flex; flex-direction: column; gap: 6px; padding: 20px 22px;
    background: #fbf8f2; border: 1px solid #d9cdb5; border-radius: 10px;
    color: #3d3934; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.hub-chr:hover, .hub-chr:focus { text-decoration: none; color: #3d3934; border-color: #8a6416; box-shadow: 0 4px 14px rgba(61, 57, 52, .12); }
.hub-chr--main { border: 2px solid #8a6416; }
.hub-chr-tag { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #7a5a17; }
.hub-chr--main .hub-chr-tag { color: #fff; background: #8a6416; padding: 2px 8px; border-radius: 4px; }
.hub-chr-name { font-family: 'King'; font-size: 28px; line-height: 1.15; }
.hub-chr-desc { font-size: 14px; line-height: 1.5; color: #4a4441; }
.hub-chr-count { margin-top: auto; padding-top: 6px; font-size: 14px; color: #6a6560; }
.hub-chr-count b { color: #3d3934; font-size: 16px; }

.hub-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px;
    margin: 0; padding: 0; list-style: none;
}
.hub-tile {
    display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 12px 14px;
    background: #fbf8f2; border: 1px solid #d9cdb5; border-radius: 10px;
    color: #3d3934; text-decoration: none; transition: border-color .15s, background-color .15s;
}
.hub-tile:hover, .hub-tile:focus { text-decoration: none; color: #3d3934; background: #fffdf8; border-color: #8a6416; }
/* иконка в рамке, как ячейка инвентаря в игре; 32 px без масштабирования — иначе мыло */
.hub-tile img {
    flex: none; width: 32px; height: 32px; padding: 5px; box-sizing: content-box;
    background: #1f1b16; border: 1px solid #6b5a3a; border-radius: 6px;
    image-rendering: pixelated;
}
.hub-tile-text { display: flex; flex-direction: column; min-width: 0; }
.hub-tile-name { font-weight: 700; font-size: 16px; }
.hub-tile-desc { font-size: 13px; color: #6a6560; line-height: 1.35; }

.hub-server {
    margin: 36px 0 8px; padding: 24px 26px; border-radius: 10px;
    background: #000c01; color: #cfd6cf; border-top: 2px solid #d1a029;
}
.hub-server-h { font-size: 24px; color: #d1a029; margin: 0 0 8px; }
.hub-server p { max-width: 720px; font-size: 15px; line-height: 1.55; margin: 0 0 16px; }
.hub-server-cta { display: flex; flex-wrap: wrap; gap: 10px; }

@media (max-width: 767px) {
    .hub { padding: 4px 4px 0; }
    .hub-title { font-size: 28px; }
    .hub-lead { font-size: 15px; }
    .hub-h2 { font-size: 22px; margin-top: 26px; }
    .hub-chr-name { font-size: 24px; }
    .hub-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .hub-tile { flex-direction: column; align-items: flex-start; gap: 8px; min-height: 0; }
    .hub-server { padding: 20px 18px; }
}

/* ---- «Похожие» на карточках: сетка вместо столбца во всю ширину ----
   Восемь ссылок одна под другой занимали 450 пикселей высоты при пустой правой половине.
   Свой класс relatedcont, а не craftcont: тот же craftcont оформляет таблицы дропа. */
.relatedcont {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.relatedcont a {
    display: flex; align-items: center; gap: 8px;
    min-height: 48px; padding: 7px 10px;
    border-bottom: 1px solid #e5dccb;
    text-decoration: none;
}
.relatedcont a:hover, .relatedcont a:focus { background: #fbf8f2; color: #7a5a17; }
.relatedcont img { flex: none; margin: 0; }

/* ---- компактная шапка на телефоне (2026-11-08) ----
   До заголовка страницы было ~410 px: логотип отдельной строкой, двухстрочная надпись бренда,
   переключатели, меню, поиск. Логотип и переключатели — в одну строку; надпись бренда на
   телефоне скрыта: она повторяет H1 и логотип. Свои классы wikihead-*, общие .row/.col не трогаем. */
@media (max-width: 767px) {
    .wikihead { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 0 8px; margin-left: 0; margin-right: 0; }
    .wikihead::before, .wikihead::after { display: none; }
    .wikihead > .wikihead-logo, .wikihead > .wikihead-switch { float: none; width: auto; padding: 0 6px; }
    .wikihead-title { display: none; }
    .wikihead .logo { width: 76px; max-width: none; padding: 4px 6px; }
    .wikihead-switch { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; text-align: right; }
    .wikihead .lang-switch, .wikihead .chr-switch { margin: 0; }
    /* тройной селектор: стили переключателей объявлены в Layout.astro со scoped-атрибутом */
    .wikihead .wikihead-switch .lang-btn, .wikihead .wikihead-switch .chr-btn { padding: 0 10px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; }
    .wikihead .wikihead-switch { flex-wrap: nowrap; }
    .wikihead .wikihead-logo .logo { width: 64px; }
    .wikihead .wikihead-logo .mainmenulink { padding: 0; margin: 0; }
    .navtoggle { margin-top: 8px; }
    .wikisearch { margin-top: 10px; }
}
/* первый <br> в теле страницы давал лишние ~40 px между крошками и заголовком */
.crumbs + main > br:first-child { display: none; }

/* ---- таблица характеристик (предметы, NPC, квесты, классы) ----
   Иконка ограничивалась max-width: 20px при атрибуте height="32" и сплющивалась в 20x32,
   а float: left прижимал подпись к верху ячейки — значение стояло ниже подписи.
   Иконка 24x24 в строку с подписью, по центру ячейки. */
.dbtab td img {
    float: none;
    width: 24px;
    height: 24px;
    max-width: none;
    margin: 0 10px 0 0;
    vertical-align: middle;
    border-color: #bdae98;
    border-radius: 3px;
}
.dbtab td:last-child { font-weight: 600; }

/* ---- фильтры каталогов ----
   Выбранный тип ничем не отличался от остальных; поле фильтра было серым и
   низкоконтрастным, как раньше поиск. */
input.dbfilter { background-color: #fbf8f2; color: #3d3934; border: 1px solid #c1b8b4; }
input.dbfilter::placeholder { color: #6b6158; opacity: 1; }
.dbfilterbtn.btn-primary {
    color: #3d3934 !important;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}
@media (max-width: 767px) {
    /* на телефоне — компактные «чипы» вместо крупных кнопок со значком-спиралью */
    .dbfilterbtn {
        min-width: 0; margin: 0 6px 8px 0; padding: 7px 12px; font-size: 14px;
        border: 1px solid #d9cdb5 !important; border-radius: 17px;
        background-color: #fbf8f2 !important; color: #5e4510;
    }
    .dbfilterbtn:before { display: none; }
    .dbfilterbtn.btn-primary { background-color: #8a6416 !important; border-color: #8a6416 !important; color: #fff !important; text-decoration: none; }
    .dbfilter, .monsterlvl, .dbskill { margin-top: 12px; }
}

/* ---- исправления по UX-аудиту (2026-11-08) ---- */

/* Страницы классов и Манор на десктопе были пустыми: вставка вступления обёрнута в
   плавающий .col-md-12, а .table-responsive с overflow-x:auto — отдельный контекст
   форматирования, и рядом с float на всю ширину он сжимался в ноль. 178 страниц. */
main .table-responsive { clear: both; }

/* Bootstrap 3 ставит nowrap ячейкам внутри .table-responsive на узких экранах:
   таблица квестов разъезжалась на 4 224 px и резала описания. */
@media (max-width: 767px) {
    .table-responsive > .table > tbody > tr > td,
    .table-responsive > .table > tbody > tr > th,
    .table-responsive > .table > thead > tr > th { white-space: normal; }
}

/* контраст: жёлтый #fdc52e на пергаменте — 1.4:1, оранжевый шанс дропа — 3.6:1 */
.page u, .page h2 { color: #8a6416; }
.droplistitem span { color: #9a4a12; }

/* читаемость вступлений и полей ввода; 16 px в полях — иначе iOS увеличивает страницу */
.iteminfo { font-size: 15px; line-height: 1.6; }
@media (max-width: 767px) {
    input.form-control, select.form-control, .wikisearch input[type="search"] { font-size: 16px; }
}

/* видимый фокус у выпадающих пунктов меню: правило Bootstrap .dropdown-toggle:focus
   { outline: 0 } было специфичнее общего a:focus-visible */
.mainnav .dropdown-toggle:focus-visible,
.dropdown-menu > li > a:focus-visible { outline: 2px solid #8a6416; outline-offset: 2px; }

/* телефон: кликабельная высота пунктов меню была 16 px, пунктов списков — 26 px */
@media (max-width: 767px) {
    .mainnav .dropdown.mainmenulink { padding: 0; }
    .mainnav .dropdown-toggle { display: block; padding: 12px 6px; color: #3d3934; }
    .mainnav .dropdown-menu > li > a { padding: 12px 16px; }
}

/* пустая колонка портрета у боссов без картинки (540x300 пустого места) */
.npcimgcont:not(:has(img)) { display: none; }

/* «Дроп пригодится в квестах»: название квеста и предметы склеивались в одну строку */
.dropquests a > span { display: block; margin-top: 2px; font-size: .9em; color: #7a5a17; }

/* ссылка «к содержимому» для клавиатуры и скринридеров */
.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    padding: 10px 16px; border-radius: 6px;
    background: #000c01; color: #d1a029; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 12px; color: #d1a029; }

/* выдача поиска: подсветка совпадений мягче ярко-жёлтого браузерного <mark> */
#search mark { background: #f1d58a; color: inherit; padding: 0 1px; border-radius: 2px; }

/* арт-шапка: полная высота только на главных (body.page-hub); на внутренних страницах
   панель поднимается, чтобы заголовок и таблица попадали в первый экран */
@media (min-width: 768px) and (max-width: 991px) { .page-inner .scene { margin-top: 80px; } }
@media (min-width: 992px) { .page-inner .scene { margin-top: 150px; } }
@media (min-width: 2560px) { .page-inner .scene { margin-top: 300px; } }

/* выдача поиска — выпадающая панель поверх страницы, а не блок в потоке: на телефоне
   первый результат начинался у нижнего края экрана, и страница прыгала */
.wikisearch { position: relative; }
.wikisearch .pagefind-ui__drawer:not(.pagefind-ui__hidden) {
    position: absolute; left: 0; right: 0; z-index: 60;
    max-height: 70vh; overflow: auto; -webkit-overflow-scrolling: touch;
    background: #fbf8f2; border: 1px solid #d9cdb5; border-top: 0;
    border-radius: 0 0 10px 10px; box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
    padding: 4px 14px 12px; text-align: left;
}
.wikisearch .pagefind-ui__result { padding: 12px 0; }
.wikisearch .pagefind-ui__result-title { font-size: 16px; }

/* кнопка сброса фильтров мобов */
.dbfilter-reset {
    margin-left: 10px; padding: 2px 10px; font-size: 13px;
    background: #f3ecdd; border: 1px solid #c9a24b; border-radius: 12px; color: #5e4510;
}
.dbfilter-reset:hover, .dbfilter-reset:focus { background: #eaddbf; }

/* примерочная: блок выбора расы/предмета наследовал .header { position: absolute } донора
   и лежал поверх заголовка страницы */
main .container.header { position: static; width: auto; margin: 6px 0 18px; padding: 0; z-index: auto; }
main .container.header .Fashion_SelectBox { width: 100%; margin: 0 0 8px; }

/* шаги квеста — нумерованный список вместо «# …» в тексте */
.quest-steps { margin: 6px 0 18px; padding-left: 0; list-style: none; counter-reset: qs; max-width: 900px; }
.quest-steps > li {
    position: relative; counter-increment: qs;
    margin: 0 0 10px; padding: 10px 14px 10px 50px; line-height: 1.6;
    background: #fbf8f2; border: 1px solid #e5dccb; border-radius: 8px;
}
.quest-steps > li::before {
    content: counter(qs);
    position: absolute; left: 12px; top: 9px;
    width: 26px; height: 26px; line-height: 26px; text-align: center;
    border-radius: 50%; background: #8a6416; color: #fff; font-weight: 700; font-size: 13px;
}
.quest-steps .dbitemicon { width: 20px; height: 20px; vertical-align: -4px; margin-right: 3px; }
/* количества и шансы в блоках крафта: #c16523 на пергаменте — 3.58:1 */
.craftcont span { color: #9a4a12; }

/* ---- «Где купить» и «Ассортимент» (2026-11-08) ----
   Сетка, как у «Похожих»: торговец и под ним город (и цена, если у торговцев она разная);
   у торговца — товар с иконкой и ценой справа. Примечание про налог замка — строкой ниже. */
.shopcont {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    margin-bottom: 0;
}
.shopcont > a, .shopcont > .droplistitem {
    display: block; min-height: 48px; padding: 8px 10px; font-size: 1em;
    border-bottom: 1px solid #e5dccb; text-decoration: none;
}
.shopcont > a:hover, .shopcont > a:focus { background: #fbf8f2; color: #7a5a17; }
.shopcont > a > span, .shopcont > .droplistitem > span {
    display: block; margin-top: 2px; font-size: .88em; color: #6a6560;
}
.shopcont--goods > a, .shopcont--goods > .droplistitem { display: flex; align-items: center; gap: 8px; }
.shopcont--goods > a > span, .shopcont--goods > .droplistitem > span {
    margin: 0 0 0 auto; white-space: nowrap; color: #9a4a12;
}
.shopcont--goods img { flex: none; margin: 0; }
.shopnote {
    margin: 0 0 30px; padding: 6px 10px; font-size: 13px; color: #6a6560;
    border: 1px solid #bdae98; border-top: 0;
}
/* примечание — продолжение рамки списка: у блока перед ним убираем нижний отступ.
   (Отрицательный margin у примечания наезжал на последнюю строку там, где отступа у блока
   и так не было — «Где купить», «Книги умений».) */
.craftcont:has(+ .shopnote) { margin-bottom: 0; }

/* контраст старых цветов донора до WCAG AA: «Агрессивный» #ff3331 — 3.5:1,
   «Пассивный» #4778a2 — 4.4:1, ссылки .wikia #8d6930 — 4.4:1 */
.red { color: #c4231f; }
.blue { color: #3d6a91; }
.wikia, legend { color: #7a5a17; }

/* ---- кнопка темы и подсказка Ctrl K ---- */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; margin: 12px 0 0 8px; padding: 0; vertical-align: top;
    border: 1px solid #8a6416; border-radius: 6px; background: #f3ecdd; color: #7a5a17;
    cursor: pointer; transition: background-color .15s, color .15s;
}
.theme-toggle:hover { background: #eaddbf; color: #5e4510; }
.theme-icon--sun { display: none; }

.kbd-hint {
    position: absolute; right: 10px; top: 9px; pointer-events: none;
    font: 600 12px/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .02em;
    color: #6b6158; background: #f3ecdd; border: 1px solid #d9cdb5; border-bottom-width: 2px;
    border-radius: 4px; padding: 4px 6px;
}
.wikisearch--hero .kbd-hint { top: 16px; right: 14px; }
.wikisearch:focus-within .kbd-hint,
.wikisearch #search:not([hidden]) ~ .kbd-hint { display: none; }
@media (hover: none), (max-width: 767px) { .kbd-hint { display: none; } }

/* панель поиска Pagefind — в цветах сайта (у неё свои переменные) */
.wikisearch .pagefind-ui {
    --pagefind-ui-primary: #7a5a17;
    --pagefind-ui-text: #3d3934;
    --pagefind-ui-background: #fbf8f2;
    --pagefind-ui-border: #d9cdb5;
    --pagefind-ui-tag: #f3ecdd;
    --pagefind-ui-font: inherit;
}

@media (max-width: 767px) {
    .wikihead .wikihead-switch .theme-toggle { width: 38px; height: 40px; margin: 0; flex: none; }
    .wikihead .wikihead-switch { gap: 5px; }
    .wikihead .wikihead-switch .lang-btn, .wikihead .wikihead-switch .chr-btn { padding: 0 8px; }
}

/* ====================================================================================
   Тёмная тема «как в клиенте»: тёмные бронзовые панели, бежевый текст, золотые заголовки.
   Для игры со вторым монитором вечером. Все цвета — через переменные ниже; контраст
   текста к фону панели: основной 13.2:1, приглушённый 6.9:1, золото 9.4:1, цены 8.0:1.
   ==================================================================================== */
html[data-theme="dark"] {
    color-scheme: dark;
    --d-bg: #16130f;
    --d-surface: #1e1a15;
    --d-surface-2: #262019;
    --d-head: #2c241a;
    --d-border: #3e3426;
    --d-text: #e4d9c3;
    --d-muted: #a99d86;
    --d-gold: #d9b46a;
    --d-gold-hi: #f0cd84;
    --d-warm: #e39a5b;
    --d-input: #100e0b;
}
html[data-theme="dark"] body { color: var(--d-text); }
html[data-theme="dark"] .scene { background: var(--d-bg); box-shadow: 0 10px 40px rgba(0, 0, 0, .45); }

/* текст, ссылки, заголовки */
/* :where() обнуляет специфичность: обычные ссылки светлеют, а элементы со своим цветом
   (кнопки «Начать играть», «наверх») его сохраняют — иначе текст кнопки стал бы светлым на золоте */
:where(html[data-theme="dark"]) a,
:where(html[data-theme="dark"]) h3 { color: var(--d-text); }
:where(html[data-theme="dark"]) a:hover, :where(html[data-theme="dark"]) a:focus { color: var(--d-gold-hi); }
html[data-theme="dark"] .mainmenulink,
html[data-theme="dark"] .mainnav .dropdown-toggle,
html[data-theme="dark"] .setheaderh3 { color: var(--d-text); }
html[data-theme="dark"] .wikia, html[data-theme="dark"] legend,
html[data-theme="dark"] .dbh1 a, html[data-theme="dark"] .dbh3 .wikia { color: var(--d-gold); }
html[data-theme="dark"] strong { color: var(--d-gold) !important; }
html[data-theme="dark"] td:nth-child(2) { color: var(--d-gold) !important; }
html[data-theme="dark"] .manor td:nth-child(2), html[data-theme="dark"] .manor td:nth-child(3) { color: var(--d-gold); }
html[data-theme="dark"] .il-en { color: var(--d-muted); }
html[data-theme="dark"] .page u, html[data-theme="dark"] .page h2 { color: var(--d-gold); }
html[data-theme="dark"] .red { color: #ff7a72; }
html[data-theme="dark"] .blue { color: #86b6dd; }
html[data-theme="dark"] .scene-hr { background: linear-gradient(90deg, transparent, rgba(228, 217, 195, .22) 12%, rgba(228, 217, 195, .22) 88%, transparent); }
html[data-theme="dark"] hr, html[data-theme="dark"] .dbhr { border-top-color: var(--d-border); background-color: var(--d-border); }
/* приглушённые подписи в разметке донора (сводные страницы квестов) */
html[data-theme="dark"] [style*="color:#8a7a58"] { color: #b8a888 !important; }

/* поверхности */
html[data-theme="dark"] .wikih2,
html[data-theme="dark"] .craftheader,
html[data-theme="dark"] .dbsetsheader,
html[data-theme="dark"] .monsterstab th { background-color: var(--d-head); color: #e8c98a; }
html[data-theme="dark"] .iteminfo { background-color: var(--d-head); color: var(--d-text); }
html[data-theme="dark"] .craftcont { border-color: var(--d-border); }
html[data-theme="dark"] .craftcont a { color: var(--d-text); }
html[data-theme="dark"] .craftcont span, html[data-theme="dark"] .droplistitem span { color: var(--d-warm); }
html[data-theme="dark"] .dbtab td,
html[data-theme="dark"] .monsterstab td { border-color: var(--d-border); }
html[data-theme="dark"] .dbtab td img { border-color: var(--d-border); }
html[data-theme="dark"] .dbcont { background-color: var(--d-surface); border-color: var(--d-border); }
html[data-theme="dark"] .dbcont:nth-child(odd) { background-color: var(--d-surface-2); }
html[data-theme="dark"] .dbcont:hover { background-color: #2f281f; }
html[data-theme="dark"] .dbcont div { color: var(--d-gold); }
html[data-theme="dark"] .setcont, html[data-theme="dark"] .toptab { background-color: var(--d-surface); border-color: var(--d-border); }
/* !important: светлый фон .skillstrip объявлен с !important, без него строки умений в тёмной
   теме оставались светлыми со светлым текстом (контраст 1.06) */
html[data-theme="dark"] .skillstrip { background-color: var(--d-surface-2) !important; }
html[data-theme="dark"] .questp { border-left-color: rgba(217, 180, 106, .35); }

/* таблицы Bootstrap */
html[data-theme="dark"] .table > thead > tr > th,
html[data-theme="dark"] .table > tbody > tr > th,
html[data-theme="dark"] .table > tbody > tr > td,
html[data-theme="dark"] .table-bordered,
html[data-theme="dark"] .table-bordered > thead > tr > th,
html[data-theme="dark"] .table-bordered > tbody > tr > td,
html[data-theme="dark"] .table-bordered > tbody > tr > th { border-color: var(--d-border); }
html[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) { background-color: var(--d-surface); }
html[data-theme="dark"] .table-hover > tbody > tr:hover { background-color: var(--d-surface-2); }

/* меню, вкладки, кнопки Bootstrap */
html[data-theme="dark"] .dropdown-menu { background: var(--d-surface); border-color: var(--d-border); }
html[data-theme="dark"] .dropdown-menu > li > a { color: var(--d-text); }
html[data-theme="dark"] .dropdown-menu > li > a:hover,
html[data-theme="dark"] .dropdown-menu > li > a:focus { background: var(--d-head); color: var(--d-gold-hi); }
html[data-theme="dark"] .nav-tabs > li > a { color: var(--d-gold); }
html[data-theme="dark"] .nav-tabs > li > a:hover, html[data-theme="dark"] .nav-tabs .active { background-color: var(--d-head); border-color: var(--d-border); }
html[data-theme="dark"] .btn-default {
    background-image: none; background-color: var(--d-surface-2); color: var(--d-text);
    border-color: var(--d-border); text-shadow: none; box-shadow: none;
}
html[data-theme="dark"] .navtoggle { background: var(--d-surface-2); color: var(--d-text); }

/* поля ввода */
html[data-theme="dark"] .form-control,
html[data-theme="dark"] input.dbfilter,
html[data-theme="dark"] .wikisearch input[type="search"],
html[data-theme="dark"] .Fashion_SelectBox,
html[data-theme="dark"] select {
    background-color: var(--d-input); color: var(--d-text); border-color: #4a3d2b;
}
html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] .wikisearch input[type="search"]::placeholder,
html[data-theme="dark"] input.dbfilter::placeholder { color: var(--d-muted); }

/* переключатели языка и хроники, кнопка темы */
html[data-theme="dark"] .wikihead-switch .lang-btn,
html[data-theme="dark"] .wikihead-switch .chr-btn { background: var(--d-surface-2); color: #e0c48a; }
html[data-theme="dark"] .wikihead-switch .lang-btn:hover,
html[data-theme="dark"] .wikihead-switch .chr-btn:hover { background: var(--d-head); color: var(--d-gold-hi); }
html[data-theme="dark"] .wikihead-switch .lang-btn.active,
html[data-theme="dark"] .wikihead-switch .chr-btn.active { background: #8a6416; color: #fff; }
html[data-theme="dark"] .theme-toggle { background: var(--d-surface-2); color: var(--d-gold-hi); }
html[data-theme="dark"] .theme-toggle:hover { background: var(--d-head); }
html[data-theme="dark"] .theme-icon--sun { display: block; }
html[data-theme="dark"] .theme-icon--moon { display: none; }

/* крошки, фильтры, поиск */
html[data-theme="dark"] .crumbs ol { color: var(--d-muted); }
html[data-theme="dark"] .crumbs a { color: var(--d-gold); }
html[data-theme="dark"] .crumbs a:hover, html[data-theme="dark"] .crumbs a:focus { color: var(--d-gold-hi); }
html[data-theme="dark"] .crumbs [aria-current="page"] { color: var(--d-text); }
html[data-theme="dark"] .crumbs li + li::before { color: #6f6555; }
html[data-theme="dark"] .dbfilterbtn { color: var(--d-gold); }
html[data-theme="dark"] .dbfilterbtn.btn-primary { color: var(--d-text) !important; }
html[data-theme="dark"] .dbfilter-note { color: var(--d-muted); }
html[data-theme="dark"] .dbfilter-reset { background: var(--d-surface-2); color: var(--d-gold); }
html[data-theme="dark"] .kbd-hint { background: var(--d-surface-2); color: var(--d-muted); border-color: var(--d-border); }
html[data-theme="dark"] .wikisearch .pagefind-ui {
    --pagefind-ui-primary: var(--d-gold);
    --pagefind-ui-text: var(--d-text);
    --pagefind-ui-background: #1a1612;
    --pagefind-ui-border: var(--d-border);
    --pagefind-ui-tag: var(--d-surface-2);
}
html[data-theme="dark"] .wikisearch .pagefind-ui__drawer:not(.pagefind-ui__hidden) { background: #1a1612; border-color: var(--d-border); }
html[data-theme="dark"] #search mark { background: #5a4720; color: #fff3d6; }
@media (max-width: 767px) {
    html[data-theme="dark"] .dbfilterbtn { background-color: var(--d-surface-2) !important; border-color: var(--d-border) !important; }
    html[data-theme="dark"] .dbfilterbtn.btn-primary { background-color: #8a6416 !important; border-color: #8a6416 !important; color: #fff !important; }
    html[data-theme="dark"] .mainnav .mainmenulink { border-bottom-color: var(--d-border); }
}

/* блоки «Похожие», «Где купить», шаги квестов */
html[data-theme="dark"] .relatedcont a,
html[data-theme="dark"] .shopcont > a,
html[data-theme="dark"] .shopcont > .droplistitem { border-bottom-color: var(--d-border); }
html[data-theme="dark"] .relatedcont a:hover, html[data-theme="dark"] .relatedcont a:focus,
html[data-theme="dark"] .shopcont > a:hover, html[data-theme="dark"] .shopcont > a:focus { background: var(--d-surface-2); color: var(--d-gold-hi); }
html[data-theme="dark"] .shopcont > a > span, html[data-theme="dark"] .shopcont > .droplistitem > span { color: var(--d-muted); }
html[data-theme="dark"] .shopcont--goods > a > span, html[data-theme="dark"] .shopcont--goods > .droplistitem > span { color: var(--d-warm); }
html[data-theme="dark"] .shopnote { color: var(--d-muted); border-color: var(--d-border); }
html[data-theme="dark"] .dropquests a > span { color: var(--d-gold); }
html[data-theme="dark"] .quest-steps > li { background: var(--d-surface); border-color: var(--d-border); }

/* главная-хаб */
html[data-theme="dark"] .hub-lead, html[data-theme="dark"] .hub-chr-desc { color: #cbbfa8; }
html[data-theme="dark"] .hub-popular { color: var(--d-muted); }
html[data-theme="dark"] .hub-popular a { background: var(--d-surface-2); border-color: var(--d-border); color: var(--d-gold); }
html[data-theme="dark"] .hub-popular a:hover, html[data-theme="dark"] .hub-popular a:focus { background: var(--d-head); border-color: #8a6416; color: var(--d-gold-hi); }
html[data-theme="dark"] .hub-chr, html[data-theme="dark"] .hub-tile { background: var(--d-surface); border-color: var(--d-border); color: var(--d-text); }
html[data-theme="dark"] .hub-chr:hover, html[data-theme="dark"] .hub-chr:focus,
html[data-theme="dark"] .hub-tile:hover, html[data-theme="dark"] .hub-tile:focus { background: var(--d-surface-2); border-color: #8a6416; color: var(--d-text); }
html[data-theme="dark"] .hub-chr--main { border-color: #a07a2a; }
html[data-theme="dark"] .hub-chr-tag { color: var(--d-gold); }
html[data-theme="dark"] .hub-chr--main .hub-chr-tag { color: #fff; }
html[data-theme="dark"] .hub-chr-count { color: var(--d-muted); }
html[data-theme="dark"] .hub-chr-count b { color: var(--d-text); }
html[data-theme="dark"] .hub-tile-desc { color: var(--d-muted); }
html[data-theme="dark"] .wikisearch--hero input[type="search"] { border-color: #6b5a3a; box-shadow: none; }
html[data-theme="dark"] .hub-server { background: #0d0b08; }

/* товар без своей карточки — спокойным приглушённым текстом, а не жирным оранжевым */
.shopcont > .droplistitem.missingpage { font-weight: normal; color: #6a6560; }
html[data-theme="dark"] .shopcont > .droplistitem.missingpage { color: var(--d-muted); }
@media (max-width: 767px) {
    .wikihead .wikihead-switch { align-items: center; }
    /* Bootstrap 3 рисует .table-responsive светлую рамку #ddd на узких экранах */
    html[data-theme="dark"] .table-responsive { border-color: var(--d-border); }
}
@media (max-width: 767px) {
    /* scoped-стиль шаблона возвращал переключателям margin-top: 12px — строка съезжала */
    .wikihead .wikihead-switch .lang-switch, .wikihead .wikihead-switch .chr-switch { margin: 0; }
}

/* «Монстры местности» и «Рейд-боссы рядом»: уровень — метка слева, красная — агрессивный */
.mobcont .lvlbadge {
    display: inline-block; flex: none; min-width: 30px; padding: 2px 6px; border-radius: 4px;
    font-size: 12px; font-weight: 700; line-height: 1.4; text-align: center;
    background: #f3ecdd; color: #5e4510; border: 1px solid #d9cdb5;
}
.mobcont .lvlbadge--aggr { background: #f8e1df; color: #9b1c18; border-color: #e2b3af; }
.mobcont .droplistitem { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 7px 10px; border-bottom: 1px solid #e5dccb; }
html[data-theme="dark"] .mobcont .lvlbadge { background: var(--d-surface-2); color: var(--d-gold-hi); border-color: var(--d-border); }
html[data-theme="dark"] .mobcont .lvlbadge--aggr { background: #3a1715; color: #ff9a92; border-color: #5a2420; }
html[data-theme="dark"] .mobcont .droplistitem { border-bottom-color: var(--d-border); }

/* ---- страница локации: карта под описанием и свёрнутый общий список (2026-11-09) ----
   Карта — тот же виджет .npcmap, что у монстров (script.js центрирует его на отметке).
   Общий список территорий донора одинаков на всех страницах локаций и раньше стоял первым
   экраном; теперь он в конце, свёрнут под заголовок в стиле .craftheader. */
.locmap { margin-bottom: 30px; }
.loc-all { margin-bottom: 30px; border: 1px solid #bdae98; }
.loc-all > summary {
    padding: 5px 12px; font-size: 1.4em; text-align: center; cursor: pointer;
    background-color: #bdae98; list-style: none;
}
.loc-all > summary::-webkit-details-marker { display: none; }
.loc-all > summary::after { content: " \25BE"; font-size: .8em; }
.loc-all[open] > summary::after { content: " \25B4"; }
.loc-all > summary:hover { background-color: #c9bca6; }
.loc-all > summary:focus-visible { outline: 2px solid #7a5a17; outline-offset: 2px; }
.loc-all .table-responsive { margin: 12px 0; border: 0; }
.loc-all .monsterstab { margin: 0 auto; }
.loc-all .loc-current td { background: #f3ecdd; font-weight: 700; }
html[data-theme="dark"] .loc-all { border-color: var(--d-border); }
html[data-theme="dark"] .loc-all > summary { background-color: var(--d-head); color: #e8c98a; }
html[data-theme="dark"] .loc-all > summary:hover { background-color: var(--d-surface-2); }
html[data-theme="dark"] .loc-all > summary:focus-visible { outline-color: var(--d-gold); }
html[data-theme="dark"] .loc-all .loc-current td { background: var(--d-surface-2); }

/* ---- гайды: список-карточки на /interlude/guides; «Также ищут» под заголовком (2026-11-09) ---- */
.guidecont { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.guidecont > a { display: block; padding: 12px 14px; border-bottom: 1px solid #e5dccb; text-decoration: none; }
.guidecont > a > b { display: block; font-size: 1.05em; color: #7a5a17; }
.guidecont > a > span { display: block; margin-top: 4px; font-size: .9em; line-height: 1.45; color: #5f5a54; }
.guidecont > a:hover, .guidecont > a:focus { background: #fbf8f2; }
.il-aliases { margin: -4px 0 12px; text-align: center; font-size: 13px; color: #6a6560; }
html[data-theme="dark"] .guidecont > a { border-bottom-color: var(--d-border); }
html[data-theme="dark"] .guidecont > a > b { color: var(--d-gold-hi); }
html[data-theme="dark"] .guidecont > a > span { color: var(--d-muted); }
html[data-theme="dark"] .guidecont > a:hover, html[data-theme="dark"] .guidecont > a:focus { background: var(--d-surface-2); }
html[data-theme="dark"] .il-aliases { color: var(--d-muted); }

/* ---- визуальная проверка перед релизом (2026-11-09) ---- */
/* дерево классов: блок с overflow встаёт рядом с плавающим заголовком расы и сжимается до 0 */
.scroll-x { clear: both; }
/* подвал заезжал внутрь контента, если последняя колонка страницы плавающая (Тату) */
.wikifoot { clear: both; }
/* широкие картинки в теле (схема тату 761 px) распирали страницу на телефоне; карта-виджет —
   исключение: её картинка намеренно шире окна и прокручивается в нём */
main img { max-width: 100%; }
.npcmap img { max-width: none; }
/* сводка умений класса (уровни / активные / пассивные): колонки слипались без отступа */
td[colspan="5"] > table[width="100%"] > tbody > tr > td { padding: 0 16px 10px 0; vertical-align: top; }
@media (max-width: 767px) {
    td[colspan="5"] > table[width="100%"] > tbody > tr > td { display: block; width: auto; white-space: normal; }
    /* круглая кнопка «наверх» закрывала кнопки в конце подвала */
    .wikifoot { padding-bottom: 76px; }
}
/* фильтры каталога монстров выглядели отключёнными рядом с белым полем названия */
input.monsterlvl, select.dbskill { background-color: #fbf8f2; color: #3d3934; border: 1px solid #c1b8b4; }
input.monsterlvl::placeholder { color: #6b6158; opacity: 1; }
html[data-theme="dark"] input.monsterlvl, html[data-theme="dark"] select.dbskill { background-color: var(--d-input); color: var(--d-text); border-color: var(--d-border); }
html[data-theme="dark"] input.monsterlvl::placeholder { color: var(--d-muted); }
/* контраст до AA: ссылки «квест» в дереве классов (было 2.99), ссылки в бежевой плашке описания
   (2.93), английские подписи в заголовках слотов (2.65), подпись источников (2.62),
   старые цвета донора в таблице квестов (жёлтый 1.81, бирюзовый 2.52) */
.classesItemText2 .wikia { color: #7a5a17; }
.iteminfo a { color: #4a3509; }
.wikih2 small.il-en { color: #4f473c; }
h2.dbh1 span[style*="color:#8a97a8"] { color: #4f5b68 !important; }
font[color="#00aaaa" i] { color: #00706f; }
font[color="#bbbb00" i] { color: #6b6400; }
html[data-theme="dark"] .classesItemText2 .wikia { color: var(--d-gold); }
html[data-theme="dark"] .iteminfo a { color: var(--d-gold-hi); }
html[data-theme="dark"] .wikih2 small.il-en { color: var(--d-muted); }
html[data-theme="dark"] h2.dbh1 span[style*="color:#8a97a8"] { color: var(--d-muted) !important; }
html[data-theme="dark"] font[color="#00aaaa" i] { color: #5fd4d4; }
html[data-theme="dark"] font[color="#bbbb00" i] { color: #d9d25a; }

/* ---- сдвиги вёрстки при прокрутке (замер qa-runtime, 2026-11-09) ----
   Каталоги: ожидаемая высота строки 44 px была втрое меньше настоящей (карточка .dbcont — 87 px
   на компьютере и 114 px на телефоне), и подвал прыгал по мере прокрутки (CLS до 0.39).
   auto — браузер запоминает настоящую высоту строки после первой отрисовки. */
.dbcont { contain-intrinsic-size: auto 87px; }
.monstercont { contain-intrinsic-size: auto 49px; }
@media (max-width: 767px) { .dbcont { contain-intrinsic-size: auto 114px; } }
/* «Сеты»: картинка персонажа (квадрат 1024×1024) грузится лениво без размеров — место под неё
   не резервировалось, и вся колонка уезжала вниз (CLS до 1.2 на телефоне) */
.pic { aspect-ratio: 1 / 1; height: auto; }
