#league-sheet.destination-screen .sheet-title {
  font-size: clamp(1rem, 5.65vw, 1.4rem);
  white-space: nowrap;
}
#league-sheet.destination-screen .sheet-title.long { font-size: clamp(.91rem, 4.8vw, 1.3rem); }
#league-sheet.destination-screen .league-heading-sub { font: 600 .89em var(--body); letter-spacing: .055em; }
#league-sheet.destination-screen :is(.league-row, .league-dock).you .league-place { color: var(--gold-light); }
#league-sheet.destination-screen :is(.league-row, .league-dock).you .league-name { color: var(--neon-cyan); }
#league-sheet.destination-screen .league-row.you { grid-template-columns: 36px 38px minmax(0, 1fr) auto auto; }
.league-you { color: var(--gold); font: 12px var(--display); text-shadow: 0 1px 0 #000; }
.league-you[hidden] { display: none; }

#pearl-sheet.destination-screen {
  --planet-sky: #122855;
  --planet-night: #060e26;
  --planet-deep: #030713;
}

#pearl-sheet.destination-screen .sheet-panel {
  background: linear-gradient(180deg, rgba(0, 0, 0, .24) 35%, rgba(0, 0, 0, .40)),
    url("../art/ui/planets-background.webp") center / cover no-repeat;
  background-color: var(--planet-deep);
}

#pearl-sheet.destination-screen .pearl-contents { padding: 0 2px 12px; }
#pearl-sheet.destination-screen .pearl-headline { margin: 0 0 8px; color: var(--neon-cyan); font-size: 13px; letter-spacing: 0.15em; }
#pearl-sheet.destination-screen .pearl-feature { flex-direction: column; gap: 10px; margin: 0 0 18px; padding: 0; }
#pearl-sheet.destination-screen .pearl-feature-stage { width: 230px; height: 190px; }
#pearl-sheet.destination-screen .pearl-feature .pearl { width: 164px; height: 164px; margin-bottom: 48px; font-size: 164px; }
#pearl-sheet.destination-screen .pearl-feature-info { flex: none; width: 100%; gap: 7px; }
#pearl-sheet.destination-screen .pearl-feature-rarity { font-size: 24px; }
#pearl-sheet.destination-screen .pearl-feature-name { font-size: 14px; color: var(--text); }
#pearl-sheet.destination-screen .pearl-open-one { width: 200px; max-width: 200px; min-height: 56px; margin: 7px 0 0; }
#pearl-sheet.destination-screen .pearl-list { gap: 10px 4px; padding: 13px 0 8px; margin: 0 0 14px; border-top: 1px solid var(--hairline); }
#pearl-sheet.destination-screen .pearl-tile { min-height: 82px; gap: 8px; padding: 8px 2px; }
#pearl-sheet.destination-screen .pearl-tile .pearl { width: 48px; max-width: 100%; height: auto; aspect-ratio: 1; font-size: 48px; }
#pearl-sheet.destination-screen .pearl-tile-count { right: 2px; top: 0; }
#pearl-sheet.destination-screen .pearl-open-all { min-height: 48px; margin-bottom: 18px; }
#pearl-sheet.destination-screen .atlas-button { min-height: 60px; padding: 7px 4px; margin-bottom: 4px; }
#pearl-sheet.destination-screen .atlas-button-name { font-size: 21px; }
#pearl-sheet.destination-screen .atlas-button-state { font-size: 12px; }
#pearl-sheet.destination-screen .pearl-boosts { padding: 0; margin-bottom: 0; }

@media (max-height: 740px) {
  #inbox-sheet.destination-screen .inbox-panel { gap: 10px; }
  #inbox-sheet.destination-screen .inbox-head { min-height: 70px; }
  #inbox-sheet.destination-screen .inbox-envelope { width: 82px; height: 66px; }
  #inbox-sheet.destination-screen .inbox-tab { min-height: 55px; gap: 5px; }
  #inbox-sheet.destination-screen .inbox-tile { min-height: 98px; padding: 12px 0; }
  #rank-sheet.destination-screen .rank-head { flex-direction: row; gap: 15px; margin-bottom: 12px; }
  #rank-sheet.destination-screen .level-star.rank-star { flex: none; width: 90px; height: 90px; font-size: 28px; }
  #rank-sheet.destination-screen .level-star.rank-star.long { font-size: 22px; }
  #rank-sheet.destination-screen .rank-info { flex: 1; width: auto; }
  #rank-sheet.destination-screen .rank-title { justify-content: flex-start; gap: 6px; }
  #rank-sheet.destination-screen .rank-name { font-size: 25px; text-align: left; }
  #rank-sheet.destination-screen .rank-next { margin-bottom: 12px; }
  #rank-sheet.destination-screen .rank-next-item { min-height: 36px; padding: 7px 0; }
  #rank-sheet.destination-screen .star-row { padding: 11px 0; }
  #league-sheet.destination-screen .league-ladder { margin-bottom: 12px; padding-bottom: 12px; }
  #league-sheet.destination-screen .league-tier.current .league-mark { width: 54px; height: 54px; }
  #league-sheet.destination-screen :is(.league-row, .league-dock) { min-height: 56px; padding: 8px 0; }
  #pearl-sheet.destination-screen .pearl-feature { flex-direction: row; gap: 12px; margin-bottom: 10px; }
  #pearl-sheet.destination-screen .pearl-feature-stage { width: 154px; height: 148px; }
  #pearl-sheet.destination-screen .pearl-feature .pearl { width: 120px; height: 120px; font-size: 120px; }
  #pearl-sheet.destination-screen .pearl-feature-info { flex: 1; width: auto; gap: 6px; }
  #pearl-sheet.destination-screen .pearl-feature-rarity { font-size: 22px; }
  #pearl-sheet.destination-screen .pearl-open-one { width: 100%; margin-top: 4px; }
  #pearl-sheet.destination-screen .pearl-list { margin-bottom: 9px; padding-top: 9px; }
  #pearl-sheet.destination-screen .pearl-open-all { margin-bottom: 10px; }
}

