/* Ячейки предметов и наград (js/itemcell.js) — один вид во всех окнах и в сумке: квадрат с рамкой редкости, значок
   (своя картинка или линия в медальоне), ярлык ступени слева сверху, число справа снизу. Цвета редкости —
   art/style.json rarity.tiers (сверху тёмный тон → снизу светлый, обводка и кант); нарисована своя ячейка
   ui.rarity_<N> — она фоном (класс .art, картинку ставит js/itemcell.js). Размеры — в пикселях сцены: ячейка награды
   .ic-cell — 44 / 56 / 76 (.ic-s / .ic-m / .ic-l), стоя — 64 / 80 (--ic-cell, docs/UI_PLAN.md §2.5) / 96, число и
   ярлык стоя не мельче 16; своя — --ic. Сетка сумки — css/items.css. Ниже — карточка ячейки (showCell) и заставка
   «Получено» (showLoot) */

/* ——— ячейка (общая с сумкой) ——— */
.it-tile, .ic-inl {
  --rt: #5f6774; --rb: #b3bec4; --rim: #9dabb6; --ro: #4b535d;
}
.it-tile {
  position: relative; display: block; box-sizing: border-box; overflow: hidden; border-radius: 14px;
  border: 2px solid var(--ro); background-color: var(--rt); background-image: linear-gradient(var(--rt), var(--rb));
  box-shadow: inset 0 0 0 2px var(--rim), inset 0 0 14px rgba(8, 12, 20, 0.35);
  color: #fff;
}
:is(.it-tile, .ic-inl).r2 { --rt: #377f29; --rb: #93c570; --rim: #7ac357; --ro: #2a5f1f; }
:is(.it-tile, .ic-inl).r3 { --rt: #1e5693; --rb: #61c6e2; --rim: #42b1e8; --ro: #163f6e; }
:is(.it-tile, .ic-inl).r4 { --rt: #741b9b; --rb: #e67fec; --rim: #c960f1; --ro: #55167a; }
:is(.it-tile, .ic-inl).r5 { --rt: #bb5a0d; --rb: #f7b962; --rim: #f2973c; --ro: #8d470b; }
:is(.it-tile, .ic-inl).r6 { --rt: #7a1018; --rb: #e0503f; --rim: #ff6a5a; --ro: #560b12; }
.it-tile.art { border-color: transparent; box-shadow: none; background-color: transparent; background-position: center; background-size: 100% 100%; background-repeat: no-repeat; }
/* низ ячейки темнее — число читается на светлом низе любой редкости */
.it-tile::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 36%; pointer-events: none;
  background: linear-gradient(rgba(8, 12, 20, 0), rgba(8, 12, 20, 0.55));
}

.it-pic { position: absolute; inset: 10%; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.it-pic > img.it-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(8, 12, 20, 0.6)); }
.it-ph {
  position: relative; width: 100%; height: 100%; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 36%, rgba(255, 255, 255, 0.24), rgba(8, 12, 20, 0.5) 74%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14), 0 2px 4px rgba(8, 12, 20, 0.35);
}
.it-ph > svg, .it-ph > img.ico-art { width: 64%; height: 64%; }
.it-ph.face > img.it-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }

.it-tag, .it-mark {
  position: absolute; left: 4px; top: 4px; z-index: 1; padding: 1px 5px; border-radius: 6px; max-width: calc(100% - 8px);
  box-sizing: border-box; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: rgba(10, 14, 22, 0.74); color: #fff3d0; font: 700 12px/16px var(--sans); letter-spacing: 0;
}
.it-mark { padding: 2px; line-height: 0; }
.it-mark :is(svg, img.ico-art) { width: 16px; height: 16px; }
.it-n {
  position: absolute; right: 5px; bottom: 3px; z-index: 1; max-width: calc(100% - 8px); overflow: hidden; white-space: nowrap;
  font: 700 15px/1.1 var(--sans); color: #fff; letter-spacing: 0;
  text-shadow: 0 0 2px #0a0e16, 0 1px 2px #0a0e16, 0 0 4px #0a0e16;
}

/* ——— ячейка награды или товара: размер --ic, шрифт числа и ярлыка — от него ——— */
.ic-cell {
  --ic: 56px; display: inline-block; flex: none; vertical-align: middle; width: var(--ic); height: var(--ic);
  border-radius: clamp(8px, calc(var(--ic) * 0.18), 16px); cursor: pointer; transition: transform 0.1s; -webkit-tap-highlight-color: transparent;
}
.ic-cell.ic-s { --ic: 44px; border-radius: 9px; }
.ic-cell.ic-l { --ic: 76px; border-radius: 14px; }
body.vertical .ic-cell { --ic: var(--ic-cell, 80px); }
body.vertical .ic-cell.ic-s { --ic: 64px; }
body.vertical .ic-cell.ic-l { --ic: 96px; }
.ic-cell:active { transform: scale(0.94); }
.ic-cell:focus-visible { outline: 2px solid #ffd75e; outline-offset: 1px; }
.ic-cell.ic-static { cursor: default; }
.ic-cell.ic-static:active { transform: none; }
/* число и ярлык — со своим цветом и шрифтом: правила строк окна вида «.row span { … }» их не перекрашивают */
.it-tile.ic-cell .it-n {
  right: 3px; bottom: 1px; max-width: calc(100% - 4px); color: #fff; font-weight: 700; line-height: 1.1;
  font-size: max(11px, calc(var(--ic) * 0.27));
}
.it-tile.ic-cell .it-tag {
  left: 1px; top: 1px; padding: 0 2px; border-radius: 4px; max-width: calc(100% - 2px); color: #fff3d0; font-weight: 700;
  font-size: max(9px, calc(var(--ic) * 0.2)); line-height: 1.35; letter-spacing: -0.2px;
}
.it-tile.ic-cell .it-pic { display: flex; }
/* длинная подпись (js/itemcell.js lenCls: 7, 8, 9, 10+ знаков — «×1,2 Tsd.», «15 Min.», ?lang=xx) — мельче, но целиком */
.it-tile.ic-cell .it-n.n7 { font-size: max(9px, calc(var(--ic) * 0.25)); }
.it-tile.ic-cell .it-n.n8 { font-size: max(9px, calc(var(--ic) * 0.235)); }
.it-tile.ic-cell .it-n:is(.n9, .n10) { font-size: max(9px, calc(var(--ic) * 0.21)); right: 2px; max-width: calc(100% - 3px); }
.it-tile.ic-cell .it-n.n10 { font-size: max(8px, calc(var(--ic) * 0.18)); letter-spacing: -0.3px; }
.it-tile.ic-cell .it-tag.n7 { font-size: max(8px, calc(var(--ic) * 0.18)); }
.it-tile.ic-cell .it-tag:is(.n8, .n9) { font-size: max(8px, calc(var(--ic) * 0.165)); }
.it-tile.ic-cell .it-tag.n10 { font-size: max(7px, calc(var(--ic) * 0.15)); padding: 0 1px; letter-spacing: -0.3px; }
/* малая ячейка (44 px лёжа): «15 мин» вылезало на пиксель и резалось многоточием — поля и разрядка теснее */
.it-tile.ic-cell.ic-s .it-tag { padding: 0 1px; letter-spacing: -0.5px; }
.ic-cell .it-mark { left: 2px; top: 2px; padding: 1px; border-radius: 4px; }
.ic-cell .it-mark :is(svg, img) { width: max(12px, calc(var(--ic) * 0.24)); height: max(12px, calc(var(--ic) * 0.24)); }
/* стоя (§2.1, §2.5): число 18 с обводкой (ячейка 80), ярлык — не мельче 16; длинная подпись (de «15 Min.», «×1,5 Tsd.»)
   — 16 и теснее, ярлык — во всю ширину ячейки */
body.vertical .it-tile.ic-cell .it-n { font-size: max(16px, calc(var(--ic) * 0.23)); }
body.vertical .it-tile.ic-cell .it-tag { font-size: max(16px, calc(var(--ic) * 0.2)); line-height: 1.25; }
body.vertical .it-tile.ic-cell :is(.it-n, .it-tag):is(.n7, .n8, .n9, .n10) { font-size: 16px; letter-spacing: -0.5px; }
body.vertical .it-tile.ic-cell .it-n:is(.n9, .n10) { right: 1px; max-width: calc(100% - 2px); letter-spacing: -0.8px; }
body.vertical .it-tile.ic-cell .it-tag:is(.n7, .n8, .n9, .n10) { left: 0; max-width: 100%; padding: 0 1px; }

/* значок дела ускорения (стройка — молот, наука — колба…; общие — две стрелки) — слева снизу ячейки сумки */
.it-for {
  position: absolute; left: 4px; bottom: 4px; z-index: 1; width: 22px; height: 22px; box-sizing: border-box; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: radial-gradient(circle at 50% 35%, #74b4f0, #2c5c9c); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 1px 3px rgba(0, 0, 0, 0.55);
}
.it-for :is(svg, img.ico-art) { width: 68%; height: 68%; }
/* вещь Кузницы в сумке: на ком надета — мини-портрет героя слева снизу (нет картинки — значок лорда) */
.it-who {
  position: absolute; left: 4px; bottom: 4px; z-index: 1; width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%;
  overflow: hidden; display: flex; align-items: center; justify-content: center; pointer-events: none;
  background: #3a4656; box-shadow: 0 0 0 2px #fff3d0, 0 1px 3px rgba(0, 0, 0, 0.6);
}
.it-who svg { width: 64%; height: 64%; }
.it-who img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; }

/* ряд ячеек награды: переносится; .scroll — лентой вбок (узкое место), не переносится */
.ic-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px; min-width: 0; }
.ic-row.scroll { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; max-width: 100%; padding-bottom: 2px; scrollbar-width: thin; }
.ic-row.scroll::-webkit-scrollbar { height: 5px; }
.ic-row.scroll::-webkit-scrollbar-thumb { background: rgba(86, 98, 116, 0.6); border-radius: 3px; }

/* ячейка с подписью под ней: цена, «осталось N», шанс */
.ic-box { display: inline-flex; flex: none; flex-direction: column; align-items: center; gap: 3px; vertical-align: top; }
.ic-sub {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  font: 700 13px/1.2 var(--sans); color: var(--w-hi, #fff3d0);
}
.ic-sub svg { flex: none; }
.ic-price { display: inline-flex; align-items: center; gap: 2px; }
body.vertical .ic-sub { font-size: var(--fs-min, 16px); }

/* мини-значки в строку (тосты, фразы): кружок цвета редкости и число */
.ic-inl { display: inline-flex; align-items: center; gap: 3px; vertical-align: middle; white-space: nowrap; }
.ic-inl .it-pic {
  position: relative; inset: auto; width: 22px; height: 22px; flex: none; box-sizing: border-box; border-radius: 50%; overflow: hidden;
  border: 1px solid var(--ro); background: linear-gradient(var(--rt), var(--rb));
}
.ic-inl .it-ph { box-shadow: none; background: none; }
.ic-inl .it-ph > svg, .ic-inl .it-ph > img.ico-art { width: 74%; height: 74%; }
.ic-inl b { font-weight: 700; }
.toast.ic-toast .ic-inl { margin: 0 2px; }

/* карточка ячейки (касание, §3 п. 26): крупный значок слева (стоя 128), сколько есть и описание справа (стоя 20),
   действия внизу во всю ширину (стоя 64). Стоя ширина — как у всех всплывающих (css/portrait.css) */
.modal.ic-modal { width: 480px; }
/* лёжа: имя мимо ✕ — поля по 60 с обеих сторон, шрифт 24; не влезло — двумя ровными строками */
body:not(.vertical) .modal.ic-modal > .modal-title { height: auto; min-height: 60px; padding: 6px 60px; font-size: 24px; letter-spacing: 1px; }
body:not(.vertical) .modal.ic-modal > .modal-title > span:first-of-type {
  min-width: 0; text-align: center; line-height: 1.1; overflow-wrap: anywhere; text-wrap: balance;
}
.ic-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); column-gap: 16px; row-gap: 14px; align-items: center; }
.ic-card .it-big { width: 112px; height: 112px; flex: none; }
.ic-card .it-big .it-n { font-size: 20px; right: 8px; bottom: 6px; }
.ic-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ic-own { font-size: 16px; font-weight: 700; color: var(--w-accent, var(--bronze-l)); }
.ic-des { margin: 0; font-size: 16px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.ic-acts { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.ic-acts .btn { width: 100%; white-space: normal; line-height: 1.1; }
body.vertical .ic-card { grid-template-columns: 128px minmax(0, 1fr); column-gap: 20px; row-gap: 18px; }
body.vertical .ic-card .it-big { width: 128px; height: 128px; }
body.vertical .ic-card .it-big .it-n { font-size: 26px; right: 9px; bottom: 6px; }
body.vertical .ic-own, body.vertical .ic-des { font-size: 20px; }
body.vertical .ic-acts { gap: 12px; }
body.vertical .ic-acts .btn { height: 64px; font-size: 24px; }

/* ——— заставка «Получено» (js/itemcell.js showLoot, §3 п. 25; круг 5 — образцы 060, 066) и открытие сундука
   (js/anim/chest.js): тёмный размытый фон над всем экраном; сверху крупная картинка (подарок, сундук) — за ней вращаются
   лучи и светится ореол; лента «Получено» (своя ui.ribbon_received — если нарисована, класс .art); сетка крупных ячеек с
   именами (лёжа 128 до шести в ряд, стоя 156 по четыре), строки «было → стало», подсказка внизу. Окно — без рамки и
   шапки (вес #app — сильнее правил своей графики окон в js/ui.js uiSkins). Классы коробки: .lo-anim — обычное появление
   (CSS: картинка падает, ячейки вылетают по очереди с перелётом масштаба, имена и подсказка — следом), .lo-intro —
   появление ведёт anim/chest.js (что ещё не показано — прозрачно, показанное — .lo-in), .lo-done — итог (лучи вращаются,
   картинка покачивается, подсказка пульсирует, у редких дышит ореол). «Уменьшить движение» — сразу итог; «Эконом» —
   без размытия и вращения лучей ——— */
#app > .modal-wrap.lo-wrap { background: rgba(6, 8, 14, 0.82); cursor: pointer; }
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  #app > .modal-wrap.lo-wrap { background: rgba(6, 8, 14, 0.7); -webkit-backdrop-filter: blur(8px) saturate(0.75); backdrop-filter: blur(8px) saturate(0.75); }
  html:is(.kod-still, .kod-lo) #app > .modal-wrap.lo-wrap { background: rgba(6, 8, 14, 0.84); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
#app .modal.lo-modal {
  position: relative; width: 100%; height: 100%; max-width: none; max-height: none;
  padding: var(--sat, 0px) var(--sar, 0px) var(--sab, 0px) var(--sal, 0px);
  border: 0; border-image: none; border-radius: 0; background: none; box-shadow: none; animation: none; color: #fff;
}
#app .modal.lo-modal > .modal-title { display: none; }
#app .modal.lo-modal > .modal-body { display: flex; padding: 0; overflow: auto; overflow-x: hidden; }
.lo-box {
  position: relative; box-sizing: border-box; width: 100%; min-height: 100%; margin: auto; padding: 22px 24px 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 18px; text-align: center;
}
/* лента — примерно на трети высоты, подсказка — внизу у пальца (образцы 060, 066): свободное место делят поле над
   картинкой (1) и сама подсказка (1.6), её текст прижат к низу */
.lo-box::before { content: ''; flex: 1 1 0; margin-bottom: -18px; }

/* картинка сверху: подарок или сундук, под ней тень (у сундука), за ней ореол цвета награды (--cc) и лучи */
.lo-top {
  position: relative; z-index: 2; flex: none; display: flex; align-items: center; justify-content: center;
  width: 100%; height: 150px; margin-bottom: -14px; pointer-events: none;
}
.lo-art { position: relative; display: block; width: 150px; height: 150px; }
.lo-float, .lo-pic { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.lo-pic img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); opacity: 0; transition: opacity 0.2s; }
.lo-pic img.on { opacity: 1; }
/* закрытый и открытый вид (сундук <слот>_open, подарок ui.gift_box_open): друг над другом; .opened — открытый вместо
   закрытого, но только когда открытый загрузился (.ok — js/itemcell.js revealImgs): иначе закрытый остаётся, пустого
   места нет. Одна картинка (открытой нет) — .opened ничего не прячет */
