/* Patinated bronze joins the game controls to the illustrated boards. */
.alpha-game .top {
  background: linear-gradient(0deg, #32382b, #454936 48%, #343c30);
  border-bottom: 3px double #b28c59;
  color: #fae7bc;
}
.alpha-game .top .brand { color: #f5dca8; text-shadow: 0 1px #202b23; }
.alpha-game .top .brand small { display: none; }
.alpha-game .top-inner:has(.heading[hidden]) .brand small { display: block; }
.alpha-game .top .brand .crest { color: #d0a571; }
.alpha-game .top .heading h1 { color: #fff0c8; }
.alpha-game .top .heading .region { color: #e0bf88; }
.alpha-game #stock-city { color: #e8d2a2; }
.alpha-game .queue { background: #383c2d; }
.storage-panel .storage-balance {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  grid-template-areas: "icon name" "icon amount" "meter meter";
  column-gap: 5px;
  border-color: #9a7a4c;
  background: linear-gradient(#363c2c, #252e25);
}
.storage-balance > .resource-icon {
  grid-area: icon;
  align-self: center;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
}
.storage-balance .storage-heading { grid-area: name; gap: 0 3px; }
.storage-balance .storage-amount { grid-area: amount; }
.storage-balance progress { grid-area: meter; }
.cost .resource-icon { width: 20px; height: 20px; object-fit: contain; flex: none; }

.alpha-game .heading .force-picker #troops {
  max-width: none;
  color: #3e2c17;
  width: min(330px, calc(100vw - 34px));
  padding: 0 8px 8px;
  border: 2px solid #b68c54;
  background: linear-gradient(#efe0bb, #dfcea4);
}
.garrison-roll .roll-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 6px;
  border-bottom: 3px double #987344;
  font: 700 20px/1.12 var(--serif);
  overflow-wrap: anywhere;
}
.garrison-roll section h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 6px 0 2px;
  padding: 2px 5px;
  color: #654924;
  font: 700 17px var(--serif);
}
.garrison-roll dl { margin: 0; background: #f4e7c6; border: 1px solid #ae9164; }
.garrison-roll dl > div { display: flex; justify-content: space-between; gap: 7px; padding: 3px 7px; }
.garrison-roll dl > div + div { border-top: 1px solid #b79b7380; }
.garrison-roll dt { overflow-wrap: anywhere; }
.garrison-roll dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }

.alpha-game main > .tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  padding: 4px;
  border: 3px double #aa8656;
  background: linear-gradient(#5c4a33, #393429);
}
.alpha-game .tabs button {
  position: relative;
  flex-direction: column;
  gap: 2px;
  min-height: 59px;
  border: 1px solid #b0885666;
  border-radius: 3px;
  color: #f5e0ae;
  background: linear-gradient(135deg, #484632, #383929);
  box-shadow: inset 0 1px #dec38a30;
}
.alpha-game .tabs .icon {
  flex: none;
  width: 26px;
  height: 26px;
  padding: 2px;
  color: #edbe76;
}
.alpha-game .tabs button:hover, .alpha-game .tabs button[aria-current] {
  background: linear-gradient(#f5db9e, #cda16b);
  border-color: #f3d7a2;
  color: #392818;
}
.alpha-game .tabs button:is(:hover, [aria-current]) .icon { color: #755129; }
.alpha-game .tabs #report-count:not(:empty) {
  position: absolute;
  top: 3px;
  left: calc(50% + 11px);
  min-width: 15px;
  margin-left: 0;
  padding: 0 2px;
  border: 1px solid #ecba80;
  border-radius: 7px;
  background: #803e2d;
  color: #fff0c3;
  font: 700 10px/1.25 var(--sans);
  white-space: nowrap;
}

.city-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  background: #9d925f;
  overflow: clip;
  isolation: isolate;
}
.city-stage > .city-backdrop { display: block; width: 100%; height: 100%; object-fit: fill; }
.city-lots { position: absolute; inset: 0; }
.city-lot {
  position: absolute;
  left: var(--lot-x);
  top: var(--lot-y);
  width: var(--lot-width);
  aspect-ratio: 1.21;
  transform: translate(-50%, -87%);
  z-index: var(--lot-depth);
  display: flex;
  justify-content: center;
  align-items: end;
  padding: 0 0 2%;
  border: 0;
  background: transparent;
  outline-offset: -2px;
}
.city-lot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(2px 3px 2px #52472d87);
}
.city-lot.empty-lot img { filter: grayscale(.75) sepia(.36) drop-shadow(1px 2px 1px #53422366); opacity: .56; }
.city-lot.empty-lot:has(.lot-tier:empty)::after {
  content: "+";
  position: absolute;
  bottom: 0;
  width: 14px;
  height: 14px;
  border: 1px solid #775939;
  border-radius: 50%;
  background: #e1c998;
  color: #553a23;
  font: 700 11px/12px var(--sans);
}
.city-lot:is(:hover, :focus-visible, [aria-pressed=true]) img { opacity: 1; filter: drop-shadow(0 0 5px #ffe296) drop-shadow(0 1px 2px #352c17); }
.city-lot:is(:hover, :focus-visible) { z-index: 101; }
.city-lot[aria-pressed=true] { z-index: 98; }
.city-lot.lot-working .lot-tier { background: #e4af55; color: #462c18; }
.lot-tier {
  position: absolute;
  bottom: 0;
  min-width: 15px;
  padding: 0 2px;
  background: #40331ee8;
  border: 1px solid #d8b77a;
  border-radius: 2px;
  color: #f9e9bf;
  font: 700 clamp(9px, 1.2vw, 12px)/1.15 var(--sans);
}
.lot-tier:empty { display: none; }
.lot-label {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  width: max-content;
  max-width: 135px;
  padding: 3px 6px;
  border: 1px solid #d8b77a;
  background: #40331ef7;
  color: #f9e9bf;
  border-radius: 2px;
  font-size: 12px;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.city-lot:is(:hover, :focus-visible) .lot-label { display: block; }
.city-lot:nth-child(6n + 1) .lot-label { left: 0; }
.city-lot:nth-child(6n) .lot-label { right: 0; }
.city-location {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 8px;
  align-items: center;
  padding: 5px 10px;
  color: #fff0c6;
  background: linear-gradient(#4e503b, #383e2e);
  border-block: 1px solid #b18a58;
}
.city-location .icon { width: 18px; height: 18px; color: #edbf7c; }
.city-location span:not(.icon) { color: #ebd9b5; font-size: 12px; }
.city-archive summary {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  color: #5d4122;
  cursor: pointer;
  font: 700 17px var(--serif);
}
.city-archive summary::-webkit-details-marker { display: none; }
.city-archive summary::after { content: '▸'; margin-left: auto; }
.city-archive[open] summary::after { content: '▾'; }
.city-archive summary .icon { width: 16px; height: 16px; }

.guild-view .guild-banner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 13px; }
.guild-banner .guild-crest {
  width: clamp(66px, 9vw, 100px);
  height: clamp(66px, 9vw, 100px);
  align-self: center;
  margin: 0;
  filter: none;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 800px) {
  .storage-panel .storage-balance { grid-template-columns: 24px minmax(0, 1fr); column-gap: 3px; padding-inline: 4px; }
  .alpha-game .heading .force-picker #troops { inset-inline: auto 0; }
}
@media (max-width: 700px) {
  .alpha-game main > .tabs { gap: 1px; padding: 2px; }
  .alpha-game .tabs button { min-height: 49px; padding-inline: 1px; font: 650 clamp(10px, 2.8vw, 15px)/1.1 var(--sans); }
  .alpha-game .tabs .icon { width: 22px; height: 22px; }
  .alpha-game .tabs #report-count:not(:empty) { top: 2px; right: 1px; left: auto; }
  .city-lot { padding-bottom: 0; }
  .city-lot .lot-label { display: none; }
  .city-lot:focus-visible .lot-label { display: block; }
}

/* Optional early-game guidance reads like a dispatch from the polis, not a web form. */
.alpha-game section.starter-guide {
  padding: 14px 16px;
  border: 2px solid #ae8954;
  background: linear-gradient(135deg, #f3e4bf, #e1c99b);
  color: #49351e;
  box-shadow: inset 0 1px #fff4d9, 0 3px 8px #28201220;
}
.alpha-game section.starter-guide h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font: 700 21px/1.18 var(--serif);
  color: #5b3b21;
}
.alpha-game section.starter-guide h3 .icon { width: 24px; height: 24px; flex: none; }
.alpha-game section.starter-guide p { margin: 6px 0 9px; }
.alpha-game section.starter-guide button { max-width: 100%; margin: 4px 8px 4px 0; white-space: normal; }
.alpha-game section.starter-guide .starter-optional {
  margin: 8px 0 0;
  padding-top: 4px;
  border-top: 1px solid #ae895477;
  color: #6a5134;
  font-size: .87rem;
}
