
html.landscape #inbox-sheet.destination-screen .inbox-panel { gap: 0; }

html.landscape #inbox-sheet.destination-screen .inbox-head {
  min-height: 0;
  height: 0;
  margin: 0;
}

html.landscape #inbox-sheet.destination-screen .inbox-envelope {
  position: absolute;
  top: calc(var(--safe-top) + 7px);
  left: max(20px, var(--safe-left));
  width: 50px;
  height: 40px;
  object-fit: contain;
}

html.landscape #inbox-sheet.destination-screen .sheet-title { left: calc(max(20px, var(--safe-left)) + 58px); }

html.landscape #inbox-sheet.destination-screen .inbox-tabs {
  position: absolute;
  top: calc(var(--safe-top) + 8px);
  left: calc(max(20px, var(--safe-left)) + 170px);
  right: calc(max(16px, var(--safe-right)) + 60px);
  z-index: 2;
  gap: 6px;
  padding: 0;
}

html.landscape #inbox-sheet.destination-screen .inbox-tab { min-height: 46px; gap: 6px; padding: 2px 6px; }
html.landscape #inbox-sheet.destination-screen .inbox-tab-icon { width: 22px; height: 22px; }
html.landscape #inbox-sheet.destination-screen .inbox-event-views .inbox-tab { min-height: 44px; }

html.landscape #inbox-sheet.destination-screen .allowance-row { margin: 0 0 4px; }
html.landscape #inbox-sheet.destination-screen .inbox-event-views { margin: 0 0 4px; }

html.landscape #inbox-sheet.destination-screen .inbox-grid {
  padding: 4px 2px 6px;
}

html.landscape #inbox-sheet.destination-screen .inbox-grid:not(.event-calendar):not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  column-gap: 32px;
}

html.landscape #inbox-sheet.destination-screen .inbox-tile { min-height: 88px; padding: 9px 0; }
html.landscape #inbox-sheet.destination-screen .inbox-tile-face { grid-template-columns: 54px minmax(0, 1fr) auto; gap: 3px 10px; }
html.landscape #inbox-sheet.destination-screen .inbox-tile-art { width: 54px; height: 54px; }
html.landscape #inbox-sheet.destination-screen .inbox-tile-caption { padding-left: 64px; }
html.landscape #inbox-sheet.destination-screen .inbox-tile-band { font-size: 20px; }
html.landscape #inbox-sheet.destination-screen .inbox-empty { min-height: 0; }

html.landscape #rank-sheet.destination-screen .rank-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 6px 32px;
}

html.landscape #rank-sheet.destination-screen .rank-head {
  grid-column: 1;
  grid-row: 1;
  flex-direction: row;
  gap: 14px;
  margin: 0;
}

html.landscape #rank-sheet.destination-screen .level-star.rank-star { flex: none; width: 84px; height: 84px; font-size: 1.6rem; }
html.landscape #rank-sheet.destination-screen .level-star.rank-star.long { font-size: 1.2rem; }
html.landscape #rank-sheet.destination-screen .level-star.rank-star > span { margin-top: 8px; }
html.landscape #rank-sheet.destination-screen .rank-info { flex: 1; width: auto; gap: 8px; }
html.landscape #rank-sheet.destination-screen .rank-title { justify-content: flex-start; gap: 6px; }
html.landscape #rank-sheet.destination-screen .rank-name { font-size: 1.5rem; text-align: left; }
html.landscape #rank-sheet.destination-screen .rank-bar { height: 22px; }

html.landscape #rank-sheet.destination-screen .rank-next {
  grid-column: 1;
  grid-row: 2;
  min-height: 0;
  margin: 0;
  overflow-y: auto;
  align-content: start;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

