/* ── Veyisor HUD, dark glass over a voxel world ─────────────── */

:root {
  --ink:        #0c0f15;
  --panel:      rgba(15, 19, 27, 0.88);
  --panel-2:    rgba(24, 29, 40, 0.92);
  --line:       rgba(255, 255, 255, 0.10);
  --line-2:     rgba(255, 255, 255, 0.18);
  --text:       #e9edf4;
  --muted:      #93a0b4;
  --dim:        #6b7789;
  --gold:       #f0b429;
  --gold-soft:  rgba(240, 180, 41, 0.14);
  --green:      #5fcf80;
  --red:        #e2585a;
  --radius:     10px;
  --shadow:     0 10px 30px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  cursor: grab;
}
#game.dragging { cursor: grabbing; }

#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
}
#hud > * { pointer-events: auto; }

/* ── glass surface ── */
.glass, .resbar, .tl, .tr, #panel, #parcelCard, #citizenCard, #siteCard, #commandbar, #menuPanel, .chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

/* ── top left ── */
.tl {
  grid-column: 1; grid-row: 1;
  justify-self: start;
  padding: 8px 14px 9px;
}
.brand {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.22em;
  color: var(--text);
}
.worldline {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 0.02em;
}
.worldline i { color: var(--dim); font-style: normal; margin: 0 6px; }

/* ── resource bar (top centre) ── */
.resbar {
  grid-column: 1; grid-row: 1;
  justify-self: center;
  align-self: start;
  display: flex;
  align-items: stretch;
  padding: 4px;
  gap: 2px;
}
.res {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: help;
  transition: background 0.15s;
}
.res:hover { background: rgba(255,255,255,0.05); }
.res-ico { font-size: 13px; color: var(--dim); transform: translateY(1px); }
.res-val {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.res-lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.res.accent .res-ico, .res.accent .res-val { color: var(--gold); }
.res.accent { background: var(--gold-soft); }

/* ── top right ── */
.tr {
  grid-column: 2; grid-row: 1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 7px 7px 15px;
  position: relative;
}
.tr .who-sub, .tr .who-name { white-space: nowrap; }
.who { display: flex; flex-direction: column; line-height: 1.25; cursor: help; }
.who-name { font-weight: 600; font-size: 13px; }
.who-sub { font-size: 11px; color: var(--muted); }
.who-sub b { font-family: "JetBrains Mono", monospace; color: var(--text); font-weight: 500; }

.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--muted);
  width: 30px; height: 30px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.07); color: var(--text); }
.icon-btn.small { width: 24px; height: 24px; font-size: 14px; }

#menuPanel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  z-index: 30;
}
#menuPanel[hidden] { display: none; }
#menuPanel button {
  background: none; border: none; cursor: pointer;
  text-align: left;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  display: flex; justify-content: space-between; align-items: baseline; gap: 8px;
}
#menuPanel button:hover { background: rgba(255,255,255,0.07); }
.menu-hint { font-size: 11px; color: var(--dim); }

/* ── right panel ── */
#panel {
  grid-column: 2; grid-row: 2;
  align-self: start;
  width: 330px;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 0.2s, transform 0.2s;
}
#panel.collapsed { width: 46px; }
#panel.collapsed .tab:not(#panelToggle), #panel.collapsed .tabbody { display: none; }
#panel.collapsed #panelToggle { transform: rotate(180deg); }

.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.tab {
  background: none; border: none; cursor: pointer;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  padding: 7px 9px;
  border-radius: 7px;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s, color 0.15s;
}
.tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.tab.on { color: var(--text); background: rgba(255,255,255,0.09); }
#panelToggle { margin-left: auto; }
.badge {
  background: var(--gold); color: #241a05;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px; font-weight: 700;
  border-radius: 20px;
  padding: 1px 6px;
}
.badge[hidden] { display: none; }

