:root {
  color-scheme: dark;
  --deep: #17271f;
  --cream: #f4edd8;
  --muted: #bdc5af;
  --gold: #dbc086;
  --line: #9c996e80;
  --sans: "Trebuchet MS", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}
* {
  box-sizing: border-box;
}
html,
body,
#game {
  height: 100%;
  width: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  background: #14251e;
  color: var(--cream);
  font: 15px var(--sans);
}
#game {
  position: fixed;
  inset: 0;
  height: 100dvh;
  isolation: isolate;
  background: #13251e;
  user-select: none;
  -webkit-user-select: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:focus-visible,
#field:focus-visible {
  outline: 2px solid #efce8c;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.43;
  cursor: default;
}
button:hover:not(:disabled) {
  filter: brightness(1.12);
}
[hidden] {
  display: none !important;
}
.icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}
i[data-icon],
span[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
}
h1,
h2,
h3,
p {
  margin: 0;
}
#field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  touch-action: none;
  outline: none;
  background: #20372b;
}
#ground,
#landscape,
#actors,
#places {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
#ground {
  transform-origin: 0 0;
  max-width: none;
}
#landscape,
#actors,
#places {
  width: 100%;
  height: 100%;
}
#field.placing {
  cursor: crosshair;
}
#field.panning {
  cursor: grabbing;
}
.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    #09150dd1 0%,
    #0b181254 11%,
    transparent 25%,
    transparent 70%,
    #101a1430 87%,
    #08130cb3 100%
  );
  box-shadow: inset 0 0 70px #0d191336;
}
.world-label,
#gate-pin {
  position: absolute;
  white-space: nowrap;
  filter: drop-shadow(0 2px 3px #0e1819bb);
}
.world-label {
  color: #e0d9b9;
  text-shadow:
    0 1px 3px #141a14,
    0 0 7px #141a14;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  font: bold 11px var(--sans);
  transform: translate(-50%, -100%);
}
#gate-pin {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  color: #efe0b5;
  background: linear-gradient(135deg, #26392de6, #18281fe6);
  border: 1px solid #b6a775a8;
  border-radius: 3px;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  font: 13px var(--serif);
}
#gate-pin:after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  transform: rotate(45deg);
  left: calc(50% - 3px);
  bottom: -4px;
  border-bottom: 1px solid #ab9e73;
  border-right: 1px solid #ab9e73;
  background: #233428;
}
#gate-pin i .icon {
  width: 14px;
  height: 14px;
}
#gate-pin b {
  border-left: 1px solid #9b99726b;
  padding-left: 5px;
  font: 12px var(--sans);
}
.hud {
  background: linear-gradient(120deg, #24352bf5, #14251ef5 85%);
  border: 1px solid #9a956c9c;
  box-shadow:
    inset 0 0 0 3px #15251d8a,
    0 4px 20px #08130e55;
  border-radius: 5px;
}
.location,
.resources,
.time-hud,
.orders,
.tactical,
.notice,
.paused-banner {
  position: absolute;
  z-index: 2;
}
.location {
  display: flex;
  align-items: center;
  gap: 11px;
  top: max(23px, env(safe-area-inset-top));
  left: max(25px, env(safe-area-inset-left));
  pointer-events: none;
  text-shadow:
    0 2px 6px #08120c,
    0 0 18px #08140eee;
}
.location img {
  width: 49px;
  height: 52px;
  filter: drop-shadow(0 2px 3px #111a11);
}
.game-name {
  color: #dfc997;
  font: bold 10px/1.3 var(--sans);
  letter-spacing: 2.4px;
  text-transform: uppercase;
}
.location h1 {
  font: normal clamp(27px, 2.4vw, 39px) / 1.14 var(--serif);
  letter-spacing: -1.25px;
}
.resources {
  left: 50%;
  transform: translateX(-50%);
  top: max(18px, env(safe-area-inset-top));
  display: flex;
  align-items: center;
  padding: 6px 9px;
  min-height: 53px;
}
.resources > div {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}
.resources > div + div {
  border-left: 1px solid #73806a65;
}
.resources .icon {
  height: 22px;
  width: 22px;
}
.resources span,
.time-hud > div > span {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1.35px;
  color: #bec3ab;
}
.resources b,
.time-hud b {
  font: normal 22px/1.15 var(--serif);
  color: var(--cream);
  font-variant-numeric: tabular-nums;
}
.resources em {
  font: 12px var(--sans);
  color: #bdc4ad;
}
.gold {
  color: #dbc081;
}
.green {
  color: #a1c59e;
}
.aqua {
  color: #a2cabe;
}
.time-hud {
  display: flex;
  align-items: center;
  gap: 9px;
  right: max(24px, env(safe-area-inset-right));
  top: max(23px, env(safe-area-inset-top));
  text-shadow: 0 1px 5px #0e1a12;
}
.time-hud > span .icon {
  width: 24px;
  height: 24px;
  color: #e6cf95;
}
.time-hud > div {
  min-width: 57px;
}
.time-hud b {
  font-size: 21px;
}
.round,
.tool {
  display: grid;
  place-items: center;
  background: linear-gradient(#304034f0, #15261df4);
  border: 1px solid #8d9778b5;
  box-shadow: 0 2px 6px #03100652;
  color: #e7e5cd;
}
.round {
  margin-left: 7px;
  border-radius: 50%;
  height: 38px;
  width: 38px;
}
.round .icon {
  width: 17px;
  height: 17px;
}
.orders {
  bottom: max(22px, env(safe-area-inset-bottom));
  left: max(24px, env(safe-area-inset-left));
  width: min(425px, calc(100vw - 30px));
  padding: 0 14px 13px;
  backdrop-filter: blur(7px);
}
.orders:before,
.orders:after {
  pointer-events: none;
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
}
.orders:before {
  top: 3px;
  left: 3px;
  border-top: 1px solid #d2b979;
  border-left: 1px solid #d2b979;
}
.orders:after {
  bottom: 3px;
  right: 3px;
  border-bottom: 1px solid #d2b979;
  border-right: 1px solid #d2b979;
}
.orders-head {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 35px;
  color: #d7c99e;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.orders-head > span:first-child {
  color: #c8b179;
}
.orders-head .icon {
  width: 15px;
  height: 15px;
}
.orders-head > i {
  flex: 1;
  height: 1px;
  background: #9ca37945;
}
.orders-head .queue {
  font-size: 11px;
  letter-spacing: 0.25px;
  text-transform: none;
  color: #c0c8b4;
  font-weight: normal;
}
.orders-head button,
.small-icon {
  background: none;
  border: 0;
  color: var(--muted);
  padding: 4px;
  display: grid;
  place-items: center;
}
.orders-head button .icon {
  height: 13px;
  width: 13px;
  transform: rotate(180deg);
}
.orders.folded {
  padding-bottom: 0;
}
.orders.folded .orders-head button .icon {
  transform: none;
}
.orders.folded #order-body {
  display: none;
}
.order-main {
  display: flex;
  align-items: center;
  gap: 12px;
}
.portrait {
  width: 65px;
  height: 72px;
  border: 1px solid #9b8b5c;
  border-radius: 3px;
  object-fit: cover;
  flex: none;
}
.portrait.sprite {
  object-fit: contain;
  padding: 7px;
  background: radial-gradient(ellipse at bottom, #4d5a43, #26392d);
}
.order-copy {
  min-width: 0;
  flex: 1;
}
.order-copy h2 {
  font: normal 24px/1.15 var(--serif);
  letter-spacing: -0.5px;
  color: #f5ebce;
}
.order-copy p,
.body-copy {
  font-size: 13px;
  line-height: 1.4;
  color: #c2cbb8;
  margin-top: 3px;
}
.meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #d4c080;
  font-size: 12px;
  margin-top: 5px;
}
.meta .icon {
  width: 13px;
  height: 13px;
}
.command,
.soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 3px;
  padding: 8px 11px;
  font: 600 13px var(--sans);
  min-height: 34px;
}
.command {
  border: 1px solid #dac58e;
  background: linear-gradient(120deg, #e2cb95, #c1a469);
  color: #223025;
  box-shadow: inset 0 1px #f6e6b58a;
}
.soft {
  border: 1px solid #788368;
  background: linear-gradient(#35493a, #26392b);
  color: #e4e8d3;
}
.command .icon,
.soft .icon {
  width: 15px;
  height: 15px;
}
.order-main .command {
  flex: none;
  max-width: 114px;
}
.order-foot {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.order-foot.solo {
  justify-content: flex-end;
}
.work-progress {
  margin-top: 10px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.work-progress i {
  height: 4px;
  flex: 1;
  background: #0d1a13;
  box-shadow: 0 0 0 1px #6672567a;
}
.work-progress b {
  display: block;
  background: linear-gradient(90deg, #a39b66, #e2c894);
  height: 100%;
  width: 0%;
}
.work-progress span {
  color: #ded9bd;
  font-size: 11px;
  min-width: 36px;
  text-align: right;
}
.tactical {
  right: max(24px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #14261ddf;
  border: 1px solid #82917197;
  border-radius: 4px;
  box-shadow: 0 2px 10px #0b160c80;
  padding: 4px;
}
.tool-row > i {
  height: 20px;
  background: #73816a7a;
  width: 1px;
  margin: 0 2px;
}
.tool {
  height: 30px;
  width: 30px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  border-radius: 3px;
}
.tool[aria-pressed="true"],
.tool:hover {
  background: #54604196;
}
.tool .icon {
  height: 16px;
  width: 16px;
}
.tool.speed {
  font: 600 13px var(--sans);
}
.minimap {
  padding: 4px;
}
.minimap button {
  width: 190px;
  display: block;
  padding: 0;
  line-height: 0;
  border: 0;
  background: url("./assets/world/warden-meadow.webp") center/cover;
}
#minimap.survey { background: #364d3c; }
.minimap canvas {
  width: 100%;
  height: auto;
}
.notice,
.paused-banner {
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 80vw;
  width: max-content;
  background: #1d3025ec;
  border: 1px solid #8791709c;
  border-radius: 3px;
  box-shadow: 0 3px 11px #08110d6b;
  padding: 7px 12px;
  text-align: center;
  font-size: 13px;
  color: #ebead3;
  pointer-events: none;
}
.notice:empty {
  display: none;
}
.paused-banner {
  top: 50%;
  transform: translate(-50%, -50%);
  font: 26px var(--serif);
  padding: 12px 28px;
}
#fatal {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  background: var(--deep);
}
.payoff {
  color: #e3c887;
}
@media (max-width: 850px) {
  .location {
    left: 15px;
    top: 15px;
    gap: 5px;
  }
  .location img {
    width: 37px;
    height: 43px;
  }
  .game-name {
    font-size: 8px;
    letter-spacing: 1.7px;
  }
  .location h1 {
    font-size: 25px;
  }
  .time-hud {
    right: 13px;
    top: 17px;
    gap: 5px;
  }
  .resources {
    top: 13px;
    min-height: 43px;
    padding: 4px;
  }
  .resources > div {
    padding: 0 8px;
    gap: 5px;
  }
  .resources .icon {
    width: 17px;
    height: 17px;
  }
  .resources b {
    font-size: 19px;
  }
  .resources span {
    font-size: 9px;
  }
  .orders {
    left: 13px;
    bottom: 12px;
    width: 382px;
  }
  .tactical {
    bottom: 12px;
    right: 12px;
  }
  .tool {
    width: 26px;
    height: 27px;
  }
}
@media (max-width: 620px) and (orientation: portrait) {
  .location {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }
  .time-hud {
    top: max(13px, env(safe-area-inset-top));
    right: 12px;
  }
  .time-hud b {
    font-size: 17px;
  }
  .time-hud > span .icon {
    width: 19px;
    height: 19px;
  }
  .time-hud > div {
    min-width: 42px;
  }
  .round {
    width: 32px;
    height: 32px;
    margin-left: 3px;
  }
  .resources {
    top: calc(max(12px, env(safe-area-inset-top)) + 53px);
    left: 13px;
    transform: none;
    min-height: 34px;
  }
  .resources > div {
    gap: 5px;
    padding: 0 8px;
  }
  .resources > div > div {
    display: flex;
    align-items: baseline;
    gap: 4px;
  }
  .resources span {
    font-size: 8px;
    letter-spacing: 0.6px;
  }
  .resources b {
    font-size: 16px;
  }
  .resources em {
    font-size: 10px;
  }
  .resources .icon {
    width: 14px;
    height: 14px;
  }
  .orders {
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    right: 8px;
    width: auto;
    padding: 0 11px 10px;
  }
  .orders-head {
    height: 29px;
  }
  .order-main {
    gap: 8px;
  }
  .portrait {
    width: 48px;
    height: 57px;
  }
  .order-copy h2 {
    font-size: 21px;
  }
  .order-copy p {
    font-size: 12px;
  }
  .order-main .command {
    padding: 7px;
    max-width: 95px;
    font-size: 12px;
  }
  .tactical {
    bottom: calc(max(8px, env(safe-area-inset-bottom)) + var(--dock-height, 110px) + 6px);
    right: 8px;
  }
  .tool-row {
    gap: 1px;
    padding: 3px;
  }
  .tool {
    width: 28px;
    height: 27px;
  }
  .notice {
    top: 109px;
    max-width: 90vw;
    font-size: 12px;
  }
  .minimap button {
    width: 147px;
  }
  #gate-pin {
    font-size: 11px;
    padding: 4px 6px;
  }
  .world-label {
    font-size: 9px;
  }
  .order-foot {
    margin-top: 4px;
  }
}
@media (max-height: 470px) and (orientation: landscape) {
  .location,
  .time-hud {
    top: 7px;
  }
  .resources {
    top: 5px;
  }
  .orders {
    max-width: 360px;
    left: 7px;
    bottom: 6px;
    padding: 0 9px 7px;
  }
  .orders-head {
    height: 24px;
  }
  .portrait {
    width: 39px;
    height: 45px;
  }
  .order-copy h2 {
    font-size: 18px;
  }
  .order-copy p {
    font-size: 11px;
  }
  .tactical {
    bottom: 6px;
    right: 7px;
  }
  .meta {
    font-size: 10px;
  }
  .notice {
    top: 51px;
  }
  .minimap button {
    width: 120px;
  }
}
#field:before {
  content: "";
  position: absolute;
  inset: -14px;
  pointer-events: none;
  background:
    linear-gradient(#11231bba, #11231bc9),
    url("./assets/world/warden-meadow.webp") center/cover;
  filter: blur(13px);
}
#site-actions {
  position: absolute;
  z-index: 8;
  width: min(224px, calc(100% - 16px));
  max-height: calc(100% - 16px);
  overflow: auto;
  padding: 10px;
  border: 1px solid #a89c75;
  border-radius: 5px;
  background: linear-gradient(140deg, #26392e, #15241e);
  box-shadow: 0 4px 15px #08120db3;
}
#site-actions header,
#site-actions button {
  display: flex;
  align-items: center;
}
#site-actions header {
  justify-content: space-between;
  gap: 8px;
}
#site-name {
  font: normal 18px/1.2 var(--serif);
}
#site-close {
  padding: 4px;
  background: transparent;
  border: 0;
  color: var(--muted);
}
#site-close svg {
  width: 16px;
  height: 16px;
}
#site-health {
  font: 13px/1.4 var(--sans);
  color: var(--muted);
  margin: 1px 0 8px;
}
.site-commands {
  border-top: 1px solid #82907855;
  padding-top: 4px;
}
.site-commands button {
  width: 100%;
  gap: 8px;
  min-height: 34px;
  padding: 4px;
  border: 0;
  background: transparent;
  border-radius: 3px;
  text-align: left;
  font-size: 14px;
}
.site-commands button:hover:enabled {
  background: #43533b;
}
.site-commands .icon {
  color: var(--gold);
  width: 16px;
  height: 16px;
}
.site-commands small {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  color: var(--gold);
}
#field.targeting:not(.panning) {
  cursor: pointer;
}
#gate-pin:hover,
#gate-pin.hovered {
  outline: 2px solid #ffe09a;
  outline-offset: 2px;
}
@media (pointer: coarse) {
  .site-commands button {
    min-height: 44px;
  }
}

