/* Календарь событий и турнир альянсов (docs/EVENTS.md §2–§3): карусель событий HUD замка, окно календаря (calendar.js), окно
   турнира (tourney.js). Окна светлые: цвета — переменные --w-* (kod.css), запасные — для тёмного окна. */

/* ——— карусель событий в правом столбце HUD замка (calendar.js bindEventRail, план 3.4, docs/UI_PLAN.md §2.6): часы мира
   и события с таймерами; идёт — алая, скоро — как все кнопки; красная точка (.alert, css/kod.css) — идёт, а ещё не
   открывали; последнее место сменяется раз в 5 с — новое въезжает (.turn), при «Уменьшить движение» — без движения ——— */
.ev-clock { display: flex; flex-shrink: 0; align-items: center; gap: 4px; height: 26px; padding: 0 8px 0 6px; box-sizing: border-box; white-space: nowrap; background: var(--plate);
  border: 1px solid var(--bronze); border-radius: 13px; color: var(--text); font: inherit; cursor: pointer; }
.ev-clock b { font-family: var(--title); font-size: 17px; line-height: 1; color: var(--bronze-l); font-variant-numeric: tabular-nums; }
.ev-clock:hover { filter: brightness(1.12); }
.evb .c { width: 50px; height: 50px; border-radius: 25px; }
.evb .tm { font-variant-numeric: tabular-nums; }
.evb.live .c { background: radial-gradient(circle at 50% 35%, #7a3a24, #3a140e); border-color: #ffb070; }
.evb.live .tm { color: #ffd2a8; }
.evb.turn { animation: ev-turn 0.35s ease-out; }
@keyframes ev-turn { from { opacity: 0; transform: translateY(10px) scale(0.9); } to { opacity: 1; transform: none; } }
html.kod-still .evb.turn { animation: none; }
/* стоя: значки событий 76, таймер 17 жирный с обводкой (§2.6) */
body.vertical .ev-clock { height: 34px; padding: 0 10px 0 8px; border-radius: 17px; }
body.vertical .ev-clock b { font: 700 20px/1 var(--sans); text-shadow: var(--t-outline); }
body.vertical .evb { width: 88px; }
body.vertical .evb .c { width: 76px; height: 76px; border-radius: 38px; }
body.vertical .evb .c :is(svg, img) { width: 40px; height: 40px; }
body.vertical .evb .tm { position: relative; margin-top: -12px; font: 700 17px/1.1 var(--sans); text-shadow: var(--t-outline); white-space: nowrap; }
body.vertical .evb.alert .c::after { width: 18px; height: 18px; border-radius: 9px; }

/* Значки событий повторяют квадратную золотую рамку боковой панели; время вынесено
   на контрастную отдельную плашку и не теряется на фоне локации. */
body.vertical .evb { width: 78px; }
body.vertical .evb .c {
  width: 62px; height: 62px; border-radius: 14px; border: 2px solid #d69b3a;
  background: linear-gradient(145deg, #293647 0%, #111922 100%);
  box-shadow: 0 3px 0 #10151a, inset 0 1px 0 rgba(255, 232, 174, 0.3), 0 2px 8px rgba(0, 0, 0, 0.55);
}
body.vertical .evb .c :is(svg, img) { width: 46px; height: 46px; object-fit: contain; }
body.vertical .evb.live .c { border-color: #f0ad53; background: linear-gradient(145deg, #55321e, #25140f); }
body.vertical .evb .tm {
  z-index: 1; min-width: 58px; box-sizing: border-box; margin-top: -2px; padding: 3px 7px;
  border: 1px solid rgba(235, 177, 83, 0.82); border-radius: 10px; background: rgba(10, 14, 20, 0.94);
  color: #ffe2a0; font: 700 15px/1.1 var(--sans); font-variant-numeric: tabular-nums;
  text-align: center; text-shadow: 0 1px 2px #000; white-space: nowrap;
}
body.vertical .evb.live .tm { color: #ffe0ba; }
/* круг 8 (аудит sobytiya-10: в окне 0,57 отсчёт был 8,6 px, значок 26 px): кнопка 96, значок 58 в рамке 80, отсчёт 19 */
body.vertical .evb { width: 96px; }
body.vertical .evb .c { width: 80px; height: 80px; border-radius: 18px; }
body.vertical .evb .c :is(svg, img) { width: 58px; height: 58px; }
body.vertical .evb .tm { min-width: 72px; padding: 3px 8px; border-radius: 12px; font-size: 19px; }
/* событие ещё закрыто (арена до Замка 8): значок приглушён, замок в углу, под ним — «Замок N», красной точки нет */
.evb.locked .c > :is(svg, img):first-child { filter: grayscale(0.85) brightness(0.7); }
.evb-lock { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  border-radius: 13px; background: #a8392d; box-shadow: 0 0 0 2px #10151a; font-style: normal; }
.evb .c { position: relative; }
body.vertical .evb-lock { width: 30px; height: 30px; border-radius: 15px; }
body.vertical .evb.locked .tm { color: #c8ccd2; }

/* ——— окно «Календарь событий» (всплывающее, как блокнот, docs/UI_PLAN.md §3 п. 23) ——— */
.cal-win { display: flex; flex-direction: column; gap: 8px; }
.cal-now { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 10px;
  background: linear-gradient(#f7ecd2, #e6d2a6); box-shadow: inset 0 0 0 2px #c4aa7c; color: #4a3518; }
.cal-clock { display: flex; flex-direction: column; min-width: 0; }
.cal-clock b { font: 700 44px/1 var(--sans); color: #4a3518; font-variant-numeric: tabular-nums; }
.cal-clock span { color: #7a5f38; font-size: 13px; }
.cal-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.cal-date { font: 700 18px/1.2 var(--sans); color: #6a4a1e; text-align: end; }
.cal-tz { display: flex; padding: 2px; border-radius: 999px; background: rgba(74, 53, 24, 0.18); }
.cal-tz button { padding: 4px 10px; border: 0; border-radius: 999px; background: none; color: #6a4a1e; font: 700 13px/1.2 var(--sans); cursor: pointer; }
.cal-tz button.on { background: #fff; color: #3a2a10; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.cal-hint, .cal-tap { margin: 0; color: var(--w-muted, var(--muted)); font-size: 13px; }
.cal-tap { padding: 6px 0 2px; text-align: center; }
.cal-quiet { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px; border-radius: 10px; color: var(--w-muted, var(--muted));
  background: var(--w-well, rgba(0, 0, 0, 0.22)); font-weight: 700; }
.cal-list { display: flex; flex-direction: column; gap: 6px; }
.cal-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; background: var(--w-well, rgba(0, 0, 0, 0.22)); }
.cal-row .ic { width: 52px; height: 52px; border-radius: 26px; flex: none; display: flex; align-items: center; justify-content: center;
  color: var(--w-accent, var(--bronze-l)); border: 2px solid var(--w-line, var(--bronze-d)); background: rgba(255, 255, 255, 0.25); }
.cal-row .ic :is(svg, img) { width: 30px; height: 30px; }
.cal-row.live { box-shadow: inset 0 0 0 2px var(--w-bad, #e0705f); }
.cal-row.live .ic { color: var(--w-bad, #e0705f); border-color: var(--w-bad, #e0705f); }
.cal-row .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-row .t b { color: var(--w-hi, #fff3d0); }
.cal-row .t > span { color: var(--w-muted, var(--muted)); font-size: 13px; }
.cal-row .t .tm { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 13px; }
.cal-row .tm i { font-style: normal; color: var(--w-muted, var(--muted)); }
.cal-row .tm b { color: var(--w-accent, var(--bronze-l)); font-variant-numeric: tabular-nums; }
.cal-go { flex: none; width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--blue-d); background: linear-gradient(var(--blue-l), var(--blue)); box-shadow: inset 0 -3px 0 rgba(8, 24, 48, 0.32), 0 2px 0 rgba(0, 0, 0, 0.35); }
.cal-go:active { transform: translateY(2px); }
.cal-go svg { width: 26px; height: 26px; }
[dir="rtl"] .cal-go svg { transform: scaleX(-1); }
/* неделя: 7 в ряд, стоя — 4 + 3 по центру (круг 9: была пустая клетка в конце второго ряда) */
.cal-week { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cal-day { flex: 1 1 calc(100% / 7 - 6px); min-width: 0; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; border-radius: 8px;
  background: var(--w-well, rgba(0, 0, 0, 0.22)); color: var(--w-accent, var(--bronze-l)); text-align: center; font-size: 12px; }
.cal-day b { color: var(--w-hi, #fff3d0); font-size: 13px; }
.cal-day .wd { font-weight: 700; color: var(--w-muted, var(--muted)); }
.cal-day .w { font-weight: 700; }
.cal-day.on { box-shadow: inset 0 0 0 2px var(--bronze-l); }
.cal-day.rest { opacity: 0.7; }
/* стоя: часы 64, строки 104 (значок 88, имя 26), стрелка 64 */
body.vertical .cal-now { padding: 14px 18px; }
body.vertical .cal-clock b { font-size: 64px; }
body.vertical .cal-clock span, body.vertical .cal-hint, body.vertical .cal-tap { font-size: var(--fs-min); }
body.vertical .cal-date { font-size: 22px; }
body.vertical .cal-tz button { padding: 8px 14px; font-size: var(--fs-min); }
body.vertical .cal-row { min-height: 104px; padding: 8px 12px; gap: 14px; }
body.vertical .cal-row .ic { width: 88px; height: 88px; border-radius: 44px; }
body.vertical .cal-row .ic :is(svg, img) { width: 50px; height: 50px; }
body.vertical .cal-row .t b { font-size: 26px; }
body.vertical .cal-row .t > span { font-size: var(--fs-min); }
body.vertical .cal-row .t .tm { font-size: var(--fs-sub); }
body.vertical .cal-row .t .tm i { font-size: var(--fs-min); }
body.vertical .cal-go { width: 64px; height: 64px; }
body.vertical .cal-go svg { width: 34px; height: 34px; }
body.vertical .cal-quiet { min-height: 104px; font-size: 22px; }
body.vertical .cal-day { flex: 0 0 calc(25% - 6px); padding: 8px 4px; font-size: var(--fs-min); }
body.vertical .cal-day b { font-size: var(--fs-min); line-height: 1.1; }

/* ——— окно «События» (events.js, docs/UI_PLAN.md §3 п. 21): лента из трёх вкладок и «Ещё», шапка цвета события,
   дела этапа с «»», пороги, круглые кнопки внизу ——— */
.modal.ev-modal > .modal-body { display: flex; flex-direction: column; }
.modal.ev-modal > .modal-body > * { flex-shrink: 0; }
.modal.ev-t-trial > .modal-title { background: linear-gradient(#b67a2c, #6e4310); }
.modal.ev-t-boss > .modal-title { background: linear-gradient(#a8402c, #5a1612); }
.modal.ev-t-throne > .modal-title { background: linear-gradient(#6a4fa0, #2c1f4e); }
.ev-calbtn { width: 48px; height: 48px; padding: 0; display: flex; align-items: center; justify-content: center; border-radius: 12px; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.14); }
.ev-calbtn:active { transform: translateY(2px); }
.ev-rib { position: relative; margin-bottom: 10px; }
.ev-rib .ev-tabs { margin: 0; flex-wrap: nowrap; }
.ev-more { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 12px; cursor: pointer;
  border: 1px solid var(--w-line, rgba(192, 138, 62, 0.4)); border-radius: 8px 8px 0 0; background: linear-gradient(#405065, #2a3442); color: #fff;
  font: 700 var(--fs-tab)/1.1 var(--sans); text-shadow: var(--t-outline); }
.ev-more.on { background: linear-gradient(#f4f8fd, #c9d6e4); color: #22303f; text-shadow: none; }
/* «Ещё» (круг 8): Ночь Пепла, Арена, Осада — крупными карточками-баннерами во всю ширину окна (было — пункты списка с
   картинкой 22 px): картинка события на всю карточку, название крупно по низу, стрелка справа */
.ev-menu { position: absolute; z-index: 5; top: 100%; inset-inline: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px;
  border-radius: 14px; background: #2a3442; box-shadow: 0 8px 22px rgba(8, 12, 20, 0.5), 0 0 0 2px #3a4656; }
.ev-menu button { position: relative; display: flex; align-items: flex-end; gap: 12px; min-height: 120px; padding: 10px 16px; border: 0; border-radius: 12px;
  overflow: hidden; background: linear-gradient(135deg, #4a5a70, #222a36); cursor: pointer; color: #fff; font: 700 28px/1.15 var(--title);
  text-align: start; text-shadow: 0 2px 3px #000, 0 0 8px rgba(0, 0, 0, 0.8); box-shadow: inset 0 0 0 2px rgba(255, 226, 150, 0.45); }
.ev-menu button::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 12, 20, 0.7), rgba(10, 12, 20, 0.05) 60%), linear-gradient(rgba(10, 12, 20, 0) 45%, rgba(10, 12, 20, 0.7)); }
.ev-menu button > :not(.ev-mpic) { position: relative; z-index: 1; }
.ev-menu button span { flex: 1; }
.ev-menu button > svg:first-child { width: 56px; height: 56px; flex: none; align-self: center; }
.ev-menu button > svg:last-child { width: 34px; height: 34px; flex: none; align-self: center; }
.ev-menu button:active { transform: scale(0.98); }
[dir="rtl"] .ev-menu button > :is(svg, img):last-child { transform: scaleX(-1); }
/* карточка события сверху — цветом события, белый текст с обводкой */
/* дела этапа: строка, очки, зелёная «»» */
.ev-go { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 36px; padding: 0; cursor: pointer;
  border: 2px solid #2f6a1c; border-radius: 10px; background: linear-gradient(#8fd060, #4c9a2e); box-shadow: inset 0 -3px 0 rgba(20, 60, 10, 0.35), 0 2px 0 rgba(0, 0, 0, 0.3); }
.ev-go svg { width: 18px; height: 18px; margin-inline: -4px; }
.ev-go:active { transform: translateY(2px); }
[dir="rtl"] .ev-go svg { transform: scaleX(-1); }
.ev-tier .q-got { margin-inline-start: auto; }
/* ——— баннер события сверху вкладки (events.js, круг 5; образец — скрины 101–105): цвет события градиентом, справа —
   своя картинка (испытание — events.board_event, босс — monsters.morvak, трон — map.throne), слева — значок темы дня,
   имя крупно, плашки отсчёта и турнира, очки крупно, неделя тем строкой. Картинка проявляется, когда загрузилась ——— */
.ev-ban { position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 230px; margin-bottom: 12px; padding: 16px 18px;
  box-sizing: border-box; border-radius: 16px; overflow: hidden; color: #fff; text-shadow: var(--t-outline);
  background: linear-gradient(135deg, #c9862f, #7a4a12); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.ev-ban-boss { background: linear-gradient(135deg, #b0472e, #3a0f0c); }
.ev-ban-throne { background: linear-gradient(135deg, #6a4fa0, #22183e); }
.ev-ban > :not(.ev-ban-art) { position: relative; z-index: 1; }
.ev-ban-art { position: absolute; inset-inline-end: 0; top: 0; bottom: 0; width: 46%; height: 100%; object-fit: cover; border-radius: 0; z-index: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%); mask-image: linear-gradient(90deg, transparent, #000 34%); }
[dir="rtl"] .ev-ban-art { -webkit-mask-image: linear-gradient(270deg, transparent, #000 34%); mask-image: linear-gradient(270deg, transparent, #000 34%); }
.ev-ban-boss .ev-ban-art { width: 58%; object-fit: contain; object-position: 100% 50%; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6)); }
.ev-ban-throne .ev-ban-art { width: 52%; object-fit: contain; object-position: 100% 60%; }
.ev-ban-main { display: flex; align-items: center; gap: 14px; max-width: 66%; }
.ev-ban-ic { flex: none; width: 96px; height: 96px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
span.ev-ban-ic { background: rgba(0, 0, 0, 0.25); }
.ev-ban-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-ban .nm { font: 700 34px/1.1 var(--sans); color: #fff; overflow-wrap: anywhere; }
.ev-ban-sub { margin: 0; color: #ffe7b8; font: 700 var(--fs-sub)/1.25 var(--sans); }
.ev-ban-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 70%; }
.ev-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 14px 4px 8px; box-sizing: border-box; border: 0; border-radius: 22px;
  background: rgba(10, 12, 20, 0.62); box-shadow: inset 0 0 0 1px rgba(255, 226, 150, 0.45); color: #fff3d0; font: 700 19px/1.2 var(--sans); text-shadow: 0 1px 2px #000; }
.ev-chip b { color: #ffe39a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev-chip.big { font-size: 22px; min-height: 52px; }
.ev-chip.hot { box-shadow: inset 0 0 0 2px #ff9a6a; }
button.ev-chip { cursor: pointer; }
button.ev-chip:active { transform: translateY(2px); }
.ev-chip.tour { background: linear-gradient(#5d8fd0, #2f5584); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5), 0 2px 0 rgba(0, 0, 0, 0.3); }
.ev-ban-pts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ev-ban-pts > b { font: 700 48px/1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.ev-ban-pts > span:not(.ev-chip) { color: #ffe7b8; font: 700 var(--fs-sub)/1.2 var(--sans); }
.ev-ban-pts .ev-rk { margin-inline-start: 6px; }
.ev-ban .ev-my { margin: 0; display: flex; align-items: center; gap: 8px; font: 700 var(--fs-sub)/1.3 var(--sans); color: #fff4dc; }
.ev-ban .ev-my b { color: #ffe39a; }
/* полоса войска босса: заливка transform, число поверх */
.ev-hp { position: relative; width: min(420px, 66%); height: 30px; border-radius: 15px; overflow: hidden; background: rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
.ev-hp > i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--hp, 1)); background: linear-gradient(#ff7a5a, #b0281c); }
[dir="rtl"] .ev-hp > i { transform-origin: 100% 50%; }
.ev-hp > b { position: relative; display: block; text-align: center; font: 700 20px/30px var(--sans); color: #fff; }
.ev-ban-boss.live .ev-ban-art { animation: evp-in 0.35s ease-out both, ev-breathe 3.2s ease-in-out infinite; }
/* круг 9: картинка баннера живая на всех вкладках — медленно дышит (босс и трон в бою — быстрее); проявление картинки
   (.evp, css/contests.css) идёт вместе с дыханием, а не заменяется им; заглушка (.evp-wait) мерцает по-своему */
html:not(.kod-still) .ev-ban:not(.live) > img.ev-ban-art { animation: evp-in 0.35s ease-out both, ev-breathe 6s ease-in-out infinite; transform-origin: 70% 60%; }
html:not(.kod-still) .ev-ban-throne.live > img.ev-ban-art { animation: evp-in 0.35s ease-out both, ev-breathe 3.2s ease-in-out infinite; transform-origin: 70% 60%; }
/* битва идёт — плашка отсчёта трона горит и пульсирует */
html:not(.kod-still) .ev-chip.hot { animation: ev-hot 1.6s ease-in-out infinite; }
@keyframes ev-hot { 50% { box-shadow: inset 0 0 0 2px #ff9a6a, 0 0 18px rgba(255, 140, 90, 0.85); } }
@keyframes ev-breathe { 50% { transform: scale(1.03) translateY(-3px); } }
/* неделя тем турнира: значки дней, сегодня — крупнее, в золотой рамке */
.ev-week { display: flex; gap: 6px; margin-top: auto; }
/* круг 9: бледнее — только значок другого дня, подпись дня читается (была вся плитка с opacity 0,6) */
.ev-wd { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 52px; }
.ev-wd :is(img, svg, .evp-wait) { width: 44px; height: 44px; border-radius: 50%; }
.ev-wd:not(.on) :is(img, svg, .evp-wait) { opacity: 0.6; filter: saturate(0.7); }
.ev-wd i { font: 700 14px/1 var(--sans); font-style: normal; color: #fff3d0; }
.ev-wd.on i { color: #ffe39a; }
.ev-wd.on :is(img, svg, .evp-wait) { box-shadow: 0 0 0 3px #ffe39a, 0 0 12px rgba(255, 226, 150, 0.8); }
html:not(.kod-still) .ev-ban-main { animation: ev-ban-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
@keyframes ev-ban-in { from { transform: translateX(-30px); opacity: 0; } }
html.kod-still .ev-ban-boss.live .ev-ban-art { animation: none; }
/* «Ещё»: окна событий — картинкой баннера */
.ev-menu .ev-mpic { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; object-fit: cover; object-position: 50% 35%; }
/* дорожка порогов (events.js stepsHtml): сундуки ui.quest_chest_1…5 на равных промежутках над толстой полосой; полоса
   — transform scaleX(--f), при появлении растёт от нуля, когда очки выросли — плавно. Готовый сундук светится и
   подпрыгивает (касание — «Забрать»), взятый — приглушён, с зелёной галочкой */
.ev-track { position: relative; margin: 2px 0 14px; padding: 8px 4px 4px; border-radius: 14px; background: linear-gradient(#e6edf5, #d4e0ef);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.8), 0 2px 0 rgba(42, 52, 66, 0.2); }
.ev-nodes { position: relative; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.ev-bar { position: absolute; left: 4px; right: 4px; top: calc(8px + var(--chest, 72px) + 6px); height: 14px; border-radius: 7px; overflow: hidden;
  background: rgba(30, 48, 76, 0.22); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); }
.ev-fill { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--f, 0)); border-radius: 7px;
  background: linear-gradient(#ffe39a, #e0a93e 55%, #a8742a); transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.3, 1); }
[dir="rtl"] .ev-fill { transform-origin: 100% 50%; }
html:not(.kod-still) .ev-fill { animation: ev-fill 1.1s 0.15s cubic-bezier(0.3, 0.8, 0.3, 1) both; }
@keyframes ev-fill { from { transform: scaleX(0); } }
html.kod-still .ev-fill { transition: none; }
.ev-node { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 0; border: 0; background: none;
  cursor: pointer; font: inherit; color: var(--w-hi, #16202c); }
.ev-chest { position: relative; width: var(--chest, 72px); height: var(--chest, 72px); display: flex; align-items: center; justify-content: center; }
.ev-chest > :is(img, .evp-wait) { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.35)); }
.ev-chest .c { width: 70%; height: 70%; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #eef3f9;
  border: 2px solid var(--w-line, #a5b6cc); color: var(--w-muted, #566274); }
.ev-dot { position: relative; z-index: 1; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%; background: #eef3f9;
  border: 3px solid #8a96a5; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.ev-node b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 16px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.ev-node.ready .ev-dot, .ev-node.got .ev-dot, .ev-node.reach .ev-dot { border-color: #a8742a; background: #ffe39a; }
.ev-node.got .ev-chest > img { filter: grayscale(0.6) brightness(0.92) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3)); opacity: 0.7; }
.ev-node.got b { color: var(--w-muted, #566274); }
.ev-node.ready .ev-chest::before { content: ''; position: absolute; inset: -18%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 226, 150, 0.95), rgba(255, 190, 80, 0.35) 60%, transparent); }
.ev-ok, .ev-bang { position: absolute; inset-inline-end: -4px; top: -4px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid #fff; font: 700 20px/1 var(--sans); font-style: normal; color: #fff; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35); }
.ev-ok { background: #3f8f4f; }
.ev-bang { background: #d64a3a; }
.ev-ok :is(svg, img) { width: 18px; height: 18px; }
.ev-node:active .ev-chest { transform: scale(0.92); }
html:not(.kod-still) .ev-node.ready .ev-chest { animation: ev-hop 1.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 0.12s); }
html:not(.kod-still) .ev-node.ready .ev-chest::before { animation: ev-glow 1.5s ease-in-out infinite; }
html:not(.kod-still) .ev-node .ev-chest > img { animation: ev-pop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; animation-delay: calc(0.1s + var(--i, 0) * 0.06s); }
@keyframes ev-hop { 0%, 55%, 100% { transform: none; } 20% { transform: translateY(-10px) scale(1.06, 0.96); } 32% { transform: translateY(0) scale(1.05, 0.95); }
  42% { transform: translateY(-4px); } }
@keyframes ev-glow { 50% { transform: scale(1.12); opacity: 0.75; } }
@keyframes ev-pop { from { transform: scale(0.3); opacity: 0; } }
/* порогов больше шести — сундуки мельче (лёжа места хватает: 9 порогов × 140) */
.ev-track.many { --chest: 64px; }
/* дела этапа: значок дела крупно */
/* порог списком (крупно): сундук и очки слева, награды крупными ячейками, «Забрать» зелёная большая */
.ev-tier2 { gap: 14px; padding: 10px 14px; border-radius: 12px; }
.ev-tier2 .ev-tp { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 84px; }
.ev-tier2 .ev-tp b, .ev-prize .ev-tp b { min-width: 0; font: 700 22px/1.1 var(--sans); color: var(--w-hi, #16202c); text-align: center; }
.ev-tchest { width: 64px; height: 64px; object-fit: contain; }
.ev-tier2 .ev-cells .ic-cell, .ev-prize .ev-cells .ic-cell { --ic: 76px; }
.ev-tier2 .btn { flex: none; min-width: 140px; height: var(--h-btn); font-size: var(--fs-btn-s); }
.ev-tier2.ready { background: linear-gradient(90deg, rgba(255, 226, 150, 0.75), var(--w-well, #d4e0ef) 60%); box-shadow: inset 0 0 0 2px #c08a3e; }
html:not(.kod-still) .ev-tier2.ready .ev-claim { animation: ev-cta 1.6s ease-in-out infinite; }
/* порог не набран (круг 8): серая «Забрать» с замком вместо синей «Перейти» у каждой строки; одна «К делам» — у заголовка */
.ev-tier2 .ev-lock { display: inline-flex; align-items: center; justify-content: center; gap: 6px; opacity: 1; cursor: default;
  background: linear-gradient(#cfd6de, #aab4c0); color: #5a6574; text-shadow: none; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12); filter: none; }
.ev-sect-go { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ev-sect-go .btn { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
@keyframes ev-cta { 0%, 70%, 100% { transform: none; } 80% { transform: scale(1.06); } 90% { transform: scale(0.98); } }
.ev-prize .ev-tp { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; }
.ev-prize .rk-chest { width: 64px; height: 64px; }
.ev-help .tr-des { margin: 0 0 10px; font-size: var(--fs-body); line-height: 1.45; color: var(--w-hi, #16202c); }
/* пороги списком: взятые — одной строкой «Взято: N из M» (нажать — развернуть), у ближайшего ненабранного — «набрано /
   нужно» под порогом */
.ev-got { width: 100%; border: 0; cursor: pointer; font: inherit; color: var(--w-hi, #fff3d0); text-align: start; }
.ev-got > span { flex: 1; min-width: 0; font-weight: 700; }
.ev-got > i { font-style: normal; font-weight: 700; color: var(--w-accent, var(--bronze-l)); }
.ev-prize.top1 { background: linear-gradient(90deg, rgba(241, 196, 90, 0.55), var(--w-well, rgba(0, 0, 0, 0.22)) 70%); }
.ev-prize.top2 { background: linear-gradient(90deg, rgba(226, 232, 239, 0.75), var(--w-well, rgba(0, 0, 0, 0.22)) 70%); }
.ev-prizes { margin: 0 0 8px; font-size: var(--fs-sub); }
.ev-prize > b { flex: 0 0 120px; } /* место — столбцом: ячейки наград с одной линии во всех строках */
/* круглые кнопки внизу окна: Рейтинг, Награды, Турнир */
/* (events.js переносит .ev-dock из тела окна в само окно: под прокруткой, у низа) */
.ev-dock { flex: none; display: flex; justify-content: center; gap: 28px; padding: 6px 12px 8px; border-top: 1px solid rgba(42, 52, 66, 0.25); }
.ev-db { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 96px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--w-hi, var(--text)); font: 700 var(--fs-sub)/1.15 var(--sans); }
.ev-db .c { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 3px solid #fff;
  background: radial-gradient(circle at 50% 35%, #6e9bd0, #2f5584); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.ev-db:active .c { transform: translateY(2px); }
.ev-db:disabled { opacity: 0.5; cursor: default; }
.ev-dock.hidden { display: none; }
/* стоя: лента 64/24, дела 56/20, пороги 110 с ячейками 80 и кнопкой 170×56, кнопки внизу 72 */
body.vertical .ev-more { min-height: var(--h-tab); padding: 0 14px; }
body.vertical .ev-calbtn { width: 60px; height: 60px; }
body.vertical .ev-calbtn svg { width: 36px; height: 36px; }
body.vertical .ev-body .ev-prize > b { flex-basis: 190px; }
body.vertical .ev-go { width: 64px; height: 52px; border-radius: 14px; }
body.vertical .ev-go svg { width: 24px; height: 24px; margin-inline: -5px; }
body.vertical .ev-body .ev-tier { min-height: 110px; padding: 10px 14px; gap: 12px; }
body.vertical .ev-body .ev-tier > b { min-width: 84px; font-size: 24px; }
body.vertical .ev-body .ev-tier .ev-cells .ic-cell { --ic: 80px; }
body.vertical .ev-body .ev-cells .it-tile .it-tag { font-size: 16px; } /* длинный ярлык («24 Std.») в ячейке 80 — не мельче 16 */
/* круг 9: короткий ярлык («15 мин», «10K») в крупной ячейке — до --fs-min (был 16 и в ячейке 104) */
body:is(.vertical, .phone-land) .ev-body .ev-cells .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: max(16px, min(var(--fs-min), calc(var(--ic) * 0.23))); }
body.vertical .ev-body .ev-tier .ev-cells { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
/* награды по урону босса (events.js fewCells: три ячейки и «+N») — без ленты с прокруткой: перенос, если не влезли */
body.vertical .ev-body .ev-prize .ev-cells { flex-wrap: wrap; overflow: visible; }
body.vertical .ev-body .ev-prize .ev-cells .ic-cell { --ic: 92px; }
body.vertical .ev-body .ev-tier .btn.small { min-width: 170px; height: 56px; }
body.vertical .ev-body .ev-tier .q-got { font-size: var(--fs-min); }
body.vertical .ev-body .ev-got { min-height: 72px; font-size: var(--fs-sub); }
/* стоя (круг 5): баннер 300 (имя 40, очки 60, значок дня 112, неделя — 60), дорожка — сундуки 84 (больше шести
   порогов — 72), пороги — ячейки 104, «Забрать» 72; дела — значок 64 */
body.vertical .ev-ban { min-height: 300px; padding: 20px 22px; gap: 12px; border-radius: 18px; }
body.vertical .ev-ban .nm { font-size: 40px; }
body.vertical .ev-ban-ic { width: 112px; height: 112px; }
body.vertical .ev-ban-pts > b { font-size: 60px; }
body.vertical .ev-chip { min-height: 52px; font-size: 22px; padding: 6px 18px 6px 10px; border-radius: 26px; }
body.vertical .ev-chip.big { font-size: 24px; min-height: 60px; }
body.vertical .ev-hp { height: 40px; border-radius: 20px; }
body.vertical .ev-hp > b { font-size: 24px; line-height: 40px; }
body.vertical .ev-wd { width: 64px; }
body.vertical .ev-wd :is(img, svg, .evp-wait) { width: 56px; height: 56px; }
body.vertical .ev-wd i { font-size: var(--fs-min); }
body.vertical .ev-week { gap: 8px; }
body.vertical .ev-track { --chest: 84px; padding: 10px 4px 6px; border-radius: 16px; }
body.vertical .ev-track.many { --chest: 72px; }
body.vertical .ev-bar { top: calc(10px + var(--chest) + 8px); height: 18px; border-radius: 9px; }
body.vertical .ev-dot { width: 26px; height: 26px; }
body.vertical .ev-node { gap: 8px; }
body.vertical .ev-node b { font-size: var(--fs-min); }
body.vertical .ev-ok, body.vertical .ev-bang { width: 34px; height: 34px; font-size: 22px; }
body.vertical .ev-body .ev-tier2 { min-height: 132px; gap: 14px; padding: 12px 14px; }
body.vertical .ev-tier2 .ev-tp { min-width: 96px; }
body.vertical .ev-tchest { width: 76px; height: 76px; }
body.vertical .ev-body .ev-tier2 .ev-tp b, body.vertical .ev-body .ev-prize .ev-tp b { font-size: 26px; }
body.vertical .ev-body .ev-tier .ev-cells .ic-cell { --ic: 104px; }
body.vertical .ev-body .ev-tier2 .btn { min-width: 150px; height: 72px; font-size: 24px; border-radius: 14px; }
body.vertical .ev-body .ev-tier2 .q-got :is(svg, img) { width: 40px; height: 40px; }
body.vertical .ev-prize .ev-tp { min-width: 150px; }
body.vertical .ev-body .ev-prize .ev-tp { flex: 0 0 172px; } /* место — столбцом одной ширины («4–10-е места» сдвигало ячейки) */
body.vertical .ev-prize .rk-chest { width: 84px; height: 84px; }
body.vertical .ev-help .tr-des { font-size: var(--fs-sub); }
body.vertical .ev-body .cell-acts .btn { height: var(--h-btn); padding: 0 24px; font-size: var(--fs-btn); }
body.vertical .ev-menu { gap: 10px; padding: 10px; }
body.vertical .ev-menu button { min-height: 170px; padding: 14px 18px; font-size: 40px; border-radius: 16px; }
body.vertical .ev-menu button > svg:last-child { width: 44px; height: 44px; }
body.vertical .ev-dock { padding: 2px 12px 10px; gap: 40px; border-top: 0; }
body.vertical .ev-db { width: 120px; font-size: var(--fs-min); color: #fff; text-shadow: var(--t-outline); }
body.vertical .ev-db .c { width: 72px; height: 72px; }
body.vertical .ev-db .c svg { width: 40px; height: 40px; }
/* битва по очкам (thronescore.js, вид — css/kingdom.css, css/social.css) внутри «Событий»: стоя — не мельче --fs-min,
   ячейки наград 96 (круг 9: были 16–18 и 80); свой вклад — число шрифтом цифр (титульный «0» читался буквой «О») */
body.vertical .ev-tsb :is(.cell-note, .ts-wake, .ts-bonus) { font-size: var(--fs-min); }
body.vertical .ev-tsb .ts-row .n em { font-size: var(--fs-min); }
body.vertical .ev-tsb .t span, body.vertical .ev-tsb .ev-pts span { font-size: var(--fs-min); }
body.vertical .ev-tsb .ic-row .ic-cell { --ic: 96px; } /* и мелкие ячейки (.ic-s) счёта — вес выше css/itemcell.css */
.ev-tsb .ts-mine { align-items: center; }
.ev-tsb .ts-mnum { font-family: var(--sans); font-variant-numeric: tabular-nums; color: #9a6a1e; }
.ev-tsb .ts-mcap { font-weight: 700; color: var(--w-muted, #566274); }
body:is(.vertical, .phone-land) .ev-tsb .ts-mcap { font-size: var(--fs-sub); }
/* лёжа строки порогов, наград мест и наград за очки трона — в два столбца (во всю ширину 1600 сцены оставалась пустая
   половина строки) */
body.phone-land .ev-tiers.evx-grid, body.phone-land .ev-tsb .ts-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
body.phone-land .ev-tiers.evx-grid > .ev-got { grid-column: 1 / -1; }
body.phone-land .ev-tiers.evx-grid > .ev-tier { margin: 0; }
body.phone-land .ev-body .ev-prize .ev-tp { flex: 0 0 150px; min-width: 0; } /* место — столбцом одной ширины */
body.phone-land .ev-tsb .ic-row .ic-cell { --ic: 88px; }
body:is(.vertical, .phone-land) .ev-tsb .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: var(--fs-min); } /* «8 ч» в ячейке награды */

/* ——— окно «Турнир альянсов» (круг 9: пара, дни, таблица и лучшие лорды прежнего вида — убраны, вид турнира — css/union.css tq-*) ——— */
.tn-body { display: flex; flex-direction: column; gap: 8px; }
.tn-ic-art { display: block; }
/* рейтинг лордов: «Неделя · Пн … Сб» (tourney.js daySelHtml, п. 27) — одной строкой; впереди лежащие дни бледные, у
   сегодняшнего — точка */
.tn-dsel { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--w-track, rgba(0, 0, 0, 0.3)); overflow-x: auto;
  scrollbar-width: none; }
.tn-dsel::-webkit-scrollbar { display: none; }
.tn-dsel button { position: relative; flex: 1 0 auto; min-width: 44px; padding: 6px 10px; border: 0; border-radius: 8px; background: none;
  cursor: pointer; color: var(--w-hi, #fff3d0); font: 700 var(--fs-sub)/1.2 var(--sans); white-space: nowrap; }
.tn-dsel button.on { background: #fff; color: #22303f; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }
.tn-dsel button:disabled { opacity: 0.4; cursor: default; }
.tn-dsel button.now::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 6px; height: 6px; margin-left: -3px; border-radius: 3px;
  background: var(--w-accent, var(--bronze-l)); }
.tn-note { margin: 0; color: var(--w-muted, var(--muted)); font-size: 14px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tn-rules { margin: 0; padding-left: 20px; color: var(--w-hi, #fff3d0); font-size: 14px; line-height: 1.45; }

/* ——— лёжа на телефоне (body.phone-land, js/ui.js fitStage: сцена мельче 3/4, около 0,57): здесь размеры прибиты в px —
   строки календаря, шапок событий и турнира 12–14 (7–8 css px), «»» дел 44×36, стрелка календаря 44, «МСК | своё» —
   около 24. Растут до размеров круга 1 (css/kod.css body.phone-land): текст не мельче 16, пояснения 17, имена 20; «»»
   64×52, стрелка 56, «МСК | своё» 48, ленты «Ещё» — 64 (--h-tab). На планшете и ПК лёжа и стоя — как было ——— */
/* часы мира в HUD замка: время 20, поле касания 32 × 85 (невидимой рамкой — в зазоры столбца, не на «Казну» и не на
   кнопку ниже); сама плашка — прежние 26: столбец событий выше не пускает (под ним — столбец кнопок до самого
   «Тронного зала», css/kod.css .rcol), 48 — только перестройкой HUD */
body.phone-land .ev-clock { position: relative; padding: 0 10px 0 8px; }
body.phone-land .ev-clock b { font-size: 20px; }
body.phone-land .ev-clock::before { content: ''; position: absolute; inset: -2px -6px -4px; }
/* календарь событий: часы, строки 76 (значок 60, имя 20, сроки 17), стрелка 56, дни недели 16–17 */
body.phone-land .cal-clock span, body.phone-land .cal-hint, body.phone-land .cal-tap { font-size: var(--fs-sub); }
body.phone-land .cal-date { font-size: 20px; }
body.phone-land .cal-tz button { min-height: 48px; padding: 0 16px; font-size: var(--fs-sub); }
body.phone-land .cal-row { min-height: 76px; box-sizing: border-box; gap: 12px; padding: 8px 12px; }
body.phone-land .cal-row .ic { width: 60px; height: 60px; border-radius: 30px; }
body.phone-land .cal-row .ic :is(svg, img) { width: 36px; height: 36px; }
body.phone-land .cal-row .t b { font-size: 20px; }
body.phone-land .cal-row .t > span, body.phone-land .cal-row .t .tm { font-size: var(--fs-sub); }
body.phone-land .cal-go { width: 56px; height: 56px; }
body.phone-land .cal-go svg { width: 30px; height: 30px; }
body.phone-land .cal-quiet { font-size: 20px; }
body.phone-land .cal-day { font-size: var(--fs-min); }
body.phone-land .cal-day b { font-size: var(--fs-sub); }
/* лёжа неделя — тоже 4 + 3: в 7 столбцов окна календаря «Подготовка» обрезалась («Подготовк») */
body.phone-land .cal-day { flex: 0 0 calc(25% - 6px); }
/* окно «События»: кнопка календаря 52, «Ещё» 64, пункты меню 60, шапка события 17, «»» 64×52 */
body.phone-land .ev-calbtn { width: 52px; height: 52px; }
body.phone-land .ev-more { min-height: var(--h-tab); padding: 0 16px; }
body.phone-land .ev-menu { flex-direction: row; }
body.phone-land .ev-menu button { flex: 1 1 0; min-height: 150px; font-size: 32px; }
body.phone-land .ev-pts span { font-size: var(--fs-min); }
body.phone-land .ev-go { width: 64px; height: var(--h-btn-s); border-radius: 12px; }
body.phone-land .ev-go svg { width: 22px; height: 22px; margin-inline: -5px; }
body.phone-land .ev-body .ev-tier .q-got { font-size: var(--fs-min); }
/* дорожка порогов лёжа: сундуки 80, пороги 18, «набрано / нужно» 16, строка «Взято» 60; баннер — имя 36, очки 52 */
body.phone-land .ev-track { --chest: 80px; }
body.phone-land .ev-node b { font-size: var(--fs-min); }
body.phone-land .ev-got { min-height: 60px; font-size: var(--fs-sub); }
body.phone-land .ev-ban .nm { font-size: 36px; }
body.phone-land .ev-ban-pts > b { font-size: 52px; }
body.phone-land .ev-chip { font-size: 20px; min-height: 48px; }
body.phone-land .ev-wd i { font-size: var(--fs-min); }
body.phone-land .ev-tier2 .ev-tp b { font-size: 24px; }
body.phone-land .ev-body .ev-tier .ev-cells .ic-cell { --ic: 88px; }
body.phone-land .ev-help .tr-des { font-size: 19px; }
body.phone-land .ev-tsb .cell-note { font-size: var(--fs-sub); }
body.phone-land .ev-tsb .t span, body.phone-land .ev-tsb .ev-pts span { font-size: var(--fs-min); }
/* турнир альянсов: строка дня 17, дни недели 16–17, пара — 17, таблица и правила 16–17 */
body.phone-land .tn-note { font-size: var(--fs-sub); }
body.phone-land .tn-rules { font-size: var(--fs-sub); }
/* лучший лорд дня 17 / 16, имя в таблице дней 16, дни рейтинга лордов — 48 */
body.phone-land .tn-dsel button { min-height: 48px; padding: 6px 12px; }

/* ——— сундуки мест рейтинга (rank.js chestPic, круг 5; образец — скрин 002): своя картинка ui.quest_chest_N, цвет
   ступени — оттенком: 1-я ступень — золотой, 2-я — лиловый, 3-я — синий, дальше — зелёный; под сундуком — свечение
   того же цвета. Касание — «Награды» со своим местом; внизу окна рейтинга — крупная «Обзор наград» ——— */
.rk-chest { position: relative; display: inline-flex; flex: none; width: 64px; height: 64px; align-items: center; justify-content: center; }
.rk-chest::before { content: ''; position: absolute; inset: 14% 8% 0; border-radius: 50%; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side, var(--rk-glow, rgba(255, 215, 94, 0.6)), transparent); }
.rk-chest-img { position: relative; z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.rk-chest.c1 { --rk-glow: rgba(255, 210, 90, 0.75); }
.rk-chest.c2 { --rk-glow: rgba(200, 140, 255, 0.7); }
.rk-chest.c2 .rk-chest-img { filter: hue-rotate(245deg) saturate(1.25) brightness(1.02) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.rk-chest.c3 { --rk-glow: rgba(110, 175, 240, 0.7); }
.rk-chest.c3 .rk-chest-img { filter: hue-rotate(175deg) saturate(1.3) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.rk-chest.c4 { --rk-glow: rgba(120, 210, 130, 0.65); }
.rk-chest.c4 .rk-chest-img { filter: hue-rotate(70deg) saturate(1.1) drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.rk-chestbtn { flex: none; display: inline-flex; padding: 0; border: 0; background: none; cursor: pointer; }
.rk-chestbtn:active { transform: scale(0.92); }
.rk-prize .rk-chest { width: 64px; height: 64px; }
.rk-foot { flex: none; display: flex; justify-content: center; padding: 10px 16px 14px; border-top: 1px solid rgba(42, 52, 66, 0.2); }
.rk-all { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 280px; height: var(--h-btn);
  border-color: var(--blue-d); background: linear-gradient(var(--blue-l), var(--blue)); font-size: var(--fs-btn); }
.rk-tier { position: relative; }
.rk-tier-pl .rk-chest { width: 56px; height: 56px; }
.rk-tier-me { position: absolute; top: -8px; inset-inline-end: 10px; padding: 1px 10px; border-radius: 10px; background: #3f8f4f; color: #fff;
  font: 700 14px/1.4 var(--sans); font-style: normal; }
html:not(.kod-still) .rk-pz-modal .rk-tier { animation: rk-in 0.32s ease-out both; animation-delay: calc(var(--i, 0) * 0.06s); }
@keyframes rk-in { from { transform: translateY(14px); opacity: 0; } }
body.vertical .rk-prize .rk-chest { width: 88px; height: 88px; }
body.vertical .rk-tier-pl .rk-chest { width: 76px; height: 76px; }
body.vertical .rk-all { min-width: 360px; }
body.vertical .rk-tier-me { font-size: 17px; }
body.phone-land .rk-prize .rk-chest { width: 72px; height: 72px; }
/* босс: «как бить» — три картинки с короткими подписями (абзац — в «!» шапки) */
.ev-how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.ev-how-it { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; text-align: center;
  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); }
.ev-how-it :is(svg, img) { width: 64px; height: 64px; }
.ev-how-it b { font: 700 var(--fs-sub)/1.25 var(--sans); color: var(--w-hi, #16202c); }
html:not(.kod-still) .ev-how-it { animation: rk-in 0.35s ease-out both; animation-delay: calc(0.2s + var(--i, 0) * 0.08s); }
body.vertical .ev-how-it { padding: 18px 8px; }
body.vertical .ev-how-it :is(svg, img) { width: 84px; height: 84px; }

/* ——— турнир (tourney.js, круг 5): шапка — крупный баннер events.banner_tourney (тёмная дымка снизу, имя, тема дня и
   отсчёт плашкой, свои очки крупно), шесть дней — плитками со значками тем 56 (стоя 72); награды — сундуками ступеней
   и крупными ячейками; правила — «!» шапки ——— */
.tn-ban { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-height: 210px; padding: 14px 16px;
  box-sizing: border-box; border-radius: 16px; overflow: hidden; background: linear-gradient(#3a4c6c, #1d2230);
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25), inset 0 0 0 2px rgba(255, 226, 150, 0.35); color: #fff; text-shadow: 0 1px 2px #000; }
.tn-ban > .tn-ban-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.tn-ban::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(rgba(10, 12, 20, 0.15), rgba(10, 12, 20, 0.1) 40%, rgba(10, 12, 20, 0.82)); }
.tn-ban > :not(.tn-ban-art) { position: relative; z-index: 1; }
.tn-ban-t { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.tn-ban-t .nm { font: 700 32px/1.1 var(--sans); color: #ffe39a; text-shadow: 0 2px 2px #000, 0 0 8px rgba(0, 0, 0, 0.7); }
.tn-ban-t .ev-chip { flex-wrap: wrap; font-size: 17px; border-radius: 18px; }
.tn-ban-t .ev-chip :is(img, svg) { flex: none; }
.tn-ban-pts { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.tn-ban-pts b { font: 700 48px/1 var(--sans); color: #fff; font-variant-numeric: tabular-nums; }
.tn-ban-pts span { font: 700 15px/1.2 var(--sans); color: #ffe7b8; }
.tn-tier .tn-tp { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; text-align: center; }
/* подпись места (b.place) — не любые b строки наград (лента итога, опыт альянса — свои цвета) */
.tn-tier .tn-tp > b.place { min-width: 0; font: 700 18px/1.15 var(--sans); color: var(--w-hi, #16202c); }
.tn-tier .tn-tp .rk-chest { width: 60px; height: 60px; }
.tn-tier .tn-cells .ic-cell { --ic: 72px; }
/* опыт альянса за итог (круг 8) — зелёной плашкой под названием итога, а не мелкой строкой справа: ячейки входят без
   прокрутки */
.tn-xp { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 2px 10px 2px 6px; border-radius: 12px; background: #3f8f4f;
  color: #fff; font: 700 16px/1.25 var(--sans); white-space: nowrap; }
body.vertical .tn-xp { font-size: 20px; padding: 3px 12px 3px 8px; border-radius: 14px; }
body.vertical .tn-xp svg { width: 26px; height: 26px; }
body.vertical :is(.cx-win, .tn-modal) .ev-tier.tn-tier .ic-cell { --ic: 84px; }
/* шапка турнира свёрнутой полосой на «Альянсах», «Лордах» и «Наградах»: список — сразу под ней */
.tn-ban.mini { min-height: 0; align-items: center; padding: 10px 14px; }
.tn-ban.mini .tn-ban-t .nm { font-size: 26px; }
.tn-ban.mini .ev-chip { position: relative; z-index: 1; margin-inline-start: auto; }
.tn-ban.mini .tn-ban-pts b { font-size: 34px; }
body.vertical .tn-ban.mini { min-height: 0; padding: 12px 16px; }
body.vertical .tn-ban.mini .tn-ban-t .nm { font-size: 30px; }
body.vertical .tn-ban.mini .tn-ban-pts b { font-size: 40px; }
.tn-tier.win { background: linear-gradient(90deg, rgba(255, 226, 150, 0.7), var(--w-well, #d4e0ef) 60%); }
.tn-help-modal .tn-rules { color: var(--w-hi, #16202c); }
body.vertical .tn-ban { min-height: 280px; padding: 18px 20px; border-radius: 18px; }
body.vertical .tn-ban-t .nm { font-size: 36px; }
body.vertical .tn-ban-t .ev-chip { font-size: 20px; }
body.vertical .tn-ban-pts b { font-size: 56px; }
body.vertical .tn-ban-pts span { font-size: 18px; }
body.vertical .tn-tier .tn-tp { min-width: 140px; }
body.vertical .tn-tier .tn-tp > b.place { font-size: 22px; }
body.vertical .tn-tier .tn-tp .rk-chest { width: 80px; height: 80px; }
body.vertical .tn-tier .tn-tp > :is(svg, img.ico-art) { width: 72px; height: 72px; }
body.vertical .tn-help-modal .tn-rules { font-size: 19px; }
body.phone-land .tn-ban-t .ev-chip { font-size: 19px; }
body.phone-land .tn-ban-pts span { font-size: 17px; }
body.phone-land .tn-tier .tn-tp > b.place { font-size: 20px; }
body.phone-land .tn-tier .tn-cells .ic-cell { --ic: 84px; }

/* ——— календарь (calendar.js, круг 5; образец — скрин 026): у строки — картинка события (скруглённый квадрат, идёт —
   красная точка), у дней недели — значки тем; строки появляются по очереди ——— */
.cal-row .ic.art { position: relative; width: 84px; height: 56px; overflow: visible; border: 0; border-radius: 14px; background: none; }
.cal-row .ic.art .cal-pic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px;
  box-shadow: 0 0 0 2px #c4aa7c, 0 2px 4px rgba(0, 0, 0, 0.35); }
.cal-row .ic.art img.cal-pic { width: 100%; height: 100%; }
.cal-row .ic.art .cal-pic.mon { object-fit: contain; object-position: 50% 80%; background: radial-gradient(ellipse at 50% 75%, #8a4a2a, #2a1c18 75%); }
.cal-row.live .ic.art .cal-pic { box-shadow: 0 0 0 3px var(--w-bad, #e0705f), 0 2px 6px rgba(0, 0, 0, 0.4); }
.cal-live { position: absolute; top: -5px; inset-inline-end: -5px; width: 18px; height: 18px; border-radius: 50%; background: #d64a3a; border: 2px solid #fff; z-index: 1; }
html:not(.kod-still) .cal-live { animation: ev-glow 1.4s ease-in-out infinite; }
html:not(.kod-still) .cal-row { animation: rk-in 0.32s ease-out both; animation-delay: calc(var(--i, 0) * 0.06s); }
.cal-day .cal-dic { width: 44px; height: 44px; }
.cal-day.on .cal-dic { box-shadow: 0 0 0 3px #c08a3e; border-radius: 50%; }
.cal-day.on { background: linear-gradient(#fff4d6, #f1d79a); box-shadow: inset 0 0 0 3px #c08a3e, 0 0 10px rgba(255, 210, 120, 0.7); }
html:not(.kod-still) .cal-day.on .cal-dic { animation: ev-hop 1.8s ease-in-out infinite; }
body.vertical .cal-row .ic.art { width: 112px; height: 88px; }
body.vertical .cal-row .ic.art .cal-pic { border-radius: 16px; }
body.vertical .cal-day .cal-dic { width: 56px; height: 56px; }
body.phone-land .cal-row .ic.art { width: 96px; height: 60px; }

/* ——— круг 9 (09.11.2026): «Испытание королевства» и «!» событий ——— */
/* дела дня — карточки дел турнира (вид — css/union.css .tq-job); над ними — значок темы дня */
.ev-jobs { margin-bottom: 6px; }
/* «раз в час» у дела, что засчитывается не чаще (добыча замка, рынок; events.js jobCard): часы и подпись плашкой */
.tq-jpts .tq-jgap { display: inline-flex; align-items: center; gap: 4px; padding: 1px 10px 1px 4px; border-radius: 12px; background: rgba(122, 76, 20, 0.12); }
.tq-jpts .tq-jgap :is(svg, img) { width: 26px; height: 26px; flex: none; }
.sect.tq-sect .ev-sect-ic { width: 44px; height: 44px; }
/* порог справа: ближайший ненабранный — полоса «набрано / нужно» (заливка растёт при появлении) и «ещё N»; дальше —
   замок и «ещё N» (были серые «Забрать» у каждого порога) */
.ev-left { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 150px; padding: 8px 12px;
  box-sizing: border-box; border-radius: 14px; background: rgba(42, 52, 66, 0.1); color: var(--w-muted, #566274);
  font: 700 var(--fs-sub)/1.1 var(--sans); white-space: nowrap; font-variant-numeric: tabular-nums; }
.ev-left > :is(svg, img) { width: 30px; height: 30px; flex: none; opacity: 0.85; }
.ev-left.next { flex-direction: column; align-items: stretch; gap: 6px; min-width: 170px; padding: 0; background: none; color: var(--w-hi, #16202c); }
.ev-left.next > b { text-align: center; }
.ev-left.done { min-width: 150px; background: rgba(63, 143, 79, 0.14); }
.ev-lbar { position: relative; display: block; height: 32px; border-radius: 16px; overflow: hidden; background: rgba(30, 48, 76, 0.22);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3); }
.ev-lbar > i { position: absolute; inset-block: 0; inset-inline-start: 0; border-radius: 16px; background: linear-gradient(#ffe39a, #e0a93e 55%, #a8742a); }
html:not(.kod-still) .ev-lbar > i { animation: ev-lbar 0.9s 0.2s cubic-bezier(0.3, 0.8, 0.3, 1) both; }
@keyframes ev-lbar { from { width: 0; } }
.ev-lbar > em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 var(--fs-min)/1 var(--sans);
  font-style: normal; color: #fff; text-shadow: var(--t-outline); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* «Как устроено» событий: строки — крупный значок или картинка и короткая подпись; награды лучшим — сундуками мест */
.ev-help { display: flex; flex-direction: column; gap: 12px; }
.ev-hrow { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 14px; background: var(--w-well, rgba(16, 20, 28, 0.08)); }
.ev-hic { flex: none; width: 80px; height: 80px; display: flex; align-items: center; justify-content: center; }
.ev-hic :is(img, svg) { width: 72px; height: 72px; object-fit: contain; }
.ev-ht { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-ht > b { font: 700 var(--fs-list)/1.2 var(--sans); color: var(--w-hi, #16202c); }
.ev-ht > span { font: 400 var(--fs-sub)/1.35 var(--sans); color: var(--w-muted, #566274); }
.ev-hprizes { display: flex; flex-direction: column; gap: 8px; }
.ev-hprize { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.35); }
.ev-hpl { flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 120px; }
.ev-hpl b { font: 700 var(--fs-min)/1.15 var(--sans); color: var(--w-hi, #16202c); text-align: center; }
.ev-hprize .ev-hcells { flex-wrap: wrap; }
.ev-hprize .ev-hcells .ic-cell { --ic: 72px; }
.ev-hban { position: relative; height: 200px; border-radius: 14px; overflow: hidden; background: linear-gradient(135deg, #b0472e, #3a0f0c); }
.ev-hban .ev-hpic { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
html:not(.kod-still) .ev-hban .ev-hpic { animation: ev-breathe 6s ease-in-out infinite; }
body.vertical .ev-hpl { flex: 0 0 156px; } /* место — столбцом одной ширины: ячейки всех мест с одной линии */
body.vertical .ev-hprize .ev-hcells .ic-cell { --ic: 96px; } /* число (0,23 ячейки) и ярлык — не мельче --fs-min (было 84: 19 и 17) */
body:is(.vertical, .phone-land) .ev-hprize .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: var(--fs-min); }
body.vertical .ev-hban { height: 260px; }
/* награда места босса: больше четырёх — три ячейки и плитка «+N» размером с ячейку; касание — вся награда окном */
.ev-more-loot { flex: none; width: var(--ic, 76px); height: var(--ic, 76px); display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 2px solid #c08a3e; border-radius: 14px; cursor: pointer; background: radial-gradient(circle at 50% 35%, #fff4d6, #e9cf96);
  box-shadow: 0 3px 0 rgba(122, 76, 20, 0.35); color: #7a4c14; font: 700 var(--fs-num)/1 var(--sans); }
.ev-prize .ev-cells .ev-more-loot { --ic: 76px; }
body.vertical .ev-body .ev-prize .ev-cells .ev-more-loot { --ic: 92px; }
body.phone-land .ev-body .ev-prize .ev-cells .ev-more-loot { --ic: 88px; }
.ev-more-loot:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(122, 76, 20, 0.35); }
.ev-allloot { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ev-allchest .rk-chest { width: 120px; height: 120px; }
.ev-allchest > :is(svg, img) { width: 96px; height: 96px; }
.ev-allloot .ev-wrapcells { flex-wrap: wrap; justify-content: center; gap: 10px; }
.ev-allloot .ev-wrapcells .ic-cell { --ic: 96px; }
body:is(.vertical, .phone-land) .ev-allloot .it-tile .it-tag:not(.n7, .n8, .n9, .n10) { font-size: var(--fs-min); } /* «8 ч», «IV» в ячейке 96 */
html:not(.kod-still) .ev-allchest { animation: arn-chest 2.4s ease-in-out infinite; }

