/* ============================================================================
   PlayInWoW — поверх site.css («Врата Азерота»).

   1. Сопряжение макета с сайтом: ссылки вместо кнопок-заглушек, поля
      настоящих форм (повтор пароля, согласие), форма выхода.
   2. Система внутренних страниц: у них нет отдельных макетов, поэтому они
      получают материалы главной — камень, потёртая бронза, светлый металл,
      Cormorant Garamond и Manrope. Страницы опираются на токены --color-*,
      --fs-*, --font-* и классы .container-piw / .piw-panel; здесь они
      переопределены в новой палитре, разметка страниц не менялась.

   Главная сюда почти не заходит: её вид целиком из site.css.
   ========================================================================= */

/* ---------------------------------------------------------------- 1. сопряжение */

/* пункты меню, сервисы, карточки и действия стали ссылками — без подчёркивания */
#ice-citadel .ic-nav a,
#ice-citadel .ic-sidebar a,
#ice-citadel .ic-news-card,
#ice-citadel .tg-account-button,
#ice-citadel .ic-primary,
#ice-citadel .ic-secondary,
#ice-citadel .ic-text-button,
#ice-citadel .tg-world-name,
#ice-citadel .g-footer-brand,
#ice-citadel .g-footer-links a {
	text-decoration: none;
}
/* карточка хроники стала ссылкой: цвет текста как у кнопки макета, сетку задаёт site.css */
#ice-citadel .ic-news-card {
	color: inherit;
}

/* настоящие публикации бывают длиннее примеров макета — не больше двух строк */
#ice-citadel .ic-news-copy b,
#ice-citadel .ic-news-copy .g-news-description {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* у двух карточек общие строки сетки: при разной длине текста окна картинок одной высоты */
@media (min-width: 881px) and (min-height: 680px) {
	#ice-citadel .ic-news-grid {
		grid-template-rows: minmax(110px, 1fr) auto;
	}
	#ice-citadel .ic-news-card {
		grid-row: span 2;
		grid-template-rows: subgrid;
	}
}

/* форма выхода на первом экране не должна ломать ряд кнопок */
#ice-citadel .tg-inline-form {
	display: contents;
}

/* согласие с правилами в окне регистрации */
#ice-citadel .ic-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 14px 0 4px;
	font-size: 12px;
	line-height: 1.5;
	color: #cbbf9f;
}
#ice-citadel .ic-check input {
	margin: 3px 0 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
	box-shadow: none !important;
	align-self: flex-start;
	width: 16px;
	height: 16px;
	accent-color: #c6a56c;
	flex-shrink: 0;
}
#ice-citadel .ic-check a {
	color: #efd59b;
}
#ice-citadel .ic-field input[aria-invalid='true'] {
	border-color: #c9785f;
}
#ice-citadel .ic-form-error:empty {
	display: none;
}
#ice-citadel .tg-account-switch a {
	color: #d7c092;
}

/* ссылки подвала: из базы их больше, чем одна кнопка макета */
#ice-citadel .g-footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	font-size: 12px;
}
#ice-citadel .g-footer-links a {
	color: #b9a987;
	transition: color 0.3s;
}
#ice-citadel .g-footer-links a:hover,
#ice-citadel .g-footer-links a:focus-visible {
	color: #efd59b;
}

/* прокрутка с привязкой к главам — только на главной, внутренним страницам она мешает читать */
:root:has(#ice-citadel[data-page='inner']) {
	scroll-snap-type: none;
}

/* ---------------------------------------------------------------- 2. токены */

