/* ====================================================================
 * mpg-platform.css — платформенная оболочка MakerPG (наш слой).
 *
 * Загружается ПОСЛЕ main.css/buttons.css/project-ui.css (классическая база
 * classicbk заменена 1:1) и ПЕРЕД модульными css (/modules/*/*.css).
 * Здесь: адаптации «Размера интерфейса» (--sizerem), стили прелоадера,
 * чат-панели, мобильной оболочки и COMPAT-стили уже портированных модулей
 * (их при порте модуля переносить в /modules/<name>/<name>.css).
 *
 * client.html должна подключать этот файл (добавляет другая сессия):
 *   <link rel="stylesheet" href="/static/css/mpg-platform.css">
 * ==================================================================== */

/* ================= 1. База платформы ================= */
html {
    /* Значение по умолчанию: до того как JS применит «Размер интерфейса»,
       calc(... * var(--sizerem)) иначе невалиден и размеры «плывут» */
    --sizerem: 1;
}

html , body {
    /*font-family: Roboto;*/
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    line-height: normal;
    font-size: 1rem; /* 10pt */
    color:#111;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
}

hr {
  box-sizing: content-box;
  height: 0;
  overflow: visible;
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 20px 0;
}

a { cursor: pointer; }

/* ================= 2. Прелоадер и спиннер (дубль из client.html) ================= */
.mpg-spinner{width:2.75rem;height:2.75rem;margin:0 auto;border:0.25rem solid #d9d9d9;border-top-color:#8a2b2b;border-radius:50%;animation:mpgspin .9s linear infinite;}
@keyframes mpgspin{to{transform:rotate(360deg)}}
#preloader_line{font-family:Verdana,Arial,Helvetica,Tahoma,sans-serif;font-size:1rem;color:#444;}

/* ================= 3. Чат (наша реализация поверх classicbk-каркаса) ================= */
.msg-line { padding-bottom: calc(2px * var(--sizerem)); padding-top: calc(1px * var(--sizerem));}

.date1		{ font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #007000}

/* Свои сообщения в чате (date12): цвет и подложка — как в правке заказчика. */
.date12 {
    font-family: Courier;
    font-size: 0.8rem;
    text-decoration: none;
    font-weight: normal;
    color: #003233;
    background-color: rgb(206, 242, 229);
}

.date2		{ font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #007000; background-color: #00FFAA}

.date3	    { font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #B00000}

.date_s0 { font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #007000; }

.date_s1 { font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #700000; }

.date_s2 { font-family: Courier; font-size: 0.8rem; text-decoration:none; font-weight:normal; color: #B00000; }

.date_s0.date_forMe { color:#000800; background: linear-gradient(90deg, rgba(0,255,170,0.95) 5%, rgba(0, 255, 170, 0.15) 100%); }

.date_s0.date_fromMe { 
	/*background-color: #00FFAA;*/
	/*background: linear-gradient(90deg, rgba(0, 255, 170, 0) 0%, rgba(255,0,190,0.17) 25%, rgba(255,0,190,0.17) 75%, rgba(0, 255, 170, 0) 100%);*/
	background: linear-gradient(90deg, rgba(0, 255, 170, 0) 10%, rgb(255 71 0 / 25%) 100%);
	color:#6b450b;
}
.bg-mirrored {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.uo_hide {
	/*background-color: red;
	opacity: 0.1;*/
	display: none;
}

.uo_user {
	margin-left: calc( 8px * var(--sizerem) );
	margin-bottom: 0.2rem;
	white-space: nowrap;
}

.uo_user img {
	padding: 0;
	border: 0;
}

.uo_img_inf {
	width:calc( 12px * var(--sizerem) );
	height:calc( 11px * var(--sizerem) );
	/*margin-bottom:calc( 1px * var(--sizerem) );*/
}

.uo_img_lock {
	width:calc( 20px * var(--sizerem) );
	height:calc( 15px * var(--sizerem) );
	margin-bottom:calc( -3px * var(--sizerem) );
}

.uo_clan0 , .uo_clan1 {
	width:calc( 24px * var(--sizerem) );
	height:calc( 15px * var(--sizerem) );
}

.uo_align0 , .uo_align1 {
	width:calc( 12px * var(--sizerem) );
	height:calc( 15px * var(--sizerem) );
}

.uo_align0 , .uo_clan0 {
	display:none !important;
}

#online_list_room {
    display: block;
    padding: calc( 5px * var(--sizerem) ) calc( 7px * var(--sizerem) );
    color:#8f0000;
	margin-bottom: 0.5rem;
	white-space: nowrap;
}

.ch-tob {
	font-weight: bolder;
}

.ch-u {
	cursor: pointer;
}

.ch-u:hover {
	opacity: 0.5;
}

.ch-msg {
    padding-left:2px;
	margin-top: 0.15rem;
}

.ch-msg-noread {
	background-color: rgba(0,0,0,0.05);
	/*transition: 0.3s all linear;*/
}

.ch-msg-read {
	background-color: transparent;
	/*transition: 0.3s all linear;*/
}

.ch_o_list {
	margin-top: 0.15rem;
    padding-left: 10px;
    white-space: nowrap;
}

.chat-panel-smiles {
    position: absolute;
    bottom: calc(4px * var(--sizerem));
    right: min(calc(16px * var(--sizerem)), 2vw);
    height: min(calc(340px * var(--sizerem)), 60vh);
    width: min(calc(366px * var(--sizerem)), 94vw);
    background-color: rgba(235,232,232,1.00);
    border: solid 1px rgba(210,203,203,1.00);
    border-radius: 2px;
    z-index: 10000;
}

.smiles-standart , .smiles-buy {
    width: 100%;
    height: min(calc(300px * var(--sizerem)), 52vh);
    overflow: auto;
    scrollbar-gutter: stable;
}

.clock-main-div svg {
    display: inline-block;
    width: 80px;
    height:30px;
}

.pch-multi {
    width: 30px;
    height: 30px;
    display: inline-block;
    padding: 0;
    margin: 0;
    border: 0;
}

.pch-multi img {
    /*transition: 0.3s all linear;*/
}

.pch-btn {
    width: 30px;
    height: 30px;
    display: inline-block;
    padding: 0;
    margin: 0;
    border: 0;
}

.pch-btn img {
    /*transition: 0.3s all linear;*/
}

.timers_body {
    display: inline-block;
    margin-right: calc(10px * var(--sizerem));
    font-weight: bolder;
}

.game-menu-top-box a {
    display: inline-block;
    padding: 0 15px;
    margin: 0;
    color:#F0F0F0;
    text-decoration: none;
    font-weight: bold;
    line-height: 14px;
}

.chat-block {
    height: 100%;
    width: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

.chat-canal {
    margin-top: calc(24px * var(--sizerem)); /* 18px */
}

.chat-canal > div[msg-ch] {
  content-visibility: auto;
  contain-intrinsic-size: 0 1rem; /* предполагаемая высота */
}

.chat-panel-menu {
    height: calc(21px * var(--sizerem));
    width: auto;
    position: absolute;
    z-index: 1;
    right: calc(12px * var(--sizerem));
    top: calc(2px * var(--sizerem));
    text-align: right;
}

#reline-h linehv {
    background-color: #A0A0A0;
    width:100%;
    height: 2px;
    display: block;
    opacity: 0;
}

#reline-v linehv {
    background-color: #A0A0A0;
    width:2px;
    height: 100%;
    display: block;
    opacity: 0;
}
.chat-block {
	overflow-anchor: none;
	overscroll-behavior: contain;
}

.chat-canal {
	overflow-anchor: none;
}
#online_list_block .uo_user img.uo_align0 { display: inline !important; }

/* ================= 4. Адаптации classicbk-правил (sizerem/rem/скролл) ================= */
.ui-tooltip {
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    line-height: normal;
    font-size: 0.85rem;    
    border-radius: 0px;
    text-transform: none;
    box-shadow: none;
    padding: 4px;
    margin: none;
    background-color: #fff;
    max-width: min(500px, 92vw);
    color:#333;
    cursor: default;
}

small {
    font-size: 0.88rem;
}

.small_b {
    display: inline-block;
}

.box_inv_r {
    border-left: 1px solid #a5a5a5;
    padding: 0.5rem;
}

/* Блок персонажа (pi_block vams) — блочная разметка 1:1 с classicbk:
   .pi-grid 240×280, ячейки .pi-slot с абсолютными координатами, картинки
   display:block. Таблиц внутри нет, поэтому baseline-зазоров (3–4 px под
   картинкой) и «съезжания» ячеек нет ни в игре, ни на SSR-странице. */
.pi_block {
    position: relative;
    width: 240px;
    min-height: 280px;
    padding: 2px;
}

.pi_block .pi-grid,
.pi_block .pi-slot,
.pi_block .pi-bottom,
.pi_block .pi-spells,
.pi_block .pi-bags { line-height: 0; }
.pi_block .pi-slot img,
.pi_block .pi-bottom > img { display: block; margin: 0; padding: 0; border: 0; }
.pi_block .pi-slot .itm-a,
.pi_block .pi-slot .itm-a > div { display: block; line-height: 0; }
.pi_block .inf_regen_box { width: 120px; height: 20px; display: flex; align-items: center; }
/* regenStart в инвентаре перерисовывает #regen без inline-ширины —
   фиксируем её, иначе flex-элемент схлопывается и линии HP/MP исчезают. */
.pi_block .inf_regen_box > div { width: 120px; }
/* Эффекты на фигуре: верхний левый угол, значки слева-направо (с переносом). */
.pi_block .shadow-effs {
	line-height: normal;
	top: calc(2px * var(--sizerem, 1));
	left: 0;
	width: calc(120px * var(--sizerem, 1));
	height: auto;
	transform: none;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	align-content: flex-start;
}
.pi_block .shadow-effs .eff-block { display: block; }
.pi_block .shadow-effs img { display: inline-block; vertical-align: middle; }
.pi_block img { vertical-align: middle; }

.pi_login {
    display: inline-block;
    width: 240px;
    text-align: center;
    margin-top: 5px;
    line-height: normal;
}

.scrollbar , .scrollbar-2 , .scrollbar-3 , .scrollbar-4 , .scrollbar-5 , .scrollbar-6 {
    scrollbar-width: thin;
    /* Место под вертикальный скроллбар резервируется всегда:
       его появление/исчезновение больше не сдвигает вёрстку по ширине */
    scrollbar-gutter: stable;
    /* «Оттягивание» внутри блока не передаётся странице (нет pull-to-refresh и «резинки») */
    overscroll-behavior: contain;
}

.btn-a {
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: calc(9pt * var(--sizerem));
    background-color: rgba(239, 239, 239, 1);
    color:rgba(25, 25, 112, 1);
    padding: calc(2px * var(--sizerem)) calc(10px * var(--sizerem));
    border: 1px solid rgba(176, 176, 176, 1);
    cursor: pointer;
}
.constructorExchange {
    max-height: 300px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.rec_itm_vx {
	position: absolute;
	background-color: #fff;
	right: 0px;
	bottom: 0px;
	padding: 1px 2px;
	font-size: calc( 7.5pt * var(--sizerem) );
	white-space: nowrap;
}

.mfdib {
	display: inline-block;
	width: 5rem;
}

.mfdib2 {
	display: inline-block;
	width: 3rem;
	text-align: right;
}

.hpmpblock .hpval {
	height:calc( 11px * var(--sizerem) );
	font-size:calc( 10px * var(--sizerem) );
	display:inline-block;
	margin-left:5px;
}

.hpmpblock .hpline {
	width:calc( 120px * var(--sizerem) );
	height:calc( 11px * var(--sizerem) );
	background-color:#333;
	display:inline-block;
	vertical-align:middle;
	margin-left:5px;
}

.hotkey {
	width: calc( 40px * var(--sizerem) );
	height: calc( 25px * var(--sizerem) );
	background-image: url(/static/img/pr_clear.gif);
	background-size: contain;
	display: inline-block;
	vertical-align: middle;
	position: relative;
	user-select: none !important;
    cursor: pointer !important;
}

.hotkey_btn {
    display: inline-block;
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    height: calc( 20px * var(--sizerem) );
    line-height: calc( 18px * var(--sizerem) );
    box-sizing: border-box;
    font-size: calc( 12px * var(--sizerem) );
    font-weight: 700;
    text-align: center;
    text-transform: capitalize;
    color: #444;
    border-color: #f2f2f2;
    border-style: solid;
    border-width: 1px;
    border-radius: 1px;
    background: -webkit-linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    background: -o-linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    background: linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    font-family: sans-serif;
    transition: box-shadow 0.3s ease, transform 0.15s ease;
    box-shadow: 0 0 1px #888, 0 1px 0 #fff, 0 6px 0 #C0C0C0, 0 8px 17px rgba(#444, 0.4), 2px 1px 4px rgba(#444, 0.25), -2px 1px 4px rgba(#444, 0.25), 0 9px 16px rgba(#444, 0.1);
}
.ttl_box {
    pointer-events: none;
    user-select: none;   /* плюс запрет выделения текста */
	
    position: absolute;
    z-index: 10000000;
    
    border:1px solid #222;
    border-top-color:#777;
    border-left-color:#777;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    line-height: normal;
    font-size: calc( 8.5pt * var(--sizerem) );   
    border-radius: 0px;
    text-transform: none;
    box-shadow: none;
    padding: 4px;
    margin: none;
    background-color: #fff;
    max-width: 500px;
    color:#333;
    cursor: default;
}

.ttl_yellow {
    background-color: rgb(255, 255, 204);
    border-color: rgb(102, 102, 102);
    padding: 5px;
    max-width: 300px;
}

.pui-h3 {
    color:#8f0000;
    font-size: 1.25rem;
    font-weight: bold;
    font-family: Arial;
}

.pui-h3c {
    text-align: center;
    margin: 1.25rem 0;
}

.pui-mr {
    position: absolute;
    right: calc( 5px * var(--sizerem) );
    top: 0px;
}

.pui-btn1 {
    border: solid 1px #B0B0B0;
    color: #191970;
    font-size: 1rem; /* 10px */
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    margin-bottom: 2px;
    margin-top: 1px;
    padding: 0.2rem 0.8rem; /*1px 6px 1px 6px;*/
    background-color: #e5e5e5;
}

.pui-btn2 {
    border: solid 1px #9a9996;
    color: #dfdfdf;
    font-size: 1rem;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    margin-bottom: 2px;
    margin-top: 1px;
    padding: 3px 10px 3px 10px; /*1px 6px 1px 6px;*/
    background-color: #504F4C;
}

table.pui-tbl tfoot td {
  font-size: 1rem;
}

.pui-width-1-1 {
    display: block;
    width: calc( 100% - 20px );
    margin: 10px;
}

.pui-inp {
    border:1px solid #B0B0B0;
    font-family: Verdana, Arial, Helvetica, Tahoma, sans-serif;
    font-size: 1.05rem;
	min-height:1.05rem;
    color: #191970;
    background-color: #F5F5F5;
    vertical-align: middle;
}

.pui-inp.uk-width-1-1 {
	width: calc( 100% - 10px );
}

.hotkeys_block { margin: calc( 2px * var(--sizerem) ) calc( 6px * var(--sizerem) ) calc( 2px * var(--sizerem) ) 0; }

.hotkey {
	width: calc( 40px * var(--sizerem) );
	height: calc( 25px * var(--sizerem) );
	background-image: url(/static/img/pr_clear.gif);
	background-size: contain;
	display: inline-block;
	vertical-align: middle;
	position: relative;
	user-select: none !important;
    cursor: pointer !important;
}

.hotkey_btn {
    display: inline-block;
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    height: calc( 20px * var(--sizerem) );
    line-height: calc( 18px * var(--sizerem) );
    box-sizing: border-box;
    font-size: calc( 12px * var(--sizerem) );
    font-weight: 700;
    text-align: center;
    text-transform: capitalize;
    color: #444;
    border-color: #f2f2f2;
    border-style: solid;
    border-width: 1px;
    border-radius: 1px;
    background: -webkit-linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    background: -o-linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    background: linear-gradient(#f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
    font-family: sans-serif;
    transition: box-shadow 0.3s ease, transform 0.15s ease;
    box-shadow: 0 0 1px #888, 0 1px 0 #fff, 0 6px 0 #C0C0C0, 0 8px 17px rgba(#444, 0.4), 2px 1px 4px rgba(#444, 0.25), -2px 1px 4px rgba(#444, 0.25), 0 9px 16px rgba(#444, 0.1);
}

.hotkey_btn:focus , .hotkey_btn:hover {
	color: #222;
	background: -webkit-linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	background: -o-linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	background: linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	box-shadow: 0 0 1px #888, 0 1px 0 #fff, 0 4px 0 #C0C0C0, 0 2px 35px rgba(#444, 0.3), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 7px 4px rgba(#444, 0.1);
}

.hotkey_btn:active {
	color: #222;
	background: -webkit-linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	background: -o-linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	background: linear-gradient(#ffffff 0%, #e6e6e6 80%, #d3d3d3 100%);
	box-shadow: 0 0 1px #888, 0 1px 0 #fff, 0 0 0 #C0C0C0, 0 0px 30px rgba(#444, 0.15), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 0px 4px rgba(#444, 0.25);
	top:3px;
	left:4px;
	right:4px;
	height: 19px;
}

.hotkey_btn_active {
    display: inline-block;
    position: absolute;
    top: 2px;
    left: 3px;
    right: 3px;
    height: calc( 20px * var(--sizerem) );
    line-height: calc( 18px * var(--sizerem) );
    box-sizing: border-box;
    font-size: calc( 12px * var(--sizerem) );
    font-weight: 700;
    text-align: center;
    text-transform: capitalize;
    border-style: solid;
    border-width: 1px;
    border-radius: 1px;
    font-family: sans-serif;
    transition: box-shadow 0.3s ease, transform 0.15s ease;
    color: #222;
    box-shadow: 0 0 1px #888, 0 1px 0 #fff, 0 0 0 #C0C0C0, 0 0px 30px rgba(#444, 0.15), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 0px 4px rgba(#444, 0.25);
    transform: translateY(1px);	
    background: -webkit-linear-gradient(#ffc8c5 0%, #c88d88 100%);
    background: -o-linear-gradient(#ffc8c5 0%, #c88d88 100%);
    background: linear-gradient(#ffc8c5 0%, #c88d88 100%);
    border-color: #9e716c;
}

/* ================= 5. uk-* subset (uikit.css в client.html не подключён) ================= */
.uk-width-1-1 { width: 100%; }

.uk-width-1-2 { width: 50%; }

.uk-width-1-3 { width: 33.333%; }

.uk-width-2-3 { width: 66.666%; }

.uk-width-1-4 { width: 25%; }

.uk-width-3-4 { width: 75%; }

.uk-width-1-5 { width: 20%; }

.uk-width-2-5 { width: 40%; }

.uk-width-3-5 { width: 60%; }

.uk-width-4-5 { width: 80%; }

/* classicbk-карточки предметов (itemInfoInv) содержат `uk-grid` как АТРИБУТ,
   но без класса `.uk-grid`: UIkit-JS класс не добавляет, поэтому без этого
   фолбэка строка остаётся display:block и правая колонка падает под левую.
   Фолбэк ограничен карточкой предмета, прочие `uk-grid`-атрибуты не трогаем. */
.uk-grid,
.box_inv[uk-grid] {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* uikit.css:6843 — правая колонка карточки занимает остаток строки.
   min-width:0 (вместо 1px в classicbk) — длинный текст переносится, а не
   распирает flex-строку. */
.uk-width-expand {
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
}

.uk-margin-remove { margin: 0 !important; }

.uk-padding-remove { padding: 0 !important; }

.uk-grid > * {
  /*padding-left: 30px;*/
}

.uk-grid > * > :last-child {
  margin-bottom: 0;
}

ul.uk-grid {
  list-style: none;
  padding: 0;
}

.uk-grid-collapse {
  margin-left: 0;
}

.uk-grid-collapse > * {
  padding-left: 0;
}

/* Диалоги подтверждения (bk.win): разметка classicbk использует `uk-grid`
   АТРИБУТОМ (без класса). Без flex две колонки `.uk-width-1-2` идут блоками:
   кнопки «Да»/«Нет» наезжают друг на друга. */
.win_s1_main [uk-grid],
.win_s2_main [uk-grid] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.win_s1_main [uk-grid] > *,
.win_s2_main [uk-grid] > * {
  min-width: 0;
}

/* ================= 6. Иконки валюты (bridge.js, модуль «Игровая валюта») ================= */
.cur-ico {
	vertical-align: middle;
	max-height: calc(14px * var(--sizerem));
	margin: 0 2px 1px 0;
}

/* ================= 7. COMPAT: location (перенести в modules/location/location.css) ================= */
.rm_ttl_online_selected {
	background-color: #acacac; /* #70BF70 */
	outline: 1px solid #919191; /* #70BF70 */
	color:#000000 !important;
}

.links_a { position: relative; }

.rm_ttl_cancel {
	opacity: 0;
	position: absolute;
	width: 100%;
	top:0px;
	right: 0px;
	height: 100%;
	cursor: pointer;
	background-color: red;
	color:red;
	z-index: 1;
	text-align: right;
}

.loc-pers-head { text-align: center; margin-bottom: 2px; white-space: nowrap; }

.loc-cell-pers .loc-panel-body { min-height: 0; }
.links_a a {
    font-size: 0.8rem;
    color:#3b3936;
}

.iloc_sel1 {
    background-color: rgba(0,41,200,0.39);
}

.locsnow {
	position: absolute;
	z-index: 1000; /* 3000 */
}

.eloc_bg {
    display:inline-block;
    background-size:cover;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.eloc_obj {
    display:inline-block;
    background-size:cover;
    cursor: pointer;
    position: absolute;
    border:2px solid rgba(255,255,255,0.00);
}

/* ================= 9. COMPAT: info/battle/shadow (перенести в модульные css при порте) ================= */
.shadow-pers {
    /* classicbk project-ui.css: 120×220; было 250 → строка pi_block растягивалась (68px) */
    width: 120px;
    height: 220px;
    background-repeat: no-repeat;
    background-position: center center;
	background-size: contain;
	position: relative;
}

.shadow-title {
	position: absolute;
	width: 120px;
	height: 220px;
	top:0px;
	left: 0px;
	z-index: 1;
}

.shadow-effs {
	position: absolute;
	width: calc( 120px * var(--sizerem) );;
	height: 1px;
	top:calc( 2px * var(--sizerem) ); /* top:0px; */
	left: 0px;
	z-index: 2;
	word-break:normal;
}

.shadow-effs.mp-yes {
	top:calc( 2px * var(--sizerem) ); /* top:0px; */
}

.shadow-pers-bg {
    background-repeat: no-repeat;
    background-position: bottom center; 
	background-size: cover;
}

#btl_info_enemy .shadow-pers {
    transform: scaleX(-1);
}

#btl_info_enemy .shadow-pers > * {
    transform: scaleX(-1);   /* возвращаем содержимое в нормальный вид */
}

.hp_line_none {
    width: 100%;
    height: 9px;               /* classicbk project-ui.css: 9px (было 11 → блок разъезжался) */
    font-size: 9px;
    background-repeat: repeat-x;
    /*background-position: 0 -36px;*/
    position: relative;
    background: linear-gradient(180deg, 
        #4a4a4a 0%,
        #3d3d3d 30%,
        #333333 50%,
        #3d3d3d 70%,
        #4a4a4a 100%);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
}

.hp_line_bg {
    height: 9px;
    font-size: 9px;
    background-color: mediumvioletred;
    background-repeat: repeat-x;
    position: relative;
}

.hp_line_title {
    color:#fff;
    line-height: 9px;
    font-weight: bold;
    position: absolute;
    top: 0px;
    left: calc( 5px * var(--sizerem) );
}

.hp_line_1 { background: linear-gradient(180deg, #b40104 0%, #b60002 12.5%, #bc0102 25%, #c50102 37.5%, #ce0002 50%, #d70101 62.5%, #e20203 75%, #eb0305 87.5%, #ee0002 100%); }

.hp_line_2 { background: linear-gradient(180deg, #a47200 0%, #a67300 12.5%, #aa7600 25%, #b37b00 37.5%, #bb8201 50%, #c48901 62.5%, #cd9002 75%, #d59503 87.5%, #d89602 100%); }

.hp_line_3 { background: linear-gradient(180deg, #04840d 0%, #04850e 12.5%, #038b0f 25%, #039111 37.5%, #049814 50%, #04a017 62.5%, #07aa1c 75%, #09b221 87.5%, #05b620 100%); }

.mp_line_none {
    width: 100%;
    height: 9px;               /* classicbk project-ui.css: 9px (было 11 → блок разъезжался) */
    font-size: 9px;
    background-repeat: repeat-x;
    /*background-position: 0 -36px;*/
    position: relative;
    /*margin-top: 1px;*/
    background: linear-gradient(180deg, 
        #4a4a4a 0%,
        #3d3d3d 30%,
        #333333 50%,
        #3d3d3d 70%,
        #4a4a4a 100%);
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3);
	/*border-top:calc( 1px * var(--sizerem) ) solid #333333;*/
	/*margin-top: 1px;
	margin-bottom: 1px;*/
}

.mp_line_bg {
    height: 9px;               /* classicbk project-ui.css: 9px (было 11 → блок разъезжался) */
    font-size: 9px;
    background-repeat: repeat-x;
    position: relative;
}

.mp_line_title {
    color:#80ffff;
    line-height: 9px;
    font-weight: bold;
    position: absolute;
    top: 0px;
    left: calc( 5px * var(--sizerem) );
}

.mp_line_1 { background: linear-gradient(180deg, #1d629d 0%, #004482 12.5%, #014187 25%, #044a92 37.5%, #004e98 50%, #0056a0 62.5%, #015ca3 75%, #1064aa 87.5%, #1c61a6 100%); }

.mp_line_2 { background: linear-gradient(180deg, #1d629d 0%, #004482 12.5%, #014187 25%, #044a92 37.5%, #004e98 50%, #0056a0 62.5%, #015ca3 75%, #1064aa 87.5%, #1c61a6 100%); }

.mp_line_3 { background: linear-gradient(180deg, #1d629d 0%, #004482 12.5%, #014187 25%, #044a92 37.5%, #004e98 50%, #0056a0 62.5%, #015ca3 75%, #1064aa 87.5%, #1c61a6 100%); }

.bkii-hp-line {
	background: rgb(101,101,101);
	background: linear-gradient(0deg, rgba(101,101,101,1) 0%, rgba(56,56,56,1) 99%, rgba(101,101,101,1) 100%);
	height:calc( 11px * var(--sizerem) );
	position:relative;
	width:100%;
	cursor:default;
}

.bkii-hp-line span {
	color:#fff;
	position:absolute;
	left:calc( 5px * var(--sizerem) );
	top:calc( 0px * var(--sizerem) );
	font-weight:bolder;
	font-size:calc( 9px * var(--sizerem) );
}

.hp-in {
	height:calc( 11px * var(--sizerem) );
	top:0;
	left:0;
	position:absolute;
	transition:all 0.3s ease-in-out;
}

.bkii-hp-green {
	background: rgb(4,132,15);
    background: linear-gradient(180deg, 
        #4caf50 0%,
        #388e3c 30%,
        #2e7d32 50%,
        #388e3c 70%,
        #4caf50 100%);
}

.bkii-hp-yellow {
	background: rgb(164,115,0);
    background: linear-gradient(180deg, 
        #d48900 0%,
        #c77800 30%,
        #b87400 50%,
        #c77800 70%,
        #d48900 100%);
}

.bkii-hp-red {
	background: rgb(181,1,1);
    background: linear-gradient(180deg, 
        #c62828 0%,
        #b71c1c 30%,
        #a31515 50%,
        #b71c1c 70%,
        #c62828 100%);
}

.hp-in2 {
	background-color:rgba(255,0,0,0.55);
	height:calc( 10px * var(--sizerem) );
	top:calc( 1px * var(--sizerem) );
	left:0;
	position:absolute;
	transition:all 1s ease-in-out;
}

.bkii-mp-line {
	background: rgb(101,101,101);
	background: linear-gradient(0deg, rgba(101,101,101,1) 0%, rgba(56,56,56,1) 99%, rgba(101,101,101,1) 100%);
	height:calc( 11px * var(--sizerem) );
	position:relative;
	width:100%;
	/*margin-top:calc( 1px * var(--sizerem) );*/
	/*margin-bottom:1px;*/
	cursor:default;
}

.bkii-mp-line span {
	color:#8fffff;
	position:absolute;
	left:calc( 5px * var(--sizerem) );
	top:calc( 0px * var(--sizerem) );
	font-weight:bolder;
	font-size:calc( 9px * var(--sizerem) );
}

.mp-in {
	background: rgb(8,102,183);
    background: linear-gradient(180deg, 
        #1976d2 0%,
        #1565c0 30%,
        #0d47a1 50%,
        #1565c0 70%,
        #1976d2 100%);
	height:calc( 11px * var(--sizerem) );
	top:0;
	left:0;
	position:absolute;
	transition:all 0.3s ease-in-out;
}

.mp-in2 {
	background-color:rgba(50,227,255,0.35);
	height:calc( 10px * var(--sizerem) );
	top:calc( 1px * var(--sizerem) );
	left:0;
	position:absolute;
	transition:all 1s ease-in-out;
}

/* ================= 10. COMPAT: info-win (перенести в modules/info/info.css) ================= */
.inf_regen_box {
    background-color: #e2e0e0;
}

.info-win { position: fixed; z-index: 100070; display: flex; flex-direction: column;
  width: 700px; max-width: calc(100vw - 20px); max-height: calc(100vh - 80px); box-sizing: border-box;
  background: #f2f0f0; border: 1px solid #888; box-shadow: 3px 3px 10px rgba(0,0,0,.4); min-width: 320px; min-height: 200px; }

.info-win-backdrop { position: fixed; inset: 0; z-index: 100060; background: rgba(0,0,0,.18); touch-action: none; }

html.mpg-info-lock, html.mpg-info-lock body { overflow: hidden !important; overscroll-behavior: none !important; touch-action: none; }

.info-win-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.info-win-rs { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, #9a9a9a 50%, #9a9a9a 65%, transparent 65%, transparent 75%, #9a9a9a 75%, #9a9a9a 90%, transparent 90%); }

.info-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0.3rem 0.45rem; background: #d2d0d0; border-bottom: 1px solid #b6b3b3; font-weight: bold;
  font-size: 0.9rem; cursor: move; user-select: none; }

.info-win-actions { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }

.info-modal-refresh { border: 1px solid #9a9a9a; background: #e8e6e6; height: 20px; line-height: 1;
  cursor: pointer; font-size: 11px; padding: 0 6px; white-space: nowrap; }

.info-modal-x { border: 1px solid #9a9a9a; background: #e8e6e6; width: 22px; height: 20px; line-height: 1;
  cursor: pointer; font-size: 12px; padding: 0; }

.info-modal-body { flex: 1; overflow: auto; padding: 0.5rem; background: #e2e0e0; }

.info-win .info-head { text-align: center; margin-bottom: 2px; }

.info-win .pi_block { margin: 0 auto; }

.info-win .small_b { display: inline-block; }

.info-win .pi_hr { border: 0; border-bottom: 1px solid #9a9a9a; margin-top: 6px; margin-bottom: 6px; }

.info-win .pi_hr_m2 { width: calc(100% - 8px); }
@media (max-width: 899px) {
  .info-win { left: 10px !important; right: 10px !important; top: 30px !important; bottom: 30px !important;
    width: auto !important; height: auto !important; max-width: none !important; max-height: none !important;
    min-width: 0 !important; min-height: 0 !important; }
  .info-win .info-win-rs { display: none; }
}

/* Карточка предмета на узком экране (classicbk не адаптирован): строка остаётся
   одной, левая колонка фиксированная/сжатая, правая занимает остаток и переносит
   длинные названия — без горизонтального скролла страницы. */
@media (max-width: 560px) {
  .box_inv[uk-grid] { flex-wrap: nowrap; }
  .box_inv[uk-grid] > .box_inv_l {
    flex: 0 1 auto;
    max-width: 45%;
    box-sizing: border-box;
  }
  .box_inv[uk-grid] > .box_inv_r {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Мобильная оболочка: ячейка #main не должна раздвигать #main_table шире
   экрана (иначе карточки предметов в модулях с широкой шапкой/табами —
   repair, commission — получают строку шире viewport). table-layout:fixed
   применяется только в мобильном режиме; на десктопе раскладка classicbk
   не меняется. */
@media (max-width: 899px) {
  html:not(.mpg-force-desktop) #main_table {
    width: 100% !important;
    table-layout: fixed;
  }
  html:not(.mpg-force-desktop) #main_table > tbody > tr > td:not(.border-line-left):not(.border-line-right) {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  html:not(.mpg-force-desktop) #main {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
  }
}


/* ================= Масштаб «Размер интерфейса» для классических блоков =================
   Часть разметки classicbk задаёт размеры в px (картинки слотов, таблицы, окна),
   поэтому rem/--sizerem их не менял. zoom масштабирует и содержимое, и занимаемое
   место: блок персонажа/характеристик, картинки предметов, магазин и диалоги. */
.pi_block,
#uid-my-stats-inv,
.shop-scale,
.dimg {
  zoom: var(--sizerem, 1);
}
/* Внутри zoom масштаб уже применён: фиксируем базовый кегль и отключаем
   повторное умножение на --sizerem у дочерних classic-правил. */
.pi_block,
#uid-my-stats-inv,
.shop-scale,
.win_pos > .win_s1_box,
.win_pos > .win_s2_box,
.win_pos > table {
  font-size: 10pt;
}
/* rem-кегль small считается от <html> и внутри zoom удваивался бы;
   привязываем его к базовому кеглю контейнера (10pt), масштаб даёт zoom. */
.pi_block small,
#uid-my-stats-inv small,
.shop-scale small,
.win_pos > .win_s1_box small,
.win_pos > .win_s2_box small,
.win_pos > table small {
  font-size: 0.88em;
}
/* --sizerem:1 только у потомков: сам контейнер должен получить zoom извне. */
.pi_block *,
#uid-my-stats-inv *,
.shop-scale *,
.win_pos > .win_s1_box *,
.win_pos > .win_s2_box *,
.win_pos > table * {
  --sizerem: 1;
}
/* Окна: масштабируем содержимое, но не .win_pos — чтобы перетаскивание
   оставалось 1:1 с курсором (left/top окна не масштабируются). */
.win_pos > .win_s1_box,
.win_pos > table {
  zoom: var(--sizerem, 1);
}
/* Картинки предметов в списках инвентаря (вне блока персонажа) */
#main_tbl_inventory img { zoom: var(--sizerem, 1); }
#main_tbl_inventory .pi_block img { zoom: 1; }
/* Инфо-иконка уже получает размер через width/height calc(--sizerem);
   в инвентаре не масштабируем её ещё раз zoom-ом. */
#main_tbl_inventory .i-inf,
#main_tbl_inventory .i-inf2,
#main_tbl_inventory img[data-city] { zoom: 1; }
/* Внутри уже масштабируемого окна/магазина не масштабируем повторно */
.win_pos .pi_block,
.win_pos #uid-my-stats-inv,
.win_pos .dimg,
.shop-scale .dimg {
  zoom: 1;
}


/* Меню логина в чате: classic-размеры в px/pt — масштабируем кегль и отступы,
   чтобы offsetWidth/offsetHeight в openMenu оставались реальными. */
#hover-menu {
  border-width: calc(1px * var(--sizerem, 1));
  font-size: calc(9px * var(--sizerem, 1));
}
#hover-menu a {
  font-size: calc(8pt * var(--sizerem, 1));
  padding: calc(2px * var(--sizerem, 1)) calc(12px * var(--sizerem, 1)) calc(2px * var(--sizerem, 1)) calc(8px * var(--sizerem, 1));
}



/* Значок «Инф. о персонаже» (домик города): масштабируется вместе с интерфейсом
   и рисуется пиксельно, как превью в редакторе городов. */
.i-inf,
.i-inf2,
img[data-city] {
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  width: calc(12px * var(--sizerem, 1));
  height: calc(11px * var(--sizerem, 1));
}


/* Картинки предметов: width/height уже пересчитаны под --sizerem в HTML.
   В списках инвентаря отключаем дополнительный zoom, а внутри zoom-контейнеров
   (магазин/окна/образ) компенсируем его, чтобы размер не удваивался. */
.mpg-item-img { zoom: 1 !important; }
html[data-sizerem="15px"] .shop-scale .mpg-item-img,
html[data-sizerem="15px"] .win_pos .mpg-item-img,
html[data-sizerem="15px"] .pi_block .mpg-item-img { zoom: 0.833333 !important; }
html[data-sizerem="16px"] .shop-scale .mpg-item-img,
html[data-sizerem="16px"] .win_pos .mpg-item-img,
html[data-sizerem="16px"] .pi_block .mpg-item-img { zoom: 0.714286 !important; }
html[data-sizerem="17px"] .shop-scale .mpg-item-img,
html[data-sizerem="17px"] .win_pos .mpg-item-img,
html[data-sizerem="17px"] .pi_block .mpg-item-img { zoom: 0.666667 !important; }


/* Skeleton модального окна «Информация о персонаже» */
.info-skeleton { min-height: 100%; color: transparent; padding: 37px 11px 0 15px; box-sizing: border-box; }
.info-sk-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr) 110px; gap: 14px; align-items: start; }
.info-sk-col { min-width: 0; }
.info-sk-avatar, .info-sk-zodiac-img, .info-sk-line, .info-sk-title {
    background: linear-gradient(100deg, #cfcfcf 20%, #e2e2e2 40%, #cfcfcf 60%);
    background-size: 200% 100%;
    animation: info-sk-pulse 1.3s linear infinite;
    border-radius: 1px;
}
.info-sk-avatar { width: 240px; max-width: 100%; height: 286px; border: 1px solid #b5b5b5; box-sizing: border-box; margin-bottom: 10px; }
.info-sk-zodiac-img { width: 100px; height: 100px; margin: 20px auto 10px; }
.info-sk-line { height: 11px; margin-bottom: 8px; }
.info-sk-title { height: 14px; width: 55%; margin-bottom: 13px; }
.info-sk-w30 { width: 30%; } .info-sk-w45 { width: 45%; } .info-sk-w55 { width: 55%; }
.info-sk-w70 { width: 70%; } .info-sk-w80 { width: 80%; }
.info-sk-anketa { border-top: 1px solid #d0cdcd; margin-top: 14px; padding-top: 12px; max-width: 760px; }
@keyframes info-sk-pulse { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
@media (max-width: 730px) {
    .info-skeleton { padding: 24px 10px 0 12px; }
    .info-sk-grid { grid-template-columns: 1fr; }
    .info-sk-zodiac { display: none; }
}


/* Skeleton блока персонажа в комнате (первый заход без кэша) */
.info-own-skel { width: 246px; box-sizing: border-box; }
.info-own-skel-avatar, .info-own-skel-line {
    background: linear-gradient(100deg, #cfcfcf 20%, #e2e2e2 40%, #cfcfcf 60%);
    background-size: 200% 100%;
    animation: info-sk-pulse 1.3s linear infinite;
}
.info-own-skel-avatar { width: 240px; max-width: 100%; height: 286px; border: 1px solid #b5b5b5; box-sizing: border-box; margin-bottom: 9px; }
.info-own-skel-line { height: 11px; margin-bottom: 8px; }
.info-own-skel-w70 { width: 70%; } .info-own-skel-w45 { width: 45%; } .info-own-skel-w60 { width: 60%; }


/* Инвентарь: колонка персонажа как в локации (фиксированная ширина ячейки,
   заголовок логина не должен попадать под общий zoom картинок инвентаря). */
#main_tbl_inventory { table-layout: fixed; }
#main_tbl_inventory .loc-pers-head img { zoom: 1 !important; }

/* ================= 11. Выделяемый текст внутри .noselect =================
 * Классический каркас bk2 ставит .noselect на целые колонки (правая колонка
 * локации, карцер): текст нельзя выделить и скопировать. Для нужных блоков
 * (предупреждение о пароле и т.п.) достаточно повесить .mpg-selectable —
 * потомок перекрывает user-select предка, включая вложенные b/u/i. */
.mpg-selectable,
.mpg-selectable * {
    -webkit-user-select: text;
       -khtml-user-select: text;
         -moz-user-select: text;
          -ms-user-select: text;
              user-select: text;
}

/* ================= 12. «Настройки боя» (раздел страницы «Настройки») =================
 * Разметка повторяет bk.canalBattleHTML в classicbk: слева название группы,
 * справа радио/флажки; подпункты «Удара при выставлении хода» с отступом. */
.mpg-btl-set td { vertical-align: top; }
.mpg-btl-set .mpg-btl-set-t { width: 20rem; padding: 4px 6px 4px 0; }
.mpg-btl-row { padding: 3px 0; }
.mpg-btl-row label { cursor: pointer; }
.mpg-btl-row small { color: #666; }
.mpg-btl-row input[type="radio"],
.mpg-btl-row input[type="checkbox"] { vertical-align: middle; margin-right: 3px; }
.mpg-btl-set .mpg-btl-sub { padding-left: 30px; }
