/* Снаряжение героев и Кузница (js/screens/gear.js, этап 7). Приставка gr-; вкладки, отметки и шансы — классы rd-
   из css/residents.css. Размеры — в пикселях сцены 1280×720; стоя (docs/UI_PLAN.md §3 п. 28–29) — блок body.vertical в
   конце: строки вещей 132, картинка вещи 112, имя 26, кнопка 150×56; плитки Кузницы 4 в ряд; текст не мельче 16.
   Вещь — своей картинкой (items.gear_<id>) в рамке редкости — ячейка сумки (css/itemcell.css .it-tile, рамка
   ui.rarity_<N>), закалка «+N» — слева сверху; пустое место — картинкой места (ui.slot_<место>). Места у портрета героя
   (.gr-places — разметка gear.js gearSlotsHtml) — здесь же, крупно: лёжа 88, стоя 128 (образец — скрин 095); прежние
   правила .gr-slots в css/heroes.css больше ни к чему не относятся. */

.gr-modal .note { color: var(--muted); font-size: 14px; line-height: 1.35; margin: 6px 0; }
.gr-modal .sect { margin: 14px 0 8px; display: flex; align-items: baseline; gap: 8px; }
.gr-cnt { font-family: var(--sans); font-size: 15px; color: var(--muted); font-weight: 400; }

/* картинка вещи или места (gear.js pic): появляется, когда загрузилась; уже виденные — сразу (класс on в разметке) */
.gr-pic { opacity: 0; transition: opacity 0.28s ease-out; }
.gr-pic.on { opacity: 1; }
html.kod-still .gr-pic { transition: none; }