.tabbody {
  display: none;
  padding: 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.tabbody.on { display: block; }
.foot { font-size: 11.5px; color: var(--dim); margin-top: 10px; line-height: 1.5; }
.foot b { color: var(--muted); font-weight: 500; }

/* ── quests ── */
#questList { list-style: none; display: flex; flex-direction: column; gap: 2px; }
#questList li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  padding: 9px 8px;
  border-radius: 8px;
  align-items: start;
}
#questList li.next { background: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(240,180,41,0.22); }
#questList .mark {
  font-size: 13px; line-height: 1.35;
  color: var(--dim);
  text-align: center;
}
#questList li.done .mark { color: var(--green); }
#questList li.next .mark { color: var(--gold); }
#questList .q-title { display: block; font-size: 13px; font-weight: 500; line-height: 1.35; }
#questList li.done .q-title { color: var(--dim); text-decoration: line-through; }
#questList .q-hint { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
#questList li:not(.next) .q-hint { display: none; }

/* ── build ── */
.buy-grid { display: flex; flex-direction: column; gap: 6px; }
.buy {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "name price" "desc price";
  align-items: center;
  gap: 2px 10px;
  text-align: left;
  padding: 10px 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s;
}
.buy:hover { border-color: var(--line-2); background: rgba(34, 41, 56, 0.95); }
.buy:active { transform: translateY(1px); }
.buy-name { grid-area: name; font-size: 13px; font-weight: 600; }
.buy-desc { grid-area: desc; font-size: 11.5px; color: var(--muted); }
.buy-price {
  grid-area: price;
  font-family: "JetBrains Mono", monospace;
  font-weight: 700; font-size: 15px;
  color: var(--gold);
  white-space: nowrap;
}
.buy-price i { font-style: normal; font-size: 12px; opacity: 0.75; margin-left: 1px; }
.buy.throne { border-color: rgba(226, 88, 90, 0.3); }
.buy.throne:hover { border-color: rgba(226, 88, 90, 0.6); }
.buy.throne .buy-price { color: #ff8f6a; }
.buy.poor { opacity: 0.45; }

/* ── chronicle ── */
#chronicle { display: flex; flex-direction: column; gap: 8px; }
.day-entry {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
}
.day-head {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 5px;
}
.day-decree { font-size: 12.5px; line-height: 1.55; color: var(--text); }
.day-events { list-style: none; margin-top: 7px; display: flex; flex-direction: column; gap: 5px; }
.day-events li {
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
  padding-left: 12px; position: relative;
}
.day-events li::before {
  content: ""; position: absolute; left: 2px; top: 7px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--dim);
}
.day-events li.paid { color: var(--text); }
.day-events li.paid::before { background: var(--gold); }

/* ── bottom: chips + command ── */
.bottom {
  grid-column: 1 / -1; grid-row: 3;
  justify-self: center;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip {
  padding: 7px 13px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s, transform 0.08s, background 0.15s;
}
.chip:hover { border-color: var(--line-2); background: var(--panel-2); }
.chip:active { transform: translateY(1px); }
.chip.danger { color: #ffb0a0; border-color: rgba(226, 88, 90, 0.28); }
.chip.danger:hover { border-color: rgba(226, 88, 90, 0.6); }
.chip:disabled { opacity: 0.4; cursor: default; }

#commandbar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 7px 7px 14px;
}
.cmd-caret { color: var(--gold); font-family: "JetBrains Mono", monospace; font-weight: 700; }
#commandInput {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 14px;
  padding: 6px 0;
}
#commandInput::placeholder { color: var(--dim); }
#commandInput:disabled { opacity: 0.5; }

