/* Star Atlas: an engraved celestial chart and a collector's violet book.
   Keep every override inside its destination; card reveals share the old art. */
#atlas-sheet.destination-screen {
  --atlas-desk: #21140f;
  --atlas-desk-light: #533921;
  --atlas-paper: #e5c998;
  --atlas-bronze: #b58b4d;
  --atlas-ink: #140b20;
  --atlas-leather: #382346;
  --atlas-leather-light: #644669;
  --atlas-map-line: rgba(229, 201, 152, 0.24);
  background: var(--atlas-desk);
}

#atlas-sheet.destination-screen .atlas-panel {
  gap: 12px;
  background:
    url("../art/atlas/celestial-map.svg") center top / max(100%, 520px) auto no-repeat,
    radial-gradient(ellipse at 12% 15%, var(--atlas-desk-light), transparent 66%),
    linear-gradient(165deg, var(--atlas-desk), var(--atlas-ink) 90%);
  background-color: var(--atlas-desk);
}

#atlas-sheet.destination-screen .atlas-view[hidden] { display: none; }

#atlas-sheet.destination-screen .sheet-title {
  background-image: var(--gold-bevel);
  letter-spacing: 0.1em;
}

#atlas-sheet.destination-screen .atlas-head {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--atlas-map-line);
}

#atlas-sheet.destination-screen .atlas-season {
  color: var(--atlas-paper);
  font-size: 14px;
  letter-spacing: 0.12em;
}

#atlas-sheet.destination-screen .atlas-dust {
  min-height: 46px;
  border-radius: 6px;
  border-color: var(--atlas-bronze);
  background: linear-gradient(var(--atlas-leather), var(--atlas-ink));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 0 rgba(0, 0, 0, 0.4);
}

#atlas-sheet.destination-screen .atlas-dust-icon,
#atlas-sheet.destination-screen .atlas-dust-name {
  color: var(--atlas-paper);
}

#atlas-sheet.destination-screen .atlas-dust-amount { font-size: 20px; }

#atlas-sheet.destination-screen .atlas-albums {
  gap: 18px;
  padding: 4px 3px 18px;
  scrollbar-color: var(--atlas-bronze) var(--atlas-desk);
}

#atlas-sheet.destination-screen .atlas-album {
  position: relative;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 8px;
  padding: 10px 4px 14px;
  border-bottom-color: var(--atlas-map-line);
}

#atlas-sheet.destination-screen .atlas-album-art {
  isolation: isolate;
  grid-row: 1 / 3;
  height: 130px;
}

#atlas-sheet.destination-screen .atlas-album-art::before {
  content: "";
  position: absolute;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--atlas-bronze), transparent 68%);
  opacity: 0.35;
}

#atlas-sheet.destination-screen .atlas-book {
  width: 77px;
  height: 104px;
  border: 3px solid var(--atlas-bronze);
  border-left-width: 8px;
  border-radius: 4px 9px 9px 4px;
  transform: rotate(-9deg);
  background:
    linear-gradient(90deg, transparent 7px, var(--atlas-map-line) 8px 9px, transparent 10px),
    url("../art/atlas/celestial-map.svg") center / 170px auto,
    linear-gradient(145deg, var(--atlas-leather-light), var(--atlas-leather) 55%, var(--atlas-ink));
  box-shadow: inset 0 0 0 4px var(--atlas-leather), inset 0 0 0 5px var(--atlas-bronze), 5px 6px 0 var(--atlas-paper), 6px 7px 0 var(--atlas-bronze), 10px 12px 12px rgba(0, 0, 0, 0.6);
}

#atlas-sheet.destination-screen .atlas-book::before {
  inset: 30px 14px 25px 11px;
  border: 2px solid var(--gold-dark);
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-light) 0 8%, transparent 9% 27%, var(--atlas-bronze) 28% 30%, transparent 31%);
  transform: none;
  z-index: 0;
}

#atlas-sheet.destination-screen .atlas-book::after {
  inset: 37px 21px 32px 18px;
  border: 0;
  border-radius: 0;
  background: var(--gold-bevel);
  clip-path: polygon(50% 0, 59% 39%, 100% 50%, 59% 61%, 50% 100%, 41% 61%, 0 50%, 41% 39%);
  transform: rotate(15deg);
  z-index: 1;
}

#atlas-sheet.destination-screen .atlas-album-body { gap: 6px; }
#atlas-sheet.destination-screen .atlas-album-count { font-size: 25px; line-height: 1.2; letter-spacing: 0.04em; }
#atlas-sheet.destination-screen .atlas-album-prize { color: var(--atlas-paper); font-size: 13px; line-height: 1.4; }
#atlas-sheet.destination-screen .atlas-album > .atlas-claim { justify-self: start; min-width: 120px; }