#ice-citadel[data-page='inner'] {
	--color-gold: #c6a56c;
	--color-gold-soft: #efd59b;
	--color-gold-deep: #7d6238;
	--color-bronze: #a8834c;
	--color-bronze-deep: #5d4527;
	--color-copper: #b87a4b;
	--color-ice: #8ec5e6;
	--color-ice-soft: #cfe6f4;
	--color-ice-deep: #3f6f8c;
	--color-fire: #e39a4e;
	--color-fire-soft: #f3c48f;
	--color-fire-deep: #8f4f22;
	--color-stone-1: #0b1012;
	--color-stone-2: #111719;
	--color-stone-3: #172024;
	--color-stone-4: #20292d;
	--color-stone-5: #2b3438;
	--color-bg: #0b1012;
	--color-surface-1: #121a1d;
	--color-parchment: #d8c9a4;
	--color-parchment-ink: #2b2317;
	--color-frame: #5f5037;
	--color-frame-lit: #a28a59;
	--color-frame-gold: #a28a59;
	--color-frame-ice: #4f6f80;
	--color-frame-fire: #7a5433;
	--color-head: #efd59b;
	--color-body: #ede7d7;
	--color-dim: #c3bba6;
	--color-mute: #a9aaa2;
	--color-success: #9fcf7a;
	--color-online: #9fcf7a;
	--color-danger: #e5aa90;
	--color-warn: #e3c07a;
	--color-offline: #8c8f8a;
	--color-alliance: #7fb2e6;
	--color-horde: #e0735f;

	--text: #ede7d7;
	--text-dim: #c3bba6;
	--text-hi: #fff6e0;
	--accent: #c6a56c;
	--accent-rgb: 198 165 108;
	--gold-rgb: 198 165 108;
	--ice-rgb: 142 197 230;
	--fire-rgb: 227 154 78;
	--gold-300: #efd59b;
	--gold-glow: 0 0 18px rgb(198 165 108 / 0.35);
	--metal-gold: linear-gradient(180deg, #f3deac, #c6a56c 55%, #8a6c3c);
	--hair: rgb(162 138 89 / 0.35);

	--font-display: 'Cormorant Garamond', Georgia, serif;
	--font-body: Manrope, 'Segoe UI', sans-serif;
	--font-num: Manrope, 'Segoe UI', sans-serif;
	--font-ui: Manrope, 'Segoe UI', sans-serif;
	--font-mono: ui-monospace, Consolas, monospace;

	--radius-s: 2px;
	--radius-m: 3px;
	--radius-l: 4px;
	--radius-xl: 6px;
	--t-fast: 0.15s;
	--t: 0.2s;
	--t-slow: 0.3s;
	--t-slower: 0.45s;
	--ease: cubic-bezier(0.16, 1, 0.3, 1);

	--fs-display: clamp(38px, 6vw, 68px);
	--fs-h1: clamp(32px, 4.2vw, 50px);
	--fs-h2: clamp(24px, 3vw, 32px);
	--fs-h3: clamp(18px, 2vw, 22px);
	--fs-lead: clamp(15px, 1.5vw, 17px);
	--fs-body: 15px;
	--fs-small: 13px;
	--fs-caption: 11.5px;
	--fs-stat: clamp(24px, 3.4vw, 40px);
}

/* ---------------------------------------------------------------- 3. страница */

/* свой фон внутренних страниц: камень зала и тёплый свет сверху.
   Дорисованный пол главной сюда намеренно не переносится. */
