/* The five buttons sit on their landmarks in the uncropped 3:2 chart. */
.sheet[data-view="map"] {
  width: min(100%, 1130px);
  padding: clamp(9px, 1.4vw, 18px);
  border: 2px solid #a6793f;
  border-radius: 8px;
  background: linear-gradient(#172d27ed, #182923ee), url('./art/title-plank-side.webp') center / cover;
  box-shadow: inset 0 0 0 2px #4e4732, inset 0 0 0 3px #8a7547, 0 18px 56px #08110ec7;
}
.sheet[data-view="map"] .sheet-top { align-items: center; gap: 10px; margin: 0 2px 10px; }
.sheet[data-view="map"] .sheet-top h2 { flex: 1; margin: 0; font-size: clamp(22px, 3.5vw, 39px); }
.atlas-challenges.plank { --plank: 44px; width: auto; font-size: 14px; }
.atlas-folio { display: grid; grid-template-columns: minmax(0, 1.95fr) minmax(228px, 1fr); align-items: stretch; }
.atlas-chart {
  position: relative;
  align-self: center;
  isolation: isolate;
  aspect-ratio: 3 / 2;
  box-shadow: 0 1px 8px #100f0c;
}
.atlas-paper { display: block; width: 100%; height: auto; }
.atlas-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  background: none;
  border: 0;
  border-radius: 0;
  min-width: 48px;
  min-height: 44px;
  padding: 0;
  color: #fff2cb;
  font: 700 clamp(12px, 1.3vw, 17px)/1.2 var(--body);
}
.atlas-pin span {
  position: relative;
  display: inline-block;
  padding: 3px clamp(5px, .8vw, 11px);
  border: 1px solid #daaf69;
  border-radius: 2px 5px 2px 5px;
  box-shadow: 0 2px 3px #201a12ae;
  background: #263c32;
}
.atlas-pin[aria-pressed="true"] span { background: #ffe0a1; border-color: #58381d; color: #362318; }
.atlas-pin.atlas-held span::before { content: "✓"; margin-right: 3px; }
.atlas-pin.atlas-frontier span::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 1px);
  left: calc(50% - 4px);
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  border: 1px solid #795628;
  background: #ffdd83;
}
.atlas-pin[data-district="village"] { --x: 17%; --y: 73%; }
.atlas-pin[data-district="orchard"] { --x: 32%; --y: 40%; }
.atlas-pin[data-district="estuary"] { --x: 53%; --y: 63%; }
.atlas-pin[data-district="breakwater"] { --x: 75%; --y: 41%; }
.atlas-pin[data-district="fair"] { --x: 85%; --y: 74%; }
.atlas-register {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: clamp(12px, 2.2vw, 28px);
  color: #36291b;
  background:
    linear-gradient(90deg, #85593471, transparent 6%, transparent 96%, #88602b3d),
    linear-gradient(#f2deb6f5, #e8cc9df7), url('./art/valley-atlas.webp') 50% 93% / 300%;
  border-block: 1px solid #a17e46;
  box-shadow: inset 1px 0 #84603c, inset 4px 0 #c8a370;
}
.sheet .atlas-chapter { color: #51331e; margin: 0; font-size: clamp(18px, 2.6vw, 32px); line-height: 1.05; }
.sheet .atlas-count { margin: 4px 0 10px; color: #654e34; font-size: 13px; }
.atlas-seals { display: grid; grid-template-columns: repeat(4, 1fr); }
.atlas-seal {
  position: relative;
  justify-self: center;
  border: none;
  background: none;
  padding: 0;
  color: #664d32;
  font: 700 17px/1 var(--title);
  width: 44px;
  height: 44px;
  isolation: isolate;
}
.atlas-seal::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px dashed #897151;
  border-radius: 50%;
}
.atlas-seal[data-state="open"]::before { border: 2px solid #77572c; background: #f2d493; }
.atlas-seal[data-state="held"] { color: #fff0bc; }
.atlas-seal[data-state="held"]::before { background: #355144; border: 2px solid #a88a4c; }
.atlas-seal[data-state="held"]::after { content: "✓"; position: absolute; right: 0; bottom: 2px; border-radius: 50%; background: #e5c897; color: #264336; font: bold 12px var(--body); }
.atlas-seal[aria-pressed="true"]::before { outline: 2px solid #815726; outline-offset: 2px; }
.atlas-order { padding: clamp(9px, 1.6vw, 20px) 0; margin-top: 7px; border-top: 1px solid #9871458c; }
.atlas-order h4 { margin: 0; color: #352d21; font: 700 clamp(17px, 2vw, 26px)/1.15 var(--title); }
.sheet .atlas-order p { color: #5d4934; margin: 4px 0 0; font-size: 14px; line-height: 1.2; }
.atlas-sighting { display: flex; align-items: center; gap: 7px; margin-top: 7px; font: 600 13px/1.2 var(--body); color: #54412a; }
.atlas-sighting img { width: 32px; height: 34px; object-fit: contain; }
.atlas-launch.plank { --plank: 46px; font-size: 16px; }
.atlas-launch.plank:disabled { opacity: .82; filter: saturate(.2); }
@media (orientation: portrait) {
  .sheet[data-view="map"] { width: min(100%, 720px); }
  .atlas-folio { grid-template-columns: 1fr; }
  .atlas-register { padding: 14px 20px; }
  .atlas-seals { grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); }
  .atlas-order { padding-block: 9px; }
}
@media (orientation: landscape) and (max-height: 550px) {
  .sheet[data-view="map"] { padding: 7px 9px 9px; width: min(100%, 235svh); max-height: calc(100svh - 16px); }
  .sheet[data-view="map"] .sheet-top { margin-bottom: 3px; }
  .sheet[data-view="map"] .sheet-top h2 { font-size: 24px; }
  .atlas-folio { grid-template-columns: minmax(0, 1.7fr) minmax(220px, 1fr); }
  .atlas-chart { max-width: calc((100svh - 80px) * 1.5); width: 100%; justify-self: center; }
  .atlas-register { padding: 6px 10px; }
  .sheet .atlas-chapter { font-size: 18px; }
  .sheet .atlas-count { margin: 2px 0; font-size: 12px; }
  .atlas-order { margin-top: 2px; padding: 5px 0; }
  .atlas-order h4 { font-size: 16px; }
  .sheet .atlas-order p { font-size: 12px; margin-top: 1px; }
  .atlas-sighting { display: none; }
  .atlas-launch.plank { --plank: 44px; font-size: 14px; }
}
@media (orientation: landscape) and (max-height: 360px) {
  .atlas-folio { position: relative; }
  .atlas-chart { max-width: calc((100svh - 90px) * 1.5); }
  .sheet .atlas-count {
    position: absolute;
    left: 14px;
    bottom: 9px;
    padding: 2px 7px;
    margin: 0;
    background: #26382beb;
    border: 1px solid #c6975b;
    color: #fff0c7;
  }
}
