/* Dedicated player destinations. The viewport, safe areas and close key
   belong to screens.css; these four rooms have their own composition. */

/* Club correspondence: plum velvet, a ruby canopy and generous mail art. */
#inbox-sheet.destination-screen {
  --mail-canopy: #6a163d;
  --mail-velvet: #29102b;
  --mail-shadow: #120a19;
  --mail-light: #f4bbd5;
  --mail-thread: rgba(255, 212, 90, 0.075);
}

#inbox-sheet.destination-screen .inbox-panel {
  gap: 16px;
  background:
    linear-gradient(90deg, transparent 7%, var(--mail-thread) 7% 7.3%, transparent 7.3% 92.7%, var(--mail-thread) 92.7% 93%, transparent 93%),
    radial-gradient(ellipse at 50% 0%, var(--mail-canopy), transparent 58%),
    linear-gradient(180deg, var(--mail-velvet), var(--mail-shadow));
  background-color: var(--mail-shadow);
}

#inbox-sheet.destination-screen .inbox-head {
  position: static;
  justify-content: center;
  min-height: 102px;
  margin: -4px 0 0;
}

#inbox-sheet.destination-screen .inbox-envelope {
  width: 104px;
  height: 84px;
  margin: 0;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.45)) drop-shadow(0 0 24px rgba(255, 212, 90, 0.2));
}

#inbox-sheet.destination-screen .inbox-tabs {
  gap: 0;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--hairline);
}

#inbox-sheet.destination-screen .inbox-tab {
  flex-direction: column;
  gap: 7px;
  min-height: 62px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--mail-light);
}

#inbox-sheet.destination-screen .inbox-tab.active {
  color: var(--gold-light);
  box-shadow: inset 0 -3px 0 var(--gold);
}

#inbox-sheet.destination-screen .inbox-tab-icon { width: 24px; height: 24px; }
#inbox-sheet.destination-screen .inbox-tab-label { font-size: 13px; letter-spacing: 0.08em; }
#inbox-sheet.destination-screen .inbox-tab.active .inbox-tab-icon .inbox-tab-hole { fill: var(--mail-velvet); }

#inbox-sheet.destination-screen .inbox-grid { padding: 0 2px 12px; }
#inbox-sheet.destination-screen .inbox-empty { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; justify-content: safe center; }
#inbox-sheet.destination-screen .inbox-empty-card,
#inbox-sheet.destination-screen .inbox-empty-text { flex: none; }
#inbox-sheet.destination-screen .inbox-tile { min-height: 112px; gap: 5px 10px; padding: 16px 0; }
#inbox-sheet.destination-screen .inbox-tile-face { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 5px 12px; }
#inbox-sheet.destination-screen .inbox-tile-art { width: 62px; height: 62px; overflow: visible; }
#inbox-sheet.destination-screen .inbox-tile-art .inbox-symbol,
#inbox-sheet.destination-screen .inbox-tile-art .inbox-icon,
#inbox-sheet.destination-screen .inbox-tile-art .inbox-star,
#inbox-sheet.destination-screen .inbox-tile-art .pearl,
#inbox-sheet.destination-screen .inbox-tile-art .wheel-icon,
#inbox-sheet.destination-screen .inbox-tile-art .credits-coin,
#inbox-sheet.destination-screen .inbox-tile-art .lobby-pig,
#inbox-sheet.destination-screen .inbox-tile-art .rush-mark { width: 50px; height: 50px; }
#inbox-sheet.destination-screen .inbox-tile-art .inbox-photo { width: 54px; height: 62px; }
#inbox-sheet.destination-screen .inbox-tile-art .atlas-button-icon { width: 36px; height: 50px; }
#inbox-sheet.destination-screen .inbox-tile-art .inbox-glyph { font-size: 42px; }
#inbox-sheet.destination-screen .inbox-tile-art .chest { transform: scale(1.3); }
#inbox-sheet.destination-screen .inbox-tile-kicker { font-size: 12px; color: var(--mail-light); }
#inbox-sheet.destination-screen .inbox-tile-band { font-size: 22px; letter-spacing: 0.045em; }
#inbox-sheet.destination-screen .inbox-tile-caption { padding-left: 74px; color: var(--text); }
#inbox-sheet.destination-screen .inbox-tile-timer { padding: 5px; font-size: 11px; background: var(--mail-shadow); }
#inbox-sheet.destination-screen .inbox-tile::after { color: var(--gold); font-size: 26px; }