:where(#ice-citadel) main.pw-inner {
	position: relative;
	min-height: calc(100dvh - var(--g-header-height, 78px) - 120px);
	padding: clamp(28px, 5vw, 64px) 0 clamp(48px, 7vw, 90px);
	background:
		radial-gradient(ellipse 70% 42% at 50% 0%, rgb(198 165 108 / 0.13), transparent 70%),
		radial-gradient(ellipse 40% 30% at 12% 20%, rgb(142 197 230 / 0.06), transparent 70%),
		radial-gradient(ellipse 40% 30% at 88% 22%, rgb(140 190 90 / 0.05), transparent 70%),
		linear-gradient(180deg, #111719, #0b1012 60%, #090d0f);
	color: var(--color-body);
	font: 400 var(--fs-body) / 1.7 var(--font-body);
}

:where(#ice-citadel .pw-inner) h1,
:where(#ice-citadel .pw-inner) h2,
:where(#ice-citadel .pw-inner) h3,
:where(#ice-citadel .pw-inner) h4 {
	font-family: var(--font-display);
	font-weight: 600;
	color: var(--color-head);
	line-height: 1.15;
	text-shadow: 0 2px 10px #000a;
}
:where(#ice-citadel .pw-inner) h1 {
	font-size: var(--fs-h1);
	margin: 0 0 12px;
}
:where(#ice-citadel .pw-inner) h2 {
	font-size: var(--fs-h2);
	margin: 1.4em 0 0.5em;
}
:where(#ice-citadel .pw-inner) h3 {
	font-size: var(--fs-h3);
	margin: 1.2em 0 0.4em;
}
:where(#ice-citadel .pw-inner) p {
	margin: 0 0 0.9em;
}
:where(#ice-citadel .pw-inner) a {
	color: #e6c98e;
	text-decoration-color: rgb(198 165 108 / 0.45);
	text-underline-offset: 3px;
	transition: color 0.25s;
}
:where(#ice-citadel .pw-inner) a:hover {
	color: #fff0c8;
}
:where(#ice-citadel .pw-inner) ul,
:where(#ice-citadel .pw-inner) ol {
	padding-left: 1.3em;
	margin: 0 0 1em;
}
:where(#ice-citadel .pw-inner) li {
	margin: 0.25em 0;
}
:where(#ice-citadel .pw-inner) li::marker {
	color: var(--color-gold);
}
:where(#ice-citadel .pw-inner) code {
	font-family: var(--font-mono);
	font-size: 0.92em;
	padding: 2px 6px;
	background: #0a1113;
	border: 1px solid #3a3326;
	color: #f0dcae;
}
:where(#ice-citadel .pw-inner) hr {
	border: 0;
	height: 1px;
	margin: 2em 0;
	background: linear-gradient(90deg, transparent, #a28a59, transparent);
}

.container-piw {
	width: min(1200px, 100% - 2 * clamp(16px, 4vw, 48px));
	margin-inline: auto;
}

/* панель — плита потемневшей бронзы с двойным кантом, как рама меню */
:where(#ice-citadel) .piw-panel {
	position: relative;
	border: 1px solid #6b5a3c;
	border-radius: 2px;
	background:
		radial-gradient(ellipse at 50% 0%, rgb(198 165 108 / 0.07), transparent 65%),
		linear-gradient(180deg, #161d20, #0f1517 70%, #121819);
	box-shadow:
		inset 0 0 0 1px #0a0f11,
		inset 0 0 0 2px rgb(162 138 89 / 0.18),
		0 10px 28px #0008;
}

.piw-label {
	font: 600 var(--fs-caption, 11.5px) / 1.2 Manrope, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.16em;
	color: #a9aaa2;
}
.piw-num {
	font-variant-numeric: tabular-nums;
	font-feature-settings: 'tnum';
	font-weight: 600;
}
.piw-divider {
	height: 1px;
	background: linear-gradient(90deg, transparent, #a28a59, transparent);
	margin: 1.5em 0;
}
:where(#ice-citadel .pw-inner) .muted {
	color: var(--color-mute);
}
:where(#ice-citadel .pw-inner) .lead {
	font-size: var(--fs-lead);
	color: var(--color-dim);
}

/* поля и кнопки внутренних форм — те же, что в окне входа */
:where(#ice-citadel .pw-inner) input:not([type='checkbox']):not([type='radio']):not([type='hidden']),
:where(#ice-citadel .pw-inner) select,
:where(#ice-citadel .pw-inner) textarea {
	width: 100%;
	min-width: 0;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid #766747;
	border-radius: 2px;
	background: #0d1518;
	color: #e0d8c6;
	font: 400 15px/1.4 Manrope, sans-serif;
	transition: border-color 0.2s, box-shadow 0.2s;
}
:where(#ice-citadel .pw-inner) input::placeholder,
:where(#ice-citadel .pw-inner) textarea::placeholder {
	color: #7f7a6c;
}
:where(#ice-citadel .pw-inner) input:focus-visible,
:where(#ice-citadel .pw-inner) select:focus-visible,
:where(#ice-citadel .pw-inner) textarea:focus-visible {
	outline: none;
	border-color: #c6a56c;
	box-shadow: 0 0 0 3px rgb(198 165 108 / 0.2);
}
:where(#ice-citadel .pw-inner) input[type='checkbox'],
:where(#ice-citadel .pw-inner) input[type='radio'] {
	accent-color: #c6a56c;
}

/* основная кнопка формы — бронзовая плита, как «Скачать лаунчер» на террасе */
:where(#ice-citadel .pw-inner) button[type='submit'],
:where(#ice-citadel .pw-inner) .btn,
:where(#ice-citadel .pw-inner) .submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 46px;
	padding: 10px 24px;
	border: 1px solid #ba985e;
	border-radius: 2px;
	background: linear-gradient(180deg, #86622e, #4d351e 45%, #34251a 54%, #65502d);
	box-shadow:
		inset 0 0 0 2px #211b14,
		inset 0 0 0 3px #9b764233,
		0 3px 12px #0009;
	color: #f3deac;
	font: 600 13px Manrope, sans-serif;
	letter-spacing: 0.04em;
	text-decoration: none;
	text-shadow: 0 1px #000;
	cursor: pointer;
	transition: filter 0.3s, box-shadow 0.3s;
}
:where(#ice-citadel .pw-inner) button[type='submit']:hover,
:where(#ice-citadel .pw-inner) .btn:hover,
:where(#ice-citadel .pw-inner) .submit:hover {
	filter: brightness(1.12);
	box-shadow:
		inset 0 0 0 2px #211b14,
		inset 0 0 0 3px #c69a5555,
		0 0 18px rgb(198 165 108 / 0.25),
		0 3px 12px #0009;
}
:where(#ice-citadel .pw-inner) button[type='submit']:disabled {
	filter: grayscale(0.4) brightness(0.8);
	cursor: progress;
}
:where(#ice-citadel .pw-inner) .ghost {
	background: transparent;
	border: 1px solid #6b5a3c;
	color: #d7c092;
}
:where(#ice-citadel .pw-inner) .danger {
	border-color: #9a5a48;
	color: #f0b8a6;
}

/* таблицы: онлайн, рейтинги, журнал */
:where(#ice-citadel .pw-inner) table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
:where(#ice-citadel .pw-inner) th {
	text-align: left;
	font: 600 11.5px/1.2 Manrope, sans-serif;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #a9aaa2;
	padding: 12px 10px;
	border-bottom: 1px solid #6b5a3c;
}
:where(#ice-citadel .pw-inner) td {
	padding: 10px;
	border-bottom: 1px solid rgb(107 90 60 / 0.35);
}
:where(#ice-citadel .pw-inner) tbody tr:hover td {
	background: rgb(198 165 108 / 0.05);
}

/* появление блоков (actions/reveal.ts) — мягко, без смещения всей страницы */
.piw-reveal {
	opacity: 0;
}
.piw-reveal.is-visible {
	animation: pw-rise 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes pw-rise {
	from {
		opacity: 0;
		translate: 0 14px;
	}
	to {
		opacity: 1;
		translate: 0 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.piw-reveal,
	.piw-reveal.is-visible {
		opacity: 1;
		animation: none;
	}
}

@media (max-width: 620px) {
	.hide-s {
		display: none !important;
	}
}

/* ---------------------------------------------------------------- 4. акценты страниц
   В стилях страниц остались яркие цвета прежней темы (синие и оранжевые
   градиенты кнопок, золотые активные вкладки). Здесь они приводятся к
   материалам «Врат»: бронзовая плита для действия, светлый металл для
   выбранного. Специфичность выше стилей страниц намеренно. */
#ice-citadel .pw-inner :is(.launcher, .dl, .submit, .btn) {
	border: 1px solid #ba985e;
	border-radius: 2px;
	background: linear-gradient(180deg, #86622e, #4d351e 45%, #34251a 54%, #65502d);
	box-shadow:
		inset 0 0 0 2px #211b14,
		inset 0 0 0 3px #9b764233,
		0 3px 12px #0009;
	color: #f3deac;
	text-shadow: 0 1px #000;
	font-family: 'Cormorant Garamond', Georgia, serif;
	font-weight: 600;
}
#ice-citadel .pw-inner :is(.launcher, .dl, .submit, .btn):hover {
	filter: brightness(1.13);
	box-shadow:
		inset 0 0 0 2px #211b14,
		inset 0 0 0 3px #c69a5555,
		0 0 18px rgb(198 165 108 / 0.25),
		0 3px 12px #0009;
}
#ice-citadel .pw-inner :is(.tabs a.active, .pages b) {
	border-color: #c6a56c;
	background: linear-gradient(180deg, #3a3122, #231d15);
	box-shadow: inset 0 0 0 1px #0b0f10, 0 0 12px rgb(198 165 108 / 0.2);
	color: #f3deac;
}

/* ---------------------------------------------------------------------------
 * Главная: кнопка «Кабинет · ЛОГИН» не выходит за рамку.
 * Логин (до 16 символов) обрезается многоточием внутри рамки, а на узком
 * экране (≤ 620px) показывается просто «Кабинет» — логин остаётся в aria-label.
 * ------------------------------------------------------------------------- */
/* ячейка сетки не растёт под длинный логин (min-width:auto у 1fr) */
#ice-citadel .tg-account-button.tg-cabinet {
	min-width: 0;
}
#ice-citadel .tg-account-button.tg-cabinet > span {
	display: flex;
	min-width: 0;
	/* отступ от шипов рамки: при узкой кнопке у неё почти нет внутренних полей */
	max-width: calc(100% - 40px);
}
#ice-citadel .tg-account-button .tg-cabinet-name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: pre;
	font: inherit;
}
@media (max-width: 620px) {
	#ice-citadel .tg-account-button .tg-cabinet-name {
		display: none;
	}
}

/* ---------------------------------------------------------------------------
 * Регистрация: две отдельные галочки (соглашение/правила/18+ и согласие на
 * обработку ПДн — отдельный документ по 152-ФЗ).
 * ------------------------------------------------------------------------- */
#ice-citadel .ic-check + .ic-check {
	margin-top: 8px;
}
#ice-citadel .ic-check input[aria-invalid='true'] {
	outline: 2px solid #c9785f;
	outline-offset: 1px;
}

/* ---------------------------------------------------------------------------
 * Подвал: строка сведений — знак 18+ (436-ФЗ), оператор и контакт (149-ФЗ),
 * отметка о неофициальном сервере. Отдельной строкой во всю ширину подвала.
 * ------------------------------------------------------------------------- */
#ice-citadel .g-footer-legal {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	margin: 4px 0 0;
	padding-top: 16px;
	border-top: 1px solid #77603d55;
	font-size: 11.5px;
	line-height: 1.5;
	color: #a8997d;
}
#ice-citadel .g-footer-legal a {
	padding: 0;
	font-size: inherit;
	color: #d3b982 !important;
	text-decoration: none;
}
#ice-citadel .g-footer-legal a:hover,
#ice-citadel .g-footer-legal a:focus-visible {
	color: #efd59b !important;
	text-decoration: underline;
}
#ice-citadel .g-footer-legal small {
	font-size: 10.5px;
	color: #7f8783;
}
/* бронзовая плашка «18+» — потёртый металл, как у кантов «Врат» */
#ice-citadel .g-age {
	flex-shrink: 0;
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	height: 30px;
	padding: 0 8px;
	border: 1px solid #b89559;
	border-radius: 3px;
	font: 800 14px/1 Manrope, 'Segoe UI', sans-serif;
	letter-spacing: 0.04em;
	color: #1a1208;
	background: linear-gradient(180deg, #e3c68a 0%, #b58d4f 55%, #8a6834 100%);
	box-shadow:
		inset 0 1px 0 #fbe8bd,
		inset 0 -1px 0 #5e4420,
		0 0 0 2px #0b1012,
		0 0 0 3px #77603d88;
	text-shadow: 0 1px 0 #f0d8a266;
}
@media (max-width: 620px) {
	#ice-citadel .g-footer-legal {
		order: 3;
		align-items: flex-start;
		gap: 12px;
		font-size: 11px;
	}
}

/* ---------------------------------------------------------------------------
 * Уведомление о cookie: тёмный камень, бронзовый кант. Снизу слева, узкое —
 * не закрывает кнопки первого экрана; пока видно, страница получает запас
 * снизу, чтобы конец подвала можно было прочитать.
 * ------------------------------------------------------------------------- */
#ice-citadel .g-cookie {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: min(520px, calc(100vw - 32px));
	padding: 12px 14px 12px 16px;
	border: 1px solid #77603d;
	border-top-color: #9c8150;
	background: linear-gradient(160deg, #1d2122f2, #0c1113f7);
	box-shadow:
		inset 0 0 0 3px #0c10123d,
		0 0 0 1px #030708,
		0 10px 30px #000a;
	font: 400 12px/1.55 Manrope, 'Segoe UI', sans-serif;
	color: #c9c0a9;
	animation: g-cookie-in 0.5s ease-out both;
}
#ice-citadel .g-cookie p {
	margin: 0;
}
#ice-citadel .g-cookie a {
	color: #efd59b;
}
#ice-citadel .g-cookie button {
	flex-shrink: 0;
	min-height: 36px;
	padding: 7px 16px;
	border: 1px solid #b19a67;
	background: linear-gradient(180deg, #3a3326, #1b1a15);
	font: 600 11.5px/1 Manrope, 'Segoe UI', sans-serif;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #efd59b;
	cursor: pointer;
	transition: border-color 0.3s, filter 0.3s;
}
#ice-citadel .g-cookie button:hover,
#ice-citadel .g-cookie button:focus-visible {
	border-color: #efd59b;
	filter: brightness(1.2);
}
#ice-citadel .g-cookie button:focus-visible {
	outline: 2px solid #efd59b;
	outline-offset: 2px;
}
#ice-citadel[data-cookie-notice] .ic-footer {
	padding-bottom: 110px;
}
@keyframes g-cookie-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
}
#ice-citadel[data-motion='off'] .g-cookie {
	animation: none;
}
@media (max-width: 620px) {
	#ice-citadel .g-cookie {
		left: 10px;
		right: 10px;
		bottom: 10px;
		max-width: none;
		padding: 10px 12px;
		gap: 10px;
		font-size: 11px;
	}
	#ice-citadel[data-cookie-notice] .ic-footer {
		padding-bottom: 150px;
	}
}

/* ---------------------------------------------------------------------------
 * QA3: подвал читается и нажимается на телефоне; кнопка входа/кабинета в шапке.
 * ------------------------------------------------------------------------- */
/* ссылки подвала и строка версий были 10px (на телефоне 9px) — 13px, контраст ≥ 4.5 */
#ice-citadel .ic-footer .g-footer-links a {
	padding: 8px 6px;
	font-size: 13px;
	color: #b9b3a3 !important;
}
#ice-citadel .ic-footer .g-footer-links a:hover,
#ice-citadel .ic-footer .g-footer-links a:focus-visible {
	color: #efd59b !important;
}
#ice-citadel .ic-footer > span small {
	font-size: 13px;
	color: #979f9b;
}
#ice-citadel .g-footer-legal,
#ice-citadel .g-footer-legal a {
	font-size: 13px;
}
#ice-citadel .g-footer-legal small {
	font-size: 12px;
	color: #979f9b;
}
@media (max-width: 620px) {
	#ice-citadel .ic-footer .g-footer-links {
		gap: 2px 10px;
	}
}

