.housing-return-button {
  position: absolute;
  right: 14px;
  top: 62px;
  z-index: 22;
  color: #ead5a1;
  background: #233329ed;
  border: 1px solid #b89d65;
  padding: 8px 12px;
  border-radius: 3px;
  cursor: pointer;
}
.housing-return-button[hidden] {
  display: none;
}
.housing-window {
  z-index: 85;
  position: absolute;
  inset: 6% 8%;
  max-width: 1040px;
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: #e2d1aa;
  background: linear-gradient(115deg, #303b31, #1c2926 60%, #293830);
  border: 2px solid #a38a59;
  box-shadow:
    0 14px 60px #000b,
    inset 0 0 0 4px #111c18;
  overflow: hidden;
}
.housing-window[hidden] {
  display: none;
}
.housing-window > header {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid #786b48;
  padding-bottom: 12px;
}
.housing-window small {
  color: #b9a979;
}
.housing-window h2 {
  margin: 4px 0;
  color: #eddbac;
  font-size: 25px;
}
.housing-window h3 {
  font-size: 17px;
  margin: 7px 0;
}
.housing-window p {
  line-height: 1.5;
}
.housing-window nav,
.housing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.housing-window nav {
  border-bottom: 1px solid #756744;
  padding: 0 0 10px;
}
.housing-window button,
.housing-window select,
.housing-window input {
  font: inherit;
  color: #e9d9ad;
  background: #25332b;
  border: 1px solid #8e794e;
  border-radius: 3px;
  padding: 9px 12px;
  min-height: 40px;
}
.housing-window button {
  cursor: pointer;
}
.housing-window button:hover,
.housing-window button[aria-pressed="true"] {
  background: #65563a;
  border-color: #d8bd78;
}
.housing-window button:disabled {
  opacity: 0.45;
  cursor: default;
}
.housing-content {
  overflow: auto;
  min-height: 0;
  padding: 10px 5px 12px;
}
.housing-content > button {
  margin-top: 12px;
}
.housing-style-grid,
.housing-recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.housing-style,
.housing-recipe-grid article,
.housing-milestone {
  background: #15241f;
  border: 1px solid #5f6345;
  padding: 14px;
}
.housing-style canvas {
  display: block;
  width: 100%;
  max-width: 240px;
  height: 135px;
  object-fit: contain;
  margin: auto;
  image-rendering: pixelated;
}
.housing-style p {
  font-size: 13px;
  min-height: 40px;
}
.housing-recipe-grid article {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.housing-recipe-grid p {
  margin: 0;
  font-size: 13px;
}
.housing-code {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 22px 0;
}
.housing-window label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.housing-window input {
  user-select: text;
  max-width: 220px;
}
.housing-address {
  padding: 15px;
  border-left: 3px solid #c5a466;
  background: #15241f;
}
.housing-town-plan,
.housing-floor-plan {
  display: block;
  width: 100%;
  height: auto;
  max-width: 800px;
  image-rendering: pixelated;
  margin: 18px auto;
  border: 2px solid #a18b5d;
}
.housing-floor-plan {
  touch-action: none;
  cursor: crosshair;
}
.housing-milestone {
  margin: 10px 0;
}
.housing-milestone p {
  margin: 5px 0;
}
.housing-milestone progress {
  display: block;
  width: 100%;
  height: 12px;
  accent-color: #a58e58;
  margin: 10px 0;
}
.housing-status {
  min-height: 22px;
  margin: 8px 0 0;
  border-top: 1px solid #5d6146;
  padding-top: 8px;
}
.housing-status[data-error] {
  color: #e2a48b;
}
@media (max-width: 600px) {
  .housing-window {
    inset: 1%;
    padding: 12px;
  }
  .housing-window h2 {
    font-size: 20px;
  }
  .housing-window > header {
    gap: 8px;
  }
  .housing-window nav {
    gap: 4px;
  }
  .housing-window nav button {
    flex: 1;
    padding: 7px 4px;
    font-size: 13px;
  }
  .housing-style-grid,
  .housing-recipe-grid {
    grid-template-columns: 1fr;
  }
  .housing-caption {
    font-size: 12px;
    margin: 9px 0;
  }
  .housing-content {
    padding: 5px 0;
  }
  .housing-style canvas {
    height: 120px;
  }
  .housing-window .housing-status {
    font-size: 13px;
  }
}
