/* Armory / inventory — Velmora night chrome (extends account.css tokens) */
:root { --slot: 64px; }

.wrap {
  width: min(1100px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.char-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(24, 47, 66, 0.42), rgba(9, 18, 28, 0.72)),
    var(--bg-card);
  border: 1px solid rgba(99, 217, 255, 0.26);
  border-radius: 1rem;
  padding: 1.2rem 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  color: inherit;
  display: block;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(99, 217, 255, 0.08);
  overflow: hidden;
}
.char-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(12px 12px at 14px 14px, rgba(216, 237, 255, 0.16), transparent 74%),
    radial-gradient(12px 12px at calc(100% - 14px) 14px, rgba(216, 237, 255, 0.14), transparent 74%);
  opacity: 0.45;
}
.char-card > * { position: relative; z-index: 1; }
.char-card:hover {
  border-color: rgba(99, 217, 255, 0.5);
  transform: translateY(-3px);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(99, 217, 255, 0.12);
}
.char-card h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--gold-bright);
  letter-spacing: 0.03em;
}
.char-card .meta { color: var(--bone-dim); font-size: 0.9rem; }
.char-card .bp {
  margin-top: 0.9rem;
  font-size: 1.1rem;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.char-card .guild {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--accent-cyan);
}

.empty {
  padding: 2rem;
  text-align: center;
  color: var(--bone-dim);
  border: 1px dashed rgba(99, 217, 255, 0.28);
  border-radius: 1rem;
  background: rgba(8, 15, 24, 0.45);
}

.armory-hero {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 800px) {
  .armory-hero {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
  }
}

.panel {
  background:
    linear-gradient(180deg, rgba(24, 47, 66, 0.42), rgba(9, 18, 28, 0.72)),
    var(--bg-card);
  border: 1px solid rgba(99, 217, 255, 0.26);
  border-radius: 1rem;
  padding: 1.25rem;
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.26),
    inset 0 0 0 1px rgba(99, 217, 255, 0.08);
}
.panel h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--gold-bright);
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.stat {
  background: rgba(9, 16, 24, 0.58);
  border: 1px solid rgba(99, 217, 255, 0.22);
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
}
.stat .lbl {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-dim);
  margin-bottom: 0.15rem;
}
.stat .val {
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  color: var(--bone);
}
.stat .val.gold { color: var(--gold-bright); }

.doll {
  display: grid;
  grid-template-columns: var(--slot) 1fr var(--slot);
  gap: 0.5rem;
  justify-items: center;
  max-width: 320px;
  margin: 0 auto;
}
.doll-col {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.doll-center {
  min-height: calc(var(--slot) * 4);
  width: 100%;
  border: 1px dashed rgba(99, 217, 255, 0.22);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone-dim);
  font-family: var(--font-display);
  font-size: 1.05rem;
  text-align: center;
  padding: 0.5rem;
  background: rgba(5, 10, 18, 0.45);
}

.slot {
  width: var(--slot);
  height: var(--slot);
  background: rgba(5, 10, 18, 0.72);
  border: 1px solid rgba(99, 217, 255, 0.24);
  border-radius: 0.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(99, 217, 255, 0.06);
}
.slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slot .qty {
  position: absolute;
  right: 2px;
  bottom: 1px;
  font-size: 0.65rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0 3px;
  border-radius: 2px;
}
.slot .plus {
  position: absolute;
  left: 2px;
  top: 1px;
  font-size: 0.65rem;
  color: var(--gold);
  font-weight: 700;
}
.slot.empty { opacity: 0.45; }
.slot[title] { cursor: help; }

.weapons-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.75rem;
}

.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 0.45rem;
}
.item-grid .slot { width: 100%; aspect-ratio: 1; height: auto; }

.item-list {
  display: grid;
  gap: 0.45rem;
  max-height: 420px;
  overflow: auto;
}
.item-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.45rem 0.55rem;
  background: rgba(9, 16, 24, 0.55);
  border-radius: 0.55rem;
  border: 1px solid rgba(99, 217, 255, 0.14);
}
.item-row img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  background: #070c14;
  border-radius: 0.35rem;
  border: 1px solid rgba(99, 217, 255, 0.16);
}
.item-row .name { font-size: 0.9rem; }
.item-row .sub { font-size: 0.75rem; color: var(--bone-dim); }
.item-row .amt { color: var(--bone-dim); font-variant-numeric: tabular-nums; }

.tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.tab {
  background: rgba(8, 16, 25, 0.55);
  border: 1px solid rgba(99, 217, 255, 0.22);
  color: var(--bone-dim);
  padding: 0.45rem 0.85rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.tab:hover { color: var(--bone); border-color: rgba(99, 217, 255, 0.4); }
.tab.active {
  border-color: rgba(99, 217, 255, 0.5);
  color: var(--accent-cyan);
  background: rgba(99, 217, 255, 0.12);
}

.msg {
  margin: 1rem 0;
  padding: 0.75rem 0.85rem;
  border-radius: 0.55rem;
  display: none;
  border: 1px solid transparent;
}
.msg.show { display: block; }
.msg.err {
  background: rgba(255, 141, 141, 0.1);
  border-color: rgba(255, 141, 141, 0.28);
  color: var(--err);
}

.back {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  color: var(--accent-cyan);
}
.back:hover { color: var(--gold-bright); }