/* «Войти» / «Кабинет» в шапке: рамка из макета (.ic-nav .tg-account в site.css),
   цвет перебивает общий !important пунктов меню */
#ice-citadel .ic-nav .tg-account {
	color: #ead6ae !important;
}
#ice-citadel .ic-nav .tg-account:hover,
#ice-citadel .ic-nav .tg-account:focus-visible,
#ice-citadel .ic-nav .tg-account[aria-current='page'] {
	color: #ffedc8 !important;
	background: #aa8c4326;
}
@media (max-width: 880px) {
	/* в раскрытом меню телефона — отдельной строкой, чтобы не терялась среди пунктов */
	#ice-citadel .ic-nav .tg-account {
		justify-content: center;
		flex-basis: 100%;
		margin-top: 6px;
	}
}

/* perf: атлас иконок глав (4×4, ячейка до 78px) — вариант под плотность экрана вместо 1024px
   исходника (scripts/optimize_images.py). Переопределяет --g-icons из site.css. */
#ice-citadel {
	--g-icons: -webkit-image-set(
		url('/playinwow/assets/gates-icons-512.webp') 1x,
		url('/playinwow/assets/gates-icons-768.webp') 2x
	);
}

/* perf: телефон ≤480px — логотип крупнее и ниже полосы «Меню» (было ~149px и заходил под неё).
   Высоту первого экрана НЕ трогаем: блоки по задумке во весь экран на любом разрешении,
   её считает скрипт сцены (--tg-page-fill, --tg-spare). */
