/* Косметический слой исходной книги предметов: механику дерева, каталога и карточки не меняет. */
.page--items .items-page {
  position: relative;
  width: min(1760px, calc(100% - 40px));
  margin: 0 auto;
  padding-top: clamp(30px, 4vw, 58px);
}

.page--items .items-page::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  width: min(420px, 72vw);
  height: 1px;
  background: linear-gradient(90deg, #d2a437, rgba(210, 164, 55, 0));
  box-shadow: 0 0 16px rgba(213, 165, 48, 0.24);
}

.page--items .items-crumbs {
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: #d8a938;
}

.page--items .items-page__title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 1.05;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.8);
}

.page--items .items-page__bar {
  position: relative;
  gap: 10px;
  margin: 22px 0 12px;
  padding: 12px;
  border: 1px solid rgba(205, 157, 38, 0.5);
  background: linear-gradient(135deg, rgba(3, 19, 24, 0.96), rgba(4, 14, 18, 0.9));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 222, 133, 0.04);
}

.page--items .item-search { max-width: 760px; }
.page--items .item-search__input,
.page--items .items-page__material {
  height: 46px;
  border-color: #31505a;
  background-color: rgba(1, 10, 14, 0.92);
}

.page--items .item-search__input:focus,
.page--items .items-page__material:focus {
  border-color: #d6a632;
  box-shadow: 0 0 0 2px rgba(214, 166, 50, 0.13);
}

.page--items .item-search__glass { stroke: #d9ad43; }
.page--items .item-search__drop { border-color: rgba(214, 166, 50, 0.58); }

.page--items .rarity-legend {
  gap: 6px;
  margin: 0 0 20px;
  padding: 8px 10px;
  align-items: center;
  border: 1px solid rgba(60, 91, 99, 0.56);
  background: rgba(2, 14, 18, 0.76);
}

.page--items .rarity-legend__title { margin-right: 8px; }
.page--items .rarity-legend__item {
  width: auto;
  min-width: 82px;
  padding: 4px 7px;
  flex-direction: row;
  gap: 7px;
}
.page--items .rarity-legend__icon { width: 34px; height: 34px; padding: 3px; }
.page--items .rarity-legend__name { font-size: 0.76rem; }

.page--items .items-page__body { gap: 18px; }

.page--items .items-tree {
  padding: 8px;
  border-color: rgba(205, 157, 38, 0.46);
  background: linear-gradient(180deg, rgba(3, 19, 24, 0.97), rgba(2, 12, 16, 0.94));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.27), inset 0 1px rgba(255, 221, 128, 0.04);
  scrollbar-color: #9c7622 #061419;
}

.page--items .items-tree__head {
  margin: -8px -8px 6px;
  padding: 14px 14px 11px;
  color: #f2d58a;
  border-bottom: 1px solid rgba(205, 157, 38, 0.28);
}

.page--items .items-tree__row { border-bottom: 1px solid rgba(61, 87, 94, 0.22); }
.page--items .items-tree__node { min-height: 48px; border-radius: 0; }
.page--items .items-tree__node:hover {
  background: linear-gradient(90deg, rgba(210, 160, 36, 0.11), rgba(20, 52, 59, 0.18));
}
.page--items .items-tree__node.is-active {
  color: #ffe18b;
  background: linear-gradient(90deg, rgba(216, 166, 38, 0.2), rgba(13, 42, 49, 0.18));
  box-shadow: inset 3px 0 #e1b13b, 0 0 16px rgba(211, 162, 38, 0.08);
}
.page--items .items-tree__icon { width: 34px; height: 34px; object-fit: contain; background: #02090c; }
.page--items .items-tree__chevron { border: 1px solid transparent; }
.page--items .items-tree__chevron:hover { border-color: rgba(215, 169, 52, 0.4); color: #e6ba51; }
.page--items .items-tree__group { color: #91a8ae; }

.page--items .items-catalog {
  padding: 16px;
  border: 1px solid rgba(53, 84, 92, 0.5);
  background: rgba(2, 13, 17, 0.68);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.16);
}
.page--items .items-catalog__head { padding-bottom: 10px; border-bottom: 1px solid rgba(205, 157, 38, 0.26); }
.page--items .items-catalog__title { color: #f2dfab; font-size: 1.28rem; }
.page--items .items-catalog__group { color: #9bb0b5; }
.page--items .items-catalog__tiles { gap: 9px; }
.page--items .items-tile {
  min-height: 72px;
  border-color: rgba(55, 85, 93, 0.58);
  background: linear-gradient(135deg, rgba(4, 20, 25, 0.9), rgba(3, 14, 18, 0.9));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}
.page--items .items-tile:hover,
.page--items .items-tile:focus-visible {
  transform: translateY(-2px);
  border-color: #b98b25;
  background: linear-gradient(135deg, rgba(25, 43, 42, 0.96), rgba(5, 22, 27, 0.96));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.24), inset 3px 0 #d7a631;
}

.page--items .items-type__variants,
.page--items .item-table__frame {
  border-color: rgba(205, 157, 38, 0.42);
  background: rgba(2, 14, 18, 0.88);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.2);
}
.page--items .item-table__th {
  color: #ecd79e;
  background: linear-gradient(180deg, #0b2228, #07171c);
  border-bottom-color: rgba(205, 157, 38, 0.48);
}
.page--items .items-page__table .item-table__th,
.page--items .items-page__table .item-table__td { padding-inline: 10px; }
.page--items .items-page__table .coins {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.page--items .item-table__row:nth-child(even) { background: rgba(11, 31, 36, 0.46); }
.page--items .item-table__row:hover { background: rgba(183, 132, 26, 0.13); }

.page--items .item-card {
  border-color: rgba(205, 157, 38, 0.52);
  background: linear-gradient(180deg, rgba(4, 21, 26, 0.98), rgba(2, 12, 16, 0.98));
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.36), inset 0 1px rgba(255, 224, 136, 0.05);
}
.page--items .item-card__top { padding-bottom: 14px; border-bottom: 1px solid rgba(205, 157, 38, 0.25); }
.page--items .item-card__name { text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75); }
.page--items .item-card__row { border-bottom-color: rgba(55, 83, 90, 0.35); }

.page--items .items-page__menu {
  border-color: #b68a29;
  background: linear-gradient(#182b2f, #08171b);
  box-shadow: inset 0 1px rgba(255, 231, 159, 0.08);
}

@media (max-width: 900px) {
  .page--items .items-page { width: min(100% - 20px, 1760px); padding-top: 24px; }
  .page--items .items-page__bar { align-items: stretch; }
  .page--items .item-search { flex-basis: 100%; max-width: none; }
  .page--items .items-page__material { flex: 1; min-width: 0; }
  .page--items .rarity-legend { overflow-x: auto; flex-wrap: nowrap; }
  .page--items .rarity-legend__item { flex: 0 0 auto; }
}

@media (max-width: 560px) {
  .page--items .items-page__title { font-size: 2rem; }
  .page--items .items-page__bar { padding: 9px; }
  .page--items .rarity-legend__title { display: none; }
  .page--items .items-catalog { padding: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .page--items .items-tile { transition: none; }
  .page--items .items-tile:hover { transform: none; }
}
