.atlas {
  padding-top: 65px;
}
.atlas-heading {
  margin-bottom: 28px;
}
.valley-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.environment-switch {
  display: flex;
  padding: 5px;
  background: #100d1d;
  border: 1px solid #79678d;
  border-radius: 5px;
  gap: 4px;
}
.environment-switch button {
  padding: 9px 17px;
  font-size: 14px;
  border-radius: 3px;
  color: #d9cce4;
}
.environment-switch button[aria-pressed="true"] {
  background: var(--lime);
  color: #201a33;
  font-weight: 700;
}
.valley-map {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  overflow: hidden;
  border: 3px solid #0f0c18;
  border-radius: 7px;
  box-shadow: 8px 8px 0 #100c1d;
  background: #302442;
}
.valley-landscape {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("assets/valle.webp") center/cover no-repeat;
  transition:
    background-position 1.2s,
    transform 1.2s,
    filter 1.2s;
  transform: scale(1.015);
}
.valley-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, #120d2430, #120d2420 40%, #120d2470);
}
.valley-map[data-world="nature"] .valley-landscape {
  background-size: auto 140%;
  background-position: left center;
  filter: saturate(1.15);
}
.valley-map[data-world="city"] .valley-landscape {
  background-size: auto 140%;
  background-position: right center;
  filter: saturate(0.95);
}
.valley-map[data-world="nature"] .valley-shade {
  background: linear-gradient(180deg, #071d1b30, #071d1b60);
}
.valley-map[data-world="city"] .valley-shade {
  background: linear-gradient(180deg, #25143525, #25143555);
}
#valley-connections {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
#valley-connections path {
  fill: none;
  stroke: #eee7d67a;
  stroke-width: 3;
  stroke-dasharray: 6 8;
  vector-effect: non-scaling-stroke;
}
#valley-connections path.revealed {
  stroke: #d5e04bd4;
  stroke-width: 4;
  stroke-dasharray: 8 9;
  filter: drop-shadow(1px 2px 2px #100c1b);
}
#valley-connections path.traveled {
  stroke: var(--yellow);
  stroke-dasharray: none;
}
.valley-place {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: clamp(140px, 16vw, 185px);
  padding: 13px 13px 12px;
  background: #201a33f2;
  border: 2px solid var(--lime);
  box-shadow: 5px 5px 0 #100c1dd9;
  border-radius: 5px;
  text-align: center;
  transition:
    background 0.3s,
    box-shadow 0.3s;
}
.valley-place:hover {
  background: #36284e;
  box-shadow:
    5px 5px 0 #100c1d,
    0 0 30px #d5e04b40;
}
.valley-place:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}
.place-label {
  display: block;
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--fg);
}
.place-state {
  display: block;
  font-family: "Barlow Condensed", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 1.3px;
  color: var(--lime);
  margin-top: 7px;
  text-transform: uppercase;
}
.valley-place.visited {
  border-color: var(--yellow);
}
.valley-place.visited .place-state {
  color: var(--yellow);
}
.valley-place[aria-disabled="true"] {
  border-color: #b9adca80;
  background: #171221d9;
  box-shadow: 4px 4px 0 #100c1b99;
}
.valley-place[aria-disabled="true"] .place-label {
  color: #c9bdd5;
}
.valley-place[aria-disabled="true"] .place-state {
  color: #b9adca;
}
.valley-world-label {
  position: absolute;
  bottom: 20px;
  left: 22px;
  background: #201a33e6;
  border: 1px solid #aa91bd7a;
  border-radius: 3px;
  padding: 8px 13px;
  font-family: "Barlow Condensed", Arial, sans-serif;
  color: var(--fg);
  font-size: 13px;
  letter-spacing: 1.7px;
}
.map-status {
  min-height: 2.4em;
  font-size: 15px;
  color: var(--lime);
  line-height: 1.65;
  margin: 22px 0 16px;
}
.map-list-toggle {
  display: flex;
  align-items: center;
  gap: 25px;
  justify-content: space-between;
  margin-bottom: 30px;
}
.map-list-toggle > span {
  font-size: 13px;
  color: var(--muted);
  max-width: 420px;
}
.atlas-grid {
  margin-top: 25px;
}
.door-mark {
  display: none;
}
.discoveries {
  margin-top: 30px;
}
.explorer-world-bar {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-top: 25px;
  border: 1px solid #9c78eb66;
  border-radius: 4px;
  background: #201a3399;
  width: fit-content;
  padding: 8px 15px;
  color: var(--lime);
  font-size: 14px;
}
.explorer-world-bar .text-button {
  font-size: 13px;
}
#explorer {
  background: #241c37;
  transition:
    border-color 0.5s,
    background 0.5s;
}
#explorer[data-world="nature"] {
  background: linear-gradient(120deg, #173d3099, #241c37 70%), #241c37;
  border-color: var(--lime);
}
#explorer[data-world="city"] {
  background: linear-gradient(120deg, #57437970, #241c37 70%), #241c37;
  border-color: var(--purple);
}
.explorer-steps {
  gap: 25px;
  flex-wrap: wrap;
}
.defense-view {
  border: 1px solid var(--purple);
  background: #302442a6;
  border-radius: 4px;
  padding: 22px;
  margin: 22px 0;
}
.defense-view strong {
  font-family: "Roboto Slab", Georgia, serif;
  font-size: 23px;
  line-height: 1.35;
  color: var(--yellow);
}
.defense-view p {
  font-size: 16px;
  line-height: 1.8;
  color: #e0d5e5;
}
.defense-label {
  display: block;
  color: var(--lime);
  font-weight: 600;
  font-size: 16px;
  margin: 25px 0 12px;
}
.defense-input {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  background: #171222;
  border: 1px solid #9c78eb;
  border-radius: 4px;
  padding: 17px;
  color: var(--fg);
  font: inherit;
  font-size: 16px;
  line-height: 1.7;
}
.defense-input::placeholder {
  color: #a89bb5;
}
.defense-input:focus {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
.defense-privacy {
  font-size: 13px;
  color: var(--muted);
  margin: 12px 0;
}
.defense-hint {
  margin: 20px 0;
  border-left: 3px solid var(--yellow);
  padding-left: 20px;
  color: #dacee1;
  font-size: 16px;
  line-height: 1.8;
}
.defense-hint summary {
  cursor: pointer;
  color: var(--yellow);
  font-size: 14px;
}
.defense-review {
  font-size: 16px;
  color: var(--fg);
  line-height: 1.8;
  margin: 25px 0;
}
.defense-review li {
  margin-bottom: 7px;
}
.draft-review {
  border: 1px solid #79618e;
  border-radius: 4px;
  padding: 20px;
  margin: 25px 0;
}
.draft-review .eyebrow {
  font-size: 13px;
}
.draft-review blockquote {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #f0e6f5;
  font-size: 16px;
  line-height: 1.8;
}
.explorer-actions .primary:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
  box-shadow: 4px 4px 0 #100c1d;
}
.explorer-inner #phase-title {
  outline: none;
}
.explorer-inner .defense-title {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.35;
}
.still .valley-landscape {
  transition: none;
}
@media (min-width: 1400px) {
  .valley-map {
    min-height: 620px;
  }
}
@media (min-width: 651px) and (max-width: 1100px) {
  .atlas {
    padding-top: 40px;
  }
  .valley-map {
    min-height: 455px;
  }
  .atlas-heading h2 {
    font-size: 34px;
  }
}
#explorer::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("assets/valle.webp") center/auto 140% no-repeat;
  opacity: 0.12;
  z-index: 0;
}
#explorer[data-world="nature"]::before {
  background-position: left center;
}
#explorer[data-world="city"]::before {
  background-position: right center;
}
.explorer-inner {
  z-index: 1;
}
@media (max-width: 750px) {
  .atlas {
    padding-top: 40px;
  }
  .atlas-heading h2 {
    font-size: 34px;
  }
  .valley-controls {
    gap: 17px;
  }
  .environment-switch {
    width: 100%;
    justify-content: space-between;
  }
  .environment-switch button {
    flex: 1;
    padding: 9px 10px;
  }
  .map-list-toggle {
    align-items: start;
    flex-direction: column;
    gap: 15px;
  }
  .map-status {
    font-size: 14px;
  }
  .valley-world-label {
    font-size: 12px;
    letter-spacing: 1px;
    bottom: 15px;
    left: 15px;
  }
  .explorer-world-bar {
    gap: 18px;
    padding: 7px 11px;
    font-size: 13px;
  }
  .explorer-steps {
    gap: 15px;
    margin-top: 25px;
  }
  .explorer-steps button {
    font-size: 12px;
  }
  .defense-view {
    padding: 18px;
  }
  .defense-view strong {
    font-size: 21px;
  }
  .defense-review {
    padding-left: 22px;
  }
}
@media (max-width: 650px) {
  .valley-map {
    min-height: 590px;
  }
  .valley-landscape {
    background-size: auto 100%;
  }
  .valley-map[data-world="nature"] .valley-landscape,
  .valley-map[data-world="city"] .valley-landscape {
    background-size: auto 110%;
  }
  .valley-place {
    width: 132px;
    padding: 12px 8px;
  }
  .place-label {
    font-size: 14px;
  }
  .place-state {
    font-size: 12px;
    letter-spacing: 0.6px;
  }
  .valley-world-label {
    right: 15px;
    text-align: center;
  }
  .valley-controls #reveal-map {
    font-size: 14px;
  }
  .explorer-steps {
    gap: 10px;
    justify-content: space-between;
  }
  .explorer-steps button {
    font-size: 12px;
  }
  .defense-input {
    min-height: 170px;
  }
}
@media (max-width: 650px) {
  .valley-landscape {
    background-image: none !important;
  }
  .valley-landscape::before,
  .valley-landscape::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    background-image: url("assets/valle-movil.webp");
    background-repeat: no-repeat;
    background-size: auto 100%;
  }
  .valley-landscape::before {
    left: 0;
    right: 50%;
    background-position: left center;
  }
  .valley-landscape::after {
    left: 50%;
    right: 0;
    background-position: right center;
  }
  .valley-map[data-world="nature"] .valley-landscape::after {
    background-position: left center;
  }
  .valley-map[data-world="city"] .valley-landscape::before {
    background-position: right center;
  }
  .explorer-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .explorer-steps button {
    text-align: left;
  }
}