/* ── buttons ── */
.btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.btn:hover { border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--gold);
  border-color: #c99019;
  color: #241a05;
  font-weight: 600;
}
.btn.primary:hover { background: #ffc63f; }
.btn.primary b { font-family: "JetBrains Mono", monospace; opacity: 0.7; margin-left: 4px; font-weight: 700; }
.btn.wide { width: 100%; justify-content: center; }

/* ── parcel card ── */
#parcelCard {
  grid-column: 1; grid-row: 2;
  align-self: end;
  justify-self: start;
  width: 268px;
  padding: 12px;
}
#parcelCard[hidden] { display: none; }
.pc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pc-top span { font-family: "JetBrains Mono", monospace; font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.pc-rows { display: flex; flex-direction: column; gap: 1px; margin-bottom: 9px; }
.pc-row { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.pc-row span { color: var(--muted); }
.pc-row b { font-weight: 500; }
.pc-row[hidden] { display: none; }
.pc-note { font-size: 11.5px; color: var(--muted); line-height: 1.5; margin-bottom: 10px; }
#pcBuy[hidden] { display: none; }

#menuPanel .menu-danger { color: var(--red); }
#menuPanel .menu-danger:hover { background: rgba(226, 88, 90, 0.12); }

/* -- the frontier: four sides, one chunk each -- */
.frontier {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
}
.frontier-head {
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.frontier-head b {
  font-family: "JetBrains Mono", monospace; font-size: 13px; color: var(--gold);
  letter-spacing: 0;
}
.frontier-head b i { font-style: normal; opacity: 0.7; margin-left: 1px; }
.frontier-note { font-size: 11.5px; color: var(--muted); line-height: 1.55; margin: 7px 0 9px; }
.frontier-note b { color: var(--text); font-weight: 600; }

.frontier-compass {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  grid-template-rows: auto auto auto;
  gap: 5px;
  align-items: stretch;
}
.fr[data-side="north"] { grid-column: 2; grid-row: 1; }
.fr[data-side="west"]  { grid-column: 1; grid-row: 2; }
.frontier-compass .fr-map { grid-column: 2; grid-row: 2; }
.fr[data-side="east"]  { grid-column: 3; grid-row: 2; }
.fr[data-side="south"] { grid-column: 2; grid-row: 3; }

.fr {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 7px 4px;
  background: rgba(240, 180, 41, 0.07);
  border: 1px dashed rgba(240, 180, 41, 0.45);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.fr:hover { background: rgba(240, 180, 41, 0.16); border-color: var(--gold); }
.fr:active { transform: translateY(1px); }
.fr-dir { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; }
.fr-price { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--gold); }
.fr.poor { opacity: 0.45; }

.fr-map {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 4px;
}
.fr-map span { font-size: 9px; letter-spacing: 0.14em; color: var(--dim); }
.fr-map b { font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--muted); font-weight: 500; }
.frontier-foot { font-size: 11px; color: var(--dim); margin-top: 8px; line-height: 1.5; }
.frontier-foot b { color: var(--muted); }

#pcFrontier[hidden] { display: none; }

/* -- a building site going up -- */
#siteCard {
  grid-column: 1; grid-row: 2;
  align-self: end;
  justify-self: start;
  width: 268px;
  padding: 12px;
}
#siteCard[hidden] { display: none; }
.sc-name { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.sc-bar {
  height: 7px; border-radius: 4px; overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
}
.sc-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width 0.4s ease; }
.sc-stage {
  font-family: "JetBrains Mono", monospace; font-size: 11px; color: var(--gold);
  text-transform: uppercase; letter-spacing: 0.07em; margin: 7px 0 4px;
}
#scRows { margin-bottom: 8px; }
#scRows .pc-row b.short { color: var(--red); }
#scRows .pc-row b.full { color: var(--green); }

/* -- the person you clicked -- */
#citizenCard {
  grid-column: 1; grid-row: 2;
  align-self: end;
  justify-self: start;
  width: 268px;
  padding: 12px;
}
#citizenCard[hidden] { display: none; }
.cc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.cc-head img {
  width: 40px; height: 54px;
  image-rendering: pixelated;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.cc-name { font-size: 14px; font-weight: 600; }
.cc-trade { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 3px; }
#ccTags { margin-bottom: 9px; }

/* ── nametag + toast ── */
#nametag {
  position: fixed;
  transform: translate(-50%, -130%);
  background: rgba(10, 13, 19, 0.92);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 20;
}
#nametag[hidden] { display: none; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 128px;
  transform: translateX(-50%);
  max-width: min(620px, 92vw);
  background: rgba(10, 13, 19, 0.95);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 13.5px;
  line-height: 1.5;
  box-shadow: var(--shadow);
  z-index: 40;
  animation: rise 0.25s ease both;
}
#toast[hidden] { display: none; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ── tooltips ── */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 230px;
  background: rgba(8, 10, 15, 0.97);
  border: 1px solid var(--line-2);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text);
  white-space: normal;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s 0.25s;
  z-index: 50;
}
[data-tip]:hover::after { opacity: 1; }
#chips [data-tip]::after { top: auto; bottom: calc(100% + 8px); }