@media (min-width: 800px) and (max-height: 640px) {
  #rank-sheet.destination-screen .rank-panel,
  #league-sheet.destination-screen .sheet-panel { padding-inline: max(22px, calc((100vw - 720px) / 2)); }  #rank-sheet.destination-screen .rank-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); grid-template-rows: 90px minmax(0, 1fr) auto; gap: 10px 24px; }
  #rank-sheet.destination-screen .rank-head { grid-column: 1; grid-row: 1; margin: 0; }
  #rank-sheet.destination-screen .rank-next { grid-column: 1; grid-row: 2; margin: 0; min-height: 0; overflow-y: auto; align-content: start; touch-action: pan-y; }
  #rank-sheet.destination-screen .rank-next-text { grid-template-columns: 58px minmax(0, 1fr); gap: 4px 8px; }
  #rank-sheet.destination-screen .rank-next-sub { grid-column: 2; }
  #rank-sheet.destination-screen .rank-next-item.rank .rank-next-sub { grid-row: 2; justify-self: start; }
  #rank-sheet.destination-screen .rank-next-prize { grid-column: 2; grid-row: 2; justify-self: end; }
  #rank-sheet.destination-screen .rank-next-coin,
  #rank-sheet.destination-screen .rank-next-planet .pearl { width: 16px; height: 16px; font-size: 16px; }
  #rank-sheet.destination-screen .rank-next-amount { font-size: 13px; }
  #rank-sheet.destination-screen .rank-heading { grid-column: 2; grid-row: 1; align-self: end; }
  #rank-sheet.destination-screen .rank-list { grid-column: 2; grid-row: 2 / 4; }
  #rank-sheet.destination-screen .rank-loyalty { grid-column: 1; grid-row: 3; margin: 0; }
  #inbox-sheet.destination-screen .inbox-panel { padding-inline: max(22px, calc((100vw - 820px) / 2)); }
  #inbox-sheet.destination-screen .inbox-head { min-height: 56px; }
  #inbox-sheet.destination-screen .inbox-envelope { width: 68px; height: 55px; }
  #inbox-sheet.destination-screen .inbox-grid { display: grid; grid-template-columns: 1fr 1fr; align-content: start; column-gap: 30px; }
  #inbox-sheet.destination-screen .inbox-grid[hidden] { display: none; }
  #pearl-sheet.destination-screen .pearl-contents { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 24px; align-content: start; }
  #pearl-sheet.destination-screen .pearl-headline { grid-column: 1 / -1; }
  #pearl-sheet.destination-screen .pearl-feature { grid-column: 1; grid-row: 1 / 5; align-self: start; }
  #pearl-sheet.destination-screen .pearl-list { grid-column: 2; grid-row: 1; margin: 0; }
  #pearl-sheet.destination-screen .pearl-open-all { grid-column: 2; grid-row: 2; margin: 0 auto; }
  #pearl-sheet.destination-screen .atlas-button { grid-column: 2; grid-row: 3; margin: 0; }
  #pearl-sheet.destination-screen .voyage-button { grid-row: 4; }
  #pearl-sheet.destination-screen .pearl-odds-button,
  #pearl-sheet.destination-screen .pearl-odds,
  #pearl-sheet.destination-screen .pearl-boosts { grid-column: 1 / -1; }
}

.league-viewport { position: relative; display: flex; flex: 1 1 auto; min-height: 0; }
.league-viewport .league-list { width: 100%; }
#league-sheet .league-dock {
  position: absolute;
  z-index: 2;
  left: 2px;
  right: 2px;
  width: calc(100% - 4px);
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--league-floor);
  box-shadow: none;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
#league-sheet .league-dock[hidden] { display: none; }
.league-dock.top { top: 0; }
.league-dock.bottom { bottom: 0; }
.league-dock::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gold);
}
.league-dock.top::after { bottom: 0; }
.league-dock.bottom::after { top: 0; }
#league-sheet .you .league-place { position: relative; }
#league-sheet .you .league-place::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(50% - 5px);
  width: 5px;
  height: 10px;
  background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