/* вещь: рамка редкости (.it-tile .r<N> — css/itemcell.css; нарисованная — фоном), картинка вещи, «+N» закалки */
.gr-face.it-tile { position: relative; width: 60px; height: 60px; flex-shrink: 0; border-radius: 12px; }
.gr-face > :is(img.gr-pic, img.lk-gear) {
  position: absolute; left: 8%; top: 8%; width: 84%; height: 84%; object-fit: contain; pointer-events: none;
  filter: drop-shadow(0 2px 2px rgba(8, 12, 20, 0.6));
}
.gr-face > svg { position: absolute; left: 25%; top: 25%; width: 50%; height: 50%; }
.gr-face .gr-lv {
  position: absolute; left: 3px; top: 3px; z-index: 2; padding: 0 5px; border-radius: 7px; font: 700 13px/18px var(--sans);
  font-style: normal; color: #fff3d0; background: rgba(10, 14, 22, 0.8); white-space: nowrap; letter-spacing: 0;
}
/* пустое место в строке — картинка места во всю ячейку */
.gr-face.gr-none { position: relative; width: 60px; height: 60px; flex-shrink: 0; border-radius: 12px; background: rgba(61, 110, 158, 0.25); }
.gr-face.gr-none > img.gr-pic { position: absolute; inset: 0; width: 100%; height: 100%; filter: none; }
.gr-face.gr-none > svg { opacity: 0.8; }
/* надели, закалили — вещь «прыгает» */
.gr-pop { animation: grPop 0.5s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes grPop { 0% { transform: scale(0.6); } 60% { transform: scale(1.1); } 100% { transform: scale(1); } }
.gr-pop .gr-lv { animation: grLv 0.9s ease-out; }
@keyframes grLv { 0%, 30% { transform: scale(1.6); background: #c08a3e; } 100% { transform: scale(1); } }
html.kod-still .gr-pop, html.kod-still .gr-pop .gr-lv { animation: none; }

/* ——— шесть мест у портрета героя (карточка героя css/heroes.css .hz-hero): три слева, три справа. Сторона места
   --gs — сколько позволяет высота портрета над плашкой имени (cqh — высота .hz-hero): лёжа до 88, стоя до 128 (во
   вкладках «Звёзды», «Навыки», «Снаряжение» портрет ниже — места мельче, но не налезают на имя и ‹ ›) ——— */
.hz-hero { --gs: 88px; }
@supports (width: 1cqh) {
  .hz-hero { container-type: size; --gs: clamp(64px, calc((100cqh - 140px) / 3), 88px); }
  body.vertical .hz-hero { --gs: clamp(80px, calc((100cqh - 170px) / 3), 128px); }
  body.phone-land .hz-hero { --gs: clamp(64px, calc((100cqh - 140px) / 3), 96px); }
}
.hz-hero .gr-places {
  position: absolute; z-index: 1; top: 10px; left: 10px; right: 10px; display: grid; grid-template-columns: repeat(2, var(--gs));
  grid-template-rows: repeat(3, var(--gs)); grid-auto-flow: column; justify-content: space-between; gap: 10px; pointer-events: none;
}
.gr-place {
  position: relative; display: block; padding: 0; border: 0; border-radius: 14px; background: none; cursor: pointer; pointer-events: auto;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5); -webkit-tap-highlight-color: transparent; transition: transform 0.1s;
}
.gr-place:active { transform: scale(0.94); }
.gr-place:focus-visible { outline: 3px solid #ffd75e; outline-offset: 2px; }
.gr-place > .gr-face.it-tile { width: 100%; height: 100%; border-radius: inherit; }
.gr-place > .gr-face .gr-lv { font-size: 15px; line-height: 20px; }
.gr-place.empty { background: rgba(16, 20, 28, 0.5); } /* подложка, пока картинка места грузится */
.gr-place.empty > img.gr-pic { position: absolute; inset: 0; width: 100%; height: 100%; }
.gr-place.empty > svg { position: absolute; left: 28%; top: 28%; width: 44%; height: 44%; }
/* эпическая и выше — блик пробегает по вещи (не при «уменьшить движение» и на ступени «Эконом») */
.gr-place:is(.r4, .r5, .r6) > .gr-face::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; transform: translateX(-130%);
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.5) 50%, transparent 68%);
  animation: grGlint 4.6s ease-in-out infinite;
}
.gr-place:nth-child(2) > .gr-face::after { animation-delay: 0.7s; }
.gr-place:nth-child(3) > .gr-face::after { animation-delay: 1.4s; }
.gr-place:nth-child(4) > .gr-face::after { animation-delay: 2.1s; }
.gr-place:nth-child(5) > .gr-face::after { animation-delay: 2.8s; }
.gr-place:nth-child(6) > .gr-face::after { animation-delay: 3.5s; }
@keyframes grGlint { 0%, 72% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
html.kod-still .gr-place > .gr-face::after, html.kod-lo .gr-place > .gr-face::after { content: none; animation: none; }
/* подписи над портретом (королевство, армия) — между столбцами мест */
.hz-hero .hz-htags { max-width: calc(100% - 2 * var(--gs) - 44px); }

/* списки: вещи, ковка, места героя */
.gr-list { display: flex; flex-direction: column; gap: 6px; }
.gr-row {
  display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; cursor: pointer;
  background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 1px solid var(--w-line, var(--bronze-d));
}
button.gr-row { width: 100%; box-sizing: border-box; font: inherit; color: inherit; text-align: start; }
.gr-row.locked { opacity: 0.6; }
.gr-row.gr-free { border-style: dashed; }
.gr-cur .gr-row { border: 2px solid #c08a3e; }
.gr-who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gr-who b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gr-who span { font-size: 13px; color: var(--muted); }
.gr-on { color: var(--muted); font-size: 13px; }
.gr-row input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--bronze); }
/* подходящих вещей нет: картинка места крупно */
.gr-empty .gr-es { position: relative; display: block; width: 120px; height: 120px; margin: 0 auto 6px; }
.gr-empty .gr-es > img.gr-pic { position: absolute; inset: 0; width: 100%; height: 100%; }
.gr-empty .gr-es > svg { position: absolute; left: 20%; top: 20%; width: 60%; height: 60%; }

