html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

body {
  background: #000;
}

.viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #000;
}

.landscape-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100vw;
  height: 100dvh;
  transform: translate(-50%, -50%);
  background: #000;
  overflow: hidden;
}

.map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.life-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.resource-overlay {
  position: absolute;
  left: 20.5%;
  top: 1.1%;
  width: 53.5%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.3%;
  pointer-events: none;
}

.res-chip {
  border: 1px solid rgba(169, 129, 82, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 14, 11, 0.9), rgba(31, 25, 19, 0.9));
  color: #ead8b1;
  padding: 3px 5px;
  line-height: 1.1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.res-chip span {
  display: block;
  font: 600 9px/1 "Trebuchet MS", Arial, sans-serif;
  opacity: 0.84;
}

.res-chip strong {
  display: block;
  font: 800 11px/1.1 "Trebuchet MS", Arial, sans-serif;
}

.time-overlay {
  position: absolute;
  right: 1.25%;
  top: 1.2%;
  width: 13.8%;
  min-width: 168px;
  border-radius: 10px;
  border: 1px solid rgba(218, 179, 114, 0.35);
  background: linear-gradient(180deg, rgba(17, 15, 12, 0.94), rgba(33, 28, 22, 0.94));
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  color: #efdcb5;
  font-family: "Trebuchet MS", Arial, sans-serif;
  padding: 8px 10px 9px;
}

.time-top-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  line-height: 1;
  margin-bottom: 5px;
}

.time-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  line-height: 1;
}

#dayLabel {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

#clockLabel {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

@media (orientation: portrait) {
  .landscape-stage {
    width: 100dvh;
    height: 100vw;
    transform: translate(-50%, -50%) rotate(90deg) scale(1.02);
  }

  .time-overlay {
    min-width: 140px;
    right: 1.4%;
    top: 1.4%;
    padding: 7px 9px;
  }

  .resource-overlay {
    left: 17.5%;
    top: 1%;
    width: 56%;
  }

  .res-chip {
    padding: 2px 4px;
  }

  #dayLabel,
  #clockLabel {
    font-size: 12px;
  }

  #clockLabel {
    font-size: 13px;
  }
}