.build-tool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  gap: 4px;
  padding: 0 8px;
  color: #f5df99;
}
.build-tool i {
  display: inline-flex;
}
.build-tool .icon {
  width: 17px;
  height: 17px;
}
#site-notes {
  color: #d3d8bd;
  line-height: 1.4;
  font-size: 13px;
}
#site-notes {
  margin: 0 0 8px;
}
#site-notes:empty {
  display: none;
}

.keeper-rail {
  position: absolute;
  z-index: 3;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: min(425px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}
.keeper-rail .orders,
.keeper-rail .tactical {
  position: static;
  pointer-events: auto;
}
.keeper-rail .orders {
  width: 100%;
}
.keeper-rail .minimap {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
}
.drawing-detail {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: 12px;
  color: #e0d4ab;
}
.drawing-detail button {
  margin-left: auto;
  padding: 3px 7px;
  font-size: 12px;
}
@media (max-height: 470px) {
  .keeper-rail {
    bottom: 4px;
    gap: 2px;
    width: min(390px, 90vw);
  }
}

#game:has(.placing) .paused-banner {
  top: max(76px, calc(env(safe-area-inset-top) + 65px));
  font: 15px var(--serif);
  padding: 5px 12px;
}

#brush-hint {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(255px, 80vw);
  padding: 5px 9px;
  border-radius: 4px;
  font: 600 13px var(--sans);
  background: #13271ef5;
  color: #f5f5e5;
  border: 1px solid #a4d7ac;
  box-shadow: 0 2px 8px #09150d7a;
}
#brush-hint b {
  color: #b0e7bc;
  font-size: 16px;
  line-height: 1;
}
#brush-hint[data-state="blocked"] {
  border-color: #f1a28d;
  background: #35221ef5;
}
#brush-hint[data-state="blocked"] b {
  color: #ffb09a;
}
#field.placing #gate-pin {
  pointer-events: none;
}

