/* Shop: three fixed columns and an always-present footer. Tokens only. */
.shop {
  position: absolute;
  left: 50%;
  top: 128px;
  transform: translateX(-50%);
  zoom: var(--ui-scale);
  width: 1600px;
  max-width: calc(100vw / var(--ui-scale) - 32px);
  height: 830px;
  max-height: calc(100vh / var(--ui-scale) - 148px);
  display: grid;
  grid-template-columns: 236px 1fr 420px;
  grid-template-rows: 1fr 52px;
  z-index: var(--z-overlay);
}
.shop-col { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3); border-right: 2px solid var(--line); min-height: 0; overflow: hidden; }
.shop-col.quick { overflow-y: auto; }
.shop-col.detail-col { border-right: none; overflow-y: auto; }
.shop-col.browse { overflow-y: auto; }
.shop h4 { margin: 0; }
/* Starters, boots and stars: three per row so the left column never runs off the bottom. */
.quickgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s1) var(--s2); }
.quickgrid .tile { width: auto; }
/* The Night Lord star track in the middle column stays one compact row. */
.browse .quickgrid { display: flex; flex-wrap: wrap; gap: var(--s2); }
.inv6 { display: grid; grid-template-columns: repeat(3, 56px); gap: var(--s2); justify-content: space-between; }
.searchbar { gap: var(--s3); }
.searchbox { flex: 1; display: flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s3); color: var(--text-dim); }
.searchbox.active { border-color: var(--you); color: var(--text); }
.searchbox input { flex: 1; background: transparent; border: none; outline: none; font-family: var(--font-body); font-size: var(--t-m); color: var(--text); }
.recommended { gap: var(--s2); }
.recs { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.rec {
  border: 2px solid var(--line);
  background: var(--bg-1);
  padding: var(--s2);
  display: flex;
  flex-direction: column;
  gap: var(--s1);
  align-items: flex-start;
  color: var(--text);
  text-align: left;
}
.rec:is(:hover, .virtual-hover) { border-color: var(--text-dim); }
.rec.sel { border-color: var(--you); box-shadow: 0 0 0 2px var(--you); }
.rec .top { gap: var(--s2); }
.rec .nm { font-weight: 700; font-size: var(--t-m); }
.rec .price { font-weight: 700; font-size: var(--t-m); color: var(--you); }
.rec.poor .price { color: var(--text-faint); }
.buildrow { display: flex; gap: var(--s2); flex-wrap: wrap; }
.browse-split { display: grid; grid-template-columns: 170px 1fr; gap: var(--s3); min-height: 0; }
.filters { display: flex; flex-direction: column; gap: 2px; }
.filters .f {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s1) var(--s2);
  font-size: var(--t-s);
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
}
.filters .f:is(:hover, .virtual-hover) { border-color: var(--line-strong); }
.filters .f.on { border-color: var(--you); background: var(--you-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: var(--s2) var(--s1); align-content: start; }
.grid .tile { width: auto; }
.tierhead { grid-column: 1 / -1; font-weight: 700; font-size: var(--t-xs); color: var(--text-dim); letter-spacing: 0.12em; border-bottom: 1px solid var(--line); padding: var(--s1) 0; margin-top: var(--s1); }
.grid-empty { grid-column: 1 / -1; }
.detail { gap: var(--s2); padding: 0; }
.buildsinto { gap: var(--s1); flex-wrap: wrap; min-height: 0; }
.tree { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.tree .lvl { display: flex; gap: var(--s4); justify-content: center; flex-wrap: wrap; }
.tree .node { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tree .node b { font-size: var(--t-xs); color: var(--you); }
.tree .node.have b { color: var(--owned); }
.buyline { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s2) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.buyline .btn.primary { font-size: var(--t-m); padding: var(--s2) var(--s4); white-space: normal; }
.detail-name { justify-content: space-between; }
.impact { display: flex; flex-direction: column; gap: 2px; padding-top: var(--s2); border-top: 1px solid var(--line); }
.shopfoot { grid-column: 1 / -1; border-top: 2px solid var(--line); display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s3); }
.shopfoot .gold { font-weight: 700; font-size: var(--t-l); color: var(--you); display: flex; align-items: center; gap: var(--s2); }
