:root {
  color-scheme: dark;
  --bg: #121110;
  --bg2: #171512;
  --card: #1b1917;
  --card2: #211e1a;
  --line: #332e27;
  --line2: #453d33;
  --text: #ece6db;
  --muted: #9c9287;
  --gold: #d9a441;
  --gold2: #f0c069;
  --green: #7fae6a;
  --red: #c85a45;
  --steel: #8b9d9f;
  --radius: 14px;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: "Segoe UI", Roboto, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1100px 520px at 50% -12%, #2b241c 0%, #121110 62%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.022) 0 2px,
    transparent 2px 64px
  );
}

button {
  font-family: inherit;
}

.app {
  position: relative;
  z-index: 1;
  max-width: 880px;
  margin: 0 auto;
  padding: 10px 12px calc(96px + env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 2px 4px 8px;
  color: #6d6255;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand span {
  color: #c9a86a;
  font-weight: 800;
}

.brand small {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #5f564b;
}

/* ---------- карточки ---------- */

.card {
  position: relative;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.card-head h2 {
  margin: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-head .card-title {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.card-head-btn {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.card-head-btn:hover .card-title {
  color: var(--gold2);
}

.card-head-side {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.card-chevron {
  width: 12px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}

.arena-head-right {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.arena-head-right .icon-btn {
  width: 26px;
  height: 26px;
  font-size: 15px;
  line-height: 1;
}

.card.danger {
  border-color: #4a2a24;
}

/* ---------- профиль ---------- */

.profile {
  background:
    linear-gradient(180deg, rgba(217, 164, 65, 0.06), transparent 42%),
    linear-gradient(180deg, var(--card), var(--bg2));
}

.profile-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 21px;
  font-weight: 800;
  color: #211a10;
  background: linear-gradient(160deg, var(--gold2), #a9762a);
  border: 1px solid #f0cd8c;
  box-shadow: 0 4px 14px rgba(217, 164, 65, 0.22);
}

.nickline {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nick {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  flex: 0 0 auto;
  background: transparent;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  padding: 3px 5px;
  border-radius: 7px;
}

.icon-btn:hover {
  color: var(--gold);
  background: #2a251f;
}

.sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-top: 3px;
}

.wallet {
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.wallet .money b {
  color: var(--gold2);
}

.wallet .auth {
  color: var(--steel);
  margin-top: 3px;
}

.xprow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.bars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.barrow {
  display: grid;
  grid-template-columns: 104px 1fr 74px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.barlabel {
  color: var(--muted);
  white-space: nowrap;
}

.barnum {
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bar {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: #0d0c0b;
  border: 1px solid var(--line);
  overflow: hidden;
}

.bar.thin {
  height: 6px;
  flex: 1;
}

.bar.tall {
  height: 16px;
}

.fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
}

.fill.hp {
  background: linear-gradient(90deg, #8f3227, #d4694f);
  box-shadow: 0 0 10px rgba(200, 90, 69, 0.35);
}

.fill.en {
  background: linear-gradient(90deg, #9a7520, #e8c05a);
  box-shadow: 0 0 10px rgba(217, 164, 65, 0.32);
}

.fill.xp {
  background: linear-gradient(90deg, #4d7a63, #8fc7a5);
}

.fill.work {
  background: linear-gradient(90deg, #8a6b28, #e0b45a);
}

/* ---------- действия ---------- */

.action-name {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 0 10px;
}

.action-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 8px;
}

.quick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 8px;
}

.quick-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.quick-btn small {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.quick-btn:hover:not(:disabled) {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.quick-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* ---------- списки ---------- */

.list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.item {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.item.locked {
  opacity: 0.55;
}

.item.owned {
  opacity: 0.82;
}

.item-main {
  min-width: 0;
}

.item-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.item-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 6px;
  font-size: 11.5px;
  color: #b9ae9f;
  font-variant-numeric: tabular-nums;
}

.item > button {
  flex: 0 0 auto;
}

/* ---------- теги ---------- */

.tag {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: #191714;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tag.lock {
  color: #c9a86a;
  border-color: #5a4a2a;
}

.tag.risk {
  color: #e0a08f;
  border-color: #5c3a31;
}

.tag.live {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1613;
  font-variant-numeric: tabular-nums;
}

.tag.owned {
  color: #9ecf8a;
  border-color: #3d5a33;
}

.tag.you {
  background: var(--steel);
  border-color: var(--steel);
  color: #14181a;
}

.tag.tier-easy {
  color: #9ecf8a;
  border-color: #3d5a33;
}

.tag.tier-even {
  color: #cfc3a6;
}

.tag.tier-hard {
  color: #e0b45a;
  border-color: #5a4a2a;
}

.tag.tier-boss {
  color: #e08b78;
  border-color: #5c3a31;
}

/* ---------- статистика / наколки / лог ---------- */

.statgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
}

.stat span {
  font-size: 10.5px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat b {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
}

.plus {
  color: var(--green);
  font-size: 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #4a3d2a;
  background: #241f18;
  color: #e6cf9f;
  font-size: 12px;
}

.log {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 2px;
  max-height: 320px;
  overflow: auto;
}

.log li {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed #2a2621;
  font-size: 12.5px;
  line-height: 1.4;
  color: #c9c0b4;
}

.log li:last-child {
  border-bottom: 0;
}

.log li .t {
  color: #6f665c;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.log li.k-good {
  color: #b6d6a3;
}

.log li.k-bad {
  color: #e2a396;
}

.log li.k-level {
  color: var(--gold2);
  font-weight: 600;
}

/* ---------- лавка ---------- */

.shopgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.shopitem {
  background: var(--card2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}

.shopitem-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.price {
  color: var(--gold);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shopitem-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btns {
  display: flex;
  gap: 6px;
}

/* ---------- рейтинг ---------- */

.rating {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.rating li {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--card2);
  border: 1px solid var(--line);
  font-size: 13px;
}

.rating li.you {
  border-color: var(--gold);
  background: #2a2114;
}

.rating li.with-friend {
  grid-template-columns: 34px 1fr auto 30px;
}

.friend-chip {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line2);
  background: #26201a;
  color: var(--gold2);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition:
    transform 0.12s ease,
    border-color 0.12s ease;
}

.friend-chip:hover {
  transform: scale(1.1);
  border-color: var(--gold2);
}

.friend-chip.on {
  color: #6ee7a8;
  border-color: #2f6a4a;
  background: #16241c;
}

.friend-chip.wait {
  color: #d8b55a;
  border-color: #6a5a2f;
  background: #241f12;
}

.friend-chip.in {
  color: #7cc4ff;
  border-color: #35506a;
  background: #16202a;
}

.place {
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.rval {
  color: #d8c9ae;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- кнопки ---------- */

.btn {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #2a251f;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s, border-color 0.15s;
}

.btn:hover:not(:disabled) {
  background: #35302a;
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(180deg, #e0b45a, #c2902f);
  border-color: #e8c272;
  color: #1a1613;
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, #f0c069, #d09a34);
}

.btn-ghost {
  background: transparent;
}

.btn-danger {
  background: #3a201b;
  border-color: #6b342a;
  color: #f0c0b4;
}

.btn-block {
  display: block;
  width: 100%;
}

.dialog-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #141311;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
}

.dialog-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.16);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-danger:hover:not(:disabled) {
  background: #4a2822;
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: 9px;
}

/* ---------- навигация ---------- */

.nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 880px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(18, 17, 16, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  z-index: 20;
}

.nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 2px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.nav-badge {
  position: absolute;
  top: 1px;
  right: 8px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #b6472f;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(18, 17, 16, 0.9);
}

.nav button .ico {
  font-size: 18px;
  line-height: 1;
  filter: grayscale(60%) opacity(0.8);
}

.nav button.active {
  background: #211c15;
  color: var(--gold2);
}

.nav button.active .ico {
  filter: none;
}

/* ---------- загрузка / ошибка входа ---------- */

.boot-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #121110;
}

.boot-card {
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line2);
  background: var(--card2);
  box-shadow: var(--shadow);
  text-align: center;
}

.boot-card h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold2);
}

.boot-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.boot-card .btn {
  width: 100%;
  justify-content: center;
}

.auth-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  outline: none;
}

.auth-input:focus {
  border-color: var(--gold2);
}

.account-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.account-actions .btn {
  width: auto;
}

.player-id-inline {
  color: var(--gold2);
  letter-spacing: 0.08em;
}

/* ---------- камера: персонаж и кастомизация ---------- */

.character-card {
  overflow: hidden;
}

.char-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 10px;
  align-items: stretch;
}

.char-layout.editing {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
}

.char-stash {
  padding: 9px 8px;
  border: 1px solid var(--line2);
  border-radius: 11px;
  background: linear-gradient(180deg, #211c17, #14110e);
}

.char-stash-title,
.char-right-title {
  margin-bottom: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.char-stash-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 2px 5px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.char-stash-row span {
  grid-row: 1 / span 2;
  font-size: 16px;
}

.char-stash-row b {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: var(--gold2);
}

.char-stash-row small {
  font-size: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.char-stash-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 9px;
  line-height: 1.4;
  color: var(--muted);
}

.char-scene {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid #3a4a42;
  border-radius: 12px;
  background:
    radial-gradient(ellipse at 50% 12%, rgba(150, 190, 170, 0.14), transparent 55%),
    linear-gradient(180deg, #22312c 0%, #1a2420 52%, #12100d 52%, #0d0a08 100%);
  isolation: isolate;
}

.cell-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse at 50% 35%, rgba(220, 200, 140, 0.12), transparent 55%);
}

.cell-window {
  position: absolute;
  left: 7%;
  top: 9%;
  z-index: 1;
  width: 25%;
  height: 21%;
  border: 5px solid #2c2a24;
  border-radius: 3px;
  background: linear-gradient(180deg, #9fb9b5, #6f8a86);
  box-shadow: 0 0 26px rgba(160, 200, 190, 0.18), inset 0 0 18px rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: space-evenly;
}

.cell-window i {
  display: block;
  width: 4px;
  height: 100%;
  background: #2b2822;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.cell-poster {
  position: absolute;
  left: 8%;
  top: 36%;
  z-index: 1;
  width: 21%;
  height: 20%;
  padding: 6px;
  border: 2px solid #4a3a26;
  border-radius: 2px;
  background: linear-gradient(160deg, #3b2a1d, #251a12);
  color: #c9a24a;
  font-family: Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-align: center;
  transform: rotate(-1.5deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cell-shelf {
  position: absolute;
  right: 10%;
  top: 26%;
  z-index: 1;
  width: 22%;
  height: 3px;
  background: #3d3126;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.cell-shelf::before {
  content: '';
  position: absolute;
  left: 12%;
  top: -14px;
  width: 18px;
  height: 12px;
  border-radius: 2px;
  background: #6e2f24;
  box-shadow: 0 0 8px rgba(200, 90, 60, 0.25);
}

.cell-bunk {
  position: absolute;
  right: 4%;
  bottom: 24%;
  z-index: 1;
  width: 29%;
  height: 17%;
  border: 1px solid #46554e;
  border-radius: 4px;
  background: linear-gradient(180deg, #5b6b63 0 36%, #37443f 36% 48%, #222a26 48% 100%);
  box-shadow: -3px 6px 0 rgba(0, 0, 0, 0.35);
}

.cell-bunk::before,
.cell-bunk::after {
  content: '';
  position: absolute;
  bottom: -46px;
  width: 4px;
  height: 46px;
  background: #3a3a34;
}

.cell-bunk::before {
  left: 8%;
}

.cell-bunk::after {
  right: 8%;
}

.cell-desk {
  position: absolute;
  left: 7%;
  bottom: 21%;
  z-index: 1;
  width: 26%;
  height: 18%;
  border-radius: 3px;
  background: linear-gradient(180deg, #4a3524, #2b1e14);
  box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}

.cell-radio {
  position: absolute;
  left: 22%;
  top: -30px;
  width: 34%;
  height: 30px;
  border: 1px solid #a35f49;
  border-radius: 3px;
  background: linear-gradient(180deg, #8a3d2e, #54251c);
}

.cell-radio::before {
  content: '';
  position: absolute;
  left: 14%;
  top: 22%;
  width: 26%;
  height: 45%;
  border-radius: 50%;
  background: #2a1a14;
}

.cell-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  height: 34%;
  background:
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(255, 255, 255, 0.025) 52px 54px),
    linear-gradient(180deg, rgba(50, 37, 27, 0.7), #0d0a08 70%);
}

.char-stage {
  position: absolute;
  left: 50%;
  bottom: 2%;
  z-index: 2;
  height: 91%;
  aspect-ratio: 360 / 520;
  transform: translateX(-50%);
}

.char-body-svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45));
}

.char-ink {
  position: absolute;
  z-index: 3;
  transform: translate(-50%, -50%) rotate(-8deg);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink, #3b3f52);
  opacity: 0.85;
  text-shadow: 0 0 1px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.char-ink::after {
  content: '';
  display: block;
  height: 1px;
  margin-top: -1px;
  background: currentColor;
  opacity: 0.5;
}

.char-zone {
  position: absolute;
  z-index: 4;
  width: 19px;
  height: 19px;
  transform: translate(-50%, -50%);
  border: 1px dashed rgba(240, 220, 180, 0.65);
  border-radius: 50%;
  background: rgba(10, 8, 6, 0.28);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.char-zone:hover {
  background: rgba(224, 181, 106, 0.35);
  border-color: var(--gold2);
}

.char-zone.filled {
  border-style: solid;
  border-color: var(--gold);
  background: rgba(224, 181, 106, 0.28);
}

.char-zone-shape {
  fill: rgba(255, 255, 255, 0.001);
  stroke: rgba(245, 235, 210, 0.55);
  stroke-width: 1.4;
  stroke-linejoin: round;
  cursor: pointer;
  transition: fill 0.15s, stroke 0.15s;
}

.char-zone-shape:hover {
  fill: rgba(255, 225, 90, 0.22);
  stroke: #ffe36a;
}

.char-zone-shape.selected {
  fill: rgba(255, 225, 90, 0.34);
  stroke: #ffe36a;
  stroke-width: 2;
}

.char-rotate {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 5;
  width: 34px;
  height: 34px;
  transform: translateX(-50%);
  border: 1px solid #6b5427;
  border-radius: 50%;
  background: rgba(10, 8, 6, 0.72);
  color: var(--gold2);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.char-rotate:hover {
  border-color: var(--gold);
}

.char-scene.view .char-body-svg {
  cursor: pointer;
}

.char-scene.view .char-body-svg:hover {
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.45)) brightness(1.08);
}

.char-view-toggle {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 5;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(10, 8, 6, 0.62);
  backdrop-filter: blur(4px);
}

.char-view-toggle button {
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.char-view-toggle button.active {
  background: var(--gold);
  color: #1a140e;
}

.char-view-toggle .char-edit-btn.active {
  background: #7a2c24;
  color: #ffe3d9;
}

.char-right {
  padding: 9px 8px;
  border: 1px solid var(--line2);
  border-radius: 11px;
  background: linear-gradient(180deg, #211c17, #14110e);
}

.char-slots {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.char-slot {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 7px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #191511;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.char-slot-clear {
  position: absolute;
  top: 3px;
  right: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.char-slot-clear:hover {
  background: rgba(200, 90, 69, 0.28);
  color: #ffd9ce;
}

.char-slot:hover {
  border-color: var(--gold);
}

.char-slot.filled {
  border-color: #5a4a2a;
  background: #221c16;
}

.char-slot-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.char-slot-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 10.5px;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-slot.filled .char-slot-name {
  color: var(--gold2);
}

.char-hint {
  margin: 9px 0 0;
}

.char-catalog {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 9px;
  border: 1px solid var(--line2);
  border-radius: 11px;
  background: linear-gradient(180deg, #211c17, #14110e);
}

.char-catalog-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #191511;
}

.char-catalog-tabs button {
  flex: 1;
  padding: 7px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.char-catalog-tabs button.active {
  background: var(--gold);
  color: #1a140e;
}

.char-catalog-tabs .char-close {
  flex: 0 0 27px;
  width: 27px;
  padding: 0;
  height: 27px;
  border-radius: 7px;
  font-size: 13px;
  letter-spacing: 0;
}

.char-catalog-tabs .char-close:hover {
  background: #2a251f;
  color: var(--gold2);
}

.char-catalog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
  font-size: 12px;
}

.char-catalog-head b {
  color: var(--gold2);
}

.char-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 7px 0;
}

.char-filters button {
  padding: 3px 7px;
  border: 1px solid var(--line2);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 9px;
  letter-spacing: 0.03em;
  cursor: pointer;
}

.char-filters button:hover {
  color: var(--text);
}

.char-filters button.active {
  border-color: var(--gold);
  background: #2a251f;
  color: var(--gold2);
}

.char-tat-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 380px;
  margin-top: 6px;
  overflow: auto;
  padding-right: 2px;
}

.char-tat-card {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.char-tat-card:hover {
  border-color: var(--gold);
}

.char-tat-card.equipped {
  border-color: var(--gold);
  background: #241f18;
}

.char-tat-glyph {
  display: flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink, #7c7568);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 16px;
  font-weight: 700;
}

.char-tat-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.char-tat-main b {
  overflow: hidden;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-tat-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-tat-action {
  flex: 0 0 auto;
  color: var(--gold2);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.char-tat-card.equipped .char-tat-action {
  color: #a9d9a6;
}

.char-clear {
  width: 100%;
  margin-top: 6px;
}

.char-catalog-hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.char-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 6px;
}

.char-slot.selected {
  border-color: var(--gold);
  background: #241f18;
}

.char-edit-bar {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.char-edit-bar .btn {
  flex: 0 0 auto;
  min-width: 150px;
}

@media (max-width: 520px) {
  .char-edit-bar .btn {
    flex: 1;
    min-width: 0;
  }
}

.char-picker-card {
  width: min(560px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  text-align: left;
}

.char-pick-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 52vh;
  margin: 9px 0;
  overflow: auto;
  padding-right: 2px;
}

.char-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.char-pick:hover {
  border-color: var(--gold);
}

.char-pick.equipped {
  border-color: var(--gold);
  background: #241f18;
}

.char-pick-dot {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.char-pick-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.char-pick-main b {
  overflow: hidden;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.char-pick-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

@media (max-width: 820px) {
  .char-layout {
    grid-template-columns: 1fr;
  }

  .char-layout.editing {
    grid-template-columns: 1fr;
  }

  .char-stash {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    padding: 8px 10px;
  }

  .char-stash-title,
  .char-stash-note {
    display: none;
  }

  .char-stash-row {
    display: flex;
    align-items: baseline;
    gap: 4px;
    padding: 0;
    border: 0;
  }

  .char-stash-row span {
    font-size: 14px;
  }

  .char-stash-row small {
    font-size: 9px;
  }

  .char-scene {
    min-height: 430px;
  }

  .char-right-title {
    display: none;
  }

  .char-right {
    padding: 8px;
  }

  .char-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .char-slot-name {
    font-size: 9.5px;
  }
}

@media (max-width: 480px) {
  .char-scene {
    min-height: 390px;
  }

  .char-stage {
    height: 92%;
  }

  .cell-window {
    width: 28%;
  }

  .cell-poster {
    display: none;
  }

  .char-view-toggle {
    right: 6px;
    top: 6px;
  }
}

.notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(3px);
}

.notice-card {
  width: min(460px, 100%);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--gold);
  background: var(--card2);
  box-shadow: var(--shadow);
  text-align: center;
}

.notice-card h2 {
  margin: 0 0 10px;
  color: var(--gold2);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.notice-card p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.notice-card .notice-sub {
  color: var(--muted);
  font-size: 12px;
}

.player-card {
  text-align: left;
  max-height: min(86vh, 760px);
  overflow: auto;
}

.player-room-scene {
  min-height: 360px;
  margin-top: 12px;
  margin-bottom: 12px;
  border-radius: 10px;
}

.player-room-scene .char-stage {
  height: 93%;
}

@media (max-width: 520px) {
  .player-room-scene {
    min-height: 300px;
  }
}

.player-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.player-head h2 {
  margin: 0;
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.player-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--bg2);
}

.player-stats span {
  color: var(--muted);
  font-size: 11px;
}

.player-stats b {
  color: var(--gold2);
  font-size: 15px;
}

.player-id {
  margin: 8px 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.player-id b {
  color: var(--text);
  letter-spacing: 0.08em;
}

.player-subtitle {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--gold2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.player-achievements {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.player-achievements li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
}

/* ---------- тосты и модалка ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  max-width: min(560px, 92vw);
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: #241f18;
  box-shadow: var(--shadow);
  font-size: 13px;
  cursor: pointer;
  animation: toastIn 0.18s ease-out;
}

.toast.good {
  border-color: #3d5a33;
}

.toast.bad {
  border-color: #6b342a;
}

.toast.info {
  border-color: var(--line2);
}

/* ---------- уведомления о достижениях ---------- */

.ach-toasts {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 7px;
  width: min(340px, calc(100vw - 20px));
  pointer-events: none;
}

.ach-toast {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid #5c4a26;
  background: linear-gradient(180deg, #2b241a, #1f1a13);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  animation: achToastIn 0.22s ease-out;
}

.ach-toast-ico {
  flex: 0 0 auto;
  font-size: 21px;
  line-height: 1;
}

.ach-toast-main {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.ach-toast-title {
  font-size: 11px;
  color: var(--muted);
}

.ach-toast-name {
  color: var(--gold2);
  font-weight: 700;
}

.ach-toast-sub {
  overflow: hidden;
  color: #b9ae9f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ach-toast-points {
  flex: 0 0 auto;
  color: var(--gold2);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

@keyframes achToastIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
}

.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--line2);
  background: linear-gradient(180deg, #221f1a, #191715);
  box-shadow: var(--shadow);
  overflow-y: auto;
}

.modal-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-card h2.good {
  color: #a9d194;
}

.modal-card h2.bad {
  color: #e29a8a;
}

.modal-sub {
  font-size: 12.5px;
  color: var(--muted);
}

.rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1e1b17;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.rewards.bad {
  color: #e2a396;
}

.rounds-wrap {
  overflow: auto;
  max-height: 34vh;
  padding: 6px 0;
  border-top: 1px dashed #2f2a24;
  border-bottom: 1px dashed #2f2a24;
}

.rounds {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #bdb3a6;
}

.rounds li:nth-child(odd) {
  color: #d6ccbe;
}

/* ---------- мелочи ---------- */

.muted {
  color: var(--muted);
}

.tiny {
  font-size: 11.5px;
  color: var(--muted);
}

.note {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

.empty {
  padding: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 8px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (min-width: 720px) {
  .quick {
    grid-template-columns: repeat(3, 1fr);
  }

  .shopgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 380px) {
  .barrow {
    grid-template-columns: 84px 1fr 64px;
    font-size: 11px;
  }

  .statgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- ������ � ������ (v2) ---------- */

.wallet {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 5px 6px;
  max-width: 380px;
  white-space: normal;
  font-variant-numeric: tabular-nums;
}

.track-slots {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.track-slot {
  position: relative;
}

.track-current {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #211d18;
  color: #d9c9ad;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

.track-current:hover,
.track-slot.open .track-current {
  border-color: var(--gold);
  background: #2a251f;
}

.track-current:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 1px;
}

.track-current b {
  color: var(--gold2);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.wallet-shop {
  display: inline-flex;
  flex: 0 0 100%;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 2px;
  padding: 5px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #211d18;
  color: #d9c9ad;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

.wallet-shop:hover,
.wallet-shop.active {
  border-color: var(--gold);
  background: #2a251f;
  color: var(--gold2);
}

.track-caret {
  margin-left: 1px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1;
}

.track-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 190px;
  padding: 5px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: #1b1814;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
}

.track-slot:first-child .track-menu {
  left: 0;
  right: auto;
}

.track-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d9c9ad;
  font: inherit;
  font-size: 12px;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}

.track-option:hover {
  background: #2a251f;
}

.track-option.active {
  background: rgba(224, 189, 85, 0.12);
  color: var(--gold2);
}

.track-option b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.track-option-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cur-ico {
  font-size: 13px;
  line-height: 1;
}

.coin-rub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: linear-gradient(160deg, #f0cd8c, #b8842f);
  color: #2a1c0d;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  vertical-align: -2px;
}

.wallet .cur {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #211d18;
  color: #d9c9ad;
  font-size: 11.5px;
  line-height: 1.3;
}

.wallet .cur b {
  color: var(--gold2);
  font-size: 12px;
}

.wallet .cur.auth b {
  color: var(--steel);
}

.equipped {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.equipped-ico {
  font-size: 28px;
  line-height: 1;
}

.equipped-name {
  font-size: 15px;
  font-weight: 700;
}

.weapon-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.weapon-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.weapon-tile:hover {
  border-color: var(--gold);
}

.weapon-tile.in-hand {
  border-color: var(--gold);
  background: #241f18;
}

.weapon-tile.in-hand .weapon-tile-name {
  color: var(--gold2);
}

.weapon-tile.empty {
  opacity: 0.72;
  border-style: dashed;
}

.weapon-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.weapon-tile-ico {
  font-size: 18px;
  line-height: 1;
}

.weapon-tile-stock {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.weapon-tile-name {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weapon-tile-damage {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.weapon-tile-price {
  font-size: 9.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weapons-summary {
  margin-top: 6px;
}

.weapons-hint {
  margin-top: 7px;
}

.weapon-chip {
  border-color: #5a4a2a;
  color: #f0d7a3;
}

/* ---------- ����� ---------- */

.boss-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  border-color: #5c3a31;
  background: linear-gradient(180deg, #2a1d18, #1b1715);
}

.banner-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}

.boss-section-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}

.boss-section-tabs button {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.boss-section-tabs button:hover {
  color: var(--text);
}

.boss-section-tabs button.active {
  background: var(--gold);
  color: #1a140e;
}

.boss-section-tabs .tag {
  padding: 2px 6px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.16);
  color: inherit;
  font-size: 9px;
}

.boss-item {
  align-items: flex-start;
}

.boss-item .item-main {
  flex: 1;
  min-width: 0;
}

.boss-thumb {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 78px;
  overflow: hidden;
  border: 1px solid #4b3a2a;
  border-radius: 9px;
  background:
    radial-gradient(ellipse at 70% 20%, rgba(224, 181, 106, 0.18), transparent 42%),
    linear-gradient(180deg, #241f1a, #0c0a08);
}

.boss-thumb .boss-svg {
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 92%;
  height: 96%;
  transform: translateX(-50%);
}

.boss-thumb.generic {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 27px;
  font-weight: 800;
  color: var(--gold2);
  background:
    radial-gradient(ellipse at 50% 30%, rgba(224, 181, 106, 0.12), transparent 55%),
    linear-gradient(180deg, #221d18, #0d0b09);
}

.thumb-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 55% 35%, rgba(224, 181, 106, 0.2), transparent 55%);
}

.thumb-figure {
  position: absolute;
  inset: 0;
}

.boss-thumb-photo {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: #1a1511;
  background-position: center 22%;
  background-size: cover;
}

.boss-thumb.defeated .boss-svg {
  filter: grayscale(0.7) brightness(0.8);
}

.boss-item.defeated {
  border-color: #4a3d2a;
}

.boss-item .loot-row {
  margin-top: 7px;
}

.loot-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag.loot-tag {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
}

.arena {
  border-color: #6b342a;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(200, 90, 69, 0.12), transparent 70%),
    linear-gradient(180deg, #221a17, #171412);
}

.arena-title {
  color: #e0a08f !important;
}

.boss-name {
  margin-top: 6px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.boss-avatar-mini {
  display: inline-block;
  width: 44px;
  height: 44px;
  margin-right: 9px;
  border: 1px solid #7a5f2e;
  border-radius: 50%;
  background-color: #1a1511;
  background-position: center 22%;
  background-size: cover;
  box-shadow: 0 0 0 2px rgba(224, 181, 106, 0.12), 0 4px 12px rgba(0, 0, 0, 0.45);
  vertical-align: middle;
}

.bossbar {
  margin-top: 8px;
}

.fill.boss {
  background: linear-gradient(90deg, #6d1f18, #d4694f);
  box-shadow: 0 0 12px rgba(200, 90, 69, 0.4);
  transition: width 0.12s linear;
}

.boss-hp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.boss-hp-meta b {
  color: var(--text);
}

/* ---------- сцена боя ---------- */

.battle-stage {
  position: relative;
  margin-top: 10px;
  aspect-ratio: 16 / 9;
  min-height: 190px;
  overflow: hidden;
  border: 1px solid #4a3327;
  border-radius: 12px;
  background: #0d0b09;
  isolation: isolate;
}

.stage-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 74% 12%, rgba(228, 190, 118, 0.18), transparent 38%),
    radial-gradient(ellipse at 18% 8%, rgba(120, 90, 60, 0.16), transparent 42%),
    linear-gradient(180deg, #24211f 0%, #171512 46%, #0d0b09 100%);
}

.stage-wall {
  position: absolute;
  top: 0;
  bottom: 26%;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 13px),
    repeating-linear-gradient(90deg, #2c221a 0 30px, #241c15 30px 33px);
}

.stage-wall.wall-left {
  left: 0;
  width: 33%;
  clip-path: polygon(0 0, 100% 6%, 86% 100%, 0 100%);
}

.stage-wall.wall-right {
  right: 0;
  width: 39%;
  clip-path: polygon(14% 8%, 100% 0, 100% 100%, 0 100%);
}

.stage-window {
  position: absolute;
  width: 7%;
  height: 9%;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background: #d8a95a;
  opacity: 0.18;
  box-shadow: 0 0 18px rgba(216, 169, 90, 0.35);
}

.stage-window.w1 {
  left: 8%;
  top: 18%;
}

.stage-window.w2 {
  left: 20%;
  top: 28%;
  width: 5%;
  height: 7%;
  opacity: 0.1;
}

.stage-fence {
  position: absolute;
  left: 28%;
  right: 35%;
  top: 24%;
  bottom: 32%;
  opacity: 0.65;
  background:
    repeating-linear-gradient(45deg, transparent 0 9px, rgba(180, 180, 170, 0.12) 9px 10px),
    repeating-linear-gradient(-45deg, transparent 0 9px, rgba(180, 180, 170, 0.08) 9px 10px);
}

.stage-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background:
    repeating-linear-gradient(90deg, transparent 0 44px, rgba(255, 255, 255, 0.025) 44px 46px),
    linear-gradient(180deg, rgba(42, 35, 29, 0.95), #0b0907 72%);
}

.stage-prop {
  position: absolute;
  z-index: 1;
}

.crate {
  width: 13%;
  height: 15%;
  border: 1px solid #4a3826;
  background: linear-gradient(160deg, #38291c, #1f1711);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25);
}

.crate::after {
  content: '';
  position: absolute;
  inset: 12%;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.crate.c1 {
  left: 6%;
  bottom: 14%;
  transform: rotate(-2deg);
}

.crate.c2 {
  left: 16%;
  bottom: 17%;
  width: 10%;
  height: 12%;
  transform: rotate(3deg);
}

.barrel {
  width: 8%;
  height: 20%;
  bottom: 16%;
  border: 1px solid #55462f;
  border-radius: 6px / 10px;
  background: linear-gradient(90deg, #2d2a24, #4a4234 55%, #241f19);
}

.barrel::before,
.barrel::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(0, 0, 0, 0.35);
}

.barrel::before {
  top: 22%;
}

.barrel::after {
  bottom: 22%;
}

.barrel.b1 {
  left: 27%;
}

.barrel.b2 {
  left: 34%;
  bottom: 17%;
  height: 16%;
}

.stage-puddle {
  position: absolute;
  right: 6%;
  bottom: 4%;
  width: 32%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(150, 140, 120, 0.12), transparent 70%);
  filter: blur(2px);
}

.stage-light {
  position: absolute;
  left: -6%;
  top: -12%;
  width: 58%;
  height: 124%;
  background: conic-gradient(
    from 205deg at 18% 0%,
    transparent 0 18deg,
    rgba(232, 196, 124, 0.1) 22deg 34deg,
    transparent 38deg
  );
  filter: blur(2px);
}

.stage-fog {
  position: absolute;
  border-radius: 50%;
  filter: blur(18px);
  opacity: 0.5;
}

.stage-fog.fog-a {
  left: 4%;
  bottom: 24%;
  width: 46%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(190, 180, 160, 0.2), transparent 70%);
}

.stage-fog.fog-b {
  right: 8%;
  bottom: 29%;
  width: 38%;
  height: 18%;
  background: radial-gradient(ellipse, rgba(190, 180, 160, 0.14), transparent 70%);
}

.boss-figure {
  position: absolute;
  right: 4%;
  bottom: 5%;
  z-index: 2;
  width: 36%;
  max-width: 260px;
  height: 88%;
  transform-origin: 50% 100%;
  transition: transform 0.5s ease;
}

.boss-figure::before {
  content: '';
  position: absolute;
  left: -25%;
  right: -15%;
  top: -8%;
  bottom: -4%;
  z-index: -1;
  background: radial-gradient(ellipse at 55% 35%, rgba(224, 181, 106, 0.16), transparent 62%);
}

.boss-motion {
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: boss-breathe 3.4s ease-in-out infinite;
}

.boss-lunge {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 100%;
  animation: boss-lunge 5.6s ease-in-out infinite;
}

.boss-svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
}

.battle-stage[data-stage="2"] .boss-figure {
  transform: rotate(2deg) translateY(3px);
}

.battle-stage[data-stage="3"] .boss-figure {
  transform: rotate(-4deg) translateY(8px) scale(0.985);
}

.battle-stage[data-stage="4"] .boss-figure {
  transform: rotate(9deg) translateY(12px) scale(0.94);
}

.battle-stage[data-stage="4"] .boss-motion {
  animation-name: boss-stagger;
  animation-duration: 4.2s;
}

.battle-stage .dmg {
  opacity: 0;
  transition: opacity 0.45s ease;
}

.battle-stage[data-stage="2"] .dmg-2,
.battle-stage[data-stage="3"] .dmg-2,
.battle-stage[data-stage="3"] .dmg-3,
.battle-stage[data-stage="4"] .dmg-2,
.battle-stage[data-stage="4"] .dmg-3,
.battle-stage[data-stage="4"] .dmg-4 {
  opacity: 1;
}

.stage-vignette {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 45%, transparent 45%, rgba(0, 0, 0, 0.35) 100%);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, 0.8), inset 0 -30px 50px rgba(0, 0, 0, 0.6);
}

.stage-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 68% 42%, rgba(255, 220, 160, 0.55), transparent 45%);
}

.battle-stage.hit .stage-flash {
  animation: stage-flash 0.32s ease-out;
}

.battle-stage.hit .boss-motion {
  animation: boss-hit 0.34s ease-out;
}

.battle-stage.stage-shift {
  animation: stage-shift 0.65s ease;
}

.stage-damage {
  position: absolute;
  z-index: 5;
  color: #ffd28a;
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 8px #000, 0 0 12px rgba(255, 150, 80, 0.5);
  pointer-events: none;
  animation: stage-damage 0.9s ease-out forwards;
}

/* Саныч: реплики и дым */

.boss-speech {
  position: absolute;
  left: 37%;
  top: 9%;
  z-index: 5;
  width: min(230px, 46%);
  height: 46px;
  border: 1px solid #7a6a45;
  border-radius: 10px;
  background: rgba(24, 20, 16, 0.86);
  color: #e8d8b0;
  font-size: 11px;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(3px);
}

.boss-speech::after {
  content: '';
  position: absolute;
  right: -9px;
  top: 16px;
  border: 6px solid transparent;
  border-left-color: #7a6a45;
}

.speech-line {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  opacity: 0;
  animation: speech-cycle 9s infinite;
}

.speech-line.l2 {
  animation-delay: 3s;
}

.speech-line.l3 {
  animation-delay: 6s;
}

.sanych-smoke {
  position: absolute;
  left: 58%;
  top: 12%;
  z-index: 3;
  width: 24%;
  height: 32%;
  pointer-events: none;
}

.sanych-smoke i {
  position: absolute;
  left: 0;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(220, 220, 210, 0.36);
  filter: blur(3px);
  opacity: 0;
  animation: sanych-puff 4.2s ease-out infinite;
}

.sanych-smoke i:nth-child(2) {
  left: 7px;
  animation-delay: 1.4s;
}

.sanych-smoke i:nth-child(3) {
  left: 3px;
  animation-delay: 2.8s;
}

.sanych-ember {
  animation: sanych-ember 1.8s ease-in-out infinite;
}

.battle-stage[data-boss="sanych"] .sanych-cap {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  transition: transform 0.5s ease;
}

.battle-stage[data-boss="sanych"][data-stage="2"] .sanych-cap {
  transform: rotate(4deg);
}

.battle-stage[data-boss="sanych"][data-stage="3"] .sanych-cap {
  transform: rotate(8deg);
}

.battle-stage[data-boss="sanych"][data-stage="4"] .sanych-cap {
  transform: rotate(14deg) translateY(2px);
}

.battle-stage[data-boss="sanych"] .stage-sky {
  background:
    radial-gradient(ellipse at 74% 12%, rgba(150, 190, 210, 0.16), transparent 38%),
    radial-gradient(ellipse at 18% 8%, rgba(80, 110, 120, 0.18), transparent 42%),
    linear-gradient(180deg, #202a2e 0%, #151d20 46%, #0b0d0e 100%);
}

@keyframes speech-cycle {
  0%,
  27% {
    opacity: 1;
    transform: translateY(0);
  }
  33%,
  100% {
    opacity: 0;
    transform: translateY(-3px);
  }
}

@keyframes sanych-puff {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.5);
  }
  22% {
    opacity: 0.55;
  }
  100% {
    opacity: 0;
    transform: translate(14px, -52px) scale(1.8);
  }
}

@keyframes sanych-ember {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 1;
  }
}

@keyframes boss-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-4px) scale(1.006);
  }
}

@keyframes boss-stagger {
  0%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  25% {
    transform: translate(-2px, 2px) rotate(-1.2deg);
  }
  50% {
    transform: translate(2px, 1px) rotate(1deg);
  }
  75% {
    transform: translate(-1px, 2px) rotate(-0.6deg);
  }
}

@keyframes boss-lunge {
  0%,
  58%,
  100% {
    transform: translate(0, 0) rotate(0);
  }
  64% {
    transform: translate(-8px, 2px) rotate(-2deg);
  }
  69% {
    transform: translate(12px, -2px) rotate(1.5deg);
  }
  74% {
    transform: translate(-2px, 0) rotate(0);
  }
}

@keyframes boss-hit {
  0% {
    transform: translateX(0) rotate(0);
    filter: brightness(1);
  }
  20% {
    transform: translateX(12px) rotate(3deg);
    filter: brightness(1.7);
  }
  55% {
    transform: translateX(-4px) rotate(-1deg);
  }
  100% {
    transform: translateX(0) rotate(0);
    filter: brightness(1);
  }
}

@keyframes stage-flash {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes stage-shift {
  0% {
    filter: brightness(1);
  }
  18% {
    filter: brightness(1.45) saturate(1.25);
  }
  100% {
    filter: brightness(1);
  }
}

@keyframes stage-damage {
  0% {
    opacity: 0;
    transform: translate(-50%, 10px) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -42px) scale(1);
  }
}

@media (max-width: 520px) {
  .battle-stage {
    aspect-ratio: 4 / 3;
    min-height: 200px;
  }

  .boss-figure {
    right: 2%;
    width: 46%;
    height: 82%;
  }

  .boss-speech {
    left: 28%;
    top: 7%;
    width: 54%;
    height: 46px;
    font-size: 10px;
  }

  .boss-speech::after {
    top: 18px;
  }

  .sanych-smoke {
    left: 54%;
    top: 10%;
  }

  .boss-thumb {
    flex-basis: 48px;
    width: 48px;
    height: 60px;
  }

  .boss-avatar-mini {
    width: 36px;
    height: 36px;
    margin-right: 7px;
  }

  .boss-thumb.generic {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-motion,
  .boss-lunge,
  .battle-stage.hit .boss-motion,
  .speech-line,
  .sanych-smoke i,
  .sanych-ember {
    animation: none;
  }

  .speech-line.l1 {
    opacity: 1;
  }
}

.damage-card {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.damage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--muted);
}

.damage-head b {
  color: var(--gold2);
}

.damage-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.damage-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
}

.damage-list li.you {
  color: var(--gold2);
}

.damage-place {
  width: 18px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.damage-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.damage-value {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.damage-value small {
  color: var(--muted);
}

.hotbar-wrap {
  margin: 8px 0;
  padding: 8px 9px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.hotbar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 11px;
  color: var(--muted);
}

.hotbar {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.hotbar-slot {
  position: relative;
  flex: 1 0 74px;
  min-height: 54px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 5px 6px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  background: var(--bg2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.hotbar-slot.empty {
  align-items: center;
  justify-content: center;
  color: var(--muted);
  border-style: dashed;
}

.hotbar-slot.low {
  border-color: var(--red);
}

.hotbar-plus {
  font-size: 18px;
  line-height: 1;
}

.hotbar-ico {
  font-size: 13px;
  line-height: 1;
}

.hotbar-name {
  padding-right: 20px;
  font-size: 10px;
  line-height: 1.15;
  color: var(--gold2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hotbar-qty {
  position: absolute;
  top: 4px;
  right: 5px;
  font-size: 10px;
  color: var(--muted);
}

.hotbar-damage {
  font-size: 11.5px;
  font-weight: 700;
}

.hotbar-left {
  padding-right: 14px;
  font-size: 9px;
  line-height: 1.1;
  color: var(--muted);
}

.hotbar-clear {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
}

/* На телефоне боевой пояс ужимается в одну линию без горизонтальной прокрутки */
@media (max-width: 480px) {
  .arena .hotbar-slot {
    flex: 1 1 0;
    min-width: 0;
    padding: 4px 5px;
  }

  .arena .hotbar-name {
    display: none;
  }

  .arena .hotbar-damage {
    font-size: 10px;
  }

  .arena .hotbar-left {
    padding-right: 0;
    font-size: 8.5px;
  }

  .arena .hotbar-clear {
    width: 13px;
    height: 13px;
    font-size: 10px;
  }
}

.book-card {
  width: min(760px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  text-align: left;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
  max-height: 46vh;
  overflow: auto;
  padding-right: 2px;
}

.stack-card {
  padding: 7px 8px;
  border: 1px solid var(--line2);
  border-radius: 9px;
  background: var(--bg2);
  cursor: grab;
}

.stack-card.low {
  border-color: var(--red);
  opacity: 0.65;
}

.stack-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: var(--gold2);
}

.stack-weapon {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.stack-damage {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 700;
}

.stack-have {
  margin-top: 2px;
  font-size: 10px;
  color: var(--muted);
}

.bonus-card {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid #5c4a26;
  background: rgba(224, 189, 85, 0.05);
}

.bonus-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  font-size: 12px;
  color: #cdbd93;
}

.bonus-head b {
  color: #f1d98a;
  font-variant-numeric: tabular-nums;
}

.bonus-track {
  position: relative;
  height: 10px;
  margin: 13px 0 16px;
  border-radius: 999px;
  border: 1px solid #3a3227;
  background: #241f18;
}

.bonus-fill {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #7a6320, #e0bd55);
  transition: width 0.12s linear;
}

.bonus-mark {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2px solid #7a6320;
  background: #241f18;
  box-shadow: 0 0 0 2px rgba(18, 17, 16, 0.9);
  transition: background 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.bonus-mark.done {
  border-color: #f1d98a;
  background: #e0bd55;
  box-shadow: 0 0 8px rgba(224, 189, 85, 0.6);
}

.bonus-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
}

.bonus-stage {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.bonus-stage.done {
  color: #a9d9a6;
}

.bonus-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid #4b4130;
  background: #241f18;
  font-size: 10px;
}

.bonus-stage.done .bonus-pip {
  border-color: #3d5a3f;
  background: rgba(61, 90, 63, 0.25);
}

.bonus-reward {
  color: #f1d98a;
  font-variant-numeric: tabular-nums;
}

.bonus-stage.done .bonus-reward {
  color: #a9d9a6;
}

.weapon-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  margin-top: 12px;
}

.weapon-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.weapon-btn {
  display: grid;
  grid-template-columns: 28px 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line2);
  background: #2a251f;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, transform 0.12s, background 0.12s;
}

.weapon-btn:hover:not(:disabled) {
  border-color: var(--gold);
  background: #342d25;
  transform: translateY(-1px);
}

.weapon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.weapon-btn.buy {
  border-style: dashed;
  border-color: #4a3f28;
  background: #1d1a16;
  color: var(--muted);
}

.weapon-btn.buy:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--text);
}

.weapon-btn.buy .weapon-dmg {
  color: #8f7f6c;
}

.weapon-btn.buy .weapon-cost {
  color: var(--gold2);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.weapon-buy-modal h2 {
  color: var(--gold2);
}

.weapon-buy-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.weapon-buy-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #151310;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.weapon-buy-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(224, 189, 85, 0.12);
}

.weapon-buy-chips {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.weapon-chip {
  padding: 9px 4px;
  border-radius: 9px;
  border: 1px solid var(--line2);
  background: #1d1a16;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.weapon-chip:hover:not(:disabled) {
  border-color: var(--gold);
}

.weapon-chip.active {
  border-color: var(--gold);
  background: #2a251f;
  color: var(--gold2);
}

.weapon-chip:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.weapon-shop-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}

.weapon-shop-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.weapon-buy-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.weapon-buy-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.weapon-ico {
  font-size: 20px;
}

.weapon-name {
  font-weight: 700;
  font-size: 13.5px;
}

.weapon-dmg {
  color: #e2a396;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.weapon-cost {
  min-width: 48px;
  text-align: right;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.hitlog {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 11px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed #2f2a24;
  background: rgba(0, 0, 0, 0.16);
  font-size: 12px;
  color: #c9c0b4;
  min-height: 34px;
}

.locked-card {
  opacity: 0.62;
}

/* ---------- ������ ---------- */

.stackgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}

.stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.stack-main {
  flex: 1 1 240px;
  min-width: 0;
}

.stack-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #151310;
  font-variant-numeric: tabular-nums;
}

.qty b {
  min-width: 34px;
  text-align: center;
  font-size: 13px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #2a251f;
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.qty-btn:hover:not(:disabled) {
  background: #3a332b;
}

.qty-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.currency-shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.currency-shop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.currency-shop-ico {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: #151310;
  font-size: 18px;
}

.currency-shop-main {
  flex: 1;
  min-width: 0;
}

.stack-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0;
}

.parcel-tokens {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #5c4a26;
  background: rgba(224, 189, 85, 0.06);
  font-size: 13px;
}

.parcel-tokens b {
  color: var(--gold2);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.parcel-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 210px;
  padding: 16px 0 10px;
  border-radius: 16px;
  border: 1px dashed #4a3f28;
  background:
    radial-gradient(circle at 50% 55%, rgba(224, 189, 85, 0.1), transparent 62%),
    #171410;
  overflow: hidden;
  perspective: 700px;
}

.parcel-crate {
  position: relative;
  width: 190px;
  height: 116px;
  margin-top: 22px;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.5));
  transform-style: preserve-3d;
}

.parcel-stage.idle .parcel-crate {
  animation: parcelFloat 2.4s ease-in-out infinite;
}

.parcel-stage.opening .parcel-crate {
  animation: parcelShake 0.55s ease-in-out infinite;
}

.parcel-body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 92px;
  border-radius: 6px 6px 12px 12px;
  border: 2px solid #5f3f22;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 22px 100%,
    linear-gradient(180deg, #a97a45, #6f4b27);
  box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.4);
}

.parcel-inside {
  position: absolute;
  inset: 7px 7px 5px;
  border-radius: 8px;
  border: 1px solid #3b2714;
  background:
    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 50% 15%, #4e3822, #221609 78%);
  box-shadow: inset 0 10px 18px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.parcel-lid {
  position: absolute;
  top: 0;
  left: -5px;
  width: calc(100% + 10px);
  height: 52px;
  border-radius: 8px;
  border: 2px solid #6a4827;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px) 0 0 / 26px 100%,
    linear-gradient(180deg, #c18e56, #865b31);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.4);
  transform-origin: top center;
  z-index: 2;
}

.parcel-stage.result .parcel-lid {
  animation: parcelLidOpen 0.55s cubic-bezier(0.18, 0.8, 0.32, 1) forwards;
}

.parcel-loot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  animation: parcelLootPop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) 0.18s both;
}

.parcel-loot-icon {
  font-size: 36px;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgba(224, 189, 85, 0.6));
}

.parcel-loot-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 62px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #b9a982;
  background: #f1e2c0;
  color: #372716;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
  transform: rotate(-2deg);
}

.parcel-loot-tag b {
  font-size: 15px;
  line-height: 1.1;
}

.parcel-loot-tag small {
  font-size: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.parcel-open-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.parcel-spark {
  position: absolute;
  color: var(--gold2);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  animation: parcelSpark 0.9s ease-out infinite;
}

.spark-1 {
  top: 22%;
  left: 26%;
}

.spark-2 {
  top: 16%;
  right: 28%;
  animation-delay: 0.18s;
}

.spark-3 {
  bottom: 24%;
  right: 34%;
  animation-delay: 0.36s;
}

.parcel-reward-sub {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.parcel-flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(224, 189, 85, 0.38), transparent 62%);
  animation: parcelFlash 0.75s ease-out forwards;
}

@keyframes parcelFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes parcelShake {
  0%,
  100% {
    transform: rotate(0) scale(1);
  }
  20% {
    transform: rotate(-4deg) scale(1.03);
  }
  40% {
    transform: rotate(4deg) scale(1.05);
  }
  60% {
    transform: rotate(-3deg) scale(1.02);
  }
  80% {
    transform: rotate(3deg) scale(1.04);
  }
}

@keyframes parcelSpark {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(4px);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: scale(1.35) translateY(-12px);
  }
}

@keyframes parcelLidOpen {
  0% {
    transform: translateY(0) rotateX(0);
  }
  55% {
    transform: translateY(-28px) rotateX(-48deg);
  }
  100% {
    transform: translateY(-20px) rotateX(-68deg);
  }
}

@keyframes parcelLootPop {
  from {
    opacity: 0;
    transform: scale(0.5) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes parcelFlash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* ---------- �������� � ������ ---------- */

.chip.rarity-common {
  border-color: #4a443a;
  color: #cfc3a6;
}

.chip.rarity-rare {
  border-color: #3d5a63;
  color: #a6d0da;
}

.chip.rarity-epic {
  border-color: #5c3a5f;
  color: #dcaee6;
}

.tag.rarity-common {
  color: #cfc3a6;
}

.tag.rarity-rare {
  color: #a6d0da;
  border-color: #3d5a63;
}

.tag.rarity-epic {
  color: #dcaee6;
  border-color: #5c3a5f;
}

.loot-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.loot-list .chip small {
  color: var(--muted);
  font-size: 10px;
  margin-left: 4px;
}

.result-line {
  font-size: 12.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- ������ �������� v2 ---------- */

@media (min-width: 640px) {
  .weapon-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .stackgrid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .profile-top {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .wallet {
    grid-column: 1 / -1;
    justify-content: flex-start;
    max-width: none;
    margin-top: 8px;
  }

  .track-slots {
    justify-content: flex-start;
  }

  .stack-actions {
    width: 100%;
    justify-content: space-between;
  }

  .weapon-btn {
    grid-template-columns: 24px 1fr auto;
  }

  .weapon-cost {
    grid-column: 2 / -1;
    text-align: left;
    min-width: 0;
  }
}

/* ---------- �����, ������� �����, ������� (v3) ---------- */

.cur b {
  font-variant-numeric: tabular-nums;
}

.bad-text {
  margin-top: 6px;
  color: #e28d7c;
  font-size: 11.5px;
}

.chain {
  margin-top: 5px;
}

.boss-key-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px dashed #5c4a26;
  background: rgba(224, 189, 85, 0.05);
  font-size: 11.5px;
  color: #cdbd93;
}

.boss-key-line b {
  color: #f1d98a;
  font-variant-numeric: tabular-nums;
}

.boss-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.boss-modes-solo {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.07);
}

.mode-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #211d18;
  color: #cfc3a6;
  font: inherit;
  font-size: 11.5px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.mode-chip small {
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.mode-chip:hover {
  border-color: #5c4a26;
}

.mode-chip.active {
  border-color: var(--gold);
  background: #2a251f;
  color: var(--gold2);
}

.mode-chip.active small {
  color: #d9c9ad;
}

.mode-desc {
  margin-top: 5px;
  font-size: 11px;
}

.mode-tag {
  text-transform: none;
  letter-spacing: 0.01em;
  border-color: #5c4a26;
  color: #f1d98a;
}

.arena-mode {
  margin-top: 3px;
}

.tag.good {
  border-color: #3d5a3f;
  color: #a9d9a6;
}

.tag.bad {
  border-color: #6b342a;
  color: #e2a396;
}

/* ---------- ������� ---------- */

.fill.talent {
  background: linear-gradient(90deg, #3f5d7a, #7fb3d5);
  box-shadow: 0 0 10px rgba(127, 179, 213, 0.25);
}

.talent-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.talent-meta b {
  color: var(--text);
}

.talent-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.talent-card .bar {
  margin-top: 9px;
}

.talent-hero {
  border-color: #35506a;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(127, 179, 213, 0.1), transparent 70%),
    linear-gradient(180deg, #1d242b, #171a1c);
}

.talent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.next-talent {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed #35506a;
  background: rgba(0, 0, 0, 0.18);
}

.next-talent .item-title {
  margin-top: 3px;
}

.talent-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 9px;
}

.talent-stat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card2);
  font-size: 12px;
}

.talent-stat b {
  color: #9cc8e8;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.talent-stat.muted {
  opacity: 0.45;
}

.talent-tracks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.talent-track {
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.talent-track.active {
  border-color: #35506a;
  background: #1e262d;
}

.talent-track.locked {
  opacity: 0.55;
}

.talent-track-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.talent-track .bar {
  margin-bottom: 6px;
}

.upcoming {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 9px;
}

.upcoming-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12.5px;
  color: #cfc3a6;
}

.upcoming-row .tag {
  min-width: 34px;
  text-align: center;
}

/* ---------- зоны ---------- */

.fill.zone {
  background: linear-gradient(90deg, #5c4a26, #c9a84c);
  box-shadow: 0 0 10px rgba(201, 168, 76, 0.16);
}

.zones-hero,
.zone-hero {
  border-color: #5c4a26;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(224, 189, 85, 0.08), transparent 70%),
    linear-gradient(180deg, #211d17, #171513);
}

.zones-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.zones-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.zone-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.zone-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.zone-card.locked {
  opacity: 0.55;
}

.zone-card.cleared {
  border-color: #3d5a33;
  background: rgba(61, 90, 51, 0.08);
}

.zone-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #5c4a26;
  background: #2a251f;
  color: var(--gold2);
  font-size: 14px;
  font-weight: 800;
}

.zone-main {
  flex: 1;
  min-width: 0;
}

.zone-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.zone-title .item-title {
  font-size: 14px;
}

.zone-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 5px 0 6px;
  font-size: 11px;
  color: var(--muted);
}

.zone-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.zone-card > .btn {
  margin-left: auto;
}

.zone-jobs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.zone-job {
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
  opacity: 0.62;
}

.zone-job.active {
  opacity: 1;
  border-color: #5c4a26;
  background: rgba(224, 189, 85, 0.05);
}

.zone-job.done {
  opacity: 1;
  border-color: #3d5a33;
  background: rgba(61, 90, 51, 0.08);
}

.zone-job-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px 10px;
  margin-bottom: 6px;
}

.zone-job-head .item-title {
  font-size: 12.5px;
}

.zone-job .bar {
  margin-bottom: 6px;
}

.zone-job-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.zone-job-foot .btn {
  margin-left: auto;
}

.zone-clear-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 12px;
}

@media (max-width: 560px) {
  .zone-card > .btn,
  .zone-job-foot .btn {
    width: 100%;
    margin-left: 0;
  }
}

/* ---------- друзья ---------- */

.friends-hero {
  border-color: #35506a;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(127, 179, 213, 0.08), transparent 70%),
    linear-gradient(180deg, #1d242b, #171a1c);
}

.friends-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.friends-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.friends-add {
  display: flex;
  gap: 8px;
}

.friends-add .auth-input {
  flex: 1;
}

.linklike {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.linklike:hover {
  color: var(--gold2);
  text-decoration: underline;
}

.rating li.clickable {
  cursor: pointer;
}

.rating li.clickable:hover {
  background: rgba(255, 255, 255, 0.04);
}

.friend-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.friend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.friend-row.incoming {
  border-color: #35506a;
  background: #1e242a;
}

.friend-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid #5c4a26;
  background: #2a251f;
  color: var(--gold2);
  font-size: 15px;
  font-weight: 800;
}

.friend-main {
  flex: 1;
  min-width: 0;
}

.friend-main .item-title {
  font-size: 13px;
}

.friend-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.player-card .friend-actions {
  align-items: center;
  margin: 10px 0 4px;
}

.friend-state {
  font-size: 12px;
  color: var(--muted);
}

/* ---------- лента корешей ---------- */

.friends-feed-wrap {
  display: flex;
  align-items: stretch;
  gap: 5px;
  margin-top: 8px;
}

.friends-feed {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.friends-feed::-webkit-scrollbar {
  display: none;
}

.friend-feed-card {
  display: flex;
  flex: 0 0 94px;
  flex-direction: column;
  gap: 0;
  padding: 4px;
  border: 1px solid var(--line2);
  border-radius: 10px;
  background: linear-gradient(180deg, #211c17, #14110e);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}

.friend-feed-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.friend-feed-card.top {
  border-color: #6b5427;
}

.friend-feed-card.you {
  border-color: #7a5f2e;
  background: linear-gradient(180deg, #2a231a, #17130f);
}

.friend-feed-you {
  color: var(--gold2);
  font-size: 7.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.friend-feed-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 76px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 7px;
  background:
    radial-gradient(ellipse at 50% 28%, #3c3124, #16120e 72%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px);
}

.friend-feed-initial {
  color: #b99a5e;
  font-size: 30px;
  font-weight: 800;
  text-shadow: 0 2px 4px #000;
}

.friend-feed-rank {
  position: absolute;
  left: 5px;
  top: 4px;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.friend-feed-crown {
  position: absolute;
  right: 3px;
  top: -2px;
  font-size: 16px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}

.friend-feed-name {
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.friend-feed-auth {
  color: var(--gold2);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.friends-feed-arrow {
  flex: 0 0 28px;
  border: 1px solid var(--line2);
  border-radius: 8px;
  background: #191511;
  color: var(--gold2);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.friends-feed-arrow:hover {
  border-color: var(--gold);
}

@media (max-width: 520px) {
  .friend-feed-card {
    flex-basis: 82px;
  }

  .friend-feed-photo {
    height: 66px;
  }

  .friends-feed-arrow {
    flex-basis: 24px;
    font-size: 17px;
  }
}

/* ---------- сеты ---------- */

.fill.set {
  background: linear-gradient(90deg, #6a4b1e, #e0bd55);
  box-shadow: 0 0 10px rgba(224, 189, 85, 0.2);
}

.sets-hero {
  border-color: #5c4a26;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(224, 189, 85, 0.09), transparent 70%),
    linear-gradient(180deg, #211d17, #171513);
}

.set-hero-meta,
.set-summary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.set-hero-meta b,
.set-summary-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.set-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.set-card {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.set-card.complete {
  border-color: #5c4a26;
  background: rgba(224, 189, 85, 0.05);
}

.set-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.set-toggle {
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.set-toggle:hover .item-title {
  color: var(--gold2);
}

.set-chevron {
  flex: 0 0 auto;
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

.set-card.open {
  border-color: #5c4a26;
}

.set-body {
  animation: setBodyIn 0.16s ease-out;
}

@keyframes setBodyIn {
  from {
    opacity: 0;
    transform: translateY(-3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.set-head > div:first-child,
.shop-set-head > div:first-child {
  min-width: 0;
}

.set-head-tags,
.shop-set-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.tag.warn {
  border-color: #6a5a2c;
  color: #f1d98a;
  background: rgba(224, 189, 85, 0.08);
}

/* ---------- камера: внутренние вкладки ---------- */

.camera-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.camera-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 2px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.camera-tabs button .ico {
  font-size: 13px;
  line-height: 1;
}

.camera-tabs button.active {
  background: #2a251f;
  color: var(--gold2);
}

.set-bonus-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 12px;
  margin-top: 7px;
  font-size: 11.5px;
  color: var(--muted);
}

.set-bonus-line b {
  color: #f1d98a;
  font-variant-numeric: tabular-nums;
}

.set-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 9px;
}

.set-item {
  padding: 7px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1c1915;
  opacity: 0.62;
}

.set-item.owned {
  opacity: 1;
  border-color: #3d5a33;
  background: rgba(61, 90, 51, 0.1);
}

.set-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.set-item-name {
  font-size: 11.5px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.set-item .tiny {
  margin-top: 3px;
  font-size: 10.5px;
}

.loot-bonus {
  display: block;
  margin-top: 2px;
  color: #f1d98a;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
}

.shop-back {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.shop-set-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.shop-set {
  padding: 10px 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.shop-set.complete {
  border-color: #3d5a3f;
  background: rgba(61, 90, 63, 0.1);
}

.shop-set-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.shop-set-head b {
  color: #f1d98a;
}

.shop-set-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.shop-set-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1c1915;
  opacity: 0.76;
}

.shop-set-item.owned {
  opacity: 1;
  border-color: #3d5a33;
  background: rgba(61, 90, 51, 0.08);
}

.shop-set-item-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shop-set-item-main .item-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-set-slot {
  color: var(--muted);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.shop-set-price {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #d9c9ad;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.shop-set-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 420px) {
  .shop-set-item {
    grid-template-columns: 1fr auto;
  }

  .shop-set-item .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .set-items {
    grid-template-columns: 1fr;
  }
}

/* ---------- достижения ---------- */

.fill.ach {
  background: linear-gradient(90deg, #6a4b1e, #e0bd55);
  box-shadow: 0 0 10px rgba(224, 189, 85, 0.22);
}

.ach-hero {
  border-color: #5c4a26;
  background:
    radial-gradient(600px 200px at 50% 0%, rgba(224, 189, 85, 0.09), transparent 70%),
    linear-gradient(180deg, #211d17, #171513);
}

.ach-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.ach-meta b {
  color: var(--gold2);
  font-variant-numeric: tabular-nums;
}

.ach-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.ach-boss {
  padding: 10px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.ach-boss-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.ach-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.ach-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}

.ach-tabs button {
  display: inline-flex;
  flex: 1 1 30%;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.ach-tabs button .ico {
  font-size: 13px;
  line-height: 1;
}

.ach-tabs button.active {
  background: #2a251f;
  color: var(--gold2);
}

.ach-tab-count {
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.ach-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ach-group {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card2);
}

.ach-group.open {
  border-color: #5c4a26;
}

.ach-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ach-group-head:hover {
  background: rgba(224, 189, 85, 0.04);
}

.ach-group-ico {
  flex: 0 0 auto;
  width: 22px;
  text-align: center;
  font-size: 18px;
}

.ach-group-title {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.ach-group-title b {
  font-size: 13px;
}

.ach-group-title small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ach-chevron {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.ach-points {
  flex: 0 0 auto;
  color: var(--gold2);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ach-group-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 7px 9px 9px;
  border-top: 1px solid var(--line);
}

.ach-row {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: #1c1915;
  opacity: 0.72;
}

.ach-row.done {
  opacity: 1;
  border-color: #3d5a33;
  background: rgba(61, 90, 51, 0.1);
}

.ach-row.current {
  opacity: 1;
  border-color: #5c4a26;
  background: rgba(224, 189, 85, 0.06);
}

.ach-row.locked {
  opacity: 0.55;
}

.ach-row-main {
  flex: 1;
  min-width: 0;
}

.ach-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ach-row .bar {
  margin: 5px 0 4px;
}

.ach-name {
  font-size: 12px;
  font-weight: 700;
}

.ach-badge {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #1c1915;
  opacity: 0.64;
}

.ach-badge.done {
  opacity: 1;
  border-color: #5c4a26;
  background: rgba(224, 189, 85, 0.08);
}

.ach-ico {
  font-size: 22px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.5;
}

.ach-badge.done .ach-ico {
  filter: none;
  opacity: 1;
}

.ach-info {
  flex: 1;
  min-width: 0;
}

.ach-name {
  font-size: 12.5px;
  font-weight: 700;
}

.ach-info .bar {
  margin: 5px 0 4px;
}

.ach-info .tiny {
  font-size: 10.5px;
}

.good-text {
  color: #a9d9a6;
}

.ach-solo-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 9px;
}

.ach-solo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card2);
  opacity: 0.7;
}

.ach-solo.done {
  opacity: 1;
  border-color: #3d5a3f;
  background: rgba(61, 90, 63, 0.12);
}

.ach-solo .ach-ico {
  font-size: 24px;
}

.ach-solo.done .ach-ico {
  filter: none;
  opacity: 1;
}

.ach-solo-main {
  flex: 1;
  min-width: 0;
}

.ach-result {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed #5c4a26;
  background: rgba(224, 189, 85, 0.05);
}

.ach-result-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.ach-tag {
  border-color: #6a5a2c;
  color: #f1d98a;
}

@media (max-width: 560px) {
  .ach-grid {
    grid-template-columns: 1fr;
  }

  .ach-grid.four {
    grid-template-columns: 1fr 1fr;
  }

  .ach-points {
    display: none;
  }
}

/* ����� ������� ������� �� �������� */
@media (max-width: 420px) {
  .nav button .lbl {
    font-size: 9.5px;
  }

  .nav button .ico {
    font-size: 17px;
  }

  .talent-summary {
    grid-template-columns: 1fr;
  }

  .ach-grid {
    grid-template-columns: 1fr;
  }
}