@media (max-width: 480px) {
	#ice-citadel .tg-stage h1.tg-logo {
		left: 25%;
		top: 3%;
		width: 50%;
		height: 20.5%;
	}
}

/* QA3: кнопка «Войти»/«Кабинет» в шапке. На ПК сетка меню — 8 колонок с иконками,
   девятый пункт переносился на вторую строку; ставим кнопку справа в полосе шапки.
   На телефоне (до 880px) она остаётся строкой в раскрывающемся меню. */
@media (min-width: 881px) {
	/* шапка остаётся position: sticky (site.css) — она и есть опора для абсолютной кнопки */
	#ice-citadel .ic-nav .tg-account {
		position: absolute !important;
		right: clamp(10px, 1.6vw, 28px) !important;
		top: 50% !important;
		transform: translateY(-50%) !important;
		margin: 0 !important;
		min-height: 36px !important;
		padding: 7px 14px !important;
		display: inline-flex !important;
		align-items: center;
		font-size: 12px !important;
		letter-spacing: 0.04em;
		border: 1px solid #86704980;
		border-radius: 3px;
		background: #aa8c431a;
		color: #ead6ae !important;
	}
	#ice-citadel .ic-nav .tg-account:hover {
		background: #aa8c4333;
	}
}
/* QA3: на средних ширинах меню занимает всю полосу — оставляем справа место под «Войти» */
@media (min-width: 881px) and (max-width: 1360px) {
	#ice-citadel .ic-nav {
		padding-right: 96px !important;
	}
}

