@font-face {
  font-family: "Joystix";
  src: url("./Resources/Fonts/joystix.ttf");
}

* {
  margin: 0;
  padding: 0;
  border: 0;
  box-sizing: border-box;
  font-family: "Joystix", monospace;
}

body {
  min-height: 100vh;
  padding: 16px;
  color: #df7126;
  background-color: #eef388;
}

a {
  color: #df7126;
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  max-width: 980px;
  margin: 0 auto 12px;
}

.top h1 {
  font-size: clamp(20px, 5vw, 28px);
  font-weight: normal;
}

.top_links {
  display: flex;
  gap: 20px;
  font-size: 13px;
}

.intro, .note, .empty, .new_build {
  max-width: 980px;
  margin: 0 auto 16px;
  font-size: 12px;
  line-height: 1.7;
  color: #1a1218;
}

.note {
  margin-top: 16px;
  font-size: 10px;
  color: #8a6a2a;
}

.empty {
  font-size: 14px;
  color: #df7126;
}

.buildings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
}

.building {
  display: flex;
  flex-direction: column;
  background-color: #f0f682;
  border: 4px solid #df7126;
}

.building_image {
  display: block;
  border-bottom: 3px solid #df7126;
  background-color: #fff;
}

.building_image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  image-rendering: pixelated;
}

.building_info {
  padding: 12px;
}

.building h2 {
  font-size: 16px;
  font-weight: normal;
  overflow-wrap: anywhere;
}

.kind {
  margin-top: 2px;
  font-size: 10px;
  color: #8a6a2a;
  text-transform: uppercase;
}

.building h3 {
  margin-top: 14px;
  font-size: 13px;
  font-weight: normal;
  color: #1a1218;
}

.account {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11px;
}

.copy {
  padding: 2px 6px;
  font-size: 9px;
  color: #df7126;
  background: transparent;
  border: 2px solid #df7126;
  cursor: pointer;
}

.assets {
  margin-top: 8px;
  list-style: none;
  font-size: 12px;
  color: #1a1218;
}

.assets li {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  border-bottom: 1px dashed #df7126;
}

.move {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 12px;
}

.move input, .move select {
  min-width: 0;
  padding: 6px;
  font-size: 16px; /* stops iOS zooming on focus */
  color: #df7126;
  background-color: #f0f682;
  border: 2px solid #df7126;
}

.other {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
}

.other[hidden] {
  display: none;
}

.other input {
  flex: 1;
}

.move button {
  padding: 8px 4px;
  font-size: 11px;
  color: #df7126;
  background-color: #f0f682;
  border: 3px solid #df7126;
  cursor: pointer;
}

.move button:enabled:hover {
  border-color: transparent;
}

.move button:disabled, .move input:disabled, .move select:disabled {
  opacity: 0.6;
  cursor: wait;
}

.status {
  min-height: 1.6em;
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.6;
  color: #1a1218;
}

.new_build {
  padding: 10px 12px;
  border: 3px solid #df7126;
  background-color: #fff;
}

.building--new {
  border-color: #1a1218;
  box-shadow: 0 0 0 4px #df7126;
}

/* Share on X: a post linking to /share/:id (also used by rarity). */
.share {
  display: inline-block;
  margin: 10px 6px 0 0;
  padding: 6px 10px 5px;
  font-size: 10px;
  text-decoration: none;
  color: #f0f682;
  background-color: #df7126;
  border: 2px solid #1a1218;
  box-shadow: 2px 2px 0 0 #1a1218;
}

.share:hover {
  color: #1a1218;
}

.share:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 0 #1a1218;
}
