/* Окно лорда и рейтинги (docs/UI_PLAN.md §2.5, §3 п. 4–5): js/screens/player.js openPlayer, js/screens/rank.js
   rankList / openRank / openPrizes. Окна светлые (цвета — --w-* окна). Размеры стоя — под body.vertical, лёжа — прежние
   (переменные kod.css: --row, --ava, --fs-*). */

/* ——— окно лорда: аватар 128 с уровнем замка, имя, альянс, королевство, мощь, клетка — ссылкой на карту ——— */
.pl-card { display: flex; align-items: center; gap: 18px; padding: 4px 4px 12px; }
.pl-card .pl-ava { --ava-s: 96px; cursor: default; }
.pl-card .pl-ava:active { transform: none; }
.pl-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.pl-nm { font: 700 var(--fs-num)/1.15 var(--sans); color: var(--w-hi, var(--text)); overflow-wrap: anywhere; }
.pl-tag { margin-inline-end: 6px; font-style: normal; color: var(--w-accent, var(--bronze-l)); }
.pl-ln { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sub); color: var(--w-muted, var(--muted)); min-width: 0; }
.pl-ln > span { min-width: 0; overflow-wrap: anywhere; }
.pl-ln svg { flex: none; }
.pl-kd { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); }
.pl-pow { color: var(--w-hi, var(--text)); font-weight: 700; }
.pl-xy {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 10px; cursor: pointer;
  border: 2px dashed var(--w-good, #23803e); background: rgba(63, 143, 79, 0.12); color: var(--w-good, #23803e);
  font: 700 var(--fs-sub)/1.2 var(--sans); text-decoration: underline;
}
.pl-note { margin: 0 0 8px; font-size: var(--fs-sub); color: var(--w-muted, var(--muted)); text-align: center; }
/* кнопки — по две в ряд, одной высоты; одна в ряду (нечётная последняя, единственная) — во всю ширину; «Пригласить» —
   всегда во всю ширину */
.pl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.pl-acts .btn { flex: 1 1 calc(50% - 5px); width: auto; min-width: 0; }
.pl-acts .btn.green { flex-basis: 100%; }
.pl-off { margin-top: 14px; }
.pl-off .sect { margin-bottom: 8px; }
/* «⋯»: жалоба и блокировка — алые, спрятаны за кнопкой */
.pl-more { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pl-dots {
  flex: none; width: 56px; height: 44px; padding: 0; border-radius: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--w-line, #a5b6cc); background: var(--w-well, #d4e0ef); color: var(--w-hi, #16202c);
}
.pl-more.open .pl-dots { border-color: var(--w-accent, #7a4c14); }
.pl-more .btn { flex: 1 1 0; min-width: 0; }

body.vertical .pl-card .pl-ava { --ava-s: 128px; }
body.vertical .pl-nm { font-size: 30px; }
body.vertical .pl-ln, body.vertical .pl-xy { font-size: 22px; }
body.vertical .pl-acts .btn, body.vertical .pl-more .btn { height: 64px; font-size: 24px; padding: 0 12px; }
body.vertical .pl-dots { width: 72px; height: 64px; }

/* ——— рейтинг: карточки мест (§2.5): медаль 1–3 и тон строки, аватар, имя и вторая строка, полоса до лидера с числом,
   сундук награды места; своя строка — зелёная, внизу и прилипает к низу окна ——— */
.rk-wrap { display: flex; flex-direction: column; gap: 8px; }
.rk-wrap + .rk-wrap { margin-top: 14px; }
.rk-head { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.rk-title { flex: 1 1 auto; min-width: 0; font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, var(--text)); }
.rk-tg { display: inline-flex; align-items: center; gap: 8px; font: 700 var(--fs-sub)/1.2 var(--sans); color: var(--w-hi, var(--text)); cursor: pointer; }
.rk-tg input { width: 22px; height: 22px; margin: 0; accent-color: #3f8f4f; }
.rk-prz { flex: none; }
.rk-list { display: flex; flex-direction: column; gap: 6px; }
/* «Мой альянс»: только соратники (флажок над списком ставит .only-ally — rank.js; соратников нет — надпись) */
.rk-wrap.only-ally .rk-list > .rk-row:not(.ally) { display: none; }
.rk-list > .rk-none.rk-noally { display: none; }
.rk-wrap.only-ally .rk-list > .rk-none.rk-noally { display: flex; }
.rk-row {
  display: flex; align-items: center; gap: 12px; min-height: var(--row); padding: 6px 12px; box-sizing: border-box; border-radius: 10px;
  background: var(--w-well, rgba(16, 20, 28, 0.5)); box-shadow: 0 3px 0 #8797ab, inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.rk-row.top1 { background: linear-gradient(90deg, #f7de8e, #efe4c4 60%, var(--w-well, #d4e0ef)); }
.rk-row.top2 { background: linear-gradient(90deg, #cfe3f6, #e2ecf6 60%, var(--w-well, #d4e0ef)); }
.rk-row.top3 { background: linear-gradient(90deg, #f1c49e, #efdccb 60%, var(--w-well, #d4e0ef)); }
.rk-row.me { background: linear-gradient(#c8eab8, #a3d690); box-shadow: 0 3px 0 #5e9a4c, inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.rk-pl { flex: none; width: 44px; display: flex; align-items: center; justify-content: center; }
.rk-pl > b { font: 700 var(--fs-num)/1 var(--sans); color: var(--w-hi, var(--text)); font-variant-numeric: tabular-nums; }
.rk-medal { width: 40px; height: 46px; display: block; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); }
.rk-medal text { font-family: var(--sans); }
img.rk-medal { object-fit: contain; } /* картинка events.rank_N — квадрат в месте значка 48×56 */
.rk-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rk-nm { font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, var(--text)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.rk-tag { margin-inline-end: 4px; font-style: normal; color: var(--w-accent, #7a4c14); }
.rk-sub { font-size: var(--fs-sub); color: var(--w-muted, var(--muted)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-bar {
  position: relative; display: block; height: 20px; max-width: 360px; border-radius: 10px; overflow: hidden;
  background: var(--w-track, rgba(30, 48, 76, 0.2)); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}
.rk-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 10px; background: linear-gradient(#8fd060, #3f8f4f); }
.rk-bar b {
  position: relative; display: block; padding-inline: 10px; font: 700 var(--fs-sub)/20px var(--sans); color: #fff; text-shadow: var(--t-outline);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.rk-val { flex: none; font: 700 var(--fs-list)/1 var(--sans); color: var(--w-hi, var(--text)); font-variant-numeric: tabular-nums; }
.rk-prize { flex: none; display: flex; }
.rk-prize .ic-cell { --ic: 48px; }
.rk-crest { flex: none; display: flex; width: var(--ava); justify-content: center; }
.rk-crest .un-crest { width: calc(var(--ava) * 0.8); height: auto; }
.rk-none { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0; padding: 18px 12px; color: var(--w-muted, var(--muted)); font-size: var(--fs-body); text-align: center; }
.rk-none svg { flex: none; opacity: 0.5; }
/* своя строка прилипает к самому низу окна: сдвиг — нижний отступ тела окна (.modal-body: лёжа 18, стоя 14) */
.rk-mine { position: sticky; bottom: -18px; z-index: 2; margin-top: 2px; padding: 6px 0 8px; background: var(--w-panel, #c6cfda); }
/* своя строка уже в списке — прилипает к низу сама (rank.js .stick), отдельной строки внизу нет */
.rk-row.stick { position: sticky; bottom: -18px; z-index: 2; }
/* награды за места (openPrizes): место — медаль или сундук, награда — лентой вбок */
.rk-tiers { display: flex; flex-direction: column; gap: 8px; }
.rk-tier { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 12px; border-radius: 10px; background: var(--w-well, #d4e0ef); box-shadow: 0 3px 0 #8797ab, inset 0 1px 0 rgba(255, 255, 255, 0.8); }
.rk-tier.me { background: linear-gradient(#c8eab8, #a3d690); }
.rk-tier-pl { flex: none; width: 150px; display: flex; align-items: center; gap: 8px; }
.rk-tier-pl b { font: 700 var(--fs-sub)/1.15 var(--sans); }
.rk-tier-lt { flex: 1; min-width: 0; }

body.vertical .rk-row { min-height: 112px; padding: 8px 14px; gap: 14px; }
body.vertical .rk-pl { width: 56px; }
body.vertical .rk-pl > b { font-size: 30px; }
body.vertical .rk-medal { width: 54px; height: 62px; }
body.vertical .rk-nm { font-size: 22px; }
body.vertical .rk-bar { height: 30px; border-radius: 15px; }
body.vertical .rk-bar i { border-radius: 15px; }
body.vertical .rk-bar b { font-size: 22px; line-height: 30px; }
body.vertical .rk-val { font-size: 24px; }
body.vertical .rk-prize .ic-cell { --ic: 80px; }
body.vertical .rk-mine, body.vertical .rk-row.stick { bottom: -14px; }
body.vertical .rk-tg input { width: 28px; height: 28px; }
body.vertical .rk-tier { min-height: 104px; }
body.vertical .rk-tier-pl { width: 200px; }
body.vertical .rk-tier-pl b { font-size: 22px; }
body.vertical .rk-tier .ic-cell { --ic: 80px; }

/* лёжа на телефоне (body.phone-land, js/ui.js fitStage — сцена около 0,57): «⋯» в окне лорда был 44 в высоту, клетка
   на карте — 28, галочка «Мой альянс» в рейтинге — 22. Касание не меньше 48: «⋯» — 52 (--h-btn-s), клетка — 48,
   галочка 32 в строке 52 (вся подпись нажимается). Текст здесь уже на переменных --fs-* */
body.phone-land .pl-dots { width: 64px; height: var(--h-btn-s); }
body.phone-land .pl-xy { min-height: 48px; box-sizing: border-box; }
body.phone-land .rk-tg { min-height: var(--h-btn-s); gap: 12px; }
body.phone-land .rk-tg input { width: 32px; height: 32px; }

/* ——— окно лорда по сведениям сервера (lord.info, js/screens/player.js): титул облика у имени, герб альянса, плитки
   «Замок · Мощь · Арена» (значок 40, число 26), «Лучшие герои» — до пяти карточек: портрет в рамке редкости
   (.hz-r<N> — css/heroes.css), уровень и зажжённые звёзды на портрете, имя, мощь; пока идёт ответ — бледные заглушки
   с бегущим бликом (не при «уменьшить движение»). Стоя — крупнее ——— */
.pl-title { display: inline-flex; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sub); }
.pl-un .un-crest { flex: none; width: 28px; height: auto; }
.pl-stats { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 8px; margin: 2px 0 10px; }
.pl-stats.n1 { --n: 1; }
.pl-stats.n2 { --n: 2; }
.pl-stat {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; border-radius: 12px; text-align: center;
  background: var(--w-well, rgba(16, 20, 28, 0.5)); box-shadow: 0 3px 0 #8797ab, inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.pl-stat svg, .pl-stat img { width: 36px; height: 36px; }
.pl-stat b { font: 700 22px/1.1 var(--sans); color: var(--w-hi, var(--text)); white-space: nowrap; }
.pl-stat i { font-style: normal; font-size: var(--fs-sub); color: var(--w-muted, var(--muted)); line-height: 1.15; overflow-wrap: anywhere; }
.pl-stat.pl-pw b { color: #8a5a00; }
.pl-sect { margin: 6px 0 8px; }
.pl-heroes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pl-hero { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pl-hface {
  position: relative; display: block; width: 100%; aspect-ratio: 175 / 240; overflow: hidden; border-radius: 10px; box-sizing: border-box;
  border: 3px solid var(--rc, #9aa3ad); background: #2a3442; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.pl-hface img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }
.pl-hlv, .pl-hst {
  position: absolute; z-index: 1; padding: 0 5px; border-radius: 7px; font: 700 13px/18px var(--sans); font-style: normal; white-space: nowrap;
  color: #fff3d0; background: rgba(10, 14, 22, 0.8);
}
.pl-hlv { left: 3px; bottom: 3px; }
.pl-hst { right: 3px; top: 3px; color: #ffd75e; }
.pl-hst img { width: 1.1em; height: 1.1em; vertical-align: -0.18em; margin-right: 1px; } /* возвышение — нарисованной звездой */
.pl-hnm { max-width: 100%; font-size: 14px; color: var(--w-hi, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hpw { display: inline-flex; align-items: center; gap: 3px; font: 700 14px/1 var(--sans); color: #8a5a00; }
.pl-hpw svg, .pl-hpw img { width: 16px; height: 16px; }
.pl-hero.skel .pl-hface { border-color: rgba(135, 151, 171, 0.5); background: rgba(135, 151, 171, 0.25); box-shadow: none; }
.pl-hero.skel .pl-hline { display: block; width: 70%; height: 12px; margin-top: 4px; border-radius: 6px; background: rgba(135, 151, 171, 0.3); }
.pl-hero.skel .pl-hface::after {
  content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%); animation: plSkel 1.2s ease-in-out infinite;
}
@keyframes plSkel { to { transform: translateX(100%); } }
html.kod-still .pl-hero.skel .pl-hface::after { animation: none; content: none; }
/* карточки и плитки появляются мягко, когда пришёл ответ */
.pl-heroes.pl-fresh .pl-hero, .pl-stats.pl-fresh { animation: plIn 0.35s ease-out both; } /* только когда пришёл ответ: перерисовка окна их не повторяет */
.pl-heroes.pl-fresh .pl-hero:nth-child(2) { animation-delay: 0.05s; }
.pl-heroes.pl-fresh .pl-hero:nth-child(3) { animation-delay: 0.1s; }
.pl-heroes.pl-fresh .pl-hero:nth-child(4) { animation-delay: 0.15s; }
.pl-heroes.pl-fresh .pl-hero:nth-child(5) { animation-delay: 0.2s; }
@keyframes plIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
html.kod-still :is(.pl-heroes.pl-fresh .pl-hero, .pl-stats.pl-fresh) { animation: none; }

body.vertical .pl-title { font-size: 20px; }
body.vertical .pl-un .un-crest { width: 36px; }
body.vertical .pl-stats { gap: 10px; margin-bottom: 14px; }
body.vertical .pl-stat { padding: 10px 6px; border-radius: 14px; }
body.vertical .pl-stat svg, body.vertical .pl-stat img { width: 44px; height: 44px; }
body.vertical .pl-stat b { font-size: 28px; }
body.vertical .pl-stat i { font-size: 18px; }
body.vertical .pl-heroes { gap: 10px; margin-bottom: 14px; }
body.vertical .pl-hlv, body.vertical .pl-hst { font-size: 16px; line-height: 22px; padding: 0 6px; }
body.vertical .pl-hnm { font-size: 17px; }
body.vertical .pl-hpw { font-size: 18px; }
body.vertical .pl-hpw svg, body.vertical .pl-hpw img { width: 20px; height: 20px; }
body.phone-land .pl-stat b { font-size: 24px; }
body.phone-land .pl-hlv, body.phone-land .pl-hst { font-size: 16px; line-height: 20px; }
body.phone-land .pl-hnm, body.phone-land .pl-hpw { font-size: 16px; }

/* ——— круг 9 (владелец 09.11: «не забудь про … вкладки … профиля игрока»): портрет крупно в рамке (player.js bigFace) —
   нарисованный портрет лорда, рамка облика Казны (looks.js: .lk-ring-<id> — кольцо и картинка поверх) или своя золотая;
   за ним мягкое свечение дышит, сам портрет чуть «дышит» (не при «уменьшить движение»); щиток уровня замка ——— */
.pf-face {
  position: relative; isolation: isolate; flex: none; display: block; width: var(--pf, 132px); height: var(--pf, 132px); border-radius: 18%;
  box-shadow: 0 0 0 4px #f3d27a, 0 0 0 8px #8a5a1e, 0 8px 18px rgba(0, 0, 0, 0.45);
}
.pf-face.lk-ring { box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45); } /* у облика своя рамка — картинкой поверх (looks.js) */
.pf-img {
  display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: 50% 18%;
  background: #2a3442; transform-origin: 50% 80%; animation: pfBreath 4.8s ease-in-out infinite;
}
.pf-letter { display: flex; align-items: center; justify-content: center; font: 700 calc(var(--pf, 132px) * 0.42)/1 var(--sans); color: #fff; animation: none; }
.pf-glow {
  position: absolute; z-index: -1; inset: -26%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 214, 120, 0.75) 0%, rgba(255, 196, 90, 0.28) 45%, rgba(255, 196, 90, 0) 70%);
  animation: pfGlow 3.2s ease-in-out infinite;
}
.pf-lv {
  position: absolute; z-index: 2; inset-inline-start: -12px; bottom: -12px; min-width: 48px; height: 48px; padding: 0 6px; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; border-radius: 24px; font: 700 24px/1 var(--sans); font-style: normal;
  color: #fff; background: radial-gradient(circle at 50% 30%, #d65248, #8e1f1c); border: 3px solid #f3d27a; text-shadow: var(--t-outline);
}
:root.art-lvl .pf-lv { border: 0; border-radius: 0; background: var(--art-lvl) center / 100% 100% no-repeat; min-width: 56px; height: 56px; }
@keyframes pfBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes pfGlow { 0%, 100% { opacity: 0.55; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.06); } }
html.kod-still :is(.pf-img, .pf-glow) { animation: none; }

/* окно чужого лорда: портрет крупно вместо аватара; подписи не мельче --fs-min (стоя 22 — 12,5 px экрана) */
.pl-card .pf-face { --pf: 124px; }
.pl-note { display: flex; align-items: center; justify-content: center; gap: 10px; }
.pl-note svg, .pl-note img { flex: none; width: 34px; height: 34px; }
body.vertical .pl-card { gap: 26px; padding: 14px 8px 18px; }
body.vertical .pl-card .pf-face { --pf: 188px; }
body.vertical .pl-nm { font-size: 34px; }
body.vertical .pl-ln, body.vertical .pl-xy, body.vertical .pl-title { font-size: var(--fs-sub); }
body.vertical .pl-stat svg, body.vertical .pl-stat img { width: 64px; height: 64px; }
body.vertical .pl-stat b { font-size: var(--fs-num); }
body.vertical .pl-stat i { font-size: var(--fs-min); }
/* лучшие герои стоя — по три в ряд, крупнее (по пять имена обрезались многоточием, подписи были 16–18) */
body.vertical .pl-heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 12px; }
body.vertical .pl-hlv, body.vertical .pl-hst { font-size: var(--fs-min); line-height: 30px; padding: 0 8px; border-radius: 10px; }
body.vertical .pl-hnm { font-size: var(--fs-min); }
body.vertical .pl-hpw { font-size: var(--fs-min); }
body.vertical .pl-hpw svg, body.vertical .pl-hpw img { width: 26px; height: 26px; }
body.vertical .pl-note { font-size: var(--fs-sub); }
body.phone-land .pl-hnm, body.phone-land .pl-hpw, body.phone-land .pl-stat i { font-size: var(--fs-min); }

/* ——— «Ваш лорд» (player.js openMe): раздел во весь экран, вкладки «Лорд · Облики · Настройки» ——— */
.pm-win .modal-body { display: flex; flex-direction: column; }
.pm-win .modal-body > * { flex-shrink: 0; }
.pm-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
/* «Лорд»: шапка — фон замка, портрет, имя, плашки (VIP, альянс, королевство, клетка) */
.pm-top {
  position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; gap: 26px; min-height: 240px;
  padding: 26px 22px 26px 30px; border-radius: 20px; box-sizing: border-box;
  background: linear-gradient(135deg, #2c3a52, #1a2232); box-shadow: 0 4px 0 #0e131c, inset 0 0 0 2px rgba(243, 210, 122, 0.5);
}
.pm-bg { position: absolute; z-index: -1; inset: 0; background: center 35% / cover no-repeat; opacity: 0.55; animation: pmBg 18s ease-in-out infinite alternate; }
.pm-top::after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(14, 18, 28, 0.55), rgba(14, 18, 28, 0.15) 45%, rgba(14, 18, 28, 0.7)); }
@keyframes pmBg { from { transform: scale(1.04) translateX(-1%); } to { transform: scale(1.1) translateX(1.5%); } }
.pm-top .pf-face { --pf: 176px; }
.pm-who { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pm-nm { font: 700 40px/1.1 var(--title); color: #fff3d0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6), 0 0 6px rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; }
.pm-title { font-size: var(--fs-sub); }
.pm-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.pm-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 16px 4px 8px; box-sizing: border-box; border-radius: 26px;
  border: 2px solid #c08a3e; background: linear-gradient(#fffaf0, #eadcc0); color: #2c1e12; font: 700 var(--fs-sub)/1.15 var(--sans); text-align: start;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35); cursor: pointer;
}
.pm-chip:active { transform: translateY(2px) scale(0.98); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.pm-chip > :is(img, svg) { flex: none; width: 40px; height: 40px; }
.pm-chip.un .un-crest { width: 38px; height: auto; }
.pm-chip > span { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.pm-chip > span > i { font-style: normal; font-size: var(--fs-min); color: #7a5a30; }
.pm-chip.none { border-style: dashed; background: rgba(255, 250, 240, 0.85); }
.pm-chip.kd { cursor: default; }
.pm-chip.kd .pl-kd { width: 26px; height: 26px; margin-inline-start: 8px; }
.pm-chip.xy { border-color: #3f8f4f; color: #23633a; text-decoration: underline; }
.pm-chip.vip { border-color: #e8b93a; background: linear-gradient(#fff3c4, #f0cf6a); padding-inline-start: 4px; }
.pm-chip.vip > img { width: 46px; height: 46px; }
.pm-chip.vip.off { filter: grayscale(0.85); }
/* мощь: медаль, «Мощь» и крупное число с докруткой (anim/count.js), полоса — доли частей */
.pm-pow {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 20px; padding: 16px 24px 18px; border-radius: 20px;
  background: linear-gradient(#3b2b16, #22180c); box-shadow: 0 4px 0 #120c05, inset 0 0 0 2px rgba(243, 210, 122, 0.55);
}
.pm-medal { display: flex; }
.pm-medal > :is(img, svg) { width: 112px; height: 112px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); animation: pmMedal 3.8s ease-in-out infinite; }
@keyframes pmMedal { 0%, 100% { transform: rotate(-4deg) scale(1); } 50% { transform: rotate(4deg) scale(1.06); } }
.pm-pv { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pm-pv > i { font: 700 var(--fs-sub)/1 var(--sans); font-style: normal; color: #e8c66a; letter-spacing: 0.5px; }
.pm-num { font: 700 64px/1 var(--sans); color: #ffe39a; font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #5a3a08, 0 0 14px rgba(255, 196, 90, 0.45); white-space: nowrap; }
.pm-stack { grid-column: 1 / -1; display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5); }
.pm-stack > i { display: block; height: 100%; animation: pmGrow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pm-stack > i + i { box-shadow: inset 2px 0 0 rgba(0, 0, 0, 0.35); }
@keyframes pmGrow { from { width: 0; } }
.pm-stack > i.castle, .pm-part.castle .pm-pct > i { background: linear-gradient(#ffe39a, #d9a640); }
.pm-stack > i.build, .pm-part.build .pm-pct > i { background: linear-gradient(#a8d4ff, #4f8fd0); }
.pm-stack > i.army, .pm-part.army .pm-pct > i { background: linear-gradient(#ff9a8a, #c0392b); }
/* разбор мощи — три плитки значками; касание — туда, где эту часть растят */
.pm-parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pm-part {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px 14px; box-sizing: border-box; cursor: pointer;
  border: 0; border-radius: 18px; background: linear-gradient(#fbf7ee, #e7dcc6); color: #2c1e12; font: inherit; text-align: center;
  box-shadow: 0 4px 0 #a5937a, inset 0 1px 0 #fff;
}
.pm-part:active { transform: translateY(3px) scale(0.98); box-shadow: 0 1px 0 #a5937a, inset 0 1px 0 #fff; }
.pm-pic { display: flex; height: 76px; align-items: center; }
.pm-pic > :is(img, svg) { width: 76px; height: 76px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); }
.pm-part:hover .pm-pic > * { animation: pmHop 0.6s ease-out; }
@keyframes pmHop { 40% { transform: translateY(-8px) scale(1.06); } }
.pm-part > b { font: 700 var(--fs-num)/1.05 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-part > i { font: 700 var(--fs-sub)/1.1 var(--sans); font-style: normal; color: #6d5a40; }
.pm-pct { display: block; width: 86%; height: 10px; border-radius: 5px; overflow: hidden; background: rgba(42, 52, 66, 0.18); }
.pm-pct > i { display: block; height: 100%; border-radius: 5px; animation: pmGrow 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
.pm-hbox .pl-sect { margin-top: 0; }
.pm-inv { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: 18px; background: rgba(192, 138, 62, 0.12); border: 2px dashed rgba(192, 138, 62, 0.55); }
.pm-invic { flex: none; display: flex; }
.pm-invic > :is(img, svg) { width: 72px; height: 72px; animation: pmGift 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes pmGift { 0%, 70%, 100% { transform: rotate(0); } 78% { transform: rotate(-8deg); } 86% { transform: rotate(7deg); } 94% { transform: rotate(-3deg); } }
.pm-inv .kd-inv-row { flex: 1; min-width: 0; margin: 0; }
html.kod-still :is(.pm-bg, .pm-medal > *, .pm-stack > i, .pm-pct > i, .pm-invic > *, .pm-part .pm-pic > *) { animation: none; }
/* лёжа — две колонки: слева шапка, мощь и её разбор, справа герои и код для друзей */
.pm-body[data-tab="lord"] {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-content: start; gap: 14px 20px;
  grid-template-areas: "top heroes" "pow heroes" "parts inv";
}
.pm-body[data-tab="lord"] > .pm-top { grid-area: top; }
.pm-body[data-tab="lord"] > .pm-pow { grid-area: pow; }
.pm-body[data-tab="lord"] > .pm-parts { grid-area: parts; }
.pm-body[data-tab="lord"] > .pm-hbox { grid-area: heroes; }
.pm-body[data-tab="lord"] > .pm-inv { grid-area: inv; align-self: start; }
/* «Облики»: как вас видят — портрет в рамке, имя с титулом, пузырь чата; плитки обликов */
.pm-prev {
  display: flex; align-items: center; gap: 26px; padding: 22px 24px 22px 30px; border-radius: 20px;
  background: linear-gradient(135deg, #2c3a52, #1a2232); box-shadow: 0 4px 0 #0e131c, inset 0 0 0 2px rgba(243, 210, 122, 0.5);
}
.pm-prev .pf-face { --pf: 132px; }
.pm-pcol { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.pm-pnm { font: 700 34px/1.1 var(--title); color: #fff3d0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; }
.pm-pbb { max-width: 100%; font-size: var(--fs-body); }
.pm-lsect { margin: 4px 0 0; }
.pm-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.pm-look {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 10px 14px; border-radius: 18px; box-sizing: border-box;
  background: linear-gradient(#f7f9fc, #dde5ef); box-shadow: 0 4px 0 #8797ab, inset 0 1px 0 #fff; text-align: center;
}
.pm-look.on { background: linear-gradient(#eefbe8, #cdeac0); box-shadow: 0 4px 0 #5e9a4c, inset 0 0 0 3px #3f8f4f; }
.pm-lpic {
  position: relative; display: flex; align-items: center; justify-content: center; width: 150px; height: 150px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 228, 160, 0.9), rgba(255, 228, 160, 0) 68%);
}
.pm-lpic:active { transform: scale(0.96); }
.pm-lpic > :first-child { max-width: 100%; max-height: 100%; }
.pm-lpic .lk-prev-bb { font-size: var(--fs-min); padding: 10px 14px; }
.pm-look.lock .pm-lpic > :first-child { filter: grayscale(0.8) brightness(0.92); opacity: 0.7; }
.pm-look.on .pm-lpic { animation: pmWorn 2.4s ease-in-out infinite; }
@keyframes pmWorn { 0%, 100% { box-shadow: 0 0 0 0 rgba(63, 143, 79, 0); } 50% { box-shadow: 0 0 18px 4px rgba(63, 143, 79, 0.55); } }
.pm-worn { position: absolute; top: 4px; inset-inline-end: 4px; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: #3f8f4f; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.pm-look > b { font: 700 var(--fs-sub)/1.15 var(--sans); color: #1f2a38; overflow-wrap: anywhere; }
.pm-look > .btn { min-width: 150px; }
.pm-lock { display: flex; height: var(--h-btn-s); align-items: center; }
.pm-lock > :is(img, svg) { width: 44px; height: 44px; }
.pm-shopbar { display: flex; justify-content: center; padding-top: 6px; }
.pm-shopbar .btn { min-width: 300px; gap: 10px; }
.pm-wait { display: flex; justify-content: center; padding: 80px 0; }
.pm-wait > :is(img, svg) { width: 120px; height: 120px; animation: pmMedal 1.6s ease-in-out infinite; }
html.kod-still :is(.pm-look.on .pm-lpic, .pm-wait > *) { animation: none; }
/* «Настройки»: плитки значками — значок в цветном медальоне, имя, справа переключатель, список или стрелка */
.pm-guest { margin-bottom: 4px; }
.pm-sets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pm-set {
  position: relative; min-width: 0; display: flex; align-items: center; gap: 16px; min-height: 92px; padding: 8px 16px 8px 10px; box-sizing: border-box;
  border: 0; border-radius: 18px; background: linear-gradient(#f4f7fb, #dfe7f0); color: #1f2a38; font: inherit; text-align: start; cursor: pointer;
  box-shadow: 0 4px 0 #8797ab, inset 0 1px 0 #fff;
}
.pm-set:active { transform: translateY(3px); box-shadow: 0 1px 0 #8797ab, inset 0 1px 0 #fff; }
.pm-sic { flex: none; width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #6f9fd1, #3d6493); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2), 0 2px 0 rgba(0, 0, 0, 0.25); }
.pm-sic > :is(img, svg) { width: 48px; height: 48px; }
.pm-sic.music { background: radial-gradient(circle at 50% 35%, #b08ae0, #6a44a8); }
.pm-sic.sfx { background: radial-gradient(circle at 50% 35%, #5fb3a8, #2c7068); }
.pm-sic.lang { background: radial-gradient(circle at 50% 35%, #6f9fd1, #3d6493); }
.pm-sic.gfx { background: radial-gradient(circle at 50% 35%, #7fc06a, #3f8f4f); }
.pm-sic.tr { background: radial-gradient(circle at 50% 35%, #e0a64e, #a8742a); }
.pm-sic.push { background: radial-gradient(circle at 50% 35%, #e0605a, #9a2a26); }
.pm-sic.tut { background: radial-gradient(circle at 50% 35%, #c9a46a, #7a5a30); }
.pm-sic.pass { background: radial-gradient(circle at 50% 35%, #8a9bb0, #4f5f74); }
.pm-sic.privacy { background: radial-gradient(circle at 50% 35%, #5f7fb3, #2c3f70); }
.pm-sic.out { background: radial-gradient(circle at 50% 35%, #d65248, #8e1f1c); }
.pm-sn { flex: 1; min-width: 0; font: 700 var(--fs-list)/1.15 var(--sans); overflow-wrap: anywhere; }
.pm-set.out .pm-sn { color: #a3262a; }
.pm-set select.input { flex: none; width: auto; min-width: 180px; max-width: 46%; height: var(--h-btn-s); font-size: var(--fs-body); }
.pm-set > input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pm-tg { position: relative; flex: none; width: 76px; height: 40px; border-radius: 20px; background: #8a96a8; transition: background 0.15s; }
.pm-tg::after { content: ''; position: absolute; left: 4px; top: 4px; width: 32px; height: 32px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: transform 0.18s cubic-bezier(0.3, 1.4, 0.5, 1); }
.pm-set > input:checked ~ .pm-tg { background: #3d9a52; }
.pm-set > input:checked ~ .pm-tg::after { transform: translateX(36px); }
.pm-tgart .pm-tg { border-radius: 0; background: var(--tg-off) center / contain no-repeat; }
.pm-tgart .pm-tg::after { display: none; }
.pm-tgart .pm-set > input:checked ~ .pm-tg { background: var(--tg-on) center / contain no-repeat; }
.pm-set > input:focus-visible ~ .pm-tg { outline: 3px solid #e8b84a; outline-offset: 2px; }
.pm-go { flex: none; display: flex; color: #6d7f95; }
.pm-go svg { width: 32px; height: 32px; }
[dir=rtl] .pm-go { transform: scaleX(-1); }
.pm-acct { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 0; font-size: var(--fs-sub); color: #6d5a40; }
.pm-acct > :is(img, svg) { width: 40px; height: 40px; }
.pm-acct b { font: 700 var(--fs-num)/1 var(--sans); color: #2c1e12; }
.pm-ask { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.pm-ask > :is(img, svg) { width: 120px; height: 120px; animation: pfBreath 2.4s ease-in-out infinite; }
.pm-ask p { margin: 0; font-size: var(--fs-body); }
html.kod-still :is(.pm-tg, .pm-tg::after) { transition: none; }
html.kod-still .pm-ask > * { animation: none; }

/* стоя: одна колонка; портрет 210, имя 42, число мощи 72, плитки крупнее; настройки — по одной в ряд */
body.vertical .pm-body { gap: 16px; }
body.vertical .pm-body[data-tab="lord"] { display: flex; flex-direction: column; }
body.vertical .pm-top { gap: 28px; min-height: 300px; padding: 30px 18px 30px 32px; }
body.vertical .pm-top .pf-face { --pf: 210px; }
body.vertical .pm-nm { font-size: 42px; }
body.vertical .pm-chip { min-height: 58px; }
body.vertical .pm-pow { padding: 18px 24px 20px; }
body.vertical .pm-medal > :is(img, svg) { width: 128px; height: 128px; }
body.vertical .pm-num { font-size: 72px; }
body.vertical .pm-stack { height: 22px; border-radius: 11px; }
body.vertical .pm-part { padding: 14px 6px 16px; }
body.vertical .pm-pic { height: 88px; }
body.vertical .pm-pic > :is(img, svg) { width: 88px; height: 88px; }
body.vertical .pm-part > b { font-size: 32px; }
body.vertical .pm-inv { padding: 14px 16px; }
body.vertical .pm-prev .pf-face { --pf: 168px; }
body.vertical .pm-pnm { font-size: 38px; }
body.vertical .pm-looks { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
body.vertical .pm-lpic { width: 168px; height: 168px; }
body.vertical .pm-look > .btn { min-width: 0; width: 100%; }
body.vertical .pm-sets { grid-template-columns: minmax(0, 1fr); gap: 12px; }
body.vertical .pm-set { min-height: 108px; gap: 18px; padding: 10px 20px 10px 12px; }
body.vertical .pm-sic { width: 88px; height: 88px; }
body.vertical .pm-sic > :is(img, svg) { width: 56px; height: 56px; }
body.vertical .pm-set select.input { min-width: 240px; height: 64px; }
body.vertical .pm-tg { width: 88px; height: 46px; border-radius: 23px; }
body.vertical .pm-tg::after { width: 38px; height: 38px; }
body.vertical .pm-set > input:checked ~ .pm-tg::after { transform: translateX(42px); }
/* лёжа на телефоне: шапка ниже, число 56 */
body.phone-land .pm-top { min-height: 220px; padding: 20px 18px 20px 26px; }
body.phone-land .pm-top .pf-face { --pf: 160px; }
body.phone-land .pm-num { font-size: 56px; }
/* лёжа: лучшие герои в правой колонке — по три в ряд, крупно (по пять выходили мелкими) */
.pm-body[data-tab="lord"] .pm-heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ——— пьедестал тройки лидеров (rank.js podiumHtml, круг 9): нарисованный пьедестал ui.arena_podium, портреты — в его
   стеклянных шарах (места шаров — в долях картинки 768×512), очки — плашкой на постаменте, имя — на ступени; шары
   опускаются по очереди, у первого — сияние за шаром. Размеры — в единицах контейнера (cqw): пьедестал во всю ширину
   стоя и не шире 560 лёжа ——— */
.rk-pod { position: relative; container-type: inline-size; width: min(100%, 560px); margin: 0 auto 6px; aspect-ratio: 3 / 2; }
.rk-pod-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.rk-pc { position: absolute; inset: 0; pointer-events: none; }
.rk-pc > * { pointer-events: auto; }
.rk-pc.p1 { --cx: 50%; --cy: 21.5%; --bd: 25cqw; --vy: 57%; --ny: 74%; }
.rk-pc.p2 { --cx: 22.5%; --cy: 31%; --bd: 22cqw; --vy: 62.5%; --ny: 75.5%; }
.rk-pc.p3 { --cx: 77%; --cy: 32.5%; --bd: 21.6cqw; --vy: 63.5%; --ny: 75.5%; }
.rk-pball { position: absolute; left: var(--cx); top: var(--cy); width: var(--bd); aspect-ratio: 1; translate: -50% -50%;
  display: flex; align-items: center; justify-content: center; }
.rk-pball .ava { --ava-s: calc(var(--bd) * 0.78); border-radius: 50%; border-width: 4px; }
.rk-pball .ava-face { border-radius: 50%; }
.rk-pball .ava .lv { display: none; }
.rk-pball .rk-crest { width: calc(var(--bd) * 0.78); }
.rk-pball .rk-crest .un-crest { width: 100%; height: auto; }
.rk-pc.p1 .rk-pball::before { content: ''; position: absolute; z-index: -1; inset: -36%; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(255, 220, 120, 0) 0deg, rgba(255, 220, 120, 0.55) 20deg, rgba(255, 220, 120, 0) 40deg,
    rgba(255, 220, 120, 0) 90deg, rgba(255, 220, 120, 0.55) 110deg, rgba(255, 220, 120, 0) 130deg, rgba(255, 220, 120, 0) 180deg,
    rgba(255, 220, 120, 0.55) 200deg, rgba(255, 220, 120, 0) 220deg, rgba(255, 220, 120, 0) 270deg, rgba(255, 220, 120, 0.55) 290deg, rgba(255, 220, 120, 0) 310deg);
  -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); }
.rk-pc.me .rk-pball .ava { box-shadow: 0 0 0 3px #5fc46a, 0 0 18px 4px rgba(95, 196, 106, 0.8); }
.rk-ptro { position: absolute; inset-inline-end: -10%; bottom: -8%; width: 40%; height: auto; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); }
img.rk-ptro { object-fit: contain; aspect-ratio: 1; }
svg.rk-ptro { width: 32%; height: auto; }
.rk-pval { position: absolute; left: var(--cx); top: var(--vy); translate: -50% -50%; max-width: 26cqw; padding: 4px 12px; box-sizing: border-box;
  border-radius: 14px; background: rgba(34, 22, 8, 0.82); border: 2px solid rgba(243, 210, 122, 0.8); color: #ffe39a;
  font: 700 var(--fs-num)/1.1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: clip; }
.rk-pnm { position: absolute; left: var(--cx); top: var(--ny); translate: -50% 0; width: max-content; max-width: 26cqw; padding: 2px 10px; box-sizing: border-box;
  border-radius: 12px; background: rgba(255, 250, 238, 0.9); color: #2c1e12; font: 700 var(--fs-sub)/1.15 var(--sans); text-align: center;
  display: flex; flex-direction: column; align-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25); }
/* имя — до двух строк целиком (без многоточия), под ним — вторая строка места (ранг, альянс, «волн: N») */
.rk-pnm > b, .rk-psub { max-width: 100%; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rk-pnm > b { font: inherit; }
.rk-psub { font: 600 var(--fs-min)/1.15 var(--sans); font-style: normal; color: #6b5636; }
.rk-pnm[data-player-rid], .rk-pnm[data-player-nick] { cursor: pointer; }
.rk-pc.p1 .rk-pnm { max-width: 31cqw; } /* середина — шире (имя в строку); с соседями (26) сходятся только поля подписей, не текст */
/* стоя вторая строка места — до трёх строк целиком (проверка перед выкладкой: у альянса на 2-м месте было «против
   «Пепельные…»»); подпись стоит серединой на ступени: длинная растёт и вверх, к плашке очков, и вниз, а не только за низ
   пьедестала (--nc — середина подписи) */
body.vertical .rk-psub { -webkit-line-clamp: 3; }
body.vertical .rk-pnm { top: var(--nc); translate: -50% -50%; }
body.vertical .rk-pc.p1 { --nc: 85%; }
body.vertical .rk-pc.p2 { --nc: 86%; }
body.vertical .rk-pc.p3 { --nc: 86.5%; }
/* награда за место — у шара слева (сундук ступени, касание — «Награды»; у альянсов турнира — очки побед венцом) */
.rk-pprize { position: absolute; z-index: 2; inset-inline-start: -22%; bottom: -14%; width: 52%; display: flex; justify-content: center; }
.rk-pprize :is(.rk-chestbtn, .rk-chest) { width: 100%; height: auto; aspect-ratio: 1; }
.rk-pprize .ic-cell { --ic: calc(var(--bd) * 0.4); }
.rk-pprize .tq-rvp { padding: 2px 10px 2px 4px; border-radius: 16px; background: rgba(255, 250, 238, 0.92); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
.rk-pc.none .rk-pball { opacity: 0; }
/* без картинки пьедестала — три постамента кодом */
.rk-pod:not(.art) { aspect-ratio: auto; height: 320px; }
.rk-pod:not(.art) .rk-pc::after { content: ''; position: absolute; z-index: -1; left: var(--cx); bottom: 0; width: 28cqw; translate: -50% 0; border-radius: 10px 10px 0 0;
  height: calc(100% - var(--cy) - var(--bd) * 0.4); background: linear-gradient(#f4f7fb, #aab6c4); }
.rk-pod:not(.art) .rk-pc.p1::after { background: linear-gradient(#ffe39a, #c99236); }
.rk-pod:not(.art) .rk-pc.p3::after { background: linear-gradient(#ffd2a8, #b7713a); }
/* движение: шары опускаются по очереди (третье, второе, первое), плашки и имена — следом; сияние первого — кружит */
html:not(.kod-still) .rk-pod-img { animation: rkPodIn 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; transform-origin: 50% 100%; }
html:not(.kod-still) .rk-pball { animation: rkBallIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; animation-delay: calc(var(--d, 0s) + 0.2s); }
html:not(.kod-still) :is(.rk-pval, .rk-pnm) { animation: rkPop 0.35s ease-out both; animation-delay: calc(var(--d, 0s) + 0.55s); }
html:not(.kod-still):not(.kod-lo) .rk-pc.p1 .rk-pball::before { animation: rkSpin 14s linear infinite; }
html:not(.kod-still) .rk-pc.p1 .rk-ptro { animation: rkTro 2.8s ease-in-out infinite 1s; }
/* окно перерисовывает разметку целиком (Ночь Пепла — раз в 30 с): въезд — только при открытии (rank.js opts.still) */
.rk-pod.still :is(.rk-pod-img, .rk-pball, .rk-pval, .rk-pnm) { animation: none; }
@keyframes rkPodIn { from { opacity: 0; transform: scaleY(0.6); } }
@keyframes rkBallIn { from { opacity: 0; translate: -50% -110%; } }
@keyframes rkPop { from { opacity: 0; scale: 0.6; } }
@keyframes rkSpin { to { rotate: 360deg; } }
@keyframes rkTro { 0%, 100% { rotate: 0deg; } 50% { rotate: -10deg; scale: 1.08; } }
/* под пьедесталом дописанная окном сцена-пьедестал (union.js, tourney.js: короткий или пустой список — .sc-fill.fit) —
   второй пьедестал не нужен: с якорями CSS она рисует зал славы за рейтингом (@supports ниже), без них — скрыта;
   другие сцены окна (житель, призыв) остаются */
.rk-wrap:is(.rk-podded, .rk-empty) ~ .sc-fill.fit { display: none; }
/* пьедестал — в своей «сцене»: обычно её нет (display: contents), в окне со свободным местом — зал славы (ниже) */
.rk-stage { display: contents; }
/* «Мой альянс»: пьедестал прячется, соратники с мест 1–3 — строками в начале списка */
.rk-list > .rk-row.rk-podrow { display: none; }
.rk-wrap.only-ally .rk-list > .rk-row.rk-podrow { display: flex; }
/* пустой рейтинг со своей строкой: пустой пьедестал крупно, надпись под ним */
.rk-none.big { flex-direction: column; gap: 6px; padding: 6px 12px 12px; }
.rk-none-art { width: min(100%, 480px); height: auto; opacity: 0.9; }
html:not(.kod-still) .rk-none-art { animation: tq-float 4s ease-in-out infinite; }
body.vertical .rk-pod { width: 100%; max-width: 690px; margin-bottom: 14px; } /* подпись места в 5 строк чуть ниже пьедестала — не на строке под ним */
body.vertical .rk-none-art { width: 100%; max-width: 560px; }
/* награды за места: сундук и ячейки крупнее, подпись места — не мельче --fs-min */
body.vertical .rk-tier-pl b { font-size: var(--fs-sub); }
/* строки рейтинга стоя: уровень на аватаре и имя — не мельче --fs-min (щиток был 17,6) */
body.vertical .rk-row .ava .lv { min-width: 34px; height: 32px; font-size: var(--fs-min); }
body.vertical .rk-nm { font-size: var(--fs-sub); }
/* окно со сценой под коротким списком (union.js «Лучшие альянса», tourney.js): сцену заменил пьедестал — он стоит в
   зале славы (картинка brand.loading_hall, rank.js stageVar) на всё оставшееся место: на красной дорожке у низа зала
   (подпись и «Мой альянс» — у верха, своя строка — у низа), а не посередине пустоты (проверка круга 9: в «Лучших
   альянса» с одним участником пустовало 60 % окна). Пустой рейтинг — пустой пьедестал в том же зале */
.sc-host > .rk-wrap:is(.rk-podded, .rk-empty) { flex: 1 0 auto; }
.sc-host > .rk-wrap.rk-podded > .rk-stage, .sc-host > .rk-wrap.rk-empty > .rk-list {
  display: flex; flex-direction: column; flex: 1 0 auto; min-height: 320px; padding: 12px 8px 14px; box-sizing: border-box; border-radius: 18px;
  background: #2c3644 var(--rk-stage, none) 50% 35% / cover no-repeat; box-shadow: 0 4px 0 #8797ab, inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.sc-host > .rk-wrap.rk-podded > .rk-stage > .rk-pod { margin: auto auto 0; }
.sc-host > .rk-wrap.rk-empty > .rk-list { justify-content: flex-end; }
.sc-host > .rk-wrap.rk-empty .rk-none.big > span { color: #fff3d0; font-weight: 700; text-shadow: 0 2px 3px rgba(0, 0, 0, 0.85), 0 0 8px rgba(0, 0, 0, 0.6); }
/* «Мой альянс» — пьедестал прячется; в окне со свободным местом зал славы остаётся — под строками соратников, на всё
   оставшееся место (своя строка — у низа), а не пустотой */
.rk-wrap.only-ally > .rk-stage > .rk-pod { display: none; }
.sc-host > .rk-wrap.only-ally > .rk-stage { order: 1; flex: 1 1 0; min-height: 0; padding: 0; }
.sc-host > .rk-wrap.only-ally > .rk-mine { order: 2; }
/* зал славы рисует сама сцена окна (.sc-fill.fit — её union.js и tourney.js ставят под коротким списком, проверка
   tourney_test меряет, что она до низа окна; проверка перед выкладкой: спрятанная, она была пустой разметкой): сцена
   встаёт за рейтингом — от пьедестала (у пустого рейтинга — от пустого пьедестала) до низа тела окна, строки мест
   стоят на дорожке зала. Её картинка-пьедестал не нужна — пьедестал свой (rank.js podiumHtml); зал — картинкой
   --rk-stage (rank.js stageVar). Браузер без якорей CSS — как выше: сцены нет, зал — фоном .rk-stage */
@supports (anchor-name: --a) {
  .sc-host:has(> .rk-wrap:is(.rk-podded, .rk-empty) ~ .sc-fill.fit) { position: relative; }
  .sc-host > .rk-wrap:is(.rk-podded, .rk-empty):has(~ .sc-fill.fit), .sc-host > .rk-wrap:is(.rk-podded, .rk-empty) ~ :not(.sc-fill) { position: relative; z-index: 1; }
  /* строка под рейтингом (турнир: «Ваше место дня — N, награда за него: …») — на полу зала светлой плашкой */
  .sc-host > .rk-wrap:is(.rk-podded, .rk-empty) ~ .tq-mytier { margin: 0 8px 8px; padding: 6px 14px; border-radius: 12px; background: rgba(255, 250, 238, 0.92);
    color: #2c1e12; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3); }
  .sc-host > .rk-wrap.rk-podded:has(~ .sc-fill.fit) > .rk-stage, .sc-host > .rk-wrap.rk-empty:has(~ .sc-fill.fit) > .rk-list {
    anchor-name: --rk-hall; background: none; box-shadow: none;
  }
  .sc-host > .rk-wrap:is(.rk-podded, .rk-empty) ~ .sc-fill.fit {
    display: block; position: absolute; z-index: 0; flex: none; min-height: 0; margin: 0;
    top: anchor(--rk-hall top); bottom: 0; left: anchor(--rk-hall left); right: anchor(--rk-hall right);
    border-radius: 18px; background: #2c3644 var(--rk-stage, none) 50% 35% / cover no-repeat;
    box-shadow: 0 4px 0 #8797ab, inset 0 0 0 2px rgba(255, 255, 255, 0.35);
  }
  .sc-host > .rk-wrap:is(.rk-podded, .rk-empty) ~ .sc-fill.fit > .sc-bg { display: none; }
}
.pl-stat svg, .pl-stat img { width: 48px; height: 48px; }
body.vertical .pl-stat svg, body.vertical .pl-stat img { width: 64px; height: 64px; }
/* титул облика у имени в окне лорда — крупнее (Казна стоя — 16, в окне лорда он главный после имени) */
body.vertical :is(.pm-title, .pl-title) .lk-title { margin: 0; padding: 2px 12px; font-size: var(--fs-sub); line-height: 1.3; border-radius: 12px; }
body.vertical :is(.pm-title, .pl-title) .lk-title .lk-tic { width: 30px; height: 30px; }
/* лёжа окно низкое: пьедестал во всплывающем рейтинге и в окне-сцене — меньше, а зал славы — без нижнего предела
   высоты: своя строка внизу окна не закрывает имена и подписи мест */
body.phone-land :is(.rk-modal, .sc-host) .rk-pod { width: min(100%, 480px); }
/* пустой пьедестал лёжа — ниже: пустой рейтинг с надписью и своей строкой помещается в окно без прокрутки (проверка перед
   выкладкой: своя строка у низа окна закрывала подножие пьедестала 340) */
body.phone-land .sc-host .rk-none-art { width: min(100%, 200px); }
body.phone-land .sc-host > .rk-wrap.rk-podded > .rk-stage, body.phone-land .sc-host > .rk-wrap.rk-empty > .rk-list { min-height: 0; padding-block: 6px; }
/* лёжа пустой рейтинг в окне-сцене: надпись — над пустым пьедесталом (под ним её закрывала своя строка внизу окна) */
body.phone-land .sc-host > .rk-wrap.rk-empty > .rk-list { justify-content: flex-start; }
body.phone-land .sc-host .rk-none.big > span { order: -1; }
/* лёжа подписи мест — чуть выше (имя и вторая строка в 3–4 строки не уходят за низ пьедестала) */
body.phone-land .rk-pc.p1 { --ny: 66%; }
body.phone-land .rk-pc.p2 { --ny: 70%; }
body.phone-land .rk-pc.p3 { --ny: 71%; }

/* ——— проверка перед выкладкой: «Награды» мест (rank.js openPrizes) — ячейки крупнее, число и ярлык («3 ч», «×2»,
   «800») не мельче --fs-min (были 16 и 18,4); длинные подписи (n7+) — по правилам ячейки ——— */
body.vertical .rk-tier .ic-cell { --ic: 96px; }
body.phone-land .rk-tier .ic-cell { --ic: 84px; }
:is(body.vertical, body.phone-land) .rk-tier .it-tile.ic-cell .it-n:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.23)); }
:is(body.vertical, body.phone-land) .rk-tier .it-tile.ic-cell .it-tag:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.2)); line-height: 1.2; }
/* лучшие герои (окно лорда, «Ваш лорд»): имя — до двух строк целиком (в строку обрезалось: «Сигрид Ле…», «Бьорн
   Жел…»); лёжа — тоже по три в ряд, уровень и звёзды на портрете — не мельче --fs-min (были 16) */
.pl-hnm { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: center; line-height: 1.15; overflow-wrap: break-word; }
body.phone-land .pl-heroes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 10px; }
body.phone-land .pl-hlv, body.phone-land .pl-hst { font-size: var(--fs-min); line-height: 28px; padding: 0 8px; border-radius: 10px; }
/* лёжа уровень на аватаре в строке рейтинга (и своя строка внизу) — не мельче --fs-min (был 12) */
body.phone-land .rk-row .ava .lv { min-width: 32px; height: 30px; font-size: var(--fs-min); }
/* Арена и Ночь Пепла (окна рейтингов участка): подписи шапки арены («Сезон 3 · до конца», круг королевства, «Награды»),
   имена на её пьедестале, подписи волн («ур. 6 · 21:00») и «Отбиты все волны…» — не мельче --fs-min (были 16–21) */
body.vertical .arn-top-row :is(.arn-chip, .arn-prz), body.vertical .arn-podium .arn-pod-nm { font-size: var(--fs-min); }
:is(body.vertical, body.phone-land) .ash-wave .ash-wt .cx-sub, :is(body.vertical, body.phone-land) .ash-full > span { font-size: var(--fs-min); }
:is(body.vertical, body.phone-land) .rk-pz-modal .rk-tier-me { font-size: var(--fs-min); } /* «Вы здесь» над своей ступенью наград (было 17 и 14) */
body.vertical .rk-pz-modal .rk-tier-pl { width: 212px; } /* у 1-го места медаль, сундук и «1-е место» — не наезжают на ячейки */
body.phone-land .rk-pz-modal .rk-tier-pl { width: 172px; }
/* Арена, «Награды сезона» (arena.js, строки мест): ячейки крупнее, число и ярлык («8 ч», «1K») не мельче --fs-min (были 16 и 18,4) */
body.vertical .arn-win .ev-prize .ev-cells .ic-cell { --ic: 96px; }
:is(body.vertical, body.phone-land) .arn-win .ev-prize .it-tile.ic-cell .it-n:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.23)); }
:is(body.vertical, body.phone-land) .arn-win .ev-prize .it-tile.ic-cell .it-tag:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.2)); line-height: 1.2; }
/* Ночь Пепла, награды волн (ashnight.js): число и ярлык в ячейке («1 ч», «×80») не мельче --fs-min (были 16 и 18,4) */
body.vertical .ash-wave .ash-wl .ic-cell { --ic: 96px; }
:is(body.vertical, body.phone-land) .ash-wave .ash-wl .it-tile.ic-cell .it-n:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.23)); }
:is(body.vertical, body.phone-land) .ash-wave .ash-wl .it-tile.ic-cell .it-tag:not(.n7, .n8, .n9, .n10) { font-size: max(var(--fs-min), calc(var(--ic) * 0.2)); line-height: 1.2; }
/* лёжа подписи мест пьедестала узкие (26cqw пьедестала 480): имя — --fs-min, поля теснее — слово целиком, без разрыва
   посреди («Курганны-й князь») */
body.phone-land .rk-pnm { padding: 2px 6px; font-size: var(--fs-min); }