/* Телефон и планшет (≤880px): каждый блок главной — ровно один экран по высоте, как на ПК.
   Макет давал «Пути» min-height 1000px, а «Хроники» ставили карточки столбиком (~1400px).
   Карточки хроник — горизонтальная лента со свайпом (по одной на экран), «Путь» — компактнее.
   --g-page-height считает скрипт сцены (экран минус полоса меню). Анимации не затронуты. */
@media (max-width: 880px) {
	#ice-citadel .g-journey,
	#ice-citadel .ic-news.g-chapter {
		/* не меньше экрана; если содержимое всё же выше — блок растёт, а не наезжает на соседний */
		min-height: 100dvh !important;
		height: auto !important;
		box-sizing: border-box;
		display: flex;
		flex-direction: column;
		justify-content: center;
	}
	/* Хроники: лента карточек */
	#ice-citadel .ic-news.g-chapter {
		padding-top: 12px !important;
		padding-bottom: 8px !important;
	}
	#ice-citadel .ic-news .g-chapter-head {
		margin-bottom: 10px !important;
	}
	#ice-citadel .ic-news-tabs {
		margin-bottom: 12px !important;
	}
	#ice-citadel .ic-news-grid {
		display: flex !important;
		grid-template-columns: none !important;
		gap: 14px !important;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		margin-inline: -16px;
		padding-inline: 16px;
	}
	#ice-citadel .ic-news-grid::-webkit-scrollbar {
		display: none;
	}
	#ice-citadel .ic-news-card {
		flex: 0 0 86%;
		scroll-snap-align: center;
		min-width: 0;
	}
	#ice-citadel .ic-news-card[hidden] {
		display: none !important;
	}
	#ice-citadel .ic-news-bottom {
		margin-top: 10px !important;
	}
	/* Путь: компактнее, чтобы всё помещалось в экран */
	#ice-citadel .g-journey {
		padding: 16px 16px 10px !important;
	}
	#ice-citadel .g-journey .g-chapter-head {
		margin-bottom: 12px !important;
	}
	#ice-citadel .g-journey .g-platform {
		margin-bottom: 12px !important;
	}
	#ice-citadel .g-journey .ic-sidebar {
		gap: 8px !important;
	}
}

