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

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

body {
  min-height: 100vh;
  padding: 16px;
  font-family: "Joystix", monospace;
  background-color: #1b2a3a;
  overflow-x: hidden;
}

#skyline {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  z-index: 0;
}

.page, .footer {
  position: relative;
  z-index: 1;
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 8vh 0 24px;
}

/* Builder-style panel with notched pixel corners and a hard drop shadow */
.card {
  width: min(640px, 100%);
  padding: 24px 22px 20px;
  color: #1a1218;
  background-color: #f0f682;
  box-shadow:
    0 -4px 0 0 #df7126,
    0 4px 0 0 #df7126,
    -4px 0 0 0 #df7126,
    4px 0 0 0 #df7126,
    8px 12px 0 0 #1a1218;
}

.hero {
  width: min(460px, 100%);
  padding: 30px 24px 22px;
  text-align: center;
  color: #df7126;
}

.title {
  font-size: clamp(32px, 10vw, 52px);
  font-weight: normal;
  line-height: 1.15;
  text-shadow: 3px 3px 0 #1a1218;
  letter-spacing: 1px;
}

.chain {
  margin-top: 8px;
  font-size: 11px;
  color: #1a1218;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.lead {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.enter {
  display: block;
  margin-top: 22px;
  padding: 18px 12px;
  font-size: clamp(16px, 5vw, 22px);
  color: #f0f682;
  text-decoration: none;
  background-color: #df7126;
  border: 3px solid #1a1218;
  box-shadow: 4px 4px 0 0 #1a1218;
}

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

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

.enter:focus-visible, a:focus-visible {
  outline: 3px dashed #1a1218;
  outline-offset: 3px;
}

.hint {
  margin-top: 14px;
  font-size: 10px;
  line-height: 1.6;
  color: #8a6a2a;
}

.connect {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.6;
  color: #1a1218;
}

a {
  color: #df7126;
}

h2 {
  font-size: 15px;
  font-weight: normal;
  color: #df7126;
}

h3 {
  margin-top: 18px;
  font-size: 12px;
  font-weight: normal;
  color: #df7126;
}

.sub {
  margin-top: 8px;
  font-size: 10px;
  line-height: 1.6;
}

.recent {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  margin-top: 12px;
}

.build {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.recent .thumb {
  display: block;
  aspect-ratio: 1;
  background-color: #1b2a3a;
  border: 3px solid #df7126;
}

.build figcaption {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
  min-width: 0;
}

.build .name, .build .artist {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.build .name {
  font-size: 10px;
}

.build .artist {
  font-size: 8px;
  color: #8a6a2a;
}

.build .share {
  display: block;
  margin-top: 6px;
  padding: 6px 4px 5px;
  font-size: 9px;
  text-align: center;
  text-decoration: none;
  color: #f0f682;
  background-color: #df7126;
  border: 2px solid #1a1218;
  box-shadow: 2px 2px 0 0 #1a1218;
}

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

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

.recent img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.steps, .plain {
  margin-top: 12px;
  padding-left: 20px;
  font-size: 11px;
  line-height: 1.7;
}

.plain {
  list-style: square;
}

.blurb {
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.7;
}

.steps li + li, .plain li + li {
  margin-top: 8px;
}

b {
  font-weight: normal;
  color: #df7126;
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 14px;
  margin-top: 12px;
  font-size: 11px;
  line-height: 1.6;
}

.facts dt {
  color: #df7126;
}

code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.footer {
  width: min(640px, 100%);
  margin: 0 auto 12px;
  padding: 10px 12px;
  background-color: #1a1218;
  text-align: center;
  font-size: 10px;
  line-height: 1.8;
  color: #f0f682;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin-bottom: 6px;
  font-size: 12px;
}

.footer a {
  color: #f0f682;
}

@media (max-width: 480px) {
  .recent {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .facts dd {
    margin-bottom: 8px;
  }
}

/* /share/:id: one build, shown big */
.shared {
  text-align: center;
}

.shared-name {
  font-size: clamp(18px, 6vw, 28px);
  font-weight: normal;
  color: #df7126;
  overflow-wrap: anywhere;
}

.shared-image {
  display: block;
  margin-top: 16px;
  background-color: #1b2a3a;
  border: 4px solid #df7126;
}

.shared-image img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
}
