/* События, часть 2 (docs/EVENTS.md §4–§6): окна «Ночь Пепла» (ashnight.js), «Арена пяти королевств» (arena.js),
   «Семидневная осада» (siege.js), общие кусочки — contest.js. Окна светлые: цвета — переменные --w-* (kod.css),
   запасные — для тёмного окна. Префиксы: cx- общее, ash- ночь, arn- арена, sg- осада. */

/* ——— общее ——— */
.cx-body { display: flex; flex-direction: column; gap: 8px; }
.cx-about { margin: 0; color: var(--w-hi, #fff3d0); font-size: 14px; line-height: 1.45; }
.cx-note { margin: 0; color: var(--w-muted, var(--muted)); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cx-box { padding: 10px 12px; border-radius: 8px; background: var(--w-well, rgba(0, 0, 0, 0.22)); display: flex; align-items: center;
  gap: 10px; flex-wrap: wrap; color: var(--w-hi, #fff3d0); font-size: 14px; }
.cx-box .btn { margin-left: auto; }
.cx-box > span:not(.cx-faces) { flex: 1 1 200px; min-width: 0; }
.cx-box.warn { box-shadow: inset 0 0 0 2px var(--w-bad, #e0705f); }
.cx-box.ok { box-shadow: inset 0 0 0 2px var(--w-good, #7fd08e); }
.cx-sub { display: block; color: var(--w-muted, var(--muted)); font-size: 12px; font-weight: 400; }
.cx-good { color: var(--w-good, #7fd08e); }
.cx-bad { color: var(--w-bad, #e0705f); }
.cx-tbl td { vertical-align: middle; }
.cx-tbl td svg { vertical-align: -3px; }
.cx-tbl tr.cur td { background: rgba(192, 138, 62, 0.14); }
.cx-tbl td.lt .q-loot { display: inline-block; white-space: nowrap; margin-right: 10px; }
.cx-note .q-loot { white-space: nowrap; margin-right: 8px; }
.cx-faces { display: flex; gap: 4px; flex-wrap: wrap; }
.cx-face { position: relative; width: 46px; height: 62px; border-radius: 6px; overflow: hidden; border: 2px solid var(--w-line, var(--bronze-d));
  background: var(--navy-l); flex: none; }
.cx-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-face .lv { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(16, 20, 28, 0.75); color: #fff3d0; font-size: 11px;
  text-align: center; line-height: 15px; }
.cx-face.lead { border-color: var(--bronze-l); }
.cx-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 360px; overflow-y: auto; }
.cx-pick button { position: relative; display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 8px; cursor: pointer; text-align: left;
  border: 2px solid var(--w-line, var(--bronze-d)); background: var(--w-well, rgba(0, 0, 0, 0.22)); color: var(--w-hi, #fff3d0); font: inherit; font-size: 13px; }
.cx-pick button.on { border-color: var(--w-good, #7fd08e); box-shadow: inset 0 0 0 1px var(--w-good, #7fd08e); }
.cx-pick button img { width: 34px; height: 46px; object-fit: cover; border-radius: 4px; flex: none; }
.cx-pick button .ord { position: absolute; top: 2px; right: 4px; font-weight: 700; color: var(--w-good, #7fd08e); }
.cx-pick button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cx-acts { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.cx-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cx-chips button { padding: 6px 12px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 14px; color: var(--w-hi, #fff3d0);
  border: 2px solid var(--w-line, var(--bronze-d)); background: var(--w-well, rgba(0, 0, 0, 0.22)); text-align: left; }
.cx-chips button.on { border-color: var(--bronze-l); box-shadow: inset 0 0 0 1px var(--bronze-l); }
.cx-chips button b { display: block; }
/* отсчёт в шапке («10 д 23 ч») не рвётся; место под числом — своим куском (arena.js, tourney.js: «рейтинг · 14-е место») */

/* ——— крупная шапка события (contest.js topHtml, круг 8): картинка события во всю ширину, плашки отсчёта сверху, крупное
   название и число внизу — как баннер «Событий» и шапка арены (была тонкая полоса ~60 px) ——— */
.cx-top { position: relative; flex: none; display: flex; flex-direction: column; justify-content: space-between; min-height: 220px;
  border-radius: 14px; overflow: hidden; background: linear-gradient(#4a3a3a, #1d2230);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(255, 226, 150, 0.35); }
.cx-top > .cx-top-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; pointer-events: none; }
.cx-top::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(10, 12, 20, 0.5), rgba(10, 12, 20, 0) 30%, rgba(10, 12, 20, 0.08) 52%, rgba(10, 12, 20, 0.86)); }
.cx-top > :not(.cx-top-art) { position: relative; z-index: 1; }
.cx-top-row { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 14px 0; }
.cx-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 10px; box-sizing: border-box; border-radius: 20px;
  background: rgba(12, 16, 26, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0.45); color: #fff3d0; font: 700 17px/1.2 var(--sans);
  text-shadow: 0 1px 2px #000; }
.cx-chip [data-to] { color: #ffe39a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-top-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 16px 14px; }
.cx-top-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cx-top-t .nm { font: 700 36px/1.1 var(--title); color: #ffe39a; text-shadow: 0 2px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); overflow-wrap: anywhere; }
.cx-top-t span { color: #f3ead8; font: 700 17px/1.25 var(--sans); text-shadow: 0 1px 2px #000; }
.cx-top .ev-pts { display: flex; flex-direction: column; align-items: flex-end; flex: none; color: #fff; font: 700 34px/1 var(--sans);
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(0, 0, 0, 0.75); }
.cx-top .ev-pts span { color: #e8dcc0; font: 700 16px/1.2 var(--sans); }
body.vertical .cx-top { min-height: 340px; border-radius: 18px; }
body.vertical .cx-top-row { padding: 14px 16px 0; gap: 10px; }
body.vertical .cx-chip { min-height: 50px; padding: 4px 18px 4px 12px; border-radius: 25px; font-size: 22px; }
body.vertical .cx-top-t .nm { font-size: 50px; }
body.vertical .cx-top-t span { font-size: 22px; }
body.vertical .cx-top .ev-pts { font-size: 46px; }
body.vertical .cx-top .ev-pts span { font-size: var(--fs-min); }
body.phone-land .cx-top { min-height: 240px; }
body.phone-land .cx-chip { min-height: 46px; font-size: 20px; }
body.phone-land .cx-top-t .nm { font-size: 42px; }
body.phone-land .cx-top-t span { font-size: 20px; }
body.phone-land .cx-top .ev-pts { font-size: 40px; }
body.phone-land .cx-top .ev-pts span { font-size: var(--fs-min); }
html:not(.kod-still) .cx-top-t { animation: ev-ban-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.cx-rules { display: flex; flex-direction: column; gap: 10px; }

/* ——— Ночь Пепла ——— */
/* закрытая ночь: Пепельная Матка крупно, на ней замок, под ней — когда откроется; ниже — волны картинками */
.ash-lock { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 16px 16px; border-radius: 14px;
  text-align: center; background: radial-gradient(ellipse at 50% 38%, rgba(255, 140, 60, 0.35), rgba(30, 22, 20, 0) 62%), linear-gradient(#3a2e2a, #241c1a);
  box-shadow: inset 0 0 0 2px rgba(255, 160, 90, 0.35); }
.ash-lock .ash-boss { width: min(380px, 86%); height: 260px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.6)) saturate(0.8); }
.ash-lock .evp-wait.ash-boss { display: block; }
.ash-lockic { position: absolute; top: 20px; inset-inline-end: 22px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #a8392d; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 4px 10px rgba(0, 0, 0, 0.5); }
.ash-lock b { max-width: 560px; color: #ffe7c8; font: 700 20px/1.35 var(--sans); text-shadow: 0 1px 2px #000; }
html:not(.kod-still) .ash-lock .ash-boss { animation: ash-breathe 3.6s ease-in-out 2; }
@keyframes ash-breathe { 50% { transform: scale(1.03) translateY(-3px); } }
/* волна карточкой: тварь картинкой с номером, имя и время, итог плашкой, награда ячейками, «Смотреть» и «Бой» */
.ash-waves { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ash-wave { position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "pic t" "pic l" "act act"; gap: 6px 12px;
  align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--w-well, rgba(0, 0, 0, 0.22)); box-shadow: inset 0 0 0 1px var(--w-line, rgba(255, 255, 255, 0.1)); }
.ash-wave.cur { box-shadow: inset 0 0 0 3px #e0a050, 0 0 14px rgba(224, 160, 80, 0.35); }
.ash-wave.won { box-shadow: inset 0 0 0 2px var(--w-good, #7fd08e); }
.ash-wave.lost { box-shadow: inset 0 0 0 2px var(--w-bad, #e0705f); }
.ash-wpic { grid-area: pic; position: relative; width: 104px; height: 96px; border-radius: 12px; overflow: hidden;
  background: radial-gradient(ellipse at 50% 70%, #6e4a36, #2a201c); }
.ash-wpic .ash-mon { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; border-radius: 0; }
.ash-mon.none { display: flex; align-items: center; justify-content: center; }
.ash-wn { position: absolute; left: 4px; top: 4px; min-width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 15px;
  background: rgba(12, 16, 26, 0.8); color: #ffe39a; font: 700 18px/1 var(--sans); }
.ash-wt { grid-area: t; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ash-wt > b { font: 700 19px/1.2 var(--sans); color: var(--w-hi, #fff3d0); }
.ash-wl { grid-area: l; min-width: 0; }
.ash-wave .aw-acts { grid-area: act; justify-content: flex-end; }
.ash-st { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; padding: 3px 12px; border-radius: 14px; font: 700 17px/1.2 var(--sans);
  color: #fff; background: #566274; }
.ash-st.live { background: #c0602a; }
.ash-st.ok { background: #3f8f4f; }
.ash-st.bad { background: #b0472e; }
.ash-st.miss { background: #7a7f88; }
.ash-st [data-to] { font-variant-numeric: tabular-nums; }
.ash-kill { display: inline-flex; align-items: center; gap: 4px; color: var(--w-muted, var(--muted)); font: 700 16px/1.2 var(--sans); }
.ash-army { gap: 18px; }
.ash-n { display: inline-flex; align-items: center; gap: 6px; flex: none !important; }
.ash-n b { font: 700 26px/1 var(--sans); }
.ash-army .cx-sub { flex: 1 1 220px; }
.ash-full { gap: 12px; }
.ash-full > span { flex: 0 1 auto !important; font-weight: 700; }
body.vertical .ash-waves { grid-template-columns: 1fr; gap: 12px; }
body.vertical .ash-wave { grid-template-columns: 150px minmax(0, 1fr); padding: 12px 14px; gap: 8px 16px; }
body.vertical .ash-wpic { width: 150px; height: 134px; }
body.vertical .ash-wt > b { font-size: 26px; }
body.vertical .ash-st { font-size: 22px; padding: 4px 14px; border-radius: 18px; }
body.vertical .ash-kill { font-size: 21px; }
body.vertical .ash-wn { min-width: 38px; height: 38px; border-radius: 19px; font-size: 22px; }
body.vertical .ash-lock .ash-boss { height: 380px; }
body.vertical .ash-lock b { font-size: 26px; }
body.vertical .ash-n b { font-size: 34px; }
body.phone-land .ash-wt > b { font-size: 22px; }
body.phone-land .ash-st { font-size: var(--fs-min); }
body.phone-land .ash-wn { min-width: 34px; height: 34px; border-radius: 17px; font-size: var(--fs-min); } /* номер волны — было 18 */
/* сцена у стен (ashwall.js, план 5.14.3): холст во всю ширину сразу под шапкой — крупно (круг 8: было 230 px окна стоя,
   фигуры по 10–15 px на экране), лента итога волны — в углу поверх; у волны с итогом — «Смотреть» и «Бой» */
.aw { position: relative; height: 300px; margin: 8px 0; border-radius: 12px; overflow: hidden; background: #5c534b; }
body.vertical .aw { height: 470px; }
body.phone-land .aw { height: 330px; }
.aw-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.aw-band { position: absolute; right: 10px; top: 10px; max-width: 62%; display: flex; flex-direction: column; gap: 2px; padding: 6px 10px;
  border-radius: 8px; background: rgba(20, 16, 12, 0.74); color: #f2e6cc; text-align: right; pointer-events: none; }
.aw-band b { font-family: var(--title); font-size: 17px; }
.aw-band span { font-size: 13px; color: #d8cbb0; }
.aw-band.win b { color: #a9e6b4; }
.aw-band.lose b { color: #ffb3a8; }
.aw-acts { display: flex; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.aw-acts .btn { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; }
body.vertical .aw-acts .btn { min-width: 0; min-height: 56px; padding: 0 18px; gap: 8px; font-size: 22px; }
body.vertical .aw-acts .btn svg { width: 30px; height: 30px; }

/* ——— своя картинка окон событий (contest.js pic): проявляется, когда загрузилась; до того — заглушка того же места,
   мягко мерцает (только прозрачность) ——— */
.evp { animation: evp-in 0.35s ease-out both; }
@keyframes evp-in { from { opacity: 0; } }
.evp-wait { display: inline-block; flex: none; max-width: 100%; border-radius: 12px; background: linear-gradient(135deg, rgba(120, 140, 170, 0.35), rgba(70, 84, 108, 0.3));
  animation: evp-wait 1.3s ease-in-out infinite; }
@keyframes evp-wait { 50% { opacity: 0.5; } }
html.kod-still :is(.evp, .evp-wait) { animation: none; }

/* ——— Арена (arena.js, круг 5: образец — скрин 051) ——— */
.arn-win .arn-body { gap: 12px; }
.arn-tabs .q-tab :is(svg, img) { vertical-align: -5px; }
/* шапка «Боя» и «Рейтинга»: картинка арены во всю ширину, сезон и круг — плашками, сундук наград сезона, пьедестал */
.arn-top { position: relative; flex: none; display: flex; flex-direction: column; min-height: 340px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(#3a4c6c, #1d2230); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(255, 226, 150, 0.35); }
.arn-top.closed { min-height: 220px; }
.arn-top > .arn-ban { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; pointer-events: none; }
.arn-top::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(10, 12, 20, 0.55), rgba(10, 12, 20, 0.05) 30%, rgba(10, 12, 20, 0.15) 55%, rgba(10, 12, 20, 0.78)); }
.arn-top > :not(.arn-ban) { position: relative; z-index: 1; }
.arn-top-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px 0; flex-wrap: wrap; }
.arn-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 14px 4px 8px; box-sizing: border-box; border-radius: 20px;
  background: rgba(12, 16, 26, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0.45); color: #fff3d0; font: 700 17px/1.2 var(--sans);
  text-shadow: 0 1px 2px #000; }
.arn-chip [data-to] { color: #ffe39a; white-space: nowrap; font-variant-numeric: tabular-nums; }
.arn-chip.pool { padding-inline-start: 12px; }
.arn-prz { margin-inline-start: auto; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0; border: 0; background: none; cursor: pointer;
  color: #fff; font: 700 16px/1.1 var(--sans); text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.arn-prz .rk-chest { width: 76px; height: 76px; }
.arn-prz:active { transform: scale(0.94); }
html:not(.kod-still) .arn-prz .rk-chest { animation: arn-chest 2.4s ease-in-out infinite; }
@keyframes arn-chest { 0%, 70%, 100% { transform: none; } 78% { transform: rotate(-7deg) scale(1.06); } 86% { transform: rotate(6deg) scale(1.06); } 93% { transform: rotate(-3deg); } }
/* пьедестал: 2-е — слева, 1-е — посередине и выше, 3-е — справа; кубок SVG с аватаром в чаше, имя, постамент с рейтингом
   и номером места. При открытии постаменты поднимаются по очереди (--d), кубки падают на них, за первым — лучи */
.arn-podium { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1fr); align-items: end; gap: 10px;
  width: min(660px, 100%); margin: auto auto 0; padding: 8px 12px 0; box-sizing: border-box; }
.arn-podium.wait { display: flex; justify-content: center; min-height: 240px; }
.arn-podium.wait .empty-state { padding: 0; color: #fff3d0; }
.arn-pod { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.arn-cup { --cup: 116px; --ava-s: 60px; position: relative; width: var(--cup); height: calc(var(--cup) * 1.1); filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.45)); }
.arn-pod.p1 .arn-cup { --cup: 150px; --ava-s: 78px; }
.arn-cup-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: visible; }
.arn-cup .ava, .arn-cup .arn-pod-ava.none { position: absolute; left: calc(50% - var(--ava-s) / 2); top: calc(var(--cup) * 0.39 - var(--ava-s) / 2);
  border-radius: 50%; }
.arn-cup .ava .ava-face { border-radius: 50%; }
.arn-pod-ava.none { display: flex; align-items: center; justify-content: center; width: var(--ava-s); height: var(--ava-s); box-sizing: border-box;
  border: 3px dashed rgba(255, 255, 255, 0.6); background: rgba(12, 16, 26, 0.45); color: rgba(255, 255, 255, 0.75); font: 700 30px/1 var(--sans); }
.arn-pod.p1 .arn-cup::before { content: ''; position: absolute; left: 50%; top: 40%; width: 300px; height: 300px; margin: -150px 0 0 -150px; z-index: -1;
  border-radius: 50%; pointer-events: none; opacity: 0.85;
  background: repeating-conic-gradient(rgba(255, 226, 150, 0.55) 0deg 8deg, rgba(255, 226, 150, 0) 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 16%, transparent 66%); mask: radial-gradient(circle, #000 16%, transparent 66%); }
.arn-pod-nm { max-width: 100%; margin-top: 4px; padding: 2px 10px; box-sizing: border-box; border-radius: 12px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; background: rgba(12, 16, 26, 0.7); color: #fff; font: 700 17px/1.3 var(--sans); text-shadow: 0 1px 2px #000; }
.arn-pod-nm[data-player-rid] { cursor: pointer; }
.arn-pod-nm .arn-kd { vertical-align: 1px; }
.arn-ped { position: relative; width: 100%; height: 58px; margin-top: 6px; overflow: hidden; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 8px; box-sizing: border-box; border-radius: 10px 10px 0 0;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55), inset 0 -10px 16px rgba(0, 0, 0, 0.25); }
.arn-pod.p1 .arn-ped { height: 82px; background: linear-gradient(#ffe39a, #e0a93e 55%, #a8742a); }
.arn-pod.p2 .arn-ped { height: 62px; background: linear-gradient(#f4f7fb, #c6d0dc 55%, #8a96a5); }
.arn-pod.p3 .arn-ped { height: 50px; background: linear-gradient(#ffd2a8, #d38a4c 55%, #8a4e1e); }
.arn-ped > i { position: absolute; inset-inline-end: 8px; bottom: -14px; font: 700 64px/1 var(--title); font-style: normal; color: rgba(255, 255, 255, 0.4);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.15); }
.arn-pod-pts { position: relative; display: inline-flex; align-items: center; gap: 4px; color: #fff; font: 700 22px/1 var(--sans); font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px #000, 0 0 3px rgba(0, 0, 0, 0.8); }
.arn-pod.none .arn-cup { opacity: 0.55; }
/* своя графика (заказана, art/REQUEST_R5.md §3): кубок ui.trophy_<место> — вместо SVG (аватар — в чаше, на той же
   высоте); пьедестал ui.arena_podium (3 : 2, середина выше) — картинкой под местами: кубок стоит на площадке (--top —
   верх площадки от верха картинки), имя и рейтинг — на передней стенке ступени (--face), постаментов кодом нет.
   Положение площадок — догадка до картинки: поправить здесь, когда она ляжет */
.arn-cup-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.arn-podium.art { position: relative; display: block; aspect-ratio: 3 / 2; height: auto; padding: 0; }
.arn-pod-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
/* место — слоем во всю картинку: кубок стоит низом на площадке (--cx, --top), имя — под кубком, рейтинг — на стенке */
.arn-podium.art .arn-pod { position: absolute; inset: 0; display: block; pointer-events: none; }
.arn-podium.art .arn-pod > * { pointer-events: auto; }
.arn-podium.art .arn-pod.p1 { --cx: 50%; --top: 34%; --face: 60%; }
.arn-podium.art .arn-pod.p2 { --cx: 19%; --top: 50%; --face: 72%; }
.arn-podium.art .arn-pod.p3 { --cx: 81%; --top: 55%; --face: 76%; }
.arn-podium.art .arn-cup { position: absolute; left: var(--cx); top: var(--top); margin: calc(var(--cup) * -1.1) 0 0 calc(var(--cup) / -2); }
.arn-podium.art .arn-pod-nm { position: absolute; left: var(--cx); top: var(--top); max-width: 30%; margin: 4px 0 0; transform: translateX(-50%); }
.arn-podium.art .arn-ped { position: absolute; left: var(--cx); top: var(--face); width: auto; height: auto; margin: 0; padding: 0; transform: translate(-50%, -50%);
  background: none; box-shadow: none; overflow: visible; }
.arn-podium.art .arn-ped > i { display: none; }
html:not(.kod-still) .arn-podium.art .arn-ped { animation: evp-in 0.35s ease-out both; animation-delay: calc(var(--d, 0s) + 0.6s); }
html:not(.kod-still) .arn-podium.art .arn-pod-img { animation: arn-rise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.12) both; transform-origin: 50% 100%; }
/* движение: постамент поднимается, кубок падает с отскоком, имя и рейтинг проявляются, лучи первого вращаются */
html:not(.kod-still) .arn-ped { animation: arn-rise 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.12) both; animation-delay: var(--d, 0s); transform-origin: 50% 100%; }
html:not(.kod-still) .arn-cup { animation: arn-drop 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.35) both; animation-delay: calc(var(--d, 0s) + 0.3s); }
html:not(.kod-still) .arn-pod-nm { animation: evp-in 0.35s ease-out both; animation-delay: calc(var(--d, 0s) + 0.55s); }
html:not(.kod-still):not(.kod-lo) .arn-pod.p1 .arn-cup::before { animation: arn-spin 16s linear infinite; }
@keyframes arn-rise { from { transform: translateY(100%) scaleY(0.4); opacity: 0; } }
@keyframes arn-drop { from { transform: translateY(-70px) scale(0.5); opacity: 0; } 70% { opacity: 1; } }
@keyframes arn-spin { to { transform: rotate(360deg); } }
/* плитки: рейтинг (касание — «Рейтинг»), бои дня, знаки арены */
.arn-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arn-st { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 10px 8px;
  border: 0; border-radius: 14px; background: linear-gradient(#f3f6fa, #d4e0ef); box-shadow: 0 3px 0 rgba(42, 52, 66, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  color: var(--w-hi, #16202c); font: inherit; text-align: center; }
button.arn-st { cursor: pointer; }
button.arn-st:active { transform: translateY(2px); }
.arn-st > :is(svg, img) { width: 52px; height: 52px; flex: none; }
.arn-st > b { font: 700 30px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.arn-st > span { color: var(--w-muted, #566274); font: 700 15px/1.2 var(--sans); }
.arn-st.ft.out > b { color: var(--w-bad, #c0392b); }
.arn-st .btn { margin-top: 6px; }
.arn-float { position: absolute; top: 4px; inset-inline-end: 10px; font: 700 28px/1 var(--sans); font-style: normal; pointer-events: none;
  text-shadow: 0 1px 0 #fff; animation: arn-float 1.5s ease-out both; }
.arn-float.plus { color: #23803e; }
.arn-float.minus { color: #c0392b; }
@keyframes arn-float { 0% { transform: translateY(14px) scale(0.6); opacity: 0; } 20% { transform: none; opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }
.arn-warn { gap: 14px; font-weight: 700; }
.arn-warn .btn { flex: none; }
.arn-sect { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.arn-sect > span { flex: 1; min-width: 0; text-align: start; }
.arn-sect .btn { flex: none; }
/* соперники — карточками: портрет главного героя, имя, сила и рейтинг крупно, остальные герои, крупные кнопки боя */
.arn-foes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.arn-foe { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'pic main' 'btns btns'; gap: 10px 12px; padding: 12px;
  border-radius: 14px; background: linear-gradient(#e8eef6, #d4e0ef); box-shadow: 0 3px 0 rgba(42, 52, 66, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.7); }
.arn-foe-pic { grid-area: pic; }
.arn-foe-main { grid-area: main; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.arn-foe .nm { font: 700 22px/1.2 var(--sans); color: var(--w-hi, #fff3d0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arn-nums { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.arn-nums > span { display: inline-flex; align-items: center; gap: 4px; }
.arn-nums b { font: 700 22px/1 var(--sans); color: var(--w-hi, #16202c); font-variant-numeric: tabular-nums; }
.arn-nums .pw.easy b { color: var(--w-good, #23803e); }
.arn-nums .pw.hard b { color: var(--w-bad, #c0392b); }
.arn-ic { display: block; flex: none; object-fit: contain; }
.cx-face.big { display: block; width: 96px; height: 130px; border-width: 3px; border-radius: 10px; }
.arn-foe .cx-faces .cx-face { width: 44px; height: 60px; }
.arn-btns { grid-area: btns; display: flex; gap: 8px; } /* «Автобой» и «Бой вручную» (docs/ARENA_PUZZLE.md) */
.arn-btns .btn { flex: 1; min-width: 0; height: var(--h-btn); display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.arn-btns .arn-go { flex: 1.4; font-size: var(--fs-btn); }
.arn-btns .arn-go :is(svg, img) { flex: none; }
.arn-btns .arn-man { font-size: var(--fs-btn-s); }
html:not(.kod-still) .arn-foe { animation: arn-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; animation-delay: calc(0.12s + var(--i, 0) * 0.08s); }
html:not(.kod-still) .arn-foe.fighting { animation: arn-fight 0.5s ease-in-out infinite; }
@keyframes arn-in { from { transform: translateX(48px); opacity: 0; } }
@keyframes arn-fight { 25% { transform: translateX(-4px) rotate(-0.6deg); } 75% { transform: translateX(4px) rotate(0.6deg); } }
.arn-kd { display: inline-block; width: 10px; height: 10px; border-radius: 5px; margin-right: 4px; vertical-align: 0; }
/* отряд защиты — портреты крупно, сила, «Изменить» */
.arn-def { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--w-well, rgba(0, 0, 0, 0.22)); }
.arn-def-h { display: flex; align-items: center; gap: 14px; }
.arn-def-h > b { flex: 1; min-width: 0; font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, #16202c); }
.arn-def-h .pw { display: inline-flex; align-items: center; gap: 6px; font: 700 22px/1 var(--sans); color: var(--w-hi, #16202c); }
.arn-def .cx-face { width: 64px; height: 86px; }
/* журнал боёв: значок (вызвал — мечи, вызвали — замок), кто, итог плашкой цвета, ±рейтинг */
.arn-log { display: flex; flex-direction: column; gap: 6px; }
.arn-lr { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px; box-sizing: border-box; border-radius: 10px;
  background: var(--w-well, rgba(0, 0, 0, 0.22)); color: var(--w-muted, #566274); }
.arn-lr > :is(svg, img) { flex: none; }
.arn-lr .t { flex: 1; min-width: 0; color: var(--w-hi, #16202c); font-size: var(--fs-sub); }
.arn-lr .arn-res { flex: none; padding: 3px 10px; border-radius: 10px; color: #fff; font-size: 15px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4); }
.arn-lr.win .arn-res { background: #3f8f4f; }
.arn-lr.lose .arn-res { background: #b0472e; }
.arn-lr .d { flex: none; min-width: 48px; text-align: end; font: 700 20px/1 var(--sans); font-variant-numeric: tabular-nums; }
.arn-lr.win .d { color: var(--w-good, #23803e); }
.arn-lr.lose .d { color: var(--w-bad, #c0392b); }
/* лавка: знаки крупно и «Все лавки» */
.arn-shop-h { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 14px; background: var(--w-well, rgba(0, 0, 0, 0.22)); }
.arn-shop-h .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arn-shop-h .t b { font: 700 34px/1 var(--sans); color: var(--w-hi, #16202c); font-variant-numeric: tabular-nums; }
.arn-shop-h .t span { color: var(--w-muted, #566274); font-size: var(--fs-sub); }
/* своё место — строкой, прибитой к низу окна (arena.js переносит .arn-dock в само окно, под прокрутку) */
.arn-dock { flex: none; padding: 8px 14px 10px; background: linear-gradient(rgba(198, 207, 218, 0.6), #bcc6d3); box-shadow: 0 -3px 8px rgba(8, 12, 20, 0.18); }
.arn-dock.hidden { display: none; }
.arn-me { display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 6px 16px; box-sizing: border-box; border-radius: 14px; cursor: pointer;
  background: linear-gradient(#c8eab8, #a3d690); box-shadow: 0 3px 0 #5e9a4c, inset 0 1px 0 rgba(255, 255, 255, 0.8); color: #16202c; }
.arn-me:active { transform: translateY(2px); }
.arn-me .ava { --ava-s: 56px; pointer-events: none; }
.arn-me-pl { flex: none; min-width: 56px; text-align: center; font: 700 28px/1 var(--sans); font-variant-numeric: tabular-nums; }
.arn-me.top1 .arn-me-pl { color: #a8742a; }
.arn-me.top2 .arn-me-pl { color: #5d6875; }
.arn-me.top3 .arn-me-pl { color: #8a4e1e; }
.arn-me-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.arn-me-who b { font: 700 20px/1.2 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arn-me-who span { font-size: 15px; color: #2f4a26; }
.arn-me-rt { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.arn-me-rt b { font: 700 28px/1 var(--sans); font-variant-numeric: tabular-nums; }
.arn-rules-modal .arn-rules { display: flex; flex-direction: column; gap: 8px; }
.arn-rules-modal .tn-rules { color: var(--w-hi, #16202c); }
/* соперник другого королевства (добор) — плашка его цвета; тень арены — дымчатая карточка с пометкой «Тень» */
.arn-tag { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arn-tag.kd { border: 1px solid var(--kd, var(--w-muted, #9aa)); color: var(--w-hi, #fff3d0); background: rgba(0, 0, 0, 0.18); }
.arn-tag.kd .arn-kd { margin-right: 0; }
.arn-tag.sh { border: 1px solid rgba(160, 170, 210, 0.55); color: #d8dcf4; background: rgba(70, 76, 120, 0.45); }
/* тень арены — тёмная дымчатая карточка, надписи светлые (круг 9: светлое имя по серому не читалось) */
.arn-foe.shade { background: linear-gradient(160deg, #545a8c, #2e3256); box-shadow: inset 0 0 0 2px rgba(170, 180, 230, 0.45), 0 3px 0 rgba(20, 22, 40, 0.35); }
.arn-foe.shade .nm { color: #fff; font-style: italic; text-shadow: 0 1px 2px rgba(10, 12, 30, 0.8); }
.arn-foe.shade :is(.cx-sub, .arn-nums b) { color: #e4e7fb; }

/* ——— Семидневная осада ——— */
.sg-vs { display: flex; align-items: stretch; gap: 10px; }
.sg-watch { margin-left: 6px; padding: 2px 6px; vertical-align: middle; } /* «Смотреть бой» у строки журнала */
.sg-side { flex: 1; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 8px; background: var(--w-well, rgba(0, 0, 0, 0.22));
  color: var(--w-muted, var(--muted)); font-size: 13px; min-width: 0; }
.sg-side .nm { font-family: var(--title); font-size: 22px; color: var(--w-hi, #fff3d0); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-side .tot { font-family: var(--title); font-size: 34px; line-height: 1; color: var(--w-accent, var(--bronze-l)); }
.sg-side.mine { box-shadow: inset 0 0 0 2px var(--w-good, #7fd08e); }
.sg-wall { height: 12px; border-radius: 6px; background: var(--w-track, rgba(0, 0, 0, 0.3)); overflow: hidden; }
.sg-wall i { display: block; height: 100%; background: linear-gradient(90deg, #8a6a3a, #c9a25a); }
.sg-mid { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 80px; text-align: center;
  color: var(--w-accent, var(--bronze-l)); font-weight: 700; }
.sg-ups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sg-up { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 8px; background: var(--w-well, rgba(0, 0, 0, 0.22));
  color: var(--w-muted, var(--muted)); font-size: 13px; }
.sg-up b { color: var(--w-hi, #fff3d0); font-size: 15px; }
.sg-up .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sg-up .row .btn { margin-left: auto; }
.sg-bar { height: 8px; border-radius: 4px; background: var(--w-track, rgba(0, 0, 0, 0.3)); overflow: hidden; }
.sg-bar i { display: block; height: 100%; background: var(--w-good, #7fd08e); }

body.vertical .arn-foes { grid-template-columns: 1fr; }
body.vertical .sg-ups { grid-template-columns: 1fr; }
body.vertical .sg-vs { flex-wrap: wrap; }
body.vertical .sg-mid { min-width: 50px; }
/* стоя (docs/UI_PLAN.md §2.1): текст окон арены, осады и ночи — не мельче 16, ячейки наград — 80, имя соперника —
   окно лорда */
body.vertical .cx-win .ev-pts, body.vertical .tn-modal .ev-pts { font: 700 36px/1 var(--sans); }
body.vertical .cx-win .ev-pts span, body.vertical .tn-modal .ev-pts span { font-size: var(--fs-min); }
body.vertical .cx-win .cx-about, body.vertical .cx-win .cx-note, body.vertical .cx-win .cx-box { font-size: var(--fs-sub); }
body.vertical .cx-win .cx-sub { font-size: var(--fs-min); }
body.vertical .cx-win .cx-box { padding: 12px 14px; border-radius: 10px; }
body.vertical .cx-face { width: 60px; height: 80px; }
body.vertical .cx-face .lv { font-size: var(--fs-min); line-height: 1.25; }
body.vertical .arn-foe { gap: 12px 16px; padding: 14px 16px; border-radius: 16px; }
body.vertical .arn-foe .nm { font: 700 28px/1.2 var(--sans); }
body.vertical .arn-tag { font-size: var(--fs-min); line-height: 1.3; padding: 2px 12px; }
body.vertical .arn-kd { width: 14px; height: 14px; border-radius: 7px; }
/* арена стоя (круг 5): шапка с пьедесталом 470, кубки 200 / 160, аватары 104 / 84, плитки — числа 40, соперник —
   портрет 140×190, сила и рейтинг 30, кнопки боя 72; своя строка внизу — 100 */
body.vertical .arn-top { min-height: 470px; }
body.vertical .arn-top.closed { min-height: 300px; }
body.vertical .arn-chip { min-height: 52px; padding: 6px 18px 6px 10px; border-radius: 26px; font-size: var(--fs-min); }
body.vertical .arn-top-row { gap: 10px; padding: 14px 16px 0; }
body.vertical .arn-prz { font-size: var(--fs-min); }
body.vertical .arn-prz .rk-chest { width: 96px; height: 96px; }
body.vertical .arn-podium { gap: 8px; padding: 6px 10px 0; }
body.vertical .arn-podium.wait { min-height: 320px; }
body.vertical .arn-cup { --cup: 160px; --ava-s: 84px; }
body.vertical .arn-pod.p1 .arn-cup { --cup: 200px; --ava-s: 104px; }
body.vertical .arn-pod.p1 .arn-cup::before { width: 400px; height: 400px; margin: -200px 0 0 -200px; }
body.vertical .arn-pod-nm { font-size: var(--fs-min); padding: 3px 12px; border-radius: 15px; }
body.vertical .arn-ped { padding-top: 10px; }
body.vertical .arn-pod.p1 .arn-ped { height: 104px; }
body.vertical .arn-pod.p2 .arn-ped { height: 80px; }
body.vertical .arn-pod.p3 .arn-ped { height: 64px; }
body.vertical .arn-ped > i { font-size: 84px; bottom: -18px; }
body.vertical .arn-pod-pts { font-size: 28px; }
body.vertical .arn-pod-pts :is(svg, img) { width: 36px; height: 36px; }
body.vertical .arn-stats { gap: 12px; }
body.vertical .arn-st { padding: 14px 8px; border-radius: 16px; }
body.vertical .arn-st > :is(svg, img) { width: 64px; height: 64px; }
body.vertical .arn-st > b { font-size: 40px; }
body.vertical .arn-st > span { font-size: var(--fs-min); }
body.vertical .arn-float { font-size: 36px; }
body.vertical .arn-warn { font-size: var(--fs-min); }
body.vertical .cx-face.big { width: 140px; height: 190px; border-radius: 14px; }
body.vertical .arn-foe .cx-faces .cx-face { width: 60px; height: 80px; }
body.vertical .arn-foe .cx-sub { font-size: var(--fs-min); }
body.vertical .arn-nums { gap: 6px 22px; }
body.vertical .arn-nums b { font-size: 30px; }
body.vertical .arn-nums :is(svg, img) { width: 40px; height: 40px; }
body.vertical .arn-btns { gap: 12px; }
body.vertical .arn-btns .btn { height: 72px; border-radius: 14px; }
body.vertical .arn-btns .arn-go { font-size: 28px; }
body.vertical .arn-btns .arn-go :is(svg, img) { width: 36px; height: 36px; }
body.vertical .arn-btns .arn-man { font-size: 22px; }
body.vertical .arn-def { padding: 14px 16px; border-radius: 16px; }
body.vertical .arn-def-h .pw { font-size: 28px; }
body.vertical .arn-def .cx-face { width: 92px; height: 124px; }
body.vertical .arn-lr { min-height: 76px; padding: 8px 14px; gap: 12px; border-radius: 12px; }
body.vertical .arn-lr .t { font-size: var(--fs-min); }
body.vertical .arn-lr .arn-res { font-size: var(--fs-min); padding: 4px 12px; }
body.vertical .arn-lr .d { font-size: 26px; min-width: 60px; }
body.vertical .arn-shop-h { padding: 14px 16px; }
body.vertical .arn-shop-h .t b { font-size: 44px; }
body.vertical .arn-dock { padding: 10px 14px calc(12px + var(--sab, 0px)); }
body.vertical .arn-me { min-height: 100px; gap: 14px; padding: 8px 18px; border-radius: 16px; }
body.vertical .arn-me .ava { --ava-s: 80px; }
body.vertical .arn-me-pl { min-width: 64px; font-size: 36px; }
body.vertical .arn-me-who b { font-size: 26px; }
body.vertical .arn-me-who span { font-size: var(--fs-min); }
body.vertical .arn-me-rt b { font-size: 36px; }
body.vertical .arn-me-rt :is(svg, img) { width: 48px; height: 48px; }
body.vertical .arn-rules-modal .tn-rules, body.vertical .arn-rules-modal .cx-about { font-size: var(--fs-sub); }
body.vertical .cx-win .ev-row, body.vertical .tn-modal .ev-row { font-size: var(--fs-min); }
body.vertical .cx-win .ev-tier, body.vertical .tn-modal .ev-tier { min-height: 104px; padding: 10px 14px; border-radius: 10px; }
body.vertical .cx-win .ev-tier > b, body.vertical .tn-modal .ev-tier > b { font-size: var(--fs-min); }
body.vertical :is(.cx-win, .tn-modal) .ev-tier .ic-cell { --ic: 80px; }
body.vertical :is(.cx-win, .tn-modal) .ev-tier .lt .ic-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body.vertical :is(.cx-win, .tn-modal) .ev-tier { flex-wrap: wrap; }
body.vertical :is(.cx-win, .tn-modal) .ev-tier .lt { min-width: 0; }
body.vertical .cx-win .cx-tbl .ic-cell { --ic: 80px; }
/* волны ночи стоя — карточками: волна и время в строку, награда лентой и итог — во всю ширину */
body.vertical .cx-win .ic-sub, body.vertical .cx-win .ic-good .ic-note { font-size: 16px; }
body.vertical .cx-win .ic-good > b { font-size: 18px; }
body.vertical .cx-win .cx-note .ic-cell { --ic: 80px; }
/* товар лавки: ячейка 96 — длинный ярлык («15 Min.») не мельче 16 */
body.vertical .cx-win .ic-good .ic-cell { --ic: 96px; }
body.vertical .cx-win .tn-rules, body.vertical .tn-modal .tn-rules { font-size: 18px; padding-inline-start: 24px; }
body.vertical .cx-win .cx-tbl .cx-sub, body.vertical .cx-win .cx-tbl td i { font-size: 16px; }
body.vertical .cx-pick button { font-size: 16px; gap: 8px; padding: 6px; }
body.vertical .cx-pick button img { width: 48px; height: 64px; }
body.vertical .cx-pick { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); max-height: none; }
/* место в бою осады стоя — столбцом во всю ширину (не рваной лесенкой) */
body.vertical .cx-chips { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.vertical .cx-chips button { width: 100%; min-height: 64px; font-size: 18px; padding: 10px 14px; text-align: start; }
body.vertical .sg-side { font-size: 18px; padding: 12px; }
body.vertical .sg-side .nm { font: 700 24px/1.2 var(--sans); }
body.vertical .sg-up { font-size: 16px; padding: 12px 14px; }
body.vertical .sg-up b { font-size: 20px; }
body.vertical .sg-wall { height: 16px; border-radius: 8px; }
body.vertical .sg-bar { height: 14px; border-radius: 7px; }
body.vertical .aw-band b { font-size: var(--fs-sub); }
body.vertical .aw-band span { font-size: var(--fs-min); }
.cx-who { cursor: pointer; text-decoration: underline dotted; }
.arn-foe .nm[data-player-rid] { cursor: pointer; }
/* турнир альянсов (tourney.js; общий вид дней и пары — css/events.css): стоя крупнее */
/* шесть дней стоя — 3 + 3 (не 4 + 2 с пустой половиной ряда) */
body.vertical .tn-modal .tn-note { font-size: 18px; }
/* лучший лорд дня и дни рейтинга лордов (п. 27): строка 20, имя 20, очки и имя в таблице 16, дни — 56 */
body.vertical .tn-modal .tn-dsel { gap: 4px; padding: 4px; border-radius: 12px; }
body.vertical .tn-modal .tn-dsel button { min-height: 56px; padding: 6px 8px; font-size: 20px; }

/* окно «События»: вкладки и кнопки окон — в две строки, если не влезают */
.ev-tabs { flex-wrap: wrap; }

/* ——— осада (круг 8, образец 102): «против» — гербы лагерей, очки недели крупно, стены полосой; семь дней карточками с
   венцом у победителя дня; значки улучшений, замыслов и мест; «Смотреть» в журнале — глаз и подпись ——— */
.sg-vs { align-items: stretch; }
.sg-side { align-items: center; text-align: center; padding: 12px 10px; }
.sg-side.foe { box-shadow: inset 0 0 0 2px var(--w-bad, #e0705f); }
.sg-crest { display: flex; justify-content: center; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35)); }
.sg-crest svg { width: 72px; height: auto; }
.sg-side .nm { max-width: 100%; }
.sg-side .tot { font: 700 44px/1 var(--sans); color: var(--w-accent, #c08a3e); font-variant-numeric: tabular-nums; }
.sg-side .sg-wall { width: 100%; }
.sg-wl { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--w-hi, #fff3d0); }
.sg-wl > span { margin-inline-end: 8px; }
.sg-mid b { font: 700 34px/1 var(--title); color: var(--w-accent, #c08a3e); letter-spacing: 1px; }
.sg-eve, .sg-watch { display: inline-flex; align-items: center; gap: 6px; }
.sg-watch { margin-left: 8px; padding: 0 14px; min-width: 0; vertical-align: middle; }
.sg-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.sg-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 6px; border-radius: 10px;
  background: var(--w-well, rgba(0, 0, 0, 0.22)); box-shadow: inset 0 0 0 1px var(--w-line, rgba(255, 255, 255, 0.1)); font-variant-numeric: tabular-nums; }
.sg-day .d { font: 700 16px/1.2 var(--sans); color: var(--w-muted, var(--muted)); text-transform: uppercase; }
.sg-day .a { font: 700 18px/1.2 var(--sans); color: var(--w-good, #3f8f4f); }
.sg-day .b { font: 700 18px/1.2 var(--sans); color: var(--w-bad, #b0472e); }
.sg-day > i { position: absolute; inset-inline-end: 4px; top: 4px; color: var(--w-bad, #b0472e); }
.sg-day.cur { box-shadow: inset 0 0 0 3px #e0a050, 0 0 10px rgba(224, 160, 80, 0.35); }
.sg-day.w-me { background: linear-gradient(rgba(63, 143, 79, 0.22), rgba(63, 143, 79, 0.05)); }
.sg-day.w-foe { background: linear-gradient(rgba(176, 71, 46, 0.2), rgba(176, 71, 46, 0.04)); }
.sg-crown { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.5)); }
.sg-up { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-auto-flow: row dense; column-gap: 12px; }
.sg-up > :not(.sg-upic) { grid-column: 2; }
.sg-upic { grid-row: 1 / span 4; position: relative; display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 14px;
  background: radial-gradient(circle at 40% 35%, #f6e2b0, #c08a3e); color: #4a3016; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.2); }
.sg-upic i { position: absolute; inset-inline-end: -6px; bottom: -6px; min-width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 13px; background: #2f5fb0; color: #fff; font: 700 15px/1 var(--sans); font-style: normal; box-shadow: 0 0 0 2px #fff; }
.sg-plans button { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; align-items: center; }
.sg-plans button > svg { grid-row: 1 / span 2; }
.sg-plans button > :not(svg) { grid-column: 2; }
body.vertical .sg-crest svg { width: 92px; }
body.vertical .sg-side .tot { font-size: 56px; }
body.vertical .sg-wl { font-size: 20px; }
body.vertical .sg-mid b { font-size: 40px; }
body.vertical .sg-days { gap: 6px; }
body.vertical .sg-day { padding: 12px 2px 8px; }
body.vertical .sg-day .d { font-size: 20px; }
body.vertical .sg-day .a, body.vertical .sg-day .b { font-size: 22px; }
body.vertical .sg-upic { width: 80px; height: 80px; border-radius: 18px; }
body.vertical .sg-upic svg { width: 52px; height: 52px; }
body.vertical .sg-upic i { min-width: 32px; height: 32px; border-radius: 16px; font-size: 19px; }
body.vertical .sg-watch, body.vertical .sg-eve { min-width: 0; min-height: 56px; padding: 0 16px; font-size: 20px; }
body.vertical .sg-plans button > svg { width: 48px; height: 48px; }
body.phone-land .sg-side .tot { font-size: 48px; }
body.phone-land .sg-day .d { font-size: 18px; }
body.phone-land .sg-day .a, body.phone-land .sg-day .b { font-size: 20px; }

/* ——— шапка события с картинкой (арена, Ночь Пепла, осада: .cx-banner): картинка ярче, под надписями — тёмная дымка
   от краёв, заголовок, строки и очки — светлые с обводкой (бронза и серый по бледной картинке не читались); во всех
   видах. Без картинки шапка — прежняя ——— */

/* ——— лёжа на телефоне (body.phone-land, js/ui.js fitStage: сцена мельче 3/4, около 0,57): здесь размеры прибиты в px —
   строки шапок, пояснения, ярлыки соперников и уровни портретов 11–14 (6–8 css px), выбор места и героев — около 30.
   Растут до размеров круга 1 (css/kod.css body.phone-land): текст не мельче 16, пояснения 17, имена 22–24; выбор места —
   52, выбор героя — 60. На планшете и ПК лёжа и стоя — как было ——— */
body.phone-land .cx-about, body.phone-land .cx-note, body.phone-land .cx-box { font-size: var(--fs-sub); }
body.phone-land .cx-sub { font-size: var(--fs-min); }
body.phone-land :is(.cx-win, .tn-modal) .tbl { font-size: var(--fs-sub); }
body.phone-land .cx-win .cx-tbl .cx-sub, body.phone-land .cx-win .cx-tbl td i { font-size: 16px; }
body.phone-land .cx-face { width: 56px; height: 76px; }
body.phone-land .cx-face .lv { font-size: var(--fs-min); line-height: 1.25; }
body.phone-land .cx-pick { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
body.phone-land .cx-pick button { min-height: 60px; gap: 8px; padding: 5px 6px; font-size: 16px; }
body.phone-land .cx-pick button img { width: 40px; height: 54px; }
body.phone-land .cx-chips button { min-height: var(--h-btn-s); padding: 6px 14px; font-size: var(--fs-sub); }
/* сцена у стен (Ночь Пепла): лента итога 20 / 16 */
body.phone-land .aw-band b { font-size: 20px; }
body.phone-land .aw-band span { font-size: var(--fs-min); }
/* арена: соперник — имя 22, рейтинг и сила 17 / 20, ярлык королевства и «Тень» 16; имя тени — с тёмной обводкой
   (светлое по серому) */
body.phone-land .arn-foe .nm { font-size: 24px; }
body.phone-land .arn-foe .cx-sub { font-size: var(--fs-min); }
body.phone-land .arn-nums b { font-size: 26px; }
body.phone-land .arn-chip { font-size: 20px; min-height: 48px; }
body.phone-land .arn-prz { font-size: var(--fs-min); }
body.phone-land .arn-pod-nm { font-size: 20px; }
body.phone-land .arn-pod-pts { font-size: 26px; }
body.phone-land .arn-st > b { font-size: 34px; }
body.phone-land .arn-st > span { font-size: var(--fs-min); }
body.phone-land .arn-lr .t { font-size: var(--fs-min); }
body.phone-land .arn-lr .arn-res { font-size: var(--fs-min); }
body.phone-land .arn-me-who b { font-size: 24px; }
body.phone-land .arn-me-who span { font-size: var(--fs-min); }
body.phone-land .arn-shop-h .t span { font-size: var(--fs-min); }
body.phone-land .arn-tag { padding: 1px 10px; border-radius: 11px; font-size: var(--fs-min); line-height: 1.3; }
body.phone-land .arn-kd { width: 14px; height: 14px; border-radius: 7px; }
body.phone-land .arn-foe.shade .nm { text-shadow: 0 1px 2px rgba(16, 18, 34, 0.95), 0 0 4px rgba(16, 18, 34, 0.7); }
/* осада: стороны и улучшения лагеря 17, имена 24, «Смотреть бой» в журнале — 48 */
body.phone-land .sg-side { font-size: var(--fs-sub); }
body.phone-land .sg-side .nm { font-size: 24px; }
body.phone-land .sg-up { font-size: var(--fs-sub); }
body.phone-land .sg-up b { font-size: 18px; }
body.phone-land .sg-watch { min-height: 48px; padding: 0 12px; }

/* ——— итог боя лентой (battle.js ribbonHtml, круг 5): ui.ribbon_victory | defeat | draw 3-slice — концы 1:1 по высоте
   ленты (--rib-h), середина тянется под надпись; под лентой — подпись итога и награда (арена: рейтинг докручивается,
   знаки). Лента разворачивается из середины, надпись падает в неё, строки награды всплывают по очереди; поражение —
   лента с толчком вниз. Вес выше css/battle.css (.bt-end.win …): страницы проверки подключают battle.css позже ——— */
.bt .bt-end.rib { --rib-h: 96px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 0; min-width: 0;
  background: none; border: 0; box-shadow: none; animation: none; }
.bt-stage .bt-end.rib { width: min(620px, 94%); }
.bt-rib { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-width: min(460px, 100%); max-width: 100%;
  height: var(--rib-h); padding: 0 0 calc(var(--rib-h) * 0.1); border-style: solid; border-color: transparent; border-width: 0 var(--rib-h);
  --rib-end: var(--rib-h); filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.bt .bt-end.rib .bt-rib b { font: 700 42px/1 var(--title); letter-spacing: 2px; color: #fff; white-space: nowrap;
  text-shadow: 0 3px 0 rgba(60, 10, 6, 0.75), 0 0 8px rgba(0, 0, 0, 0.6); }
.bt .bt-end.rib.lose .bt-rib b { color: #eef2f7; text-shadow: 0 3px 0 rgba(20, 28, 40, 0.8), 0 0 8px rgba(0, 0, 0, 0.6); }
.bt .bt-end.rib.draw .bt-rib b { color: #fff3d0; text-shadow: 0 3px 0 rgba(40, 30, 10, 0.8), 0 0 8px rgba(0, 0, 0, 0.6); }
.bt .bt-end.rib .bt-sub { max-width: 100%; padding: 4px 14px; border-radius: 12px; background: rgba(12, 16, 26, 0.72); color: #fff;
  font: 700 18px/1.3 var(--sans); text-shadow: 0 1px 2px #000; }
.bt-prize { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
.bt .bt-end .bt-pr { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 10px; border-radius: 26px; font-size: inherit;
  background: rgba(12, 16, 26, 0.78); box-shadow: inset 0 0 0 2px rgba(255, 226, 150, 0.55), 0 4px 10px rgba(0, 0, 0, 0.35); }
.bt .bt-end .bt-pr > :is(svg, img) { width: 40px; height: 40px; flex: none; }
.bt .bt-end .bt-pr b { font: 700 32px/1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
.bt-pr i { padding: 2px 8px; border-radius: 10px; font: 700 20px/1.2 var(--sans); font-style: normal; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); }
.bt-pr i.plus { background: #3f8f4f; }
.bt-pr i.minus { background: #b0472e; }
html:not(.kod-still) .bt-end.rib .bt-rib { animation: bt-unfurl 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.18) both; }
html:not(.kod-still) .bt-end.rib.lose .bt-rib { animation: bt-unfurl 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.18) both, bt-sag 0.5s 0.6s ease-in-out both; }
html:not(.kod-still) .bt-end.rib .bt-rib b { animation: bt-word 0.42s 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
html:not(.kod-still) .bt-end.rib :is(.bt-sub, .bt-pr) { animation: bt-up 0.36s ease-out both; animation-delay: calc(0.55s + var(--i, 0) * 0.14s); }
@keyframes bt-unfurl { from { transform: scaleX(0.12) scaleY(0.7); opacity: 0; } 55% { transform: scaleX(1.06) scaleY(1.04); opacity: 1; } }
@keyframes bt-word { from { transform: scale(2); opacity: 0; } }
@keyframes bt-up { from { transform: translateY(18px); opacity: 0; } }
@keyframes bt-sag { 40% { transform: translateY(8px) rotate(-1.5deg); } 70% { transform: translateY(2px) rotate(0.6deg); } }
/* итог без просмотра боя (battle.js openResult): всплывающее окно, лента на свечении, касание — закрыть */
.bt-res { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 0 6px; }
.bt-res .bt-end { width: 100%; }
.bt-res .bt-end.rib::before { content: ''; position: absolute; left: 50%; top: 48px; width: 420px; height: 260px; margin-left: -210px; z-index: -1;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 214, 120, 0.55), transparent); pointer-events: none; }
.bt-res .bt-end.rib.lose::before { background: radial-gradient(closest-side, rgba(120, 140, 170, 0.45), transparent); }
.bt-res .bt-end.rib { position: relative; z-index: 0; }
.bt-tap { margin: 0; color: var(--w-muted, #566274); font-size: var(--fs-sub); }
body.vertical .bt .bt-end.rib { --rib-h: 120px; }
body.vertical .bt .bt-end.rib .bt-rib b { font-size: 52px; }
body.vertical .bt .bt-end.rib .bt-sub { font-size: 20px; }
body.vertical .bt .bt-end .bt-pr b { font-size: 38px; }
body.vertical .bt .bt-end .bt-pr > :is(svg, img) { width: 48px; height: 48px; }
body.vertical .bt-pr i { font-size: 24px; }
body.phone-land .bt .bt-end.rib .bt-sub { font-size: 20px; }
/* выбор отряда (contest.js pickSquad, круг 5): портреты крупнее, номер места в отряде — кружком */
.cx-pick button img { width: 44px; height: 60px; }
.cx-pick button .ord { top: 4px; right: 6px; min-width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; border-radius: 13px;
  background: #3f8f4f; color: #fff; font-size: 16px; }
body.vertical .cx-pick button { min-height: 96px; }
body.vertical .cx-pick button img { width: 64px; height: 86px; }
body.vertical .cx-pick button .ord { min-width: 32px; height: 32px; border-radius: 16px; font-size: 19px; }
body.phone-land .cx-pick button img { width: 48px; height: 64px; }
/* арена закрыта (замок мал): замок крупно и одна строка */
.arn-lock { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 16px; border-radius: 14px; text-align: center;
  background: var(--w-well, rgba(0, 0, 0, 0.22)); box-shadow: inset 0 0 0 2px var(--w-bad, #e0705f); }
.arn-lock > :is(svg, img) { width: 80px; height: 80px; }
.arn-lock .btn { display: inline-flex; align-items: center; gap: 8px; }
.arn-lock .btn :is(svg, img) { width: 30px; height: 30px; }
/* арена закрыта: лавка тенью — видно, что будет, но не купить */
.arn-shade { filter: grayscale(0.7) brightness(0.8); opacity: 0.75; pointer-events: none; }
.arn-lock b { font: 700 22px/1.3 var(--sans); color: var(--w-hi, #16202c); }
body.vertical .arn-lock b { font-size: 26px; }
html:not(.kod-still) .arn-lock > :is(svg, img) { animation: arn-chest 2.4s ease-in-out infinite; }

/* ——— Тайные дела (secret.js, круг 9): сверху — четыре крупные плитки дня, дела — карточками (печать дела на круге
   цвета звёзд, нарисованные звёзды, полоса времени, награда ячейками), пустые вкладки — крупной картинкой. Прежний вид
   строк (sc-offer, sc-deed) — css/tasks.css; этот файл грузится позже ——— */
.scx-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.scx-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: 8px 4px;
  border-radius: 14px; background: linear-gradient(#f3f6fa, #d4e0ef); box-shadow: 0 3px 0 rgba(42, 52, 66, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  color: var(--w-hi, #16202c); text-align: center; }
.scx-tile > :is(svg, img) { width: 48px; height: 48px; flex: none; }
.scx-tile > b { max-width: 100%; font: 700 var(--fs-num)/1.1 var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scx-tile.tm > b { font-size: var(--fs-sub); }
.scx-tile > i { font: 700 var(--fs-min)/1.1 var(--sans); font-style: normal; color: var(--w-muted, #566274); }
.scx-tile.out > b { color: var(--w-bad, #c0392b); }
.scx-card { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 12px 14px;
  margin-bottom: 10px; border-radius: 16px; background: linear-gradient(#f3f6fa, #dbe5f1);
  box-shadow: 0 3px 0 rgba(42, 52, 66, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.8); }
.scx-card.ready { background: linear-gradient(90deg, rgba(190, 240, 190, 0.9), #dbe5f1 70%); box-shadow: inset 0 0 0 3px #3f8f4f, 0 3px 0 rgba(42, 52, 66, 0.22); }
.scx-card > .t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.scx-card .nm { font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, #16202c); }
.scx-card .who { font: 700 var(--fs-min)/1.2 var(--sans); color: var(--w-accent, #7a4c14); }
.scx-card .rw { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.scx-card .rw > i { font: 700 var(--fs-min)/1.2 var(--sans); font-style: normal; color: var(--w-muted, #566274); }
.scx-card > .a { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.scx-card > .a:empty { display: none; }
.scx-card > .a .btn:not(.sq) { min-width: 150px; height: var(--h-btn); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-btn-s); }
.scx-card > .a .btn.sq { width: var(--h-btn); height: var(--h-btn); padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.scx-pic { position: relative; flex: none; display: flex; align-items: center; justify-content: center; width: 124px; height: 136px; }
.scx-pic::before { content: ''; position: absolute; left: 50%; top: 2px; width: 116px; height: 116px; margin-left: -58px; border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0) 62%), var(--sc, #8f96a5);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 0 0 3px rgba(255, 255, 255, 0.55); }
.scx-pic > :is(svg, img.ico-art) { position: relative; width: 88px; height: 88px; margin-top: -16px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4)); }
.scx-pic > .ava { position: relative; --ava-s: 100px; margin-top: -16px; }
.scx-pic > .sc-stars { position: absolute; left: -6px; right: -6px; bottom: 0; display: flex; justify-content: center; font-size: 20px; line-height: 1; }
.sc-stars.art { display: inline-flex; align-items: center; letter-spacing: 0; }
.sc-stars.art img { width: 26px; height: 26px; margin: 0 -1px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45)); }
html:not(.kod-still) .scx-card.ready > .scx-pic { animation: ev-hop 1.6s ease-in-out infinite; }
.scx-bar { position: relative; display: block; height: 36px; border-radius: 18px; overflow: hidden; background: rgba(30, 48, 76, 0.25);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); }
.scx-bar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 18px; background: linear-gradient(#8fc4f0, #3d78c2);
  transition: width 0.9s linear; }
.scx-bar > em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 6px; font: 700 var(--fs-sub)/1 var(--sans);
  font-style: normal; color: #fff; text-shadow: var(--t-outline); font-variant-numeric: tabular-nums; }
.scx-bar > em :is(svg, img) { width: 26px; height: 26px; }
.scx-ready { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 16px 4px 10px; border-radius: 18px; background: #3f8f4f;
  color: #fff; font: 700 var(--fs-sub)/1.2 var(--sans); }
.scx-chips { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.scx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px 2px 6px; border-radius: 18px; background: rgba(42, 52, 66, 0.1);
  color: var(--w-hi, #16202c); font: 700 var(--fs-sub)/1.3 var(--sans); white-space: nowrap; }
.scx-chip > :is(svg, img) { width: 30px; height: 30px; flex: none; }
.scx-chip .up { font-style: normal; color: #23803e; }
.scx-chip.bad { color: #a3262a; background: rgba(163, 38, 42, 0.12); }
.sc-sect .scx-chip.days { font-size: var(--fs-min); }
.scx-done { display: inline-flex; align-items: center; gap: 6px; color: #23803e; font: 700 var(--fs-sub)/1.2 var(--sans); white-space: nowrap; }
/* ячейки награды дела 96 (стоя общее правило itemcell.css весит больше «.scx-cells .ic-cell» — было 80), ярлык «5K» — --fs-min */
.scx-cells .ic-cell, body.vertical .scx-cells .ic-cell { --ic: 96px; }
body:is(.vertical, .phone-land) .scx-cells .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: var(--fs-min); }
.scx-none { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; border-radius: 14px;
  background: var(--w-well, rgba(16, 20, 28, 0.08)); color: var(--w-muted, #566274); font: 700 var(--fs-sub)/1.3 var(--sans); }
.scx-none > :is(svg, img) { flex: none; width: 64px; height: 64px; }
.modal.sc-win .scj-row .t :is(.ok, .bad) :is(svg, img) { width: 28px; height: 28px; vertical-align: -6px; }
/* стоя: печать слева, сведения справа, кнопки — строкой под ними (карточка во всю ширину, кнопка крупная) */
body.vertical .scx-card { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'pic t' 'a a'; }
body.vertical .scx-card > .scx-pic { grid-area: pic; align-self: start; }
body.vertical .scx-card > .t { grid-area: t; }
body.vertical .scx-card > .a { grid-area: a; flex-direction: row; justify-content: flex-end; }
body.vertical .scx-card > .a .btn:not(.sq) { min-width: 230px; height: 64px; font-size: var(--fs-btn); }
body.vertical .scx-card > .a .btn.sq { width: 64px; height: 64px; }
body:is(.vertical, .phone-land) .modal.sc-win .sc-sect { font-size: var(--fs-sub); } /* лёжа было 19 */
/* лёжа дела — в два столбца (во всю ширину 1600 сцены между наградой и кнопкой оставалась пустота); плитки дня,
   заголовки и пустые вкладки — во всю ширину */
body.phone-land .modal.sc-win .sc-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; align-content: start; }
body.phone-land .modal.sc-win .sc-body > :not(.scx-card) { grid-column: 1 / -1; }
body.vertical .modal.sc-win .sc-sect .btn.small { height: 56px; font-size: var(--fs-min); }
body.vertical .modal.sc-win :is(.scj-who, .scj-deed, .scj-res, .scj-at) { font-size: var(--fs-min); }
body.vertical .modal.sc-win .scj-who b { font-size: var(--fs-sub); }
body.phone-land .scx-card .nm { font-size: var(--fs-list); }
/* «Тайные дела: как устроено» стоя (вид — css/tasks.css .lf-how-*): пояснение и «Подробнее» — не мельче --fs-sub (было 18) */
body.vertical .sc-how-win .lf-how-t { font-size: var(--fs-body); }
body.vertical .sc-how-win :is(.lf-how-s, .lf-more summary, .lf-more .tbl, .lf-more .tbl td:first-child) { font-size: var(--fs-sub); }

/* ——— выбор армии дома (homearmy.js, круг 9): цель крупно, враг и цена — плашками, армии — карточками с портретами
   героев, мощь и воины крупно, полоса «наша мощь против вражеской», исход — цветной плашкой ——— */
.tkx-place { gap: 10px; margin: 0 0 10px; font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-accent, #7a4c14); }
.tkx-place > :is(svg, img) { width: 40px; height: 40px; flex: none; }
.tkx-foe { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.tkx-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 8px; border-radius: 22px; background: rgba(42, 52, 66, 0.1);
  color: var(--w-hi, #16202c); font: 700 var(--fs-sub)/1.2 var(--sans); }
.tkx-chip > :is(svg, img) { width: 40px; height: 40px; flex: none; }
.tkx-chip > b { font-variant-numeric: tabular-nums; }
.tkx-chip.foe { background: rgba(163, 38, 42, 0.12); color: #7a1c1c; }
.tkx-chip.foe > b { font-size: var(--fs-num); }
.tkx-chip.cost { color: #6a4200; background: rgba(232, 185, 58, 0.22); }
.tkx-armies { gap: 10px; }
.tk-army.tkx-army { align-items: center; gap: 14px; padding: 10px 14px; border-radius: 16px; border: 2px solid rgba(42, 52, 66, 0.15);
  background: linear-gradient(#f3f6fa, #dbe5f1); box-shadow: 0 3px 0 rgba(42, 52, 66, 0.22); }
.tk-army.tkx-army:not(:disabled):active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(42, 52, 66, 0.22); }
.tk-army.tkx-army.easy, .tk-army.tkx-army.good { border-color: rgba(63, 143, 79, 0.55); }
.tk-army.tkx-army.bad { border-color: rgba(176, 71, 46, 0.5); }
.tkx-faces { flex: none; display: flex; gap: 4px; }
.tkx-face { position: relative; width: 64px; height: 86px; border-radius: 10px; overflow: hidden; border: 2px solid var(--w-line, #a5b6cc); background: #26303c; }
.tkx-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tkx-face i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(16, 20, 28, 0.75); color: #fff3d0; font: 700 16px/20px var(--sans);
  font-style: normal; text-align: center; }
.tkx-face.none { display: flex; align-items: center; justify-content: center; }
.tk-army.tkx-army .t { flex: 1; min-width: 0; gap: 6px; }
.tk-army.tkx-army .t > b { font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, #16202c); }
.tkx-nums { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tkx-nums > span { display: inline-flex; align-items: center; gap: 6px; }
.tkx-nums > span > :is(svg, img) { width: 34px; height: 34px; flex: none; }
.tk-army.tkx-army .tkx-nums b { font: 700 var(--fs-num)/1 var(--sans); color: var(--w-hi, #16202c); font-variant-numeric: tabular-nums; }
.tkx-vs { position: relative; display: block; height: 14px; border-radius: 7px; overflow: hidden; background: linear-gradient(90deg, transparent, #c0392b); }
.tkx-vs > i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(#7fd08e, #3f8f4f); border-radius: 7px 0 0 7px; }
html:not(.kod-still) .tkx-vs > i { animation: ev-lbar 0.8s 0.25s cubic-bezier(0.3, 0.8, 0.3, 1) both; }
.tk-army.tkx-army .odds { align-self: flex-start; padding: 2px 12px; border-radius: 14px; color: #fff; font: 700 var(--fs-min)/1.3 var(--sans); }
.tk-army.tkx-army .odds.easy, .tk-army.tkx-army .odds.good { background: #3f8f4f; color: #fff; }
.tk-army.tkx-army .odds.even { background: #c08a3e; color: #fff; }
.tk-army.tkx-army .odds.bad { background: #b0472e; color: #fff; }
.tk-army.tkx-army .why { display: inline-flex; align-items: center; gap: 6px; font: 700 var(--fs-min)/1.2 var(--sans); }
.tkx-none { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 14px; background: var(--w-well, rgba(16, 20, 28, 0.08));
  color: var(--w-muted, #566274); font: 700 var(--fs-sub)/1.3 var(--sans); }
.tkx-none > :is(svg, img) { width: 72px; height: 72px; flex: none; }
/* стоя портрет 80 × 104; «ур. N» на нём — не мельче --fs-min (было 16 и стоя, и лёжа) */
body.vertical .tkx-face { width: 80px; height: 104px; }
body:is(.vertical, .phone-land) .tkx-face i { font-size: var(--fs-min); line-height: 1.25; }

/* ——— выбор отряда (contest.js pickSquad, круг 9): сверху — «выбрано / можно» крупно, герои — портретами 3 : 4 в ряд,
   выбранный — зелёная рамка и номер в отряде кружком, первый — корона (во главе) ——— */
.cxp-head { display: flex; justify-content: center; }
.cxp-cnt { display: inline-flex; align-items: center; gap: 10px; padding: 4px 18px 4px 10px; border-radius: 24px; background: rgba(42, 52, 66, 0.1);
  color: var(--w-hi, #16202c); }
.cxp-cnt > :is(svg, img) { width: 44px; height: 44px; flex: none; }
.cxp-cnt > b { font: 700 var(--fs-num)/1 var(--sans); font-variant-numeric: tabular-nums; }
.cxp-cnt.full { background: rgba(63, 143, 79, 0.18); }
.cxp-cnt.short > b { color: var(--w-bad, #c0392b); }
.cx-pick.cxp { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-height: none; }
.cx-pick.cxp .cxp-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; cursor: pointer;
  border: 3px solid transparent; background: linear-gradient(#f3f6fa, #dbe5f1); box-shadow: 0 3px 0 rgba(42, 52, 66, 0.22); font: inherit; color: inherit; }
.cx-pick.cxp .cxp-card.on { border-color: #3f8f4f; box-shadow: 0 0 0 3px rgba(63, 143, 79, 0.3), 0 3px 0 rgba(42, 52, 66, 0.22); }
.cx-pick.cxp .cxp-card:active { transform: translateY(2px); }
.cx-pick.cxp .cxp-pic { position: relative; width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; background: #26303c; }
.cx-pick.cxp .cxp-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-pick.cxp .cxp-pic i { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(16, 20, 28, 0.75); color: #fff3d0; font: 700 var(--fs-min)/1.4 var(--sans);
  font-style: normal; text-align: center; }
.cx-pick.cxp .cxp-card > b { max-width: 100%; font: 700 var(--fs-min)/1.15 var(--sans); color: var(--w-hi, #16202c); text-align: center; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cx-pick.cxp .cxp-card .ord { position: absolute; top: -8px; right: -8px; min-width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
  border-radius: 20px; background: #3f8f4f; color: #fff; font: 700 var(--fs-sub)/1 var(--sans); box-shadow: 0 0 0 3px #fff, 0 2px 4px rgba(0, 0, 0, 0.35); }
.cx-pick.cxp .cxp-card .ord :is(svg, img) { width: 26px; height: 26px; }
html:not(.kod-still) .cx-pick.cxp .cxp-card.on .ord { animation: ev-pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
body.vertical .cx-pick.cxp { grid-template-columns: repeat(3, minmax(0, 1fr)); }
body.phone-land .cx-pick.cxp { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.ev-hban.arn-hban { background: linear-gradient(#3a4c6c, #1d2230); }
.arn-rules-modal .ev-hrow .ev-ht > span { color: var(--w-hi, #16202c); }

/* ——— Ночь Пепла (ashnight.js, круг 9): «на стенах» — карточкой (щит или замок крупно, строка, армии и воины крупными
   числами, кнопка), волна — плашками уровня и времени, убито — крупно, награда за рассвет — сундуком, прошлая ночь —
   плашками ——— */
.ash-wall { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(135deg, #5a4436, #2c211c);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(255, 170, 100, 0.35); color: #fff3d0; }
.ash-wall.on { background: linear-gradient(135deg, #3d6b45, #1f3524); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(150, 230, 160, 0.45); }
.ash-wall-ic { flex: none; width: 88px; height: 88px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.25), rgba(0, 0, 0, 0.25)); }
.ash-wall-ic :is(svg, img) { width: 72px; height: 72px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
html:not(.kod-still) .ash-wall.on .ash-wall-ic :is(svg, img) { animation: ev-breathe 2.6s ease-in-out infinite; }
.ash-wall-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ash-wall-t > b { font: 700 var(--fs-sub)/1.25 var(--sans); text-shadow: 0 1px 2px #000; }
.ash-wall-t > b [data-to] { color: #ffe39a; white-space: nowrap; }
.ash-nums { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.ash-wall .ash-n { display: inline-flex; align-items: center; gap: 8px; color: #ffe39a; }
.ash-wall .ash-n :is(svg, img) { width: 44px; height: 44px; }
.ash-wall .ash-n b { font: 700 var(--fs-num)/1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.ash-warn { display: flex; align-items: flex-start; gap: 8px; color: #ffc4b8; font: 700 var(--fs-min)/1.3 var(--sans); }
.ash-warn > :is(svg, img) { flex: none; width: 30px; height: 30px; }
.ash-wall > .btn { flex: none; min-width: 170px; height: var(--h-btn); display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: var(--fs-btn-s); }
html:not(.kod-still) .ash-wall > .btn.green { animation: ev-cta 1.6s ease-in-out infinite; }
.ash-wmeta { display: flex; flex-wrap: wrap; gap: 6px; }
.ash-lv, .ash-at { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; background: rgba(42, 52, 66, 0.12);
  color: var(--w-hi, #16202c); font: 700 var(--fs-min)/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.ash-lv { background: #7a4c14; color: #fff3d0; }
/* пояс времени волн — плашкой у заголовка «Волны ночи» (МСК) */
.ash-tz { display: inline-flex; align-items: center; margin-inline-start: 10px; padding: 1px 10px; border-radius: 12px; vertical-align: middle;
  background: rgba(42, 52, 66, 0.14); color: var(--w-hi, #16202c); font: 700 var(--fs-min)/1.3 var(--sans); }
.ash-kill b { font: 700 var(--fs-sub)/1 var(--sans); color: var(--w-hi, #16202c); }
.ash-dawn { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(255, 214, 120, 0.55), var(--w-well, #d4e0ef) 70%); box-shadow: inset 0 0 0 2px #c08a3e; }
.ash-dawn-pic { flex: none; width: 120px; height: 120px; display: flex; align-items: center; justify-content: center; }
.ash-dawn-pic :is(img, .evp-wait) { width: 120px; height: 120px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35)); }
html:not(.kod-still) .ash-dawn-pic > img { animation: evp-in 0.35s ease-out both, arn-chest 2.4s ease-in-out infinite; } /* проявление (.evp) — вместе с покачиванием */
.ash-dawn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.ash-dawn-t > b { font: 700 var(--fs-sub)/1.25 var(--sans); color: var(--w-hi, #16202c); }
.ash-dawn-cells { flex-wrap: wrap; }
.ash-dawn-cells .ic-cell { --ic: 88px; }
body.vertical .ash-dawn-cells .ic-cell { --ic: 96px; } /* стоя общее правило itemcell.css (80) весило больше */
.ash-last { display: flex; flex-wrap: wrap; gap: 8px; }
.ash-lchip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px 4px 8px; border-radius: 18px; background: rgba(42, 52, 66, 0.1);
  color: var(--w-muted, #566274); font: 700 var(--fs-sub)/1.2 var(--sans); }
.ash-lchip > :is(svg, img) { width: 30px; height: 30px; flex: none; }
.ash-lchip b { color: var(--w-hi, #16202c); font-variant-numeric: tabular-nums; }
.ash-wl .ic-row .ic-cell { --ic: 88px; }
body.vertical .ash-wl .ic-row .ic-cell { --ic: 96px; } /* число в ячейке — не мельче --fs-min (0,23 ячейки) */
body:is(.vertical, .phone-land) :is(.ash-wl, .ash-dawn-cells) .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: var(--fs-min); } /* «3 ч» */
body.vertical .ash-wall { flex-wrap: wrap; }
body.vertical .ash-wall-t { flex: 1 1 calc(100% - 110px); } /* строка — рядом со щитом во всю ширину, кнопка — строкой ниже справа */
body.vertical .ash-wall > .btn { margin-inline-start: auto; min-width: 230px; height: 64px; font-size: var(--fs-btn); }
body.vertical .ash-st { font-size: var(--fs-sub); }
body.vertical .ash-kill { font-size: var(--fs-sub); }
/* арена закрыта (круг 9): замок нужного уровня картинкой с красным запором — вместо значка замка */
.arn-lock-pic { position: relative; display: block; width: 220px; height: 200px; }
.arn-lock-pic .arn-lock-castle { width: 220px; height: 200px; object-fit: contain; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); }
.arn-lock-pic > i { position: absolute; inset-inline-end: 6px; top: 6px; width: 64px; height: 64px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #a8392d; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6), 0 4px 10px rgba(0, 0, 0, 0.45); font-style: normal; }
html:not(.kod-still) .arn-lock-pic > i { animation: arn-chest 2.4s ease-in-out infinite; }
html:not(.kod-still) .arn-lock-pic img.arn-lock-castle { animation: evp-in 0.35s ease-out both, ev-breathe 4s ease-in-out infinite; transform-origin: 50% 90%; }
