/* Общий каркас подготовки к рейду. */
.up-page { padding: 46px 54px; }
.up-header, .up-header-right { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.up-balance { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 15px; }
.up-balance b { color: var(--gold); }
.up-balance-runes b { color: #ddd3ff; }
.up-balance img, .up-buy img { width: 19px; image-rendering: pixelated; }
.up-reset-description p { margin: 0 0 8px; }
.up-reset-shortfall { color: #ff948b; }

/* Карта дерева навыков */
.up-tree-page {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  height: 100%;
  box-sizing: border-box;
  padding: 26px 44px;
}
.up-tree-page .up-header h2 { white-space: nowrap; }
.up-tree-page .up-header-right { gap: 16px; }
.up-map-controls, .up-wallet {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 12px;
  border: 1px solid #605048;
  border-radius: 8px;
  background: #191820;
  white-space: nowrap;
}
.up-zoom-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 16px;
  border-right: 1px solid #514653;
  color: var(--ink);
  font-size: 15px;
}
.up-map-controls .btn {
  min-height: 32px;
  padding-inline: 12px;
  border-radius: 7px;
  font-size: 13px;
}
.up-map-controls .up-fit { min-width: 98px; }
.up-help { position: relative; }
.up-map-controls :is(.up-zoom-out, .up-zoom-in, .up-help-button) {
  width: 34px;
  padding: 0;
}
.up-map-controls .up-help-button {
  font-size: 19px;
}
.up-zoom-icon {
  position: relative;
  width: 10px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
}
.up-zoom-in .up-zoom-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: inherit;
  transform: rotate(90deg);
}
.up-map-controls .btn:not(:disabled):is(.up-zoom-out, .up-zoom-in, .up-help-button) {
  border-color: #806042;
  color: #ffdfae;
}
.up-map-controls .btn:not(:disabled):is(.up-zoom-out, .up-zoom-in, .up-help-button):hover,
.up-map-controls .up-help-button[aria-expanded="true"] {
  border-color: var(--gold);
}
.up-wallet {
  justify-content: space-between;
  min-width: 214px;
  padding-inline: 14px;
}
.up-wallet .up-balance + .up-balance {
  padding-left: 12px;
  border-left: 1px solid #514653;
}
.up-wallet b { font-variant-numeric: tabular-nums; }
.up-tree-page :is(.up-reset, .up-back) { min-height: 44px; }
.up-tree-page .up-reset {
  width: 44px;
  padding: 0;
  border-color: #806042;
}
.up-tree-page .up-reset:hover { border-color: var(--gold); }
.up-reset img { width: 39px; height: 39px; object-fit: contain; }
.up-help-toast {
  position: absolute;
  z-index: 2;
  top: calc(100% + 19px);
  right: 0;
  width: max-content;
  padding: 10px 14px;
  border: 1px solid #8a6b52;
  border-radius: 8px;
  background: var(--raised);
  box-shadow: 0 6px 20px #0009;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}
.up-help-toast p { margin: 0; }
.up-map {
  position: relative;
  min-height: 0;
  overflow: clip;
  border: 1px solid #534657;
  border-radius: 14px;
  background: linear-gradient(#12162440, #1216244d),
    var(--up-map-background) center / cover #161b2c;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.up-map:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.up-map-panning, .up-map-panning .up-socket { cursor: grabbing; }
.up-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
}
.up-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.up-vertex {
  position: absolute;
  box-sizing: border-box;
  width: var(--node-size);
  height: var(--node-size);
  display: grid;
  place-items: center;
  border: 2.5px solid var(--branch-line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #10101c50, 0 2px 8px #08071099;
  color: var(--branch);
}
.up-node-label {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  color: inherit;
  font: 700 36px/1 var(--display);
  white-space: nowrap;
  text-shadow: 0 1px 4px #080610, 0 0 6px #080610;
  pointer-events: none;
}
.up-root {
  border-color: #f3ca8a;
  background: radial-gradient(circle at 50% 36%, #594332, #2b2329 82%);
  box-shadow: 0 0 28px #e6af5952, inset 0 0 0 4px #261d22;
  color: #ffe1a7;
}
.up-branch {
  border-color: var(--branch);
  background: radial-gradient(circle at 50% 36%, color-mix(in srgb, var(--branch-line) 32%, #262237), #1c1828 82%);
}
.up-branch .scr-portrait { width: 63px; height: 63px; border-radius: 50%; background: transparent; }
.up-branch .scr-portrait img { width: 203px; left: -69px; top: -51px; }
.up-socket {
  padding: 0;
  background: radial-gradient(circle at 50% 36%, #353142, #211d2b 90%);
  cursor: pointer;
}
.up-node-icon { display: inline-block; width: 60px; height: 60px; object-fit: contain; image-rendering: pixelated; }
.up-socket small { position: absolute; bottom: 6px; color: inherit; font: 700 12px/1 "Segoe UI", sans-serif; }
.up-tier-mark { position: absolute; top: 8px; right: 11px; color: var(--branch); font: 700 13px/1 Georgia, serif; }
.up-currency-badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 1;
  width: 32px;
  height: 32px;
  box-sizing: border-box;
  padding: 3px;
  border: 1.5px solid #9a806d;
  border-radius: 50%;
  background: #1d1926;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}
.up-socket:has(small) .up-node-icon { transform: translateY(-6px); }
.up-detail .up-node-icon { width: 28px; height: 28px; margin-right: 7px; vertical-align: middle; }
.up-socket-learned, .up-socket-full {
  border-color: var(--branch);
  background: radial-gradient(circle at 50% 37%, color-mix(in srgb, var(--branch-line) 56%, #312733), #302738 88%);
}
.up-socket-buyable { border-color: color-mix(in srgb, var(--branch) 84%, #29242e); }
.up-socket-open .up-pixel-glyph, .up-socket-buyable .up-pixel-glyph { filter: grayscale(.55) brightness(.8); }
.up-socket:hover, .up-socket:focus-visible, .up-socket[aria-current="true"] { color: var(--branch); border-color: var(--branch); }
.up-socket[aria-current="true"] { box-shadow: 0 0 0 3px #17131f, 0 0 0 5px var(--branch); }
.up-socket-active, .up-socket-active:is(:hover, :focus-visible, [aria-current="true"]) { border-color: #e7b968; }
.up-socket-active[aria-current="true"] { box-shadow: 0 0 0 3px #17131f, 0 0 0 5px #e7b968, 0 0 20px #f7c26450; }
.up-socket[aria-pressed="true"] { outline: 3px solid var(--ink); outline-offset: 6px; }
.up-socket-active::before {
  position: absolute;
  inset: 2px;
  border: 2px dashed #ffdf9a;
  border-radius: inherit;
  pointer-events: none;
  content: "";
  animation: up-active-ring 18s linear infinite;
}
.up-socket-locked { border-style: dashed; background: #242332; }
.up-socket-locked .up-node-icon { filter: grayscale(1) brightness(.70); }
.up-socket-locked.up-socket-active::before { display: none; animation: none; }
.up-lock {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 24px;
  height: 24px;
  border: 1px solid #827888;
  border-radius: 50%;
  background: #25232e;
  color: #ede2d6;
}
.up-lock::before, .up-lock::after { position: absolute; left: 50%; transform: translateX(-50%); content: ""; }
.up-lock::before { top: 4px; width: 6px; height: 6px; border: 2px solid; border-radius: 6px 6px 0 0; }
.up-lock::after { top: 11px; width: 13px; height: 9px; border-radius: 2px; background: currentColor; }
@keyframes up-active-ring { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .up-socket-active::before { animation: none; }
}
.up-details { min-height: 104px; }
.up-detail {
  display: grid;
  grid-template-columns: minmax(178px, max-content) minmax(0, max-content) 100px minmax(122px, max-content);
  gap: 6px 17px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  min-height: 58px;
  padding: 6px 13px;
  box-sizing: border-box;
  border: 1px solid #3e3745;
  border-left: 3px solid var(--branch-line);
  border-radius: 9px;
  background: var(--surface);
}
.up-detail h3 { margin: 1px 0 0; font: 400 21px/1.15 var(--display); }
.up-detail p { margin: 0; }
.up-detail-path { color: var(--branch); font-size: 12px; }
.up-detail-name { max-width: 264px; }
.up-detail-description { max-width: 540px; color: var(--ink); font-size: 14px; line-height: 1.35; white-space: pre-line; }
.up-detail-rank { display: grid; gap: 4px; }
.up-detail-rank label { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 12px; }
.up-detail-rank strong { color: var(--branch); }
.up-detail-rank progress { width: 100%; height: 7px; accent-color: var(--branch); }
.up-buy { justify-content: space-between; min-height: 35px; padding: 0 10px; gap: 9px; white-space: nowrap; font-size: 13px; }
.up-buy span { display: flex; align-items: center; gap: 5px; }
.up-requirement { max-width: 200px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.up-complete { color: var(--branch); }
.up-prerequisite { max-width: 175px; color: var(--ink); }
.up-prerequisite strong { display: block; color: var(--branch); }
.up-next {
  grid-column: 1 / -1;
  padding-top: 5px;
  border-top: 1px solid #49414c;
  color: var(--ink);
  font-size: 13px;
}
.up-next strong { color: var(--branch); }

/* Редактор панели */
.pe-page {
  height: 100%;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 20px;
  padding-block: 36px;
  background: linear-gradient(180deg, #101118ee, #101118be 49%, #101118df),
    url("../assets/backgrounds/forge-armory.webp") center/cover #101118;
}
.pe-layout {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}
.pe-loadout, .pe-available {
  padding: 15px 17px;
  border: 1px solid #605048;
  border-radius: 12px;
  background: linear-gradient(145deg, #29232afc, #191820f7 61%);
}
.pe-available {
  box-sizing: border-box;
  align-self: start;
  max-height: 100%;
  overflow: auto;
  scrollbar-color: #806447 #181720;
}
.pe-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 34px;
  margin-bottom: 12px;
}
.pe-section-head h3 { margin: 0; color: #f8e7d0; font: 400 25px/1.15 var(--display); }
.pe-section-head .pe-hint { margin: 0; text-align: right; }
.pe-clear { min-height: 34px; padding-inline: 12px; font-size: 13px; }
.pe-slots {
  display: grid;
  grid-template-columns: repeat(var(--slot-count), minmax(0, 1fr));
  gap: 8px;
  max-width: calc(var(--slot-count) * 142px);
  margin-inline: auto;
}
.pe-slot {
  position: relative;
  box-sizing: border-box;
  min-height: 114px;
  padding: 27px 6px 8px;
  border-radius: 7px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 4px;
}
.pe-slot-empty {
  border: 1px dashed #554b50;
  background: #15151ddd;
  color: var(--muted);
  font-size: 12px;
}
.pe-slot-filled {
  border: 1px solid #806042;
  background: radial-gradient(ellipse at 50% 24%, #47352d, #211c26 75%);
  cursor: grab;
}
.pe-slot-filled:hover { border-color: var(--gold); }
.pe-slot-hotkey {
  position: absolute;
  top: 6px;
  left: 6px;
  box-sizing: border-box;
  min-width: 19px;
  max-width: calc(100% - 12px);
  padding: 2px 5px;
  overflow: hidden;
  border: 1px solid #71583f;
  border-radius: 4px;
  background: #16141c;
  color: var(--gold);
  font: 600 11px/1.15 "Segoe UI", sans-serif;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pe-slot:has(.pe-slot-badge) .pe-slot-hotkey { max-width: calc(100% - 34px); }
.pe-skill-icon {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 3px 4px #0009);
}
.pe-slot-name { font-size: 13px; font-weight: 650; line-height: 1.17; color: var(--ink); }
.pe-slot-owner { font-size: 12px; color: var(--muted); }
.pe-slot-badge { position: absolute; top: 6px; right: 8px; color: var(--gold); font-size: 12px; font-weight: 650; }
.pe-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pe-option {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 8px 12px;
  text-align: left;
  background: linear-gradient(135deg, #2d252b, #1b1a23 70%);
  color: var(--ink);
  border: 1px solid #514653;
  border-radius: 7px;
  cursor: grab;
}
.pe-option:hover { border-color: var(--gold); background: #31262b; }
.pe-option .pe-skill-icon { width: 46px; height: 46px; }
.pe-option strong, .pe-option small { display: block; }
.pe-option strong { font-size: 14px; line-height: 1.2; }
.pe-option small { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pe-add { font-size: 20px; color: var(--gold); }
.pe-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.pe-empty { margin: 0; padding-bottom: 4px; }
.pe-dragging { opacity: .5; cursor: grabbing; }
.pe-drop-active { border-color: var(--gold); background: #3b2c30; }
.pe-slot.pe-drop-active { border-style: solid; }
.pe-toast {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  background: var(--raised);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
}