html.landscape #rank-sheet.destination-screen .rank-next-item { min-height: 36px; padding: 6px 0; }
html.landscape #rank-sheet.destination-screen .rank-next-text { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 2px 8px; }
html.landscape #rank-sheet.destination-screen .rank-next-sub { grid-column: 2; }
html.landscape #rank-sheet.destination-screen .rank-next-item.rank .rank-next-sub { grid-row: 2; justify-self: start; }
html.landscape #rank-sheet.destination-screen .rank-next-prize { grid-column: 2; grid-row: 2; justify-self: end; }
html.landscape #rank-sheet.destination-screen .rank-next-coin,
html.landscape #rank-sheet.destination-screen .rank-next-planet .pearl { width: 16px; height: 16px; font-size: 16px; }
html.landscape #rank-sheet.destination-screen .rank-next-amount { font-size: 13px; }
html.landscape #rank-sheet.destination-screen .rank-loyalty { grid-column: 1; grid-row: 3; margin: 0; padding: 6px 0 2px; }

html.landscape #rank-sheet.destination-screen .rank-heading {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding: 0 0 4px;
  border-bottom: 1px solid var(--hairline);
}

html.landscape #rank-sheet.destination-screen .rank-list {
  grid-column: 2;
  grid-row: 1 / -1;
  margin-top: 34px;
  min-height: 0;
  padding: 0 2px 4px;
}

html.landscape #rank-sheet.destination-screen .star-row { padding: 9px 0; }
html.landscape #rank-sheet.destination-screen .star-claim { min-height: 46px; }

.profile-col { display: contents; }

html.landscape #profile-sheet.destination-screen .profile-scroll {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0 32px;
  overflow: hidden;
  padding: 2px 2px 0;
}

html.landscape #profile-sheet .profile-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

html.landscape #profile-sheet .profile-head { gap: 12px; margin: 0 0 6px; }
html.landscape #profile-sheet .profile-preview { padding: 2px; }
html.landscape #profile-sheet .profile-preview-portrait { width: 64px; height: 64px; }
html.landscape #profile-sheet .profile-name { font-size: 1.5rem; }
html.landscape #profile-sheet .profile-wearing { margin-top: 1px; font-size: 12px; line-height: 1.3; }
html.landscape #profile-sheet .profile-name-form { display: grid; grid-template-columns: 60px minmax(0, 1fr); align-items: center; gap: 3px 8px; margin-bottom: 6px; }
html.landscape #profile-sheet .profile-name-entry { min-width: 0; margin-top: 0; }
html.landscape #profile-sheet #profile-name-help { display: none; }
html.landscape #profile-sheet #profile-name-status { grid-column: 1 / -1; }
html.landscape #profile-sheet input { min-height: 44px; }
html.landscape #profile-sheet .profile-help { margin-top: 3px; font-size: 12px; line-height: 1.3; }
html.landscape #profile-sheet .profile-heading { padding-bottom: 4px; }
html.landscape #profile-sheet .profile-heading-name { font-size: 1rem; }
html.landscape #profile-sheet .profile-portraits { gap: 6px; margin: 6px 0 0; }
html.landscape #profile-sheet .profile-portrait-key { justify-content: center; gap: 0; padding: 4px; }
html.landscape #profile-sheet .profile-portrait-key .profile-preview-portrait { width: 36px; height: 36px; }
html.landscape #profile-sheet .profile-portrait-label { display: none; }

html.landscape #profile-sheet .profile-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 6px; font-size: 1rem; }
html.landscape #profile-sheet .profile-stats > div { flex-direction: column; gap: 0; padding: 5px 0; }
html.landscape #profile-sheet .profile-stats dt { color: var(--muted); font-size: 0.7rem; letter-spacing: 0.06em; }
html.landscape #profile-sheet .profile-stats dd { text-align: left; }

html.landscape #profile-sheet .profile-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 0 2px 4px;
}

html.landscape #profile-sheet .cosmetic-row { grid-template-columns: 52px minmax(0, 1fr) 80px; gap: 10px; padding: 7px 0; }
html.landscape #profile-sheet .cosmetic-swatch { padding: 2px; }
html.landscape #profile-sheet .cosmetic-swatch-face { width: 44px; height: 44px; }
html.landscape #profile-sheet .cosmetic-name { font-size: 1rem; }
html.landscape #profile-sheet .cosmetic-condition { font-size: 12px; line-height: 1.25; }
html.landscape #profile-sheet .cosmetic-action { min-height: 44px; }
html.landscape #profile-sheet .profile-note { margin: 4px 0 0; font-size: 12px; line-height: 1.3; }