/* Keep each transparent silhouette intact at every HUD size. */
.portrait:not(.sprite) {
  object-fit: contain;
  border: 0;
  border-radius: 0;
}
/* The receiving notice frames the bust against the full height of its copy.
   All 320px portraits have a transparent rim around the head and shoulders. */
.order-main:has(> #greet) {
  display: grid;
  grid-template-columns: clamp(78px, 24%, 98px) minmax(0, 1fr) auto;
  gap: 10px;
}
.order-main:has(> #greet) > .portrait {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 112px;
  object-view-box: inset(7% 2% 2%);
  align-self: center;
}
.order-main > #greet { max-width: 98px; }
@media (max-width: 410px) and (orientation: portrait) {
  .order-main:has(> #greet) {
    grid-template-columns: clamp(84px, 27%, 99px) minmax(0, 1fr);
    gap: 5px 10px;
  }
  .order-main:has(> #greet) > .portrait { grid-row: span 2; }
  .order-main > #greet { justify-self: start; max-width: none; }
}
@media (max-height: 470px) and (orientation: landscape) {
  .order-main:has(> #greet) { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 7px; }
  .order-main:has(> #greet) > .portrait { max-height: 70px; }
}
#site-portrait { width: 46px; height: 48px; object-fit: contain; }
#site-name { margin-right: auto; }
#site-class { margin: 5px 0; font: 14px/1.36 var(--sans); }
/* The exchange takes the orders card's place above the controls, even when orders are folded. */
#gate-conversation {
  width: min(52rem, calc(100vw - 1.25rem));
  position: relative;
  overflow: hidden;
  background: linear-gradient(105deg, #243a30fa, #15271ff7 75%);
  border: 1px solid #a79a75;
  border-radius: 3px;
  box-shadow: 0 4px 16px #0a17156b;
}
.gate-exchange { display: grid; grid-template-columns: 1fr 1.15fr; }
.gate-turn {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .55rem .8rem;
  min-width: 0;
}
.gate-turn img { width: 2.8rem; height: 3.4rem; object-fit: contain; flex: none; }
.gate-turn strong { display: block; color: #dfc788; font: 600 .9rem/1.3 var(--sans); }
.gate-turn p { color: #f5efdc; font: clamp(1rem, 2vw, 1.15rem)/1.25 var(--serif); margin-top: .15rem; }
.mourner-turn { border-inline-start: 1px solid #65705a; }
#gate-conversation[data-speaker="keeper"] .keeper-turn,
#gate-conversation[data-speaker="mourner"] .mourner-turn { background: #d0c18a18; }
#greeting-progress { display: block; width: 100%; height: 3px; border: 0; background: #435045; appearance: none; }
#greeting-progress::-webkit-progress-bar { background: #435045; }
#greeting-progress::-webkit-progress-value { background: #c7ad75; }
#greeting-progress::-moz-progress-bar { background: #c7ad75; }
@media (max-width: 580px) {
  .gate-exchange { grid-template-columns: 1fr; }
  .gate-turn { padding: .35rem .65rem; }
  .gate-turn img { width: 2.25rem; height: 2.6rem; }
  .mourner-turn { border-inline-start: 0; border-top: 1px solid #65705a; }
}
.visitor-line, #site-visitor { display: flex; align-items: center; gap: 8px; font: 14px/1.35 var(--sans); }
.visitor-line img, #site-visitor img { width: 40px; height: 44px; object-fit: contain; }
#site-visitor { margin: 2px 0 8px; }
.visitor-line small { display: block; color: var(--muted); }

#site-residents { display: grid; gap: 3px; margin-block: 6px; }
#site-residents button { display: flex; align-items: center; gap: 6px; color: var(--cream); background: #1a2b23; text-align: left; border: 1px solid var(--line); }
#site-residents button[aria-pressed="true"] { border-color: var(--gold); }
#site-residents img { width: 28px; height: 32px; object-fit: contain; }
#site-residents small { display: block; color: var(--muted); }
#shared-upgrades { display: grid; margin-top: 4px; }
#shared-upgrades button { text-align: left; }