#atlas-sheet.destination-screen .atlas-claim {
  min-height: 46px;
  padding: 6px 16px;
  border-radius: 7px;
  background: linear-gradient(var(--atlas-leather-light), var(--atlas-leather));
  border-color: var(--atlas-bronze);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.08em;
}

#atlas-sheet.destination-screen .atlas-album.complete .atlas-claim,
#atlas-sheet.destination-screen .atlas-set.complete .atlas-claim {
  background: var(--gold-bevel);
  color: var(--gold-deep);
  text-shadow: none;
}

#atlas-sheet.destination-screen .atlas-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px 10px;
  padding: 0 0 14px;
}

#atlas-sheet.destination-screen .atlas-shelf::before {
  content: "COLLECTIONS";
  grid-column: 1 / -1;
  font-family: var(--display);
  color: var(--atlas-paper);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 #000;
}

#atlas-sheet.destination-screen .atlas-medal { width: 100%; gap: 6px; min-height: 140px; }

#atlas-sheet.destination-screen .atlas-medal-ring {
  width: 84px;
  height: 84px;
  border: 4px double var(--atlas-bronze);
  background:
    radial-gradient(circle at 38% 26%, var(--atlas-leather-light), var(--atlas-leather) 52%, var(--atlas-ink));
  box-shadow: 0 0 0 2px var(--atlas-desk), 0 0 0 3px var(--atlas-bronze), inset 0 0 0 3px var(--atlas-ink), 0 5px 0 rgba(0, 0, 0, 0.5);
}

#atlas-sheet.destination-screen .atlas-medal-name { min-height: 29px; width: 100%; font-size: 12px; line-height: 1.2; white-space: normal; }
#atlas-sheet.destination-screen .atlas-medal-count { color: var(--atlas-paper); border-color: var(--atlas-bronze); background: var(--atlas-ink); font-size: 13px; }
#atlas-sheet.destination-screen .atlas-medal.complete .atlas-medal-count { background: var(--gold-bevel); color: var(--gold-deep); }
#atlas-sheet.destination-screen .atlas-medal-new { right: calc(50% - 44px); }

#atlas-sheet.destination-screen .atlas-track-wrap { padding: 16px 0 10px; border-color: var(--atlas-map-line); }
#atlas-sheet.destination-screen .atlas-track-title { margin-bottom: 12px; color: var(--atlas-paper); font-size: 13px; letter-spacing: 0.1em; }
#atlas-sheet.destination-screen .atlas-stop-sets { color: var(--atlas-paper); font-size: 11px; text-shadow: 0 1px 0 #000; }
#atlas-sheet.destination-screen .atlas-stop-amount { font-size: 12px; }
#atlas-sheet.destination-screen .atlas-workshop { padding-top: 2px; }
#atlas-sheet.destination-screen #atlas-exchange { padding-top: 14px; border-top: 1px solid var(--atlas-map-line); }
#atlas-sheet.destination-screen .atlas-trade-title { margin-top: 0; color: var(--gold-light); font-size: 19px; letter-spacing: 0.08em; }
#atlas-sheet.destination-screen .atlas-guide { color: var(--atlas-paper); font-size: 13px; margin: 8px 0 16px; }
#atlas-sheet.destination-screen .atlas-trades { gap: 6px; padding: 4px 0 15px; }
#atlas-sheet.destination-screen .atlas-planet-name { font-size: 11px; }
#atlas-sheet.destination-screen .atlas-planet-offer .pearl { width: 44px; height: 44px; }
#atlas-sheet.destination-screen .atlas-trade { min-height: 48px; border-color: var(--atlas-bronze); border-radius: 6px; background: linear-gradient(var(--atlas-leather-light), var(--atlas-leather)); font-size: 12px; }
#atlas-sheet.destination-screen .atlas-trade:disabled { opacity: 0.65; }

#atlas-sheet.destination-screen .atlas-action {
  min-height: 56px;
  margin: 4px auto 8px;
  border: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--gold-bevel);
  color: var(--gold-deep);
  box-shadow: 0 0 0 1px var(--gold-deep), inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 4px 0 var(--atlas-ink);
  text-shadow: none;
  font-size: 20px;
  letter-spacing: 0.07em;
}