/* Rank is a royal gallery: the player's star occupies the central dais,
   while future ranks and collected constellations form a quiet ledger. */
#rank-sheet.destination-screen {
  --rank-roof: #174797;
  --rank-hall: #0b2353;
  --rank-floor: #060c25;
  --rank-grid: rgba(255, 212, 90, 0.055);
}

#rank-sheet.destination-screen .rank-panel {
  background:
    linear-gradient(90deg, transparent 11%, var(--rank-grid) 11% 11.3%, transparent 11.3% 88.7%, var(--rank-grid) 88.7% 89%, transparent 89%),
    radial-gradient(ellipse at 50% 0%, var(--rank-roof), transparent 55%),
    linear-gradient(180deg, var(--rank-hall), var(--rank-floor));
  background-color: var(--rank-floor);
}

#rank-sheet.destination-screen .rank-head {
  position: relative;
  flex-direction: column;
  gap: 11px;
  margin: 0 0 18px;
}

#rank-sheet.destination-screen .level-star.rank-star { width: 112px; height: 112px; font-size: 34px; }
#rank-sheet.destination-screen .level-star.rank-star.long { font-size: 25px; }
#rank-sheet.destination-screen .level-star.rank-star > span { margin-top: 11px; }
#rank-sheet.destination-screen .rank-info { flex: none; width: min(100%, 290px); gap: 10px; }
#rank-sheet.destination-screen .rank-title { justify-content: center; gap: 9px; }
#rank-sheet.destination-screen .rank-name { flex: 0 1 auto; font-size: 29px; text-align: center; }
#rank-sheet.destination-screen .rank-bar { height: 24px; border-radius: 6px; }
#rank-sheet.destination-screen .rank-xp { font-size: 13px; }
#rank-sheet.destination-screen .rank-next { margin: 0 0 20px; }
#rank-sheet.destination-screen .rank-next-item { min-height: 42px; padding: 9px 0; }
#rank-sheet.destination-screen .rank-next-text { grid-template-columns: 68px minmax(0, 1fr) auto; }
#rank-sheet.destination-screen .rank-next-label { font-size: 11px; }
#rank-sheet.destination-screen .rank-next-value { font-size: 15px; }
#rank-sheet.destination-screen .rank-next-sub { font-size: 12px; }
#rank-sheet.destination-screen .rank-heading { padding: 0 0 10px; margin: 0; }
#rank-sheet.destination-screen .rank-heading-name { font-size: 18px; letter-spacing: 0.08em; color: var(--text); }
#rank-sheet.destination-screen .rank-stars { font-size: 16px; }
#rank-sheet.destination-screen .rank-list { padding: 0 2px 10px; }
#rank-sheet.destination-screen .star-row { grid-template-columns: 30px minmax(0, 1fr) 84px; gap: 10px; padding: 14px 0; }
#rank-sheet.destination-screen .star-icon { width: 30px; height: 30px; }
#rank-sheet.destination-screen .star-name { font-size: 15px; }
#rank-sheet.destination-screen .star-claim { min-height: 52px; }

/* League: a gold tournament stage over a cool midnight standings board. */
#league-sheet.destination-screen {
  --league-canopy: #224e85;
  --league-hall: #10283f;
  --league-floor: #061222;
  --league-metal: #dfb959;
}

#league-sheet.destination-screen .sheet-panel {
  background:
    linear-gradient(115deg, transparent 0 45%, rgba(255, 212, 90, 0.045) 45% 46%, transparent 46% 54%, rgba(255, 212, 90, 0.045) 54% 55%, transparent 55%),
    radial-gradient(ellipse at 50% 0%, var(--league-canopy), transparent 48%),
    linear-gradient(180deg, var(--league-hall), var(--league-floor));
  background-color: var(--league-floor);
}

#league-sheet.destination-screen .league-tiers {
  position: relative;
  align-items: flex-end;
  min-height: 140px;
  gap: 6px;
  margin: 0 0 18px;
  padding: 0 0 17px;
  border-bottom: 2px solid var(--league-metal);
}