/* Короткие экраны телефонов (≤780px по высоте, напр. 360×740, 375×667): ещё компактнее,
   чтобы «Хроники» и «Путь» тоже умещались в один экран. */
@media (max-width: 880px) and (max-height: 780px) {
	#ice-citadel .ic-news .g-chapter-head > p,
	#ice-citadel .g-journey .g-chapter-head > p,
	#ice-citadel .g-journey .g-platform,
	#ice-citadel .g-journey .ic-sidebar small {
		display: none !important;
	}
	#ice-citadel .ic-news .g-chapter-head h2,
	#ice-citadel .g-journey .g-chapter-head h2 {
		font-size: 30px !important;
		margin-block: 4px !important;
	}
	#ice-citadel .g-journey .g-journey-icon {
		width: 44px !important;
		height: 44px !important;
	}
	#ice-citadel .ic-news-card .g-news-description {
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
	#ice-citadel .g-journey .ic-sidebar a {
		min-height: 0 !important;
		padding-block: 10px !important;
	}
}

/* Совсем низкие экраны (≤700px, напр. iPhone SE 375×667): карточка хроник уже — её картинка ниже */
@media (max-width: 880px) and (max-height: 700px) {
	#ice-citadel .ic-news-card {
		flex-basis: 84%;
	}
	#ice-citadel .ic-news-copy b {
		font-size: 22px !important;
		line-height: 1.2 !important;
	}
	#ice-citadel .ic-news .g-eyebrow,
	#ice-citadel .ic-news-bottom {
		display: none !important;
	}
	#ice-citadel .ic-news-card .g-news-description {
		-webkit-line-clamp: 1 !important;
	}
	#ice-citadel .ic-news-tabs {
		margin-bottom: 8px !important;
	}
	#ice-citadel .ic-news .g-rule {
		display: none !important;
	}
}

/* Планшеты 621–880px: шапка там закреплена (sticky, site.css) — блоки «экран минус шапка», как на ПК.
   До 620px шапка обычная и уезжает — там блоки в полный экран (правило выше, 100dvh). */
@media (min-width: 621px) and (max-width: 880px) {
	#ice-citadel .g-journey,
	#ice-citadel .ic-news.g-chapter {
		min-height: var(--g-page-height) !important;
	}
}