.lo-pic.two { position: relative; }
.lo-pic.two > img { position: absolute; inset: 0; }
.lo-pic.two img.lo-open.on, .lo-pic.two.ok.opened img.lo-shut.on { opacity: 0; }
.lo-pic.two.ok.opened img.lo-open.on { opacity: 1; }
html:not(.kod-still) .lo-anim .lo-pic.two.opened { animation: lo-open 0.5s cubic-bezier(0.3, 0.7, 0.4, 1.3); }
.lo-svg { display: flex; }
.lo-svg svg { width: 120px; height: 120px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6)); }
.lo-shadow { display: none; }
.lo-chest .lo-shadow {
  display: block; position: absolute; left: 14%; right: 14%; bottom: 0; height: 15%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.62), rgba(0, 0, 0, 0));
}
.lo-back { position: absolute; left: 50%; top: 50%; z-index: -1; width: 0; height: 0; pointer-events: none; } /* лучи и ореол — вокруг середины картинки */
.lo-rays, .lo-glow { position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; }
.lo-rays {
  width: 460px; height: 460px; margin: -230px 0 0 -230px; opacity: 0.85;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 160, 0.6) 0deg 7deg, rgba(255, 230, 160, 0) 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 12%, rgba(0, 0, 0, 0.55) 38%, transparent 68%);
  mask: radial-gradient(circle, #000 12%, rgba(0, 0, 0, 0.55) 38%, transparent 68%);
}
.lo-glow {
  width: 250px; height: 250px; margin: -125px 0 0 -125px; opacity: 0.6;
  background: radial-gradient(circle, rgba(255, 248, 222, 0.95) 0%, var(--cc, #ffd77a) 30%, rgba(255, 200, 90, 0) 68%);
}

/* лента: синяя полоса с бронзовым кантом и загнутыми концами; заголовок 28 (стоя 38) с обводкой */
.lo-ribbon { position: relative; z-index: 1; display: flex; justify-content: center; width: min(600px, 90%); }
.lo-ribbon > b {
  position: relative; z-index: 1; display: block; width: 100%; box-sizing: border-box; padding: 13px 44px; border-radius: 6px;
  background: linear-gradient(#6a9ee0 0%, #3d6db4 52%, #2c5596 100%); border: 3px solid #e2b866;
  box-shadow: 0 4px 0 #1d3762, 0 10px 22px rgba(0, 0, 0, 0.5), inset 0 2px 0 rgba(255, 255, 255, 0.35);
  font: 700 28px/1.15 var(--sans); color: #fff; letter-spacing: 0; text-shadow: 0 2px 0 #13284a, 0 0 3px #13284a;
}
.lo-ribbon::before, .lo-ribbon::after {
  content: ''; position: absolute; top: 14px; bottom: -12px; width: 50px; z-index: 0; box-sizing: border-box;
  background: linear-gradient(#3e6db0, #23467e); border: 3px solid #c99a4a;
}
.lo-ribbon::before { left: -30px; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, 34% 50%); }
.lo-ribbon::after { right: -30px; clip-path: polygon(0 0, 100% 0, 66% 50%, 100% 100%, 0 100%); }
.lo-ribbon.art::before, .lo-ribbon.art::after { display: none; }
.lo-ribbon.art > b { border-color: transparent; box-shadow: none; border-radius: 0; padding-inline: 70px; }

.lo-rows { display: flex; flex-direction: column; gap: 10px; width: min(560px, 100%); }
.lo-row {
  display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; border-radius: 10px;
  background: rgba(16, 24, 38, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  font: 700 18px/1.2 var(--sans); text-shadow: 0 1px 2px #000;
}
.lo-row > span { flex: 1; min-width: 0; text-align: start; color: #d6e2f0; }
.lo-row .lo-from { color: #c9d3de; }
.lo-row .lo-to { color: #8ff09c; font-size: 22px; }
.lo-row :is(svg, img.ico-art) { flex: none; }
[dir=rtl] .lo-row :is(svg, img.ico-art) { transform: scaleX(-1); } /* справа налево «было → стало» идёт справа: стрелка — по ходу */

/* сетка: лёжа ячейки 128 до шести в ряд, стоя 156 по четыре; под ячейкой имя — до трёх строк (длинное — мельче); за ячейкой — ореол цвета
   редкости (--rc), при появлении — вспышка и блик по ячейке */
.lo-grid {
  --lo-ic: 128px; --lo-w: 136px; display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 16px;
  max-width: calc(var(--cols, 6) * var(--lo-w) + (var(--cols, 6) - 1) * 16px);
}
.lo-it { --rc: #c8d2dc; position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; width: var(--lo-w); }
.lo-it.r2 { --rc: #7ad35a; }
.lo-it.r3 { --rc: #4fc0ff; }
.lo-it.r4 { --rc: #d07cff; }
.lo-it.r5 { --rc: #ffb43c; }
.lo-it.r6 { --rc: #ff5a4a; }
.lo-it::before {
  content: ''; position: absolute; left: 50%; top: calc(var(--lo-ic) / 2); z-index: 0; pointer-events: none;
  width: calc(var(--lo-ic) * 1.55); height: calc(var(--lo-ic) * 1.55); margin: calc(var(--lo-ic) * -0.775) 0 0 calc(var(--lo-ic) * -0.775);
  border-radius: 50%; background: radial-gradient(closest-side, var(--rc), rgba(0, 0, 0, 0)); opacity: 0.42;
}
.lo-it.r1::before { opacity: 0.22; }
.lo-grid .ic-cell.lo-cell { --ic: var(--lo-ic); position: relative; z-index: 1; border-radius: 16px; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45); }
.lo-grid .ic-cell.lo-cell.art { box-shadow: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.45)); }
.lo-grid .it-tile.ic-cell .it-n { font-size: 28px; right: 8px; bottom: 5px; }
.lo-grid .it-tile.ic-cell .it-tag { font-size: 18px; left: 5px; top: 5px; padding: 0 5px; }
.lo-grid .it-tile.ic-cell :is(.it-n, .it-tag):is(.n7, .n8, .n9, .n10) { font-size: 20px; }
.lo-cell::after { /* блик: светлая полоса пробегает по ячейке, когда она встала */
  content: ''; position: absolute; top: -20%; bottom: -20%; left: -60%; width: 45%; z-index: 2; pointer-events: none; opacity: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0));
  transform: translateX(0) skewX(-14deg);
}
.lo-nm {
  position: relative; z-index: 1; max-width: 100%; font: 700 16px/1.2 var(--sans); color: #fff; text-shadow: 0 1px 0 #000, 0 0 3px #000, 0 0 6px #000;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; overflow-wrap: anywhere;
}
/* длинное имя (больше 20 знаков, itemcell.js showLoot) — мельче: «Карта великого драконьего клада» целиком (стоя 22 px в
   две строки резали 5 из 6 самых длинных имён); короткие — как были (до трёх строк — только запас) */
.lo-nm.lo-long { font-size: 14px; line-height: 1.15; }
.lo-hint {
  flex: 1.6 1 auto; display: flex; align-items: flex-end; justify-content: center; margin: 0; padding-top: 6px;
  font: 700 18px/1.3 var(--sans); color: #eef3f8; text-shadow: 0 1px 2px #000, 0 0 6px #000;
}
/* вспышка раскрытия сундука и монеты (js/anim/chest.js): свой слой поверх всей заставки, во весь экран */
.lo-fx { position: absolute; inset: 0; z-index: 7; overflow: hidden; pointer-events: none; }
.lo-flash {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 44%, #fff 0%, rgba(255, 252, 238, 0.95) 28%, rgba(255, 238, 196, 0.6) 66%, rgba(255, 222, 160, 0.35));
}
.lo-coin {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 36% 30%, #fffbe0 0%, #ffe07a 22%, #e8a92a 62%, #a8660c 100%);
  box-shadow: inset 0 0 0 3px rgba(255, 236, 160, 0.85), inset 0 -3px 4px rgba(120, 60, 0, 0.5), 0 0 8px rgba(255, 200, 80, 0.75);
}
.lo-it.lo-fly { z-index: 5; }

/* стоя: картинка 250, лучи 760, лента 38, ячейки 156 по четыре (на телефоне 412 — около 90 px), имена 22, подсказка 24 */
body.vertical .lo-box { gap: 26px; padding: 56px 20px 44px; }
body.vertical .lo-box::before { margin-bottom: -26px; }
body.vertical .lo-top { height: 250px; margin-bottom: -22px; }
body.vertical .lo-art { width: 250px; height: 250px; }
body.vertical .lo-svg svg { width: 190px; height: 190px; }
body.vertical .lo-rays { width: 760px; height: 760px; margin: -380px 0 0 -380px; }
body.vertical .lo-glow { width: 400px; height: 400px; margin: -200px 0 0 -200px; }
body.vertical .lo-ribbon { width: min(640px, 90%); }
body.vertical .lo-ribbon > b { font-size: 38px; padding: 18px 48px; }
body.vertical .lo-ribbon::before, body.vertical .lo-ribbon::after { top: 18px; bottom: -14px; width: 56px; }
body.vertical .lo-ribbon::before { left: -34px; }
body.vertical .lo-ribbon::after { right: -34px; }
body.vertical .lo-grid { --lo-ic: 156px; --lo-w: 160px; max-width: calc(var(--pcols, 4) * 160px + (var(--pcols, 4) - 1) * 12px); gap: 26px 12px; }
body.vertical .lo-grid .it-tile.ic-cell .it-n { font-size: 34px; right: 10px; bottom: 6px; }
body.vertical .lo-grid .it-tile.ic-cell .it-tag { font-size: 22px; left: 6px; top: 6px; }
body.vertical .lo-grid .it-tile.ic-cell :is(.it-n, .it-tag):is(.n7, .n8, .n9, .n10) { font-size: 24px; letter-spacing: -0.5px; }
body.vertical .lo-nm { font-size: 22px; }
body.vertical .lo-nm.lo-long { font-size: 19px; }
body.vertical .lo-row { font-size: var(--fs-body); padding: 14px 18px; }
body.vertical .lo-row .lo-to { font-size: var(--fs-num); }
body.vertical .lo-hint { font-size: 24px; }
body.vertical .lo-coin { width: 42px; height: 42px; margin: -21px 0 0 -21px; }

/* обычное появление (.lo-anim): картинка падает с отскоком, лента — следом, ячейки — по одной (--d0 + --i × --st),
   имя — когда ячейка встала, подсказка — после последней */
html:not(.kod-still) .lo-anim .lo-top { animation: lo-fade 0.3s ease-out both; }
html:not(.kod-still) .lo-anim .lo-art { animation: lo-top-in 0.62s cubic-bezier(0.25, 0.8, 0.35, 1.2) both; }
html:not(.kod-still) .lo-anim .lo-ribbon { animation: lo-drop 0.42s 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
html:not(.kod-still) .lo-anim .lo-row { animation: lo-pop 0.42s cubic-bezier(0.3, 0.7, 0.4, 1) both; animation-delay: calc(0.32s + var(--j, 0) * 0.08s); }
html:not(.kod-still) .lo-anim .lo-it > .lo-cell { animation: lo-pop 0.55s cubic-bezier(0.3, 0.7, 0.4, 1) both; animation-delay: calc(var(--d0) + var(--i) * var(--st)); }
html:not(.kod-still) .lo-anim .lo-it::before { animation: lo-halo 0.75s ease-out both; animation-delay: calc(var(--d0) + var(--i) * var(--st) + 0.12s); }
html:not(.kod-still) .lo-anim .lo-cell::after { animation: lo-shine 0.65s ease-out both; animation-delay: calc(var(--d0) + var(--i) * var(--st) + 0.32s); }
html:not(.kod-still) .lo-anim .lo-nm { animation: lo-fade 0.3s ease-out both; animation-delay: calc(var(--d0) + var(--i) * var(--st) + 0.22s); }
html:not(.kod-still) .lo-anim .lo-hint { animation: lo-fade 0.4s ease-out both; animation-delay: calc(var(--d0) + var(--n) * var(--st) + 0.45s); }
/* сундук (.lo-intro): ещё не показанное прозрачно; лучи и ореол проявляются, когда он раскрылся */
.lo-intro :is(.lo-rays, .lo-glow, .lo-ribbon, .lo-row, .lo-it, .lo-hint):not(.lo-in) { opacity: 0; }
.lo-intro :is(.lo-rays, .lo-glow) { transition: opacity 0.45s ease-out, transform 0.25s ease-out; }
.lo-intro .lo-it:not(.lo-hit)::before { opacity: 0; }
html:not(.kod-still) .lo-intro .lo-it.lo-hit::before { animation: lo-halo 0.75s ease-out both; }
html:not(.kod-still) .lo-intro .lo-it.lo-hit .lo-cell::after { animation: lo-shine 0.65s 0.12s ease-out both; }
/* всегда (кроме «уменьшить движение»): лучи вращаются (не на «Экономе»), картинка покачивается и ореол дышит — когда
   появление кончилось (у сундука) или сразу (подарок); подсказка в итоге мягко пульсирует, ореол редких (4–6) дышит */
html:not(.kod-still):not(.kod-lo) .lo-rays { animation: lo-spin 16s linear infinite; }
html:not(.kod-still) .lo-box:not(.lo-intro) .lo-float { animation: lo-float 3.2s 0.6s ease-in-out infinite; }
html:not(.kod-still):not(.kod-lo) .lo-box:not(.lo-intro) .lo-glow { animation: lo-glow 2.6s ease-in-out infinite; }
html:not(.kod-still) .lo-done .lo-hint { animation: lo-pulse 1.8s ease-in-out infinite; }
html:not(.kod-still):not(.kod-lo) .lo-done .lo-it:is(.r4, .r5, .r6)::before { animation: lo-breathe 2.2s ease-in-out infinite; }
@keyframes lo-fade { from { opacity: 0; } }
@keyframes lo-top-in {
  0% { transform: translateY(-70px) scale(0.35); opacity: 0; }
  55% { transform: translateY(6px) scale(1.12); opacity: 1; }
  78% { transform: translateY(0) scale(0.96); }
  100% { transform: none; opacity: 1; }
}
@keyframes lo-drop { from { transform: translateY(-40px) scale(0.8); opacity: 0; } }
@keyframes lo-pop {
  0% { transform: scale(0.2) rotate(-12deg); opacity: 0; }
  40% { transform: scale(1.22) rotate(3deg); opacity: 1; }
  62% { transform: scale(0.93) rotate(-1deg); }
  80% { transform: scale(1.05); }
  100% { transform: none; opacity: 1; }
}
@keyframes lo-halo {
  0% { transform: scale(0.3); opacity: 0; }
  35% { transform: scale(1.3); opacity: 1; }
  100% { transform: none; }
}
@keyframes lo-shine {
  0% { opacity: 0; transform: translateX(0) skewX(-14deg); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(430%) skewX(-14deg); }
}
@keyframes lo-open { 0% { transform: scale(1.16); } 30% { transform: scale(1.26, 0.86); } 60% { transform: scale(0.95, 1.07); } 100% { transform: none; } }
@keyframes lo-spin { to { transform: rotate(360deg); } }
@keyframes lo-float { 50% { transform: translateY(-8px); } }
@keyframes lo-glow { 50% { transform: scale(1.08); opacity: 0.8; } }
@keyframes lo-pulse { 50% { opacity: 0.45; } }
@keyframes lo-breathe { 50% { transform: scale(1.12); opacity: 0.7; } }

/* ——— показ одной награды и награды «сама пришла» (js/itemcell.js rewardShow, 07.11) ———
   .rw-mini — «Получено» компактно: одна награда, а её плашки на экране нет (окно поверх шапки). В середине экрана над
   окнами (z 110 — выше окон и тостов, ниже диалогов сюжета), без затемнения, касания идут сквозь: лента «Получено»
   (своя ui.ribbon_received — как в заставке), ячейка 124 (стоя 156) с ореолом и лучами цвета редкости, имя. Ячейка
   ждёт значок, что летит из кнопки (.rw-landed — долетел: выскакивает с бликом). Гаснет сама через ~1,9 с.
   .rw-band — награда пришла сама (quiet: дозор, обоз): лента сверху под шапкой — надпись и ячейки 60 (стоя 76),
   въезжает сверху, ячейки выскакивают по одной, через 2,5 с уезжает. Лучи крутятся один оборот за время жизни карточки
   (не бесконечно); «Уменьшить движение» — без движения, «Эконом» — лучи стоят */
#app > .rw-mini {
  --rc: #c8d2dc; position: absolute; left: 50%; top: 46%; z-index: 110; transform: translate(-50%, -50%); pointer-events: none;
  display: flex; flex-direction: column; align-items: center; gap: 16px; width: 600px; max-width: 94%; text-align: center; color: #fff;
}
/* тёмное пятно позади — лучи, ореол и лента читаются на любом окне (светлом листе, сцене замка) */
.rw-mini::before {
  content: ''; position: absolute; left: 50%; top: 50%; z-index: -1; width: 780px; height: 600px; margin: -300px 0 0 -390px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(10, 14, 26, 0.88) 0%, rgba(10, 14, 26, 0.76) 46%, rgba(10, 14, 26, 0.34) 76%, rgba(10, 14, 26, 0));
}
body.vertical .rw-mini::before { width: 760px; height: 720px; margin: -360px 0 0 -380px; }
html:not(.kod-still) .rw-mini.rw-anim::before { animation: lo-fade 0.3s ease-out both; }
.rw-mini.r2 { --rc: #7ad35a; }
.rw-mini.r3 { --rc: #4fc0ff; }
.rw-mini.r4 { --rc: #d07cff; }
.rw-mini.r5 { --rc: #ffb43c; }
.rw-mini.r6 { --rc: #ff5a4a; }
.rw-mini .lo-ribbon { z-index: 2; width: auto; min-width: 300px; max-width: 100%; }
.rw-mini .lo-ribbon > b { font-size: 26px; padding: 10px 40px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rw-mini .lo-ribbon::before, .rw-mini .lo-ribbon::after { top: 11px; bottom: -10px; width: 40px; }
.rw-mini .lo-ribbon::before { left: -24px; }
.rw-mini .lo-ribbon::after { right: -24px; }
.rw-mini .lo-ribbon.art > b { padding-inline: 58px; }
.rw-cellbox { position: relative; z-index: 1; display: flex; justify-content: center; }
.rw-halo { position: absolute; left: 50%; top: 50%; z-index: -1; width: 0; height: 0; pointer-events: none; }
.rw-halo > i { position: absolute; left: 0; top: 0; border-radius: 50%; }
.rw-rays {
  width: 420px; height: 420px; margin: -210px 0 0 -210px; opacity: 0.8;
  background: repeating-conic-gradient(from 0deg, rgba(255, 230, 160, 0.55) 0deg 7deg, rgba(255, 230, 160, 0) 7deg 22.5deg);
  -webkit-mask: radial-gradient(circle, #000 14%, rgba(0, 0, 0, 0.5) 38%, transparent 66%);
  mask: radial-gradient(circle, #000 14%, rgba(0, 0, 0, 0.5) 38%, transparent 66%);
}
.rw-glow { width: 280px; height: 280px; margin: -140px 0 0 -140px; opacity: 0.7; background: radial-gradient(circle, rgba(255, 248, 222, 0.92) 0%, var(--rc) 32%, rgba(0, 0, 0, 0) 68%); }
.rw-mini .ic-cell.rw-cell { --ic: 124px; position: relative; border-radius: 16px; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); }
.rw-mini .ic-cell.rw-cell.art { box-shadow: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5)); }
.rw-nm {
  position: relative; z-index: 1; max-width: 100%; font: 700 20px/1.2 var(--sans); color: #fff;
  text-shadow: 0 1px 0 #000, 0 0 3px #000, 0 0 8px #000; overflow-wrap: anywhere;
}
body.vertical #app > .rw-mini { top: 44%; gap: 22px; }
body.vertical .rw-mini .lo-ribbon > b { font-size: 34px; padding: 14px 46px; }
body.vertical .rw-mini .lo-ribbon.art > b { padding-inline: 64px; }
body.vertical .rw-mini .ic-cell.rw-cell { --ic: 156px; }
body.vertical .rw-rays { width: 560px; height: 560px; margin: -280px 0 0 -280px; }
body.vertical .rw-glow { width: 360px; height: 360px; margin: -180px 0 0 -180px; }
body.vertical .rw-nm { font-size: 26px; }
body.phone-land .rw-nm { font-size: var(--fs-sub, 22px); }
/* ждёт значок: ячейка и имя прозрачны; долетел (.rw-landed) — выскакивают, по ячейке пробегает блик */
.rw-mini:not(.rw-landed) :is(.rw-cell, .rw-nm) { opacity: 0; }
html:not(.kod-still) .rw-anim .lo-ribbon { animation: lo-drop 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
html:not(.kod-still) .rw-anim .rw-halo { animation: rw-halo 0.55s ease-out both; }
html:not(.kod-still):not(.kod-lo) .rw-anim .rw-rays { animation: lo-spin 7s linear; }
html:not(.kod-still) .rw-anim.rw-landed .rw-cell { animation: lo-pop 0.55s cubic-bezier(0.3, 0.7, 0.4, 1) both; }
html:not(.kod-still) .rw-anim.rw-landed .rw-cell::after { animation: lo-shine 0.65s 0.28s ease-out both; }
html:not(.kod-still) .rw-anim.rw-landed .rw-nm { animation: lo-fade 0.3s 0.18s ease-out both; }
@keyframes rw-halo { from { transform: scale(0.2); opacity: 0; } }

/* лента «награда пришла сама»: синяя плашка с бронзовым кантом (как лента «Получено»), надпись и ячейки */
#app > .rw-band {
  position: absolute; left: 50%; top: calc(var(--sat, 0px) + 92px); z-index: 110; transform: translateX(-50%); pointer-events: none;
  display: flex; align-items: center; gap: 16px; box-sizing: border-box; max-width: 94%; padding: 8px 22px 8px 26px; border-radius: 14px;
  background: linear-gradient(#5e93d8 0%, #3a68ae 48%, #24467e 100%); border: 3px solid #e2b866;
  box-shadow: 0 5px 0 #162f58, 0 12px 26px rgba(0, 0, 0, 0.55), inset 0 2px 0 rgba(255, 255, 255, 0.32);
  color: #fff; white-space: nowrap;
}
.rw-band .rw-bt { flex: none; max-width: 360px; overflow: hidden; text-overflow: ellipsis; font: 700 24px/1.2 var(--sans); text-shadow: 0 2px 0 #13284a, 0 0 3px #13284a; }
.rw-band .rw-bc { display: flex; align-items: center; gap: 8px; }
.rw-band .rw-bi { display: flex; }
.rw-band .ic-cell.rw-bcell { --ic: 60px; box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4); }
.rw-band .rw-more { font: 700 22px/1 var(--sans); color: #ffe39a; text-shadow: 0 2px 0 #13284a; }
body.vertical #app > .rw-band { top: calc(var(--sat, 0px) + 128px); flex-direction: column; gap: 10px; min-width: 420px; padding: 12px 26px 14px; }
body.vertical .rw-band .rw-bt { max-width: 100%; font-size: 30px; }
body.vertical .rw-band .rw-bc { gap: 12px; }
body.vertical .rw-band .ic-cell.rw-bcell { --ic: 88px; }
body.phone-land .rw-band .ic-cell.rw-bcell { --ic: 72px; }
body.phone-land .rw-band .rw-bt { font-size: var(--fs-sub, 22px); }
html:not(.kod-still) .rw-band.rw-anim { animation: rw-band-in 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
html:not(.kod-still) .rw-band.rw-anim .rw-bi { animation: lo-pop 0.5s cubic-bezier(0.3, 0.7, 0.4, 1) both; animation-delay: calc(0.2s + var(--i, 0) * 0.07s); }
@keyframes rw-band-in { from { transform: translateX(-50%) translateY(-44px) scale(0.92); opacity: 0; } }

/* значок, что летит из кнопки в плашку (js/anim/fly.js flyPic; слой полёта — на body, px экрана): картинка ячейки во
   весь свой квадрат; класс свой (.rw-fic): у .rw-ic окна «Ресурсы» стоя 100×100 (css/hud.css) */
.fly-pic .rw-fic { position: relative; display: block; width: 100%; height: 100%; }
.fly-pic .rw-fic > .it-pic { inset: 0; }

/* ——— «Задания» (screens/city.js openQuests, круг 5): сундуки шкалы активности — своей картинкой ui.quest_chest_1…5
   (.q-chest.art; готовый светится и подпрыгивает, взятый — бледнее с зелёной галочкой), награды строк — крупными ячейками
   (стоя 84 — четыре в строке, готовый сундук и главы — 104, лёжа на телефоне 76 / 84); письма — ячейки вложений 112 (лёжа 88) ——— */
.q-chest.art {
  z-index: 1; width: 60px; height: 60px; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible;
}
.q-chest.art > img.q-chest-pic { width: 100%; height: 100%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.45)); }
.q-chest.art.ready { background: none; border: 0; box-shadow: none; }
.q-chest.art.ready::before {
  content: ''; position: absolute; inset: -34%; z-index: -1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 232, 150, 0.95), rgba(255, 190, 60, 0.45) 55%, rgba(255, 190, 60, 0));
}
html:not(.kod-still) .q-chest.art.ready > img.q-chest-pic { animation: q-chest-hop 1.6s ease-in-out infinite; }
html:not(.kod-still):not(.kod-lo) .q-chest.art.ready::before { animation: lo-glow 1.6s ease-in-out infinite; }
.q-chest.art.claimed { opacity: 1; }
.q-chest.art.claimed > img.q-chest-pic { opacity: 0.6; filter: grayscale(0.7) brightness(0.9); }
.q-chest-ok {
  position: absolute; right: -6px; bottom: 0; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 50%; background: #2f9a4a; box-shadow: 0 0 0 2px #fff, 0 2px 4px rgba(0, 0, 0, 0.5);
}
.q-chest.art i { top: 58px; font-weight: 700; }
.q-act:has(.q-chest.art) > span { margin-bottom: 30px; }
.q-track:has(.q-chest.art) { margin-bottom: 44px; }
body.vertical .q-chest.art { width: 88px; height: 88px; }
body.vertical .q-chest-ok { width: 36px; height: 36px; }
body.vertical .q-chest-ok :is(svg, img) { width: 26px; height: 26px; }
body.vertical .q-chest.art i { top: 86px; font-size: 20px; }
body.vertical .q-act:has(.q-chest.art) > span { margin-bottom: 48px; }
body.vertical .q-track:has(.q-chest.art) { margin-bottom: 76px; }
body.phone-land .q-chest.art { width: 76px; height: 76px; }
body.phone-land .q-chest.art i { top: 74px; font-size: 16px; }
body.phone-land .q-act:has(.q-chest.art) > span { margin-bottom: 40px; }
body.phone-land .q-track:has(.q-chest.art) { margin-bottom: 64px; }
@keyframes q-chest-hop {
  0%, 55%, 100% { transform: none; }
  65% { transform: translateY(-10%) rotate(-6deg) scale(1.06); }
  75% { transform: translateY(0) rotate(5deg) scale(1.06); }
  85% { transform: rotate(-3deg); }
}
/* награды: строки дел дня, готовый сундук, главы и постройки; вложения писем */
.q-task .q-rw .ic-cell { --ic: 56px; }
body.vertical .q-task .q-rw .ic-cell { --ic: 84px; } /* четыре видны в строке рядом с «Пойти», дальше — лентой вбок */
body.vertical .q-task .q-rw .ic-row { gap: 8px; }
body.vertical :is(.q-ready, .q-ch-reward) .ic-cell { --ic: 104px; }
body.vertical .q-side .rw .ic-cell { --ic: 96px; }
body.vertical .ml-loot .ic-cell { --ic: 112px; }
body.vertical .ml-loot { gap: 10px 14px; }
body.phone-land .q-task .q-rw .ic-cell { --ic: 76px; }
body.phone-land :is(.q-ready, .q-ch-reward, .q-side .rw) .ic-cell { --ic: 84px; }
body.phone-land .ml-loot .ic-cell { --ic: 88px; }

/* сетка товаров лавок: ячейка, под ней цена и предел, ниже — прежние кнопки покупки */
.ic-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ic-good {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; min-width: 0; text-align: center;
  border-radius: 10px; background: var(--w-well, rgba(0, 0, 0, 0.22));
}
.ic-good > b { font-size: 14px; line-height: 1.2; color: var(--w-hi, #fff3d0); overflow-wrap: anywhere; }
.ic-good .ic-note { font-size: 13px; color: var(--w-muted, var(--muted)); }
.ic-good .ic-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: auto; }
.ic-good.off { opacity: 0.6; }
body.vertical .ic-shop { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); }
body.vertical .ic-good > b { font-size: var(--fs-sub, 18px); }
body.vertical .ic-good .ic-note { font-size: var(--fs-min, 16px); }

/* ——— где ряд ячеек встал на место прежней строки наград ——— */
.mon-loot:has(.ic-row) { align-items: center; }
.sh-free:has(.ic-row) { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ic-req .ic-row { justify-content: flex-end; }
.rep-loot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.rep-loot > .t { font-weight: 700; }
.hz-res-dup .ic-row { flex: 1; }
.ev-tier:has(> .lt .ic-row) > b { min-width: 112px; } /* места и пороги одной ширины — ряды ячеек встают ровно */
.sh-cday .ic-row { gap: 4px; }
.tbl td .ic-row { gap: 4px; }
.od-nm:has(.ic-row) { display: inline-flex; align-items: center; gap: 8px; }
.tbl tr:has(.od-nm .ic-row) > td { vertical-align: middle; }
/* «Шансы» подарков альянса: что лежит всегда — рядом ячеек над таблицей с шансом */
.od-always { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 6px 0 8px; }
.od-always > b { font-size: 15px; color: var(--w-accent, var(--bronze-l)); }
body.vertical .od-always > b { font-size: var(--fs-sub, 18px); }

/* строки списков, где значок стал ячейкой: ячейка не растягивается правилами строк вида «.row span { flex: 1 }» */
:is(.rd-tk, .dg-feed, .gr-lr, .sp-item, .hz-book, .ic-use) > .ic-cell { flex: none; }
.ic-use { display: inline-flex; align-items: center; gap: 6px; } /* ячейка предмета из сумки и «Использовать» рядом */
.hz-kv b.hz-kv-loot { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; } /* награда ступени испытания */
.hz-kv > span:has(+ .hz-kv-loot) { align-self: center; }
.gr-mat-nm { display: flex; align-items: center; gap: 8px; min-width: 0; } /* Кузница: материал, руна, камень — ячейка и имя */
.gr-mat-nm > i { font-style: normal; min-width: 0; overflow-wrap: anywhere; }
.gr-chest-h > .ic-cell { flex: none; }
.gr-rpick > .ic-cell { grid-row: span 2; }
/* итог ручного боя арены (screens/puzzle.js): знаки арены — ячейкой, рядом — сколько с камней «Знак» */
.pz-end .pz-loot { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 8px 0 4px; font: 700 15px/1.3 var(--sans); }
body.vertical .pz-end .pz-loot { font-size: var(--fs-sub, 18px); }

/* ——— лёжа на телефоне (body.phone-land, js/ui.js fitStage: сцена мельче 3/4, около 0,57): ячейка 56 (малая 44) с
   ярлыком 9–11 и числом 12–15 выходила в 5–9 css px. Ячейки крупнее — 72 / 60 / 88, число и ярлык не мельче 16 (как
   стоя: длинная подпись — 16 и теснее). Размер — через :where (вес одного класса): свои размеры окон (.rk-prize,
   body.phone-land .rd-tk и т. п.) и размер из кода (style --ic) остаются в силе. Подписи товаров лавок 17 / 16, карточка
   ячейки 18, имена в «Получено» 17. На планшете и ПК лёжа и стоя — как было ——— */
:where(body.phone-land) .ic-cell { --ic: 72px; }
:where(body.phone-land) .ic-cell.ic-s { --ic: 60px; }
:where(body.phone-land) .ic-cell.ic-l { --ic: 88px; }
body.phone-land .it-tile.ic-cell .it-n { font-size: max(16px, calc(var(--ic) * 0.27)); }
body.phone-land .it-tile.ic-cell .it-tag { font-size: max(16px, calc(var(--ic) * 0.2)); line-height: 1.25; }
body.phone-land .it-tile.ic-cell :is(.it-n, .it-tag):is(.n7, .n8, .n9, .n10) { font-size: 16px; letter-spacing: -0.5px; }
body.phone-land .it-tile.ic-cell .it-n:is(.n9, .n10) { right: 1px; max-width: calc(100% - 2px); letter-spacing: -0.8px; }
body.phone-land .it-tile.ic-cell .it-tag:is(.n7, .n8, .n9, .n10) { left: 0; max-width: 100%; padding: 0 1px; }
body.phone-land .ic-sub { font-size: 16px; }
body.phone-land .ic-shop { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
body.phone-land .ic-good > b { font-size: var(--fs-sub); }
body.phone-land .ic-good .ic-note { font-size: 16px; }
body.phone-land .ic-own, body.phone-land .ic-des { font-size: 18px; }
body.phone-land .ic-card .it-big .it-n { font-size: 22px; }
body.phone-land .lo-nm { font-size: var(--fs-sub); }
body.phone-land .lo-nm.lo-long { font-size: var(--fs-min, 16px); }
body.phone-land .od-always > b { font-size: var(--fs-sub); }
body.phone-land .pz-end .pz-loot { font-size: var(--fs-sub); }