#league-sheet.destination-screen .league-tier { flex: 1; gap: 9px; opacity: 0.6; }
#league-sheet.destination-screen .league-tier-mark { width: 34px; height: 34px; font-size: 30px; }
#league-sheet.destination-screen .league-tier-name { font-size: 11px; letter-spacing: 0.04em; }
#league-sheet.destination-screen .league-tier.current { gap: 12px; opacity: 1; }
#league-sheet.destination-screen .league-tier.current .league-tier-mark {
  width: 70px;
  height: 80px;
  font-size: 64px;
  background-image: var(--gold-bevel);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 3px 0 var(--gold-deep)) drop-shadow(0 0 18px rgba(255, 212, 90, 0.28));
}

#league-sheet.destination-screen .league-info { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; margin-bottom: 14px; text-align: left; }
#league-sheet.destination-screen .league-info-label { font-size: 13px; letter-spacing: 0.12em; color: var(--text); }
#league-sheet.destination-screen .league-timer { margin: 0; padding: 5px 10px; font-size: 18px; background: var(--league-floor); }
#league-sheet.destination-screen .league-movement { grid-column: 1 / -1; margin: 0; line-height: 1.4; }
#league-sheet.destination-screen .league-result { padding: 0 0 12px; }
#league-sheet.destination-screen .league-list { padding: 0 2px 10px; }
#league-sheet.destination-screen .league-row { min-height: 62px; grid-template-columns: 36px 38px minmax(0, 1fr) auto; gap: 9px; padding: 11px 0; font-size: 15px; }
#league-sheet.destination-screen .league-place { font-size: 17px; }
#league-sheet.destination-screen .league-avatar-mark { width: 36px; height: 36px; }
#league-sheet.destination-screen .league-row.you .league-place { color: var(--gold-light); }
#league-sheet.destination-screen .league-row.you .league-name { color: var(--neon-cyan); }

/* Prize Planets is an observatory: the chosen globe floats in a large
   orbital instrument; the collection lives in the lower sky. */
#pearl-sheet.destination-screen {
  --planet-sky: #122855;
  --planet-night: #060e26;
  --planet-deep: #030713;
  --planet-orbit: rgba(66, 230, 255, 0.13);
}

#pearl-sheet.destination-screen .sheet-panel {
  background:
    radial-gradient(circle at 12% 28%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.7px),
    radial-gradient(circle at 82% 22%, rgba(255, 212, 90, 0.7) 0 1px, transparent 1.7px),
    radial-gradient(circle at 75% 69%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.7px),
    radial-gradient(circle at 25% 76%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.7px),
    radial-gradient(ellipse at 50% 12%, var(--planet-sky), transparent 60%),
    linear-gradient(180deg, var(--planet-night), var(--planet-deep));
  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-stage::before {
  content: "";
  position: absolute;
  inset: 8px 25px 12px;
  border: 1px solid var(--planet-orbit);
  border-radius: 50%;
  box-shadow: 0 0 0 16px var(--planet-orbit), 0 0 0 35px rgba(66, 230, 255, 0.04);
  transform: rotate(-25deg) scaleY(0.85);
}

#pearl-sheet.destination-screen .pearl-feature-stage::after { left: 12%; right: 12%; bottom: 7px; height: 25px; }
#pearl-sheet.destination-screen .pearl-feature .pearl { width: 132px; height: 132px; margin-bottom: 20px; font-size: 132px; }
#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: 44px; height: 44px; font-size: 44px; }
#pearl-sheet.destination-screen .pearl-tile-count { right: 2px; top: 0; }
#pearl-sheet.destination-screen .pearl-tile-name { font-size: 11px; }
#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; }

/* The compact phone keeps the hero visible and grants the remaining
   space to the destination's own list, without shrinking readable type. */
@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-tiers { min-height: 107px; margin-bottom: 12px; padding-bottom: 12px; }
  #league-sheet.destination-screen .league-tier.current .league-tier-mark { height: 64px; font-size: 54px; }
  #league-sheet.destination-screen .league-row { 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-stage::before { inset: 9px 15px 15px; box-shadow: 0 0 0 10px var(--planet-orbit); }
  #pearl-sheet.destination-screen .pearl-feature .pearl { width: 100px; height: 100px; font-size: 100px; }
  #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 44px; 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-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; }
  #rank-sheet.destination-screen .sheet-close { grid-column: 1 / -1; grid-row: 4; justify-self: center; 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 / 4; 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 .pearl-odds-button,
  #pearl-sheet.destination-screen .pearl-odds,
  #pearl-sheet.destination-screen .pearl-boosts { grid-column: 1 / -1; }
}