/* карточка вещи: картинка | имя, редкость, прибавка | кнопки места; вехи закалки; цена — есть / нужно */
.gr-big { display: flex; gap: 14px; align-items: center; }
.gr-big .gr-face.it-tile { width: 96px; height: 96px; border-radius: 16px; }
.gr-big .gr-face .gr-lv { font-size: 16px; line-height: 22px; }
.gr-bi { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gr-hbtns { flex: none; display: flex; flex-direction: column; gap: 8px; }
.gr-name { font-size: 20px; }
.gr-sub { color: var(--muted); font-size: 14px; }
.gr-main { font-size: 17px; }
.gr-main b { color: var(--w-good, #9fe0a8); }
.gr-next { color: var(--w-good, #2f8f3e); font-size: 15px; font-weight: 700; }
.gr-line { padding: 4px 10px; font-size: 15px; }
.gr-line b { color: var(--w-good, #9fe0a8); }
.gr-line.off { color: var(--muted); font-style: italic; }
.gr-line.on { color: var(--w-good, #9fe0a8); }
.gr-cost { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 15px; margin: 6px 0; }
.gr-cost span { display: flex; align-items: center; gap: 4px; }
.gr-cost b.bad, .gr-mats .bad b, .gr-mats i.bad { color: var(--w-bad, var(--bad)); }
.gr-track { position: relative; height: 34px; margin: 4px 14px 8px; }
.gr-track .bar { position: absolute; left: 0; right: 0; top: 4px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--w-field, rgba(16, 20, 28, 0.5)); }
.gr-track .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd25e, #ec9a1e); }
.gr-track .mk {
  position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; font-size: 13px;
  font-weight: 700; color: var(--muted);
}
.gr-track .mk::before { content: ''; width: 14px; height: 14px; margin-bottom: 2px; border-radius: 50%; background: #8797ab; border: 2px solid #fff; box-sizing: border-box; }
.gr-track .mk.on { color: var(--w-good, #2f8f3e); }
.gr-track .mk.on::before { background: #ffd25e; }
[dir=rtl] .gr-track .mk { transform: translateX(50%); }
/* ‹ › в шапке карточки — вещи того же героя */
.gr-nav {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, 0.14); border: 2px solid rgba(255, 255, 255, 0.55);
}
.gr-nav svg { width: 24px; height: 24px; }
[dir=rtl] .gr-nav svg { transform: scaleX(-1); } /* справа налево: «прежняя» — справа, стрелка смотрит наружу */

/* Кузница: ремёсла — места ярлыками (картинка места), плитки вещей, выбранная — карточкой сверху, «Ковать» — внизу */
.gr-state { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; margin-bottom: 10px;
  background: rgba(192, 138, 62, 0.15); border: 1px solid rgba(192, 138, 62, 0.4); }
.gr-state > span:not(.gr-face) { flex: 1; }
.gr-state > .gr-face.it-tile { width: 44px; height: 44px; border-radius: 10px; }
.gr-state b { color: var(--w-accent, var(--bronze-l)); }
.gr-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.gr-chips .chip .gr-cpic { position: relative; flex: none; width: 30px; height: 30px; }
.gr-chips .chip .gr-cpic > :is(img, svg) { position: absolute; inset: 0; width: 100%; height: 100%; }
.gr-fsel { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 12px; margin-bottom: 10px; border-radius: 10px;
  background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 2px solid #c08a3e; }
.gr-fsel > .gr-face.it-tile { width: 80px; height: 80px; border-radius: 14px; }
/* имя вещи — тон редкости, притемнённый для светлой панели: серое «Простое» и золотое иначе не читаются (≈4,5:1) */
.gr-fsel .gr-name, .gr-big .gr-name { color: var(--rc); color: color-mix(in srgb, var(--rc) 56%, #10141c); }
.gr-mats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.gr-fsel .gr-mats { flex: 1 1 100%; }
.gr-mats > span { display: flex; align-items: center; gap: 6px; }
.gr-mats b { color: var(--w-hi, var(--text)); }
.gr-mats .gr-mat-nm { font-weight: 400; }
.gr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
.gr-tile {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; box-sizing: border-box;
  border-radius: 10px; border: 2px solid var(--rc, #9aa3ad); cursor: pointer; font: inherit; color: inherit; text-align: center;
  background: linear-gradient(rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.15)), var(--rc, #9aa3ad);
}
.gr-tile > .gr-face.it-tile { width: 64px; height: 64px; }
.gr-tile > span:not(.gr-face) { font-size: 13px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; color: #16202c; }
.gr-tile.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #c08a3e; }
.gr-tile.locked { filter: grayscale(0.7); opacity: 0.75; }
.gr-tile .gr-ok, .gr-tile .gr-lock {
  position: absolute; top: -6px; inset-inline-end: -6px; z-index: 3; width: 28px; height: 28px; box-sizing: border-box; border-radius: 50%; border: 2px solid #fff;
  display: flex; align-items: center; justify-content: center;
}
.gr-tile .gr-ok { background: #3f8f4f; }
.gr-tile .gr-lock { background: #6d7783; }
.gr-mats-t { display: flex; flex-direction: column; gap: 4px; }
.gr-mat { display: grid; grid-template-columns: 1fr 70px; gap: 8px; align-items: center; padding: 4px 8px; margin-top: 8px;
  border-radius: 8px; background: var(--w-well, rgba(16, 20, 28, 0.45)); }
.gr-mat span { text-align: right; font-weight: 700; }
/* материалы и руны — плитки: выбрать, действие — в полосе внизу */
.gr-mtiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; }
/* материал и руна (аудит geroi-15): крупная ячейка, как в Сумке, — число в сумке на ней, ступень ярлыком; имя — до двух
   строк, длинное переносится, а не «Добротная ст…» (руне — ещё «+N%» справа); нет в сумке — тусклая */
.gr-mtile {
  min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; box-sizing: border-box; border-radius: 10px;
  background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 1px solid var(--w-line, var(--bronze-d)); cursor: pointer; font: inherit; color: inherit;
  text-align: center;
}
.gr-mtile .ic-cell.ic-s { --ic: 76px; }
.gr-mtile b { display: flex; align-items: baseline; justify-content: center; gap: 0.3em; max-width: 100%; font-size: 13px; line-height: 1.15; }
.gr-mtile b > span { min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.gr-mtile b > i { flex: none; font-style: normal; color: var(--w-good, #2f8f3e); }
.gr-mtile.none .ic-cell { filter: grayscale(0.5); opacity: 0.78; }
.gr-mtile.on { border: 2px solid #c08a3e; box-shadow: 0 0 0 2px rgba(192, 138, 62, 0.5); }
/* сундук и мешочек рун: сундук крупно слева на всю высоту карточки, справа — имя, шансы плашками, гарантия, кнопки */
.gr-chest {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 6px 14px; padding: 10px 12px; border-radius: 12px; margin-bottom: 10px;
  background: radial-gradient(120% 140% at 0 50%, rgba(255, 200, 110, 0.32), rgba(255, 200, 110, 0) 46%), var(--w-well, rgba(16, 20, 28, 0.55));
  border: 1px solid var(--bronze);
}
.gr-chest > .ic-cell.gr-cbig { --ic: 110px; align-self: center; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }
.gr-chest > .ic-cell.gr-cbig.none { filter: grayscale(0.4) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)); opacity: 0.82; } /* нет — чуть тусклее, но крупно */
.gr-cb { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.gr-cname { font-size: 17px; line-height: 1.15; }
.gr-cb .note { margin: 0; }
.gr-cb .rd-act { margin: 2px 0 0; }
/* шансы — плашки цвета редкости (уровня руны) с белым числом */
.gr-odds { display: flex; flex-wrap: wrap; gap: 6px; }
.gr-odd {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; white-space: nowrap; font-size: 13px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65); background: var(--rc); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 1px 2px rgba(0, 0, 0, 0.25);
}
.gr-odd b { font-weight: 800; }

/* руны и перековка (карточка вещи) */
.gr-lr { display: flex; align-items: center; gap: 8px; }
.gr-lr .btn { margin-left: auto; margin-inline-start: auto; }
.gr-reforge { margin: 2px 0 8px; padding: 6px 10px; border-radius: 8px; background: var(--w-well, rgba(16, 20, 28, 0.55)); border: 1px dashed var(--w-line, var(--bronze-d)); }
.gr-reforge .btn { display: inline-flex; align-items: center; gap: 4px; }
.gr-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; margin: 6px 0; }
.gr-rpick { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  text-align: left; padding: 6px 10px; border-radius: 8px; cursor: pointer; color: inherit; font: inherit;
  background: var(--w-well, rgba(16, 20, 28, 0.6)); border: 1px solid #6d5aa8; }
.gr-rpick svg { grid-row: span 2; }
.gr-rpick b { font-size: 15px; }
.gr-rpick span { font-size: 13px; color: var(--muted); }

/* ——— стоя ——— */
body.vertical .gr-modal .note { font-size: var(--fs-sub); }
body.vertical .gr-modal .sect { margin: 16px 0 10px; }
body.vertical .gr-cnt { font-size: var(--fs-sub); }
body.vertical .gr-face .gr-lv { font-size: 18px; line-height: 24px; padding: 0 7px; border-radius: 9px; left: 4px; top: 4px; }
/* места у портрета: до 128, между ними 14 (сторона — --gs выше) */
body.vertical .hz-hero .gr-places { top: 14px; left: 14px; right: 14px; gap: 14px; }
body.vertical .gr-place { border-radius: 18px; }
body.vertical .gr-place > .gr-face .gr-lv { font-size: 20px; line-height: 26px; }
body.vertical .hz-hero .hz-htags { max-width: calc(100% - 2 * var(--gs) - 60px); }
body.vertical .gr-list { gap: 10px; }
/* строка вещи: 132, картинка 112, имя 26, кнопка 150×56 */
body.vertical .gr-row { flex-wrap: wrap; min-height: 132px; gap: 12px 14px; padding: 10px 14px; border-radius: 14px; }
body.vertical .gr-row > .gr-face { width: 112px; height: 112px; border-radius: 16px; }
body.vertical .gr-who { gap: 4px; }
body.vertical .gr-who b { font-size: 26px; white-space: normal; overflow-wrap: anywhere; }
body.vertical .gr-who span, body.vertical .gr-on { font-size: var(--fs-min); }
body.vertical .gr-row > .btn.small { min-width: 150px; height: 56px; }
body.vertical .gr-row > svg { width: 32px; height: 32px; }
body.vertical .gr-row input[type=checkbox] { width: 36px; height: 36px; }
body.vertical .gr-hlist .gr-row { min-height: 120px; }
body.vertical .gr-hlist .gr-row > .gr-face { width: 100px; height: 100px; }
body.vertical .gr-hlist .gr-who b { font-size: 23px; }
body.vertical .gr-empty .gr-es { width: 160px; height: 160px; }
/* карточка вещи: картинка 144 | имя, прибавка | кнопки */
body.vertical .gr-big { gap: 16px; }
body.vertical .gr-big .gr-face.it-tile { width: 144px; height: 144px; border-radius: 20px; }
body.vertical .gr-big .gr-face .gr-lv { font-size: 22px; line-height: 28px; }
body.vertical .gr-bi { gap: 6px; }
body.vertical .gr-name { font-size: 28px; line-height: 1.1; overflow-wrap: anywhere; }
body.vertical .gr-sub { font-size: var(--fs-sub); }
body.vertical .gr-main { font-size: var(--fs-body); }
body.vertical .gr-main b { font-size: 26px; }
body.vertical .gr-next { font-size: 22px; }
body.vertical .gr-hbtns { gap: 10px; }
body.vertical .gr-hbtns .btn.small { min-width: 150px; height: 56px; }
body.vertical .gr-line { padding: 8px 12px; font-size: var(--fs-body); }
body.vertical .gr-lr { min-height: 64px; gap: 12px; }
body.vertical .gr-lr .ic-cell.ic-s, body.vertical .gr-rpick .ic-cell.ic-s { --ic: 80px; } /* ярлык уровня руны — не мельче 16 */
body.vertical .gr-cost { gap: 10px 22px; font-size: var(--fs-body); }
body.vertical .gr-cost svg, body.vertical .gr-cost img { width: 28px; height: 28px; }
body.vertical .gr-track { height: 50px; margin: 6px 22px 10px; }
body.vertical .gr-track .bar { top: 6px; height: 14px; border-radius: 7px; }
body.vertical .gr-track .mk { font-size: var(--fs-sub); }
body.vertical .gr-track .mk::before { width: 22px; height: 22px; border-width: 3px; }
body.vertical .gr-nav { width: 56px; height: 56px; }
body.vertical .gr-nav svg { width: 30px; height: 30px; }
body.vertical .gr-reforge { padding: 10px 12px; }
body.vertical .gr-rpick { padding: 10px 12px; }
body.vertical .gr-rpick b { font-size: var(--fs-body); }
body.vertical .gr-rpick span { font-size: var(--fs-sub); }
body.vertical .gr-pick { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
/* Кузница: места — ярлыки 64 в два ряда по три (картинка места 40), плитки вещей 4 в ряд, картинка 96 */
body.vertical .gr-state { padding: 12px 14px; font-size: var(--fs-body); }
body.vertical .gr-state > .gr-face.it-tile { width: 64px; height: 64px; border-radius: 12px; }
body.vertical .gr-modal .rd-chips.gr-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
body.vertical .gr-modal .gr-chips .chip { justify-content: center; min-height: 64px; padding: 6px 8px; gap: 8px; font: 700 20px/1.1 var(--sans); border-radius: 12px; }
body.vertical .gr-chips .chip .gr-cpic { width: 44px; height: 44px; }
body.vertical .gr-fsel { gap: 12px 16px; padding: 14px 16px; border-radius: 14px; }
body.vertical .gr-fsel > .gr-face.it-tile { width: 112px; height: 112px; border-radius: 16px; }
body.vertical .gr-fsel .gr-name { font-size: 26px; }
body.vertical .gr-mats { gap: 8px 18px; font-size: var(--fs-sub); }
body.vertical .gr-mats svg, body.vertical .gr-mats img { width: 26px; height: 26px; }
body.vertical .gr-mats .gr-mat-nm .ic-cell { width: var(--ic); height: var(--ic); } /* ячейка материала — своего размера */
body.vertical .gr-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
body.vertical .gr-tile { min-height: 170px; gap: 8px; padding: 12px 6px 10px; border-radius: 14px; border-width: 3px; }
body.vertical .gr-tile > .gr-face.it-tile { width: 96px; height: 96px; border-radius: 14px; }
body.vertical .gr-tile > span:not(.gr-face) { font-size: var(--fs-min); }
body.vertical .gr-tile .gr-ok, body.vertical .gr-tile .gr-lock { width: 36px; height: 36px; top: -8px; inset-inline-end: -8px; }
body.vertical .gr-mat { grid-template-columns: 1fr 90px; padding: 8px 12px; font-size: var(--fs-body); }
body.vertical .gr-mtiles { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
/* материалы и руны — 4 в ряд, ячейка 132 (≈ 75 px экрана, как в Сумке), имя 22 — до двух строк */
body.vertical .gr-mtile { gap: 6px; padding: 8px 4px 10px; border-radius: 12px; }
body.vertical .gr-mtile .ic-cell.ic-s { --ic: 132px; }
body.vertical .gr-mtile b { font-size: var(--fs-min); }
/* сундук 184 (≈ 105 px экрана) слева; имя 26, шансы 22 */
body.vertical .gr-chest { gap: 8px 16px; padding: 14px 16px; border-radius: 16px; }
body.vertical .gr-chest > .ic-cell.gr-cbig { --ic: 184px; border-radius: 20px; }
body.vertical .gr-cb { gap: 8px; }
body.vertical .gr-cname { font-size: var(--fs-list); }
body.vertical .gr-odds { gap: 8px; }
body.vertical .gr-odd { padding: 4px 12px; border-radius: 16px; font-size: var(--fs-min); }
/* пять ярлыков Кузницы — в один ряд без ленты (аудит geroi-25: «Су…» обрезалась справа) */
body.vertical .gr-forge .rd-tabs.tabs-many { overflow: visible; padding-top: 0; }
body.vertical .gr-forge .rd-tabs.tabs-many > .tab { flex: 1 1 0; min-width: 0; padding: 6px 4px; font-size: var(--fs-min); }
/* ряды шансов и действий Кузницы (классы rd- — css/residents.css; здесь только внутри окон снаряжения) */
body.vertical .gr-modal .rd-odds { gap: 8px 18px; font-size: var(--fs-sub); }
/* Кузницы нет: сама Кузница крупно (emptyHtml art) */
body.vertical .gr-forge .empty-state.es-big { --es-art: 440px; }
body.vertical .gr-modal .rd-act { gap: 10px; margin: 12px 0; }
body.vertical .gr-modal .btn.two .sub { font-size: var(--fs-min); } /* «Ковать · 08:20», «Закалить +3 → +4» — не мельче 22 */
body.vertical .gr-modal .rd-got .rd-gcard b { font-size: var(--fs-body); }

/* ——— лёжа на телефоне (body.phone-land, js/ui.js fitStage: сцена мельче 3/4, около 0,57): здесь размеры прибиты в px —
   подписи плиток, мест и цен 11–15 (6–9 css px), ярлыки мест Кузницы 34, ‹ › карточки 44. Растут до размеров круга 1
   (css/kod.css body.phone-land): текст не мельче 16, пояснения 17, имена 20–24; ярлыки и ‹ › — 52 (--h-btn-s). На
   планшете и ПК лёжа и стоя — как было ——— */
body.phone-land .gr-modal .note { font-size: var(--fs-sub); }
body.phone-land .gr-cnt { font-size: var(--fs-sub); }
body.phone-land .gr-face .gr-lv { padding: 0 5px; font-size: 16px; line-height: 20px; }
/* места у портрета: до 96 (--gs выше) */
body.phone-land .gr-place > .gr-face .gr-lv { font-size: 17px; line-height: 22px; }
/* строки вещей и мест героя: 84, картинка 72, имя 20, пояснение 17, отметка 32 */
body.phone-land .gr-list { gap: 8px; }
body.phone-land .gr-row { min-height: 84px; box-sizing: border-box; gap: 12px; padding: 6px 12px; }
body.phone-land .gr-row > .gr-face { width: 72px; height: 72px; border-radius: 12px; }
body.phone-land .gr-who { gap: 2px; }
body.phone-land .gr-who b { font-size: 20px; }
body.phone-land .gr-who span, body.phone-land .gr-on { font-size: var(--fs-sub); }
body.phone-land .gr-row input[type=checkbox] { width: 32px; height: 32px; }
/* карточка вещи: картинка 112, имя 24, прибавка 20, строки 18, вехи закалки 16, ‹ › 52 */
body.phone-land .gr-big .gr-face.it-tile { width: 112px; height: 112px; }
body.phone-land .gr-name { font-size: 24px; }
body.phone-land .gr-sub { font-size: var(--fs-sub); }
body.phone-land .gr-main { font-size: var(--fs-body); }
body.phone-land .gr-next { font-size: 18px; }
body.phone-land .gr-line { font-size: 18px; }
body.phone-land .gr-cost { gap: 8px 18px; font-size: 18px; }
body.phone-land .gr-track { height: 44px; }
body.phone-land .gr-track .bar { height: 12px; border-radius: 6px; }
body.phone-land .gr-track .mk { font-size: 16px; }
body.phone-land .gr-track .mk::before { width: 18px; height: 18px; }
body.phone-land .gr-nav { width: var(--h-btn-s); height: var(--h-btn-s); }
body.phone-land .gr-nav svg { width: 28px; height: 28px; }
body.phone-land .gr-rpick { padding: 8px 12px; }
body.phone-land .gr-rpick b { font-size: 18px; }
body.phone-land .gr-rpick span { font-size: 16px; }
body.phone-land .gr-pick { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
/* Кузница: ярлыки мест 52 / 18, плитки вещей и материалов шире (140), подписи 16, числа 18, сундуки — имя 20 */
body.phone-land .gr-state { font-size: 18px; }
body.phone-land .gr-state > .gr-face.it-tile { width: 52px; height: 52px; }
body.phone-land .gr-modal .gr-chips .chip { min-height: var(--h-btn-s); padding: 0 16px 0 10px; gap: 8px; font-size: var(--fs-btn-s); border-radius: 10px; }
body.phone-land .gr-chips .chip .gr-cpic { width: 36px; height: 36px; }
body.phone-land .gr-fsel > .gr-face.it-tile { width: 96px; height: 96px; }
body.phone-land .gr-fsel .gr-name { font-size: 24px; }
body.phone-land .gr-mats { gap: 6px 18px; font-size: var(--fs-sub); }
body.phone-land .gr-tiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
body.phone-land .gr-tile > .gr-face.it-tile { width: 80px; height: 80px; }
body.phone-land .gr-tile > span:not(.gr-face) { font-size: 16px; }
body.phone-land .gr-tile .gr-ok, body.phone-land .gr-tile .gr-lock { width: 32px; height: 32px; top: -8px; inset-inline-end: -8px; }
body.phone-land .gr-mat { grid-template-columns: 1fr 90px; padding: 6px 12px; font-size: 18px; }
body.phone-land .gr-mtiles { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
body.phone-land .gr-mtile .ic-cell.ic-s { --ic: 112px; }
body.phone-land .gr-mtile b { font-size: var(--fs-min); }
body.phone-land .gr-chest > .ic-cell.gr-cbig { --ic: 150px; }
body.phone-land .gr-cname { font-size: var(--fs-list); }
body.phone-land .gr-odd { font-size: var(--fs-min); }
body.phone-land .gr-modal .rd-odds { gap: 6px 18px; font-size: var(--fs-sub); }
body.phone-land .gr-modal .rd-got .rd-gcard b { font-size: 18px; }
body.phone-land .gr-modal .btn.two .sub { font-size: var(--fs-btn-s); } /* «Ковать · 08:20», «Закалить +3 → +4» */
