/* =========================================================
   LINEAGERS.NET — адаптив для телефонов и планшетов.
   Всё внутри @media (max-width:1199px): десктоп (1200px+) не меняется.
   Вне медиа-запроса — только скрытые элементы и карточки вместо офлайн-стримов.
   ========================================================= */

.m-burger,
.m-brand {
	display: none;
}

.sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.logotype-h1 {
	margin: 0;
	font-size: inherit;
}

/* Карточки на месте офлайн-стримов (десктоп и мобильные) */
.stream .frame.stream-promo__frame {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 12px 20px;
	box-sizing: border-box;
	text-align: center;
	text-decoration: none;
}

.stream-promo__ico {
	width: 26px;
	height: 26px;
	fill: #ffc600;
	filter: drop-shadow(0 0 6px rgba(255, 180, 0, 0.45));
}

.stream-promo__name {
	display: block;
	color: #ffce66;
	font-family: calibrib, "Roboto", sans-serif;
	font-size: 16px;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.stream-promo__text {
	display: block;
	color: #cfc6a8;
	font-size: 12px;
	line-height: 1.35;
}

.stream-promo__frame:hover .stream-promo__name {
	color: #fff0b8;
}

/* =========================================================
   Планшеты и телефоны
   ========================================================= */
@media (max-width: 1199px) {

	#general {
		min-width: 0;
		height: auto;
		overflow: visible;
		overflow-x: clip;
		background:
			linear-gradient(180deg, rgba(16, 13, 1, 0) 200px, #100d01 292px) no-repeat center top / 100% 292px,
			url(../images/bg1.jpg?v=2) no-repeat center -58px / 1340px auto,
			#100d01;
		padding-bottom: 8px;
	}

	.wrapper {
		width: auto;
		max-width: 760px;
		margin: 0 auto;
		box-sizing: border-box;
	}

	/* ---------- Верхняя панель + бургер ---------- */
	#nav.navigation {
		position: sticky;
		top: 0;
		z-index: 60;
		max-width: none;
		height: 56px;
		padding: 0 12px;
		display: flex;
		align-items: center;
		gap: 12px;
		background: rgba(14, 11, 4, 0.94);
		border-bottom: 1px solid rgba(255, 198, 0, 0.22);
		box-shadow: 0 4px 16px rgba(0, 0, 0, 0.55);
	}

	.m-burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		flex-shrink: 0;
		width: 44px;
		height: 40px;
		padding: 0 11px;
		background: rgba(255, 198, 0, 0.06);
		border: 1px solid rgba(255, 198, 0, 0.35);
		border-radius: 6px;
		cursor: pointer;
		box-sizing: border-box;
	}

	.m-burger span,
	.m-burger:before,
	.m-burger:after {
		content: "";
		display: block;
		height: 2px;
		background: #ffc600;
		border-radius: 2px;
		transition: transform 0.25s, opacity 0.2s;
	}

	#nav.m-open .m-burger span {
		opacity: 0;
	}

	#nav.m-open .m-burger:before {
		transform: translateY(7px) rotate(45deg);
	}

	#nav.m-open .m-burger:after {
		transform: translateY(-7px) rotate(-45deg);
	}

	.m-burger:focus-visible {
		outline: 2px solid #ffc600;
		outline-offset: 2px;
	}

	.m-brand {
		display: block;
		color: #ffce66;
		font-family: albexbold, "Roboto", sans-serif;
		font-size: 19px;
		letter-spacing: 1.5px;
		text-shadow: 0 0 10px rgba(255, 160, 0, 0.35);
	}

	#nav ul.navi {
		display: none;
		position: absolute;
		top: 56px;
		left: 0;
		right: 0;
		height: auto;
		max-height: calc(100vh - 56px);
		overflow-y: auto;
		padding: 6px 0 10px;
		background: rgba(14, 11, 4, 0.98);
		border-bottom: 1px solid rgba(255, 198, 0, 0.22);
		box-shadow: 0 14px 28px rgba(0, 0, 0, 0.6);
	}

	#nav.m-open ul.navi {
		display: block;
	}

	#nav ul.navi li {
		display: block;
		float: none;
		height: auto;
	}

	#nav ul.navi li a,
	#nav ul.navi li:first-child a {
		height: auto;
		padding: 11px 22px;
		border-bottom: 1px solid rgba(255, 255, 255, 0.05);
	}

	#nav ul.navi li:last-child a {
		border-bottom: 0;
	}

	#nav ul.navi li a span {
		padding-top: 0;
		font-size: 15px;
	}

	#nav ul.navi li a p {
		top: 0;
		margin-top: 2px;
	}

	.langs {
		margin: 0 0 0 auto;
		width: 78px;
	}

	.lang__link_select {
		width: 78px;
	}

	.lang__name_select {
		font-size: 15px;
		margin-right: 8px;
	}

	/* на телефоне нет hover — список языков открывается по тапу (класс из скрипта) */
	.langs.m-langs-open .lang__list {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	/* ---------- Шапка ---------- */
	#header {
		height: auto;
		padding: 0 12px 18px;
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}

	#header > br {
		display: none;
	}

	.logotype-h1 {
		order: 0;
		width: 100%;
	}

	.logotype {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		max-width: 380px;
		height: 196px;
		margin: 0 auto;
	}

	#status {
		order: 1;
		position: relative;
		bottom: auto;
		height: auto;
		margin-top: 22px;
	}

	#status .item {
		margin: 0 10px;
	}

	.timerhello {
		order: 2;
		position: relative;
		top: auto;
		right: auto;
		width: 100%;
		max-width: 359px;
		margin-top: 4px;
	}

	.timerhello .title {
		color: #e9dfc0;
		text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
	}

	.timerhello .second-my-content {
		width: 100%;
		max-width: 359px;
		background-size: 100% 100%;
	}

	.header-register,
	.header-load,
	.header-account {
		position: relative;
		top: auto;
		right: auto;
		margin: -6px auto -12px;
	}

	.header-register {
		order: 3;
		margin-top: 4px;
	}

	.header-load {
		order: 4;
	}

	.header-account {
		order: 5;
	}

	#header > a[href*="l2oops"] {
		order: 7;
		margin-top: 10px;
		/* в шаблоне inline z-index:99999 — во flex-раскладке он перекрывал cookie-панель */
		z-index: 1 !important;
	}

	ul.social {
		order: 6;
		position: relative;
		top: auto;
		left: auto;
		display: flex;
		align-items: center;
		gap: 8px;
		height: auto;
		margin-top: 18px;
		list-style: none;
	}

	ul.social span {
		float: none;
		color: #a39d86;
		margin: 0 4px 0 0;
	}

	ul.social li {
		float: none;
		margin: 0;
	}

	ul.social li:empty {
		display: none;
	}

	ul.social li a img {
		width: 28px;
		height: 28px;
	}

	/* ---------- Контент: одна колонка ---------- */
	#content {
		height: auto;
		display: flex;
		flex-direction: column;
		gap: 14px;
		padding: 0 10px;
	}

	#content .left-side,
	#content .right-side {
		display: contents;
	}

	.news-block {
		order: 1;
	}

	.about-block {
		order: 2;
	}

	.block-shares {
		order: 3;
	}

	.stream {
		order: 4;
	}

	#content .left-side .side {
		order: 5;
	}

	#content .left-side .side.top-rate {
		order: 6;
	}

	#content .left-side .side.top-clan {
		order: 7;
	}

	#content .left-side .side,
	.news-block,
	.about-block,
	.block-shares,
	.stream {
		position: relative;
		left: auto;
		width: auto;
		height: auto;
		margin: 0;
		padding: 16px 14px;
		box-sizing: border-box;
		background: linear-gradient(180deg, rgba(40, 32, 18, 0.94), rgba(17, 13, 7, 0.96));
		border: 1px solid rgba(255, 198, 0, 0.2);
		border-radius: 8px;
		box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.55), 0 8px 20px rgba(0, 0, 0, 0.45);
	}

	/* ---------- Новости ---------- */
	.news-block .slider {
		position: relative;
		top: auto;
		left: auto;
		width: auto;
		height: auto;
	}

	.news-block .slider .news {
		width: auto;
		height: auto;
	}

	.news-block .slider .news .title {
		font-size: 15px;
		line-height: 1.3;
	}

	.news-block .slider .news .frame {
		width: auto;
		height: auto;
		aspect-ratio: 516 / 84;
		overflow: hidden;
	}

	.news-block .slider .news .frame img {
		height: 100%;
		object-fit: cover;
	}

	.news-block .slider .news .text {
		height: auto;
	}

	.news-block .slider .pager {
		text-align: center;
	}

	.news-block .short-news {
		position: relative;
		top: auto;
		right: auto;
		width: auto;
		margin-top: 18px;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
		gap: 6px;
		justify-items: center;
	}

	.news-block .short-news .news {
		margin: 0;
	}

	/* ---------- Наборы (магазин) ---------- */
	.shop {
		padding: 0;
		grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
		gap: 12px;
	}

	/* ---------- Акции ---------- */
	.block-shares {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		gap: 8px;
	}

	.block-shares .title-shares {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		margin: 0 0 4px;
		text-align: center;
	}

	.block-shares .btn-shares,
	.block-shares .btn-shares-1,
	.block-shares .btn-shares-2 {
		position: relative;
		top: auto;
		left: auto;
		right: auto;
	}

	.block-shares .block {
		position: relative;
		top: auto;
		left: auto;
		width: 100%;
		display: flex;
		flex-direction: column;
		gap: 4px;
		margin-top: 6px;
	}

	.block-shares .block .item {
		float: none;
		width: auto;
		min-height: 55px;
		padding: 6px 8px 6px 4px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		border-radius: 6px;
	}

	.block-shares .block .item .img {
		left: 4px;
	}

	/* ---------- Стримы / карточки ---------- */
	.stream .arrows {
		display: none;
	}

	.stream .inner {
		top: auto;
		left: auto;
		height: auto;
		display: grid;
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 14px;
		justify-items: center;
	}

	.stream .item {
		float: none;
		height: auto;
		margin: 0;
	}

	.stream .item .title {
		top: auto;
		margin-top: 8px;
	}

	/* ---------- Форум и рейтинги ---------- */
	#content .left-side .side .title {
		padding-top: 0;
	}

	.forum .item {
		width: auto;
	}

	#content .left-side .side > div[style] {
		height: auto !important;
	}

	/* ---------- Подвал ---------- */
	#footer {
		height: auto;
		margin: 26px auto 0;
		padding: 0 18px 24px;
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
		gap: 18px 12px;
	}

	#footer ul.nav {
		float: none;
		margin: 0;
	}

	#footer .banner {
		display: none;
	}

	#footer .copyright {
		position: relative;
		top: auto;
		right: auto;
		grid-column: 1 / -1;
		width: auto;
		text-align: center;
		line-height: 1.5;
		color: #bdb6a0;
	}

	/* ---------- Всплывающие окна (скачать файлы и т.д.) ---------- */
	#popup .popup-content {
		top: 64px;
		max-width: calc(100% - 16px);
	}

	#popup .popup-load,
	#popup .popup-donate,
	#popup #popup-about,
	#popup #popup-servers,
	#popup .popup-donat,
	#popup .popup-about {
		width: auto;
		height: auto;
		min-height: 0;
		padding: 18px 14px 26px;
		box-sizing: border-box;
		background: linear-gradient(180deg, #2a2214, #15110a);
		border: 1px solid rgba(255, 198, 0, 0.3);
		border-radius: 10px;
	}

	#popup .popup-load:before,
	#popup .popup-load:after,
	#popup .popup-donate:before,
	#popup .popup-donate:after,
	#popup .popup-about:before,
	#popup .popup-about:after {
		display: none;
	}

	#popup .popup-content .popup-close,
	#popup .popup-content.popup-load .popup-close,
	#popup .popup-content.popup-about .popup-close {
		top: 14px;
		right: 14px;
		width: 28px;
		height: 28px;
		background-position: center;
	}

	#popup .popup-load .title,
	#popup .popup-donate .title,
	#popup .popup-about .title,
	#popup #popup-about .title {
		width: auto;
		margin: 6px 30px 0;
	}

	#popup .popup-load-block,
	#popup .popup-donate-block,
	#popup .popup-about-block {
		width: auto;
		margin: 18px 0 0;
	}

	#popup .popup-load-block .item,
	#popup .popup-donate-block .item {
		width: auto;
		margin-left: 0;
	}

	#popup .popup-load-block .item .popup-line-files,
	#popup .popup-donate-block .item .popup-line-files {
		width: auto;
		height: auto;
		padding: 8px 10px;
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
	}

	#popup .popup-load-block .item .popup-line-files span {
		position: relative;
		float: none;
		margin-left: 0;
		line-height: 1.3;
	}

	#popup .popup-load-block .item .popup-line-files .link {
		float: none;
		height: auto;
		display: flex;
		flex-wrap: wrap;
		gap: 2px 6px;
		justify-content: center;
		width: 100%;
		line-height: normal;
	}

	#popup .popup-load-block .item .popup-line-files .link a {
		float: none;
		top: 0;
		margin: 0;
	}

	#popup .popup-load-block .item .popup-register,
	#popup .popup-donate-block .item .popup-register {
		position: relative;
		margin: 10px auto 0;
		left: auto;
		right: auto;
	}

	#popup .popup-about-block center {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 10px;
	}

	#popup .popup-about-block .inner {
		width: auto;
	}

	/* ---------- Cookie ---------- */
	.cookie {
		padding: 14px 16px;
		font-size: 13px;
	}

	.cookie__body {
		flex-wrap: wrap;
		gap: 10px;
	}
}

@media (max-width: 600px) {
	#general {
		background:
			linear-gradient(180deg, rgba(16, 13, 1, 0) 180px, #100d01 261px) no-repeat center top / 100% 261px,
			url(../images/bg1.jpg?v=2) no-repeat center -52px / 1200px auto,
			#100d01;
	}

	.logotype {
		height: 168px;
	}

	.news-block .slider .news .frame .date-open-rates {
		font-size: 34px;
		left: 14px;
	}

	.news-block .slider .news .frame .date-open-chronicle {
		font-size: 16px;
		left: 18px;
	}

	.news-block .slider .news .frame .date-open {
		font-size: 17px;
		right: 12px;
	}

	.news-block .slider .news .frame .date-open .small-text {
		font-size: 14px;
	}
}

@media (max-width: 400px) {
	.m-brand {
		font-size: 16px;
		letter-spacing: 1px;
	}

	#status .item {
		margin: 0 4px;
	}

	.header-register,
	.header-load,
	.header-account {
		transform: scale(0.92);
	}
}

@media (prefers-reduced-motion: reduce) {
	#status .server_animation_1 {
		animation: none;
	}
}