/* ── intro ── */
#intro {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.78);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  padding: 20px;
}
#intro[hidden] { display: none; }
.intro-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 30px 32px 26px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.6);
  animation: rise 0.3s ease both;
}
.intro-brand { font-size: 12px; letter-spacing: 0.28em; color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.intro-card h1 { font-size: 23px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin-bottom: 10px; }
.intro-card p { font-size: 13.5px; line-height: 1.65; color: var(--muted); margin-bottom: 18px; }
.intro-card p b { color: var(--gold); font-weight: 600; }
.intro-steps { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 22px; }
.intro-steps li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 13px; line-height: 1.5; align-items: start; }
.intro-steps b {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  background: var(--gold-soft);
  color: var(--gold);
  border-radius: 5px;
  text-align: center;
  padding: 2px 0;
}

/* ── modal ── */
#modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 8, 12, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 55;
  padding: 20px;
}
#modal-backdrop[hidden] { display: none; }
#modal {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: rise 0.2s ease both;
}
#modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
#modal p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 16px; }
#modal label { display: block; margin-bottom: 16px; }
#modal label[hidden] { display: none; }
#modal label span {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 6px;
}
#modal input, #modal textarea {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  resize: none;
}
#modal input:focus, #modal textarea:focus { border-color: var(--gold); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ── narrow screens ── */
@media (max-width: 900px) {
  #hud { padding: 10px; }
  .resbar { grid-row: 2; align-self: start; }
  #panel { width: 280px; }
  .tl .worldline { display: none; }
  #parcelCard, #citizenCard, #siteCard { display: none; }
}

/* ── materials in the resource bar ── */
.res.mat { padding: 7px 10px; gap: 5px; }
.res.mat .res-val { font-size: 15px; color: var(--muted); }
.res.mat .res-ico { font-size: 12px; }

/* ── People tab: stores + roster ── */
#stores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 10px;
}
.store {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  text-align: center;
}
.store b {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  line-height: 1.1;
}
.store span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

#roster { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.cz {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 9px;
  padding: 8px 9px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  align-items: start;
}
.cz img {
  width: 30px; height: 41px;
  image-rendering: pixelated;
  align-self: center;
}
.cz-name { font-size: 12.5px; font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.cz-trade { font-size: 10px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
.cz-doing { font-size: 11.5px; color: var(--gold); margin-top: 2px; }
.cz-doing.idle { color: var(--dim); }
.cz-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}
.tag.gear { background: rgba(174, 180, 194, 0.16); color: #cfd6e4; }
.empty { font-size: 12px; color: var(--dim); line-height: 1.5; padding: 6px 2px; }

.buy.castle { border-color: rgba(240, 180, 41, 0.3); }
.buy.castle:hover { border-color: rgba(240, 180, 41, 0.6); }

#stores { grid-template-columns: repeat(4, 1fr); }
.store.zero { opacity: 0.4; }
.store span { font-size: 9.5px; }

/* ── view controls ── */
.viewctl {
  grid-column: 1; grid-row: 2;
  align-self: end; justify-self: start;
  display: flex; gap: 4px;
  margin-bottom: 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
#parcelCard, #citizenCard, #siteCard { align-self: end; margin-bottom: 46px; }