#atlas-sheet.destination-screen .atlas-book-view { gap: 12px; }
#atlas-sheet.destination-screen .atlas-sets { padding: 8px 5px 16px; scrollbar-color: var(--atlas-bronze) var(--atlas-desk); }
#atlas-sheet.destination-screen .atlas-set { gap: 18px; }
#atlas-sheet.destination-screen .atlas-set-head { gap: 12px; padding-bottom: 8px; }
#atlas-sheet.destination-screen .atlas-set-name { font-size: 26px; }
#atlas-sheet.destination-screen .atlas-set-bar { width: 172px; height: 20px; }
#atlas-sheet.destination-screen .atlas-set-fill { background: linear-gradient(var(--atlas-paper), var(--atlas-bronze)); }
#atlas-sheet.destination-screen .atlas-set-count { font-size: 13px; }
#atlas-sheet.destination-screen .atlas-set .atlas-grid { gap: 22px 10px; padding: 10px 1px 6px; }
#atlas-sheet.destination-screen .atlas-card { border-radius: 5px; min-height: 130px; box-shadow: 0 0 0 1px var(--atlas-ink), inset 0 0 0 2px rgba(0, 0, 0, 0.3), 2px 4px 0 rgba(0, 0, 0, 0.5); }
#atlas-sheet.destination-screen .atlas-card.missing { --frame: var(--atlas-bronze); background: linear-gradient(var(--atlas-leather), var(--atlas-ink)); }
#atlas-sheet.destination-screen .atlas-card.missing .atlas-card-name { opacity: 0.8; }
#atlas-sheet.destination-screen .atlas-card-name { font-size: 11px; }
#atlas-sheet.destination-screen .atlas-card-count { font-size: 12px; }
#atlas-sheet.destination-screen .atlas-slot-stars { font-size: 13px; }
#atlas-sheet.destination-screen .atlas-slot.missing .atlas-slot-stars { color: var(--atlas-paper); }
#atlas-sheet.destination-screen .atlas-set-prize { padding: 10px 0; border-top: 1px solid var(--atlas-map-line); }
#atlas-sheet.destination-screen .atlas-set-prize .atlas-claim-reward { font-size: 25px; }
#atlas-sheet.destination-screen .atlas-strip-row { border-top-color: var(--atlas-map-line); padding: 10px 0 4px; gap: 8px; }
#atlas-sheet.destination-screen .atlas-back { min-width: 56px; color: var(--atlas-paper); }
#atlas-sheet.destination-screen .atlas-strip { overflow-x: auto; overflow-y: hidden; justify-content: space-between; gap: 8px; padding: 7px 4px 6px; }
#atlas-sheet.destination-screen .atlas-chip .atlas-medal-ring { width: 44px; height: 44px; border-width: 2px; }
#atlas-sheet.destination-screen .atlas-chip.current .atlas-medal-ring { opacity: 1; border-color: var(--gold-light); box-shadow: 0 0 0 2px var(--atlas-ink), 0 0 0 3px var(--gold-light); }

@media (min-width: 760px) and (max-height: 650px) {
  #atlas-sheet.destination-screen .atlas-head { padding-bottom: 4px; }
  #atlas-sheet.destination-screen .atlas-albums {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(270px, 0.9fr);
    grid-template-rows: auto auto auto;
    align-content: start;
    column-gap: 40px;
    row-gap: 12px;
  }
  #atlas-sheet.destination-screen .atlas-album { grid-column: 1; grid-row: 1; padding-top: 4px; }
  #atlas-sheet.destination-screen .atlas-shelf { grid-column: 2; grid-row: 1 / 3; gap: 16px 10px; }
  #atlas-sheet.destination-screen .atlas-track-wrap { grid-column: 1; grid-row: 2; }
  #atlas-sheet.destination-screen .atlas-albums > .atlas-workshop:not(#atlas-exchange) { grid-column: 1; grid-row: 3; }
  #atlas-sheet.destination-screen #atlas-exchange { grid-column: 1 / -1; grid-row: 4; }
  #atlas-sheet.destination-screen .atlas-trades { max-width: 560px; margin: 0 auto; }
  #atlas-sheet.destination-screen .atlas-set { gap: 12px; }
  #atlas-sheet.destination-screen .atlas-set .atlas-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 850px; width: 100%; margin: 0 auto; }
  #atlas-sheet.destination-screen .atlas-card { aspect-ratio: 3 / 4; min-height: 140px; }
  #atlas-sheet.destination-screen .atlas-strip-row { max-width: 550px; width: 100%; margin: 0 auto; }
}

@media (max-width: 759px) and (max-height: 720px) {
  #atlas-sheet.destination-screen .atlas-panel { gap: 8px; }
  #atlas-sheet.destination-screen .atlas-albums { gap: 14px; }
  #atlas-sheet.destination-screen .atlas-album { padding: 8px 4px 16px; }
  #atlas-sheet.destination-screen .atlas-album-art { height: 112px; }
  #atlas-sheet.destination-screen .atlas-medal { min-height: 128px; gap: 6px; }
  #atlas-sheet.destination-screen .atlas-medal-ring { width: 76px; height: 76px; }
  #atlas-sheet.destination-screen .atlas-medal-new { right: calc(50% - 40px); }
  #atlas-sheet.destination-screen .atlas-shelf { gap: 16px 10px; }
  #atlas-sheet.destination-screen .atlas-set { gap: 12px; }
  #atlas-sheet.destination-screen .atlas-set-head { gap: 8px; }
}
