:root {
  --ink: #1a2218;
  --moss: #2f4a35;
  --leaf: #4a7a52;
  --brass: #c4a35a;
  --brass-dim: #8a7340;
  --parch: #e8e0d0;
  --parch-soft: #f3eee3;
  --blood: #8b3a3a;
  --ok: #2d6a3e;
  --warn: #8a5a20;
  --shadow: rgba(20, 28, 18, 0.45);
  --font-display: "Cinzel", "Palatino Linotype", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #121610;
  line-height: 1.45;
}
.bg {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(74, 122, 82, 0.35), transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(196, 163, 90, 0.12), transparent 50%),
    linear-gradient(160deg, #161c14 0%, #1e281c 45%, #141a12 100%);
}
.top {
  display: flex; align-items: baseline; gap: 0.75rem;
  padding: 1.25rem 1.5rem 0.5rem;
  max-width: 1100px; margin: 0 auto;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.75rem; font-weight: 700;
  color: var(--brass); text-decoration: none;
  letter-spacing: 0.06em;
}
.brand-sub {
  color: #8a9680; font-size: 0.8rem;
  text-transform: lowercase; letter-spacing: 0.12em;
}
.crumbs { margin-left: auto; font-size: 0.9rem; color: #a8b4a0; }
.crumbs a { color: var(--brass); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.shell, .wide {
  max-width: 640px; margin: 1.5rem auto 3rem; padding: 0 1.25rem;
}
.wide { max-width: 1100px; }

.panel {
  background: linear-gradient(180deg, var(--parch-soft), var(--parch));
  border: 1px solid #cfc4ae;
  box-shadow: 0 18px 40px var(--shadow);
  padding: 1.75rem 1.5rem;
}
.panel.center { text-align: center; }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700; color: var(--moss);
  margin: 0 0 0.75rem;
  letter-spacing: 0.03em;
}
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; margin-top: 1.75rem; }
p.lead { color: #4a5344; margin: 0 0 1.25rem; }
.muted { color: #6a7364; font-size: 0.92rem; }

label { display: block; font-weight: 600; margin: 0.85rem 0 0.3rem; font-size: 0.92rem; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; padding: 0.55rem 0.7rem;
  border: 1px solid #b8ae98; background: #fffdf8;
  font: inherit; color: var(--ink);
}
textarea { min-height: 4.5rem; resize: vertical; }
.row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: end; }
.row > * { flex: 1; min-width: 140px; }
.check {
  display: flex; align-items: center; gap: 0.5rem;
  margin: 1rem 0; font-weight: 600;
}
.check input { width: auto; }

button, .btn {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.04em;
  padding: 0.55rem 1.1rem;
  border: 1px solid var(--brass-dim);
  background: linear-gradient(180deg, #d4b56a, var(--brass));
  color: #1a160c; cursor: pointer; text-decoration: none;
  font-weight: 700;
}
button.secondary, .btn.secondary {
  background: transparent; color: var(--moss);
  border-color: var(--moss);
}
button.danger, .btn.danger {
  background: #a84848; border-color: #7a2e2e; color: #fff;
}
button:hover, .btn:hover { filter: brightness(1.05); }
.actions { margin-top: 1.25rem; display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.actions.left { justify-content: flex-start; }

.flash {
  margin-bottom: 1rem; padding: 0.7rem 1rem;
  border: 1px solid; font-weight: 600;
}
.flash-ok { background: #dcead8; border-color: #8bb58a; color: var(--ok); }
.flash-err { background: #f0d8d8; border-color: #c48a8a; color: var(--blood); }

.menu-list { list-style: none; padding: 0; margin: 0; }
.menu-list li { margin: 0 0 0.75rem; }
.menu-list a.card {
  display: block; text-decoration: none; color: inherit;
  padding: 1rem 1.1rem;
  border: 1px solid #cfc4ae; background: #fffdf8;
  transition: border-color 0.15s, transform 0.15s;
}
.menu-list a.card:hover {
  border-color: var(--brass); transform: translateY(-1px);
}
.menu-list .name {
  font-family: var(--font-display); font-size: 1.15rem;
  color: var(--moss); display: block;
}
.menu-list .desc { color: #5a6354; margin-top: 0.25rem; font-size: 0.95rem; }

.grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
}
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.char-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.char-list li {
  display: flex; justify-content: space-between; align-items: center;
  gap: 0.5rem; padding: 0.45rem 0;
  border-bottom: 1px solid #ddd4c2;
}
.tag {
  display: inline-block; font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.15rem 0.4rem; border: 1px solid;
}
.tag-pc { color: var(--moss); border-color: var(--leaf); }
.tag-npc { color: #5a4a30; border-color: var(--brass-dim); }
.tag-magic { color: #4a3a78; border-color: #7a6aa8; background: #ece8f5; }
.tag-mundane { color: #4a5344; border-color: #8a9680; }
.tag-fixture { color: #6a4020; border-color: #a87848; background: #f3e8d8; }
.tag-novac { color: #6a5a10; border-color: #c4a35a; background: #f5ecd4; }
.tag-gem { color: #1a5a6a; border-color: #3a8a9a; background: #e0f0f4; }
.tag-nakit { color: #6a2a4a; border-color: #a85a7a; background: #f5e4ec; }
.tag-maybe_magic { color: #5a4a20; border-color: #b09040; background: #f3e9c8; }
.tag-set { color: #204060; border-color: #5080a0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.kind-edit { margin-top: 0.45rem; }
.item-tabs { margin: 0.75rem 0 1.5rem; }
.tab-bar {
  display: flex; flex-wrap: wrap; gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.tab-btn {
  font-family: var(--font-body);
  font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0;
  padding: 0.4rem 0.65rem;
  border: 1px solid #b8ae98;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
}
.tab-btn:hover { border-color: var(--brass-dim); }
.tab-btn.active {
  background: linear-gradient(180deg, #d4b56a, var(--brass));
  border-color: var(--brass-dim);
  color: #1a160c;
}
.tab-count {
  display: inline-block;
  min-width: 1.1rem;
  margin-left: 0.2rem;
  font-size: 0.75rem;
  opacity: 0.75;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem; margin: 1rem 0 1.5rem;
}
.stat {
  background: #fffdf8; border: 1px solid #cfc4ae; padding: 0.75rem;
  text-align: center;
}
.stat .v {
  font-family: var(--font-display); font-size: 1.25rem; color: var(--moss);
}
.stat .l { font-size: 0.78rem; color: #6a7364; text-transform: uppercase; letter-spacing: 0.06em; }

.set-block {
  border: 1px dashed #a89870; padding: 0.85rem; margin: 0.85rem 0;
  background: rgba(255,253,248,0.45);
}
.set-block h3 { font-size: 1rem; margin-bottom: 0.65rem; }
.item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.65rem 1rem;
  padding: 0.85rem 0.95rem;
  margin: 0.65rem 0;
  border: 1px solid #cfc4ae;
  background: #fffdf8;
  box-shadow: 0 1px 0 rgba(40, 36, 24, 0.06);
  align-items: start;
}
.set-block .item {
  background: #fffcf6;
  border-color: #c4b89e;
}
.item .meta {
  font-size: 0.88rem; color: #5a6354;
  margin: 0.35rem 0 0.15rem;
}
.item .ops {
  display: flex; flex-direction: column; gap: 0.45rem; align-items: stretch;
  min-width: 9rem;
  padding-left: 0.75rem;
  border-left: 1px solid #ddd4c2;
}
.item .ops form { margin: 0; }
.item .ops .inline-form { flex-direction: column; align-items: stretch; }
.item .ops select { width: 100%; }
@media (max-width: 640px) {
  .item {
    grid-template-columns: 1fr;
  }
  .item .ops {
    min-width: 0;
    padding-left: 0;
    padding-top: 0.55rem;
    border-left: none;
    border-top: 1px solid #ddd4c2;
    align-items: stretch;
  }
}
.over { color: var(--blood); font-weight: 700; }
.okish { color: var(--ok); font-weight: 600; }

table.sheet {
  width: 100%; border-collapse: collapse; font-size: 0.95rem;
  background: #fffdf8;
}
table.sheet th, table.sheet td {
  border: 1px solid #cfc4ae; padding: 0.45rem 0.55rem; text-align: left;
}
table.sheet th { background: #e4dcc8; font-family: var(--font-display); font-size: 0.85rem; }

.pick-heading {
  margin: 1rem 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #5a6354;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.pc-pick {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem; margin: 0 0 1rem;
}
.pc-pick label {
  margin: 0; padding: 0.75rem; border: 1px solid #cfc4ae;
  background: #fffdf8; cursor: pointer; text-align: center;
  font-family: var(--font-display);
}
.pc-pick-npc {
  padding: 0.75rem;
  border: 1px dashed #a89870;
  background: rgba(90, 74, 48, 0.06);
}
.pc-pick-npc label.pick-npc {
  border-color: #b8a888;
  background: #f7f0e4;
  font-family: var(--font-body);
  font-weight: 600;
}
.pc-pick input { display: none; }
.pc-pick input:checked + span,
.pc-pick label:has(input:checked) {
  border-color: var(--brass); background: #f5ecd4;
  box-shadow: inset 0 0 0 2px var(--brass);
}
.pc-pick-npc label.pick-npc:has(input:checked) {
  border-color: var(--brass-dim);
  background: #efe4cc;
}

.inline-form { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.inline-form input[type=text], .inline-form input[type=number], .inline-form select {
  width: auto; min-width: 0; flex: 1;
}
.tiny { font-size: 0.8rem; padding: 0.3rem 0.55rem; }

.zone {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #cfc4ae;
}
.zone-label {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin: 0 0 1rem;
}
.zone-treasurer {
  margin-top: 2.25rem;
  padding: 1.25rem 1rem 0.5rem;
  border-top: 2px solid var(--brass-dim);
  background: rgba(196, 163, 90, 0.08);
}
.zone-treasurer .zone-label { color: #6a5a30; }


/* —— Razdioba board (drag & drop) —— */
.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1rem 0 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .board { grid-template-columns: 1fr; }
}
.board-col {
  background: #fffdf8;
  border: 1px solid #cfc4ae;
  padding: 0.75rem 0.7rem 0.85rem;
  min-height: 8rem;
}
.board-chars {
  /* overflow visible so item info tooltips are not clipped */
  overflow: visible;
}
.board-col h2 {
  margin-top: 0;
  font-size: 1.05rem;
}
.board-pool.drop-target,
.char-box.drop-target {
  outline: 2px dashed var(--brass);
  background: #f5ecd4;
}
.chip-stack { display: flex; flex-direction: column; gap: 0.45rem; }
.loot-chip {
  position: relative;
  z-index: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.5rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid #c4b89e;
  background: #fffcf6;
  cursor: grab;
  user-select: none;
  box-shadow: 0 1px 0 rgba(40,36,24,0.05);
}
.loot-chip:has(.item-info:hover),
.loot-chip:has(.item-info:focus-within) {
  z-index: 80;
}
.loot-chip:active { cursor: grabbing; }
.loot-chip.is-dragging { opacity: 0.45; }
.loot-chip .chip-title {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--moss);
  flex: 1 1 auto;
}
.loot-chip .chip-val {
  font-weight: 700;
  color: #5a4a20;
  font-size: 0.9rem;
}
.loot-chip .chip-meta {
  flex: 1 1 100%;
  font-size: 0.8rem;
  color: #6a7364;
}
.loot-cash {
  background: #f5ecd4;
  border-color: #c4a35a;
}
.loot-cash.is-empty {
  opacity: 0.55;
  cursor: default;
}
.loot-fixture { cursor: default; opacity: 0.9; }
.fixture-note { margin-bottom: 0.75rem; }
.empty-hint { margin: 0.35rem 0; font-size: 0.88rem; }

.char-box {
  border: 1px solid #cfc4ae;
  background: #faf6ec;
  padding: 0.35rem 0.5rem 0.4rem;
  margin-bottom: 0.4rem;
  transition: background 0.12s, outline 0.12s;
}
.char-box.is-over { border-color: #c48a8a; }
.char-name {
  display: flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-display);
  font-size: 0.92rem; font-weight: 700;
  color: var(--moss);
  line-height: 1.2;
  margin-bottom: 0.2rem;
}
.char-name .tag { font-size: 0.62rem; padding: 0.05rem 0.28rem; }
.char-sum {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.75rem; font-weight: 600;
  color: #6a7364;
}
.char-box.is-over .char-sum { color: var(--blood); }
.char-loot {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.12rem;
  min-height: 1.1rem;
}
.board-chars .loot-chip {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.4rem;
  padding: 0.12rem 0.3rem;
  border: none;
  border-left: 2px solid #c4b89e;
  background: transparent;
  box-shadow: none;
  font-size: 0.78rem;
  line-height: 1.25;
  color: #3a4336;
  cursor: grab;
}
.board-chars .loot-chip .chip-val {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6a5a30;
  white-space: nowrap;
}
.board-chars .loot-cash {
  background: transparent;
  border-left-color: #c4a35a;
  color: #5a4a20;
  font-weight: 600;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(18, 22, 16, 0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop[hidden] { display: none !important; }
.modal {
  width: min(420px, 100%);
  background: linear-gradient(180deg, var(--parch-soft), var(--parch));
  border: 1px solid #cfc4ae;
  box-shadow: 0 18px 40px var(--shadow);
  padding: 1.25rem 1.2rem;
}
.modal h3 { margin-top: 0; }
.modal strong { white-space: nowrap; }

.board.is-dragging-active .loot-chip {
  pointer-events: none;
}
.board.is-dragging-active .loot-chip.is-dragging {
  opacity: 0.4;
}


/* Item info (i) tooltip */
.item-info {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  z-index: 1;
}
.item-info:hover,
.item-info:focus-within {
  z-index: 90;
}
.item-info-btn {
  width: 1.05rem;
  height: 1.05rem;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid var(--brass-dim);
  background: #fffdf8;
  color: var(--moss);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
}
.item-info-btn:hover,
.item-info:focus-within .item-info-btn {
  background: var(--brass);
  color: #1a160c;
  border-color: var(--brass-dim);
}
.item-info-tip {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  width: min(16.5rem, 70vw);
  padding: 0.55rem 0.65rem;
  background: #1e281c;
  color: #e8e0d0;
  border: 1px solid #8a7340;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  z-index: 100;
  pointer-events: none;
}
.item-info:hover .item-info-tip,
.item-info:focus-within .item-info-tip {
  display: block;
}
.item-info-tip .tip-title {
  display: block;
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: var(--brass);
  margin-bottom: 0.4rem;
}
.item-info-tip .tip-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.15rem 0;
}
.item-info-tip .tip-k { color: #a8b4a0; }
.item-info-tip .tip-v { color: #f3eee3; font-weight: 600; text-align: right; }
.item-info-tip .tip-desc {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid #3a4a38;
  color: #d4cbb8;
  white-space: pre-wrap;
}
.item-info-tip .tip-desc.muted { color: #8a9680; font-style: italic; }
.board-chars .chip-line {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-width: 0;
  flex: 1 1 auto;
}
.board-chars .kind-mini {
  flex: 0 0 auto;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1;
  padding: 0.08rem 0.22rem;
  border: 1px solid;
  white-space: nowrap;
  max-width: 3.2rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-chars .item-info-btn {
  width: 0.95rem;
  height: 0.95rem;
  font-size: 0.62rem;
}
/* Keep info hoverable even inside chips; flip tip upward near bottom */
.board-chars .char-box:last-child .item-info-tip,
.board-pool .loot-chip:last-child .item-info-tip {
  top: auto;
  bottom: calc(100% + 0.35rem);
}
.board.is-dragging-active .item-info {
  pointer-events: none;
}

.board-chars .char-box { position: relative; z-index: 0; }
.board-chars .char-box:has(.item-info:hover),
.board-chars .char-box:has(.item-info:focus-within) {
  z-index: 70;
}
.board-pool .loot-chip:has(.item-info:hover),
.board-pool .loot-chip:has(.item-info:focus-within) {
  z-index: 80;
}


/* Set groups on board */
.set-group {
  border: 1px dashed #5080a0;
  background: rgba(32, 64, 96, 0.06);
  padding: 0.35rem 0.4rem 0.45rem;
  margin: 0.35rem 0;
  cursor: grab;
  position: relative;
  z-index: 0;
}
.set-group.is-dragging { opacity: 0.45; }
.set-group.is-away { opacity: 0.85; border-style: dotted; }
.set-group.is-split { border-color: #a86840; background: rgba(168, 104, 64, 0.08); }
.set-group-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.35rem;
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  color: var(--moss);
}
.set-group-head strong { font-family: var(--font-display); }
.set-drag-hint {
  font-size: 0.72rem;
  color: #6a7364;
  font-weight: 400;
}
.set-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #5a6354;
}
.set-group-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.loot-chip.is-absent {
  border-color: #c48a8a !important;
  background: #f8e4e4 !important;
  color: #8b3a3a !important;
  cursor: default;
  opacity: 0.95;
  border-left-color: #a84848 !important;
}
.loot-chip.is-absent .chip-title,
.loot-chip.is-absent .chip-line {
  color: #8b3a3a;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.absent-note {
  font-size: 0.7rem;
  font-weight: 600;
  color: #a84848;
  text-decoration: none !important;
  margin-left: 0.35rem;
}
.board-chars .set-group {
  margin: 0.25rem 0;
  padding: 0.25rem 0.3rem;
}
.board-chars .set-group-head { font-size: 0.75rem; margin-bottom: 0.15rem; }
.board.is-dragging-active .set-group .loot-chip {
  pointer-events: none;
}


/* Shift multi-select */
.board.shift-select-mode,
.board.shift-select-mode .loot-chip[data-type="item"],
.board.shift-select-mode .loot-chip[data-item-id] {
  cursor: copy !important; /* + style */
}
.board.shift-select-mode .loot-chip[data-type="item"]:hover,
.board.shift-select-mode .loot-chip[data-item-id]:hover {
  outline: 2px solid var(--brass);
  outline-offset: 1px;
}
.loot-chip.is-selected {
  outline: 2px solid var(--leaf);
  outline-offset: 1px;
  background: #e5f0e4 !important;
  box-shadow: inset 0 0 0 1px var(--leaf);
}
.board-chars .loot-chip.is-selected {
  background: #e5f0e4 !important;
}
.multi-select-count {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.35rem 0.65rem;
  background: #e5f0e4;
  border: 1px solid var(--leaf);
  color: var(--moss);
  font-size: 0.85rem;
  font-weight: 700;
}
.multi-select-count[hidden] {
  display: none !important;
}


.cash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0.65rem 0 0.85rem;
  padding: 0.55rem 0.5rem;
  background: #f5ecd4;
  border: 1px solid #c4a35a;
}
.cash-actions form {
  margin: 0;
  flex: 1 1 auto;
  min-width: 10rem;
}
.cash-actions button {
  width: 100%;
  font-size: 0.82rem;
  padding: 0.45rem 0.65rem;
}
.cash-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: none;
}

.gold-nudge {
  display: flex;
  gap: 0.25rem;
  margin: 0 0 0.2rem 0.35rem;
}
.gold-nudge button {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.12rem 0.45rem;
  min-width: 1.55rem;
}
.gold-nudge button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

.campaign-roster {
  display: grid;
  grid-template-columns: minmax(190px, 250px) 1fr;
  gap: 1rem;
  margin: 0.25rem 0 0.5rem;
  align-items: start;
}
@media (max-width: 720px) {
  .campaign-roster { grid-template-columns: 1fr; }
}
.roster-side h2 { margin-top: 0; font-size: 1.05rem; }
.roster-side h3 {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6a5a30;
  margin: 0.65rem 0 0.35rem;
}
.roster-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  border: 1px solid #cfc4ae;
  background: #fffdf8;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.35rem;
  color: var(--moss);
}
.roster-box:hover { border-color: var(--brass); }
.roster-box.is-active {
  border-color: var(--brass);
  background: #f5ecd4;
  box-shadow: inset 0 0 0 1px var(--brass);
}
.roster-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.92rem;
  min-width: 0;
}
.roster-box .sum {
  margin-left: auto;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  color: #6a7364;
  white-space: nowrap;
}
.roster-inv {
  background: #fffdf8;
  border: 1px solid #cfc4ae;
  padding: 0.85rem 0.95rem 1rem;
  min-height: 8rem;
}
.roster-inv h2 { margin-top: 0; }
.inv-dist { margin: 0.9rem 0 0.2rem; }
.inv-dist:first-of-type { margin-top: 0.35rem; }
.inv-dist-name {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--moss);
  text-decoration: none;
  margin-bottom: 0.2rem;
}
.inv-dist-name:hover { text-decoration: underline; }
.inv-tabs { margin: 0.35rem 0 0.15rem; }
.inv-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  padding: 0.28rem 0.05rem;
  border-bottom: 1px solid #efe6d4;
  font-size: 0.92rem;
  position: relative;
}
.inv-line[hidden] { display: none !important; }
.inv-dist[hidden] { display: none !important; }
.inv-line:has(.item-info:hover),
.inv-line:has(.item-info:focus-within) { z-index: 8; }
.inv-val {
  margin-left: auto;
  font-weight: 600;
  color: #6a5a30;
  font-size: 0.85rem;
  white-space: nowrap;
}
