.menu-screen {
  position: absolute;
  inset: 0;
  z-index: 8;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
  background: #101511;
}

.menu-screen::before {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(180deg, #101511f7 0%, #101511e6 30%, #1015119e 58%, #0c110d66 100%),
    url("../assets/schron/cover-bg.webp") center 88% / cover;
  opacity: .82;
}

.menu-screen::after {
  position: absolute;
  content: "";
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, #0a0e0bd9 0%, #0a0e0b33 34%, transparent 100%);
}

.menu-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: calc(clamp(8px, 1.5dvh, 16px) + var(--safe-top))
    calc(clamp(13px, 4.2cqw, 21px) + var(--safe-right))
    7px
    calc(clamp(13px, 4.2cqw, 21px) + var(--safe-left));
  border-bottom: 1px solid #7e7151;
  background: linear-gradient(#111610f2, #111610b8);
}

.brand { display: grid; gap: 2px; min-width: 0; }

.wordmark {
  color: #f5e6c6;
  font: 700 clamp(32px, 8.6cqw, 46px)/.92 var(--display);
  letter-spacing: .075em;
  text-shadow: 0 2px 0 #00000080;
}

.brand-sub {
  color: #d0c19c;
  font: 600 clamp(8px, 2.1cqw, 10px)/1 var(--display);
  letter-spacing: .24em;
  text-transform: uppercase;
}

.menu-head .icon-btn {
  align-self: center;
  margin-inline-end: -4px;
  color: #e5d2a9;
}

.wallet {
  display: flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  margin-inline-start: auto;
  padding: 4px 8px;
  border: 1px solid #756446;
  background: #241f16d9;
  line-height: 1;
}
.wallet img {
  width: 21px;
  height: 21px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 #00000080);
}
.wallet b {
  color: #ffd17a;
  font: 700 17px/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: #1b2119f2;
  border-bottom: 1px solid #4d4f3d;
}

.tabs button {
  min-height: 44px;
  padding: 5px 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #d2c8af;
  font: 650 clamp(11px, 3.2cqw, 15px)/1.2 var(--display);
  letter-spacing: .035em;
  text-transform: uppercase;
}

.tabs button[aria-selected="true"] {
  border-bottom-color: var(--amber);
  color: #ffd382;
  background: #342e21;
}

.tabs button:focus-visible { outline-offset: -3px; }

.menu-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #756446 #1b2018;
  padding: 0 calc(clamp(12px, 4cqw, 20px) + var(--safe-right))
    calc(14px + var(--safe-bottom))
    calc(clamp(12px, 4cqw, 20px) + var(--safe-left));
}

.menu-screen.showing-achievements .menu-scroll { background: #101511f2; }

.menu-pane { display: flow-root; }
.menu-pane:focus-visible, #homeLeaderboard:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

.menu-title {
  margin: 0;
  font: 650 clamp(20px, 5.6cqw, 26px)/1.08 var(--display);
  letter-spacing: .015em;
}

.menu-subtitle {
  margin: 0;
  font: 650 clamp(15px, 4.2cqw, 19px)/1.12 var(--display);
}

.menu-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.hero-stage { padding-top: 8px; }

.hero-picker {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 4px;
}

.hero-arrow {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 0;
  border: 1px solid #686148;
  background: #272b21d9;
  color: #ffd382;
}
.hero-arrow::before {
  content: "";
  width: 9px;
  height: 9px;
  border: solid currentColor;
  border-width: 2px 2px 0 0;
  rotate: 45deg;
}
#prevHero::before { rotate: -135deg; }

.hero-current {
  display: grid;
  grid-template-columns: clamp(82px, 23cqw, 122px) minmax(0, 1fr);
  align-items: stretch;
  min-height: clamp(110px, 18dvh, 190px);
  overflow: hidden;
  border: 1px solid #696148;
  background: linear-gradient(115deg, #2b2f24, #20251d);
  box-shadow: 0 3px 0 #0a0e0b80;
  touch-action: pan-y;
  user-select: none;
}

.hero-image { position: relative; background: radial-gradient(circle at 50% 30%, #6a6448, #373a2a 72%); }
.hero-image::after {
  position: absolute;
  content: "";
  inset: 0;
  background: linear-gradient(90deg, transparent 62%, #20251d 100%);
  pointer-events: none;
}
.hero-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

.loadout {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 10px;
}
.hero-identity { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 3px 5px; }
.hero-identity h2 {
  margin: 0;
  color: #ffe3ab;
  font: 700 clamp(24px, 6.7cqw, 32px)/1 var(--display);
  letter-spacing: .01em;
}
#heroPosition {
  padding: 2px 5px;
  border: 1px solid #625c45;
  color: #e5d6b5;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.loadout dl, .loadout dd { margin: 0; }
.loadout dl { display: grid; gap: 2px; }
#heroWeapon { color: #ffd995; font-size: clamp(13px, 3.6cqw, 15px); font-weight: 680; }
#heroPerk { color: #d8cbb0; font-size: clamp(11px, 3.2cqw, 13px); line-height: 1.25; }

.hero-ability {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  margin-top: 3px;
  padding-top: 4px;
  border-top: 1px solid #625c4559;
}
.hero-ability img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 #00000066);
}
.hero-ability .ability-kicker {
  display: block;
  color: #c1b18c;
  font: 600 8px/1 var(--display);
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero-ability b { display: block; color: #ffd995; font-size: clamp(10px, 2.9cqw, 12px); line-height: 1.2; }
.hero-ability p { margin: 1px 0 0; color: #d8cbb0; font-size: clamp(9px, 2.6cqw, 11px); line-height: 1.25; }

.hero-dots { display: flex; justify-content: center; gap: 3px; margin-top: 3px; }
.hero-dots button {
  display: grid;
  width: clamp(38px, 10.4cqw, 48px);
  height: clamp(38px, 10.4cqw, 48px);
  place-items: center;
  padding: 0;
  overflow: hidden;
  border: 1px solid #4f513d;
  background: #252a21;
  opacity: .58;
  transition: opacity 120ms ease, border-color 120ms ease;
}
.hero-dots button img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 16%; }
.hero-dots button[aria-current="true"] { border-color: var(--amber); opacity: 1; }
.hero-dots button:focus-visible { outline-offset: 2px; }

.home-record {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
  border: 1px solid #4b4e39;
  background: #1a2018eb;
}
.home-record > div { display: grid; gap: 1px; padding: 5px 10px 6px; min-width: 0; }
.home-record > div + div { border-inline-start: 1px solid #4b4e39; }
.home-record span {
  color: #c9bd9d;
  font: 600 clamp(9px, 2.6cqw, 10px)/1.15 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.home-record b {
  color: #ffd17a;
  font: 700 clamp(17px, 5cqw, 23px)/1 var(--display);
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.launch { margin-top: 7px; }
.launch .primary-btn {
  width: 100%;
  min-height: 50px;
  font-size: clamp(18px, 5.2cqw, 22px);
  letter-spacing: .05em;
  box-shadow: 0 3px 0 #8a6222;
}

.goal-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  margin-top: 7px;
  padding: 6px 10px 7px;
  border: 1px solid #4b4e39;
  background: #181e16e8;
}
.goal-label {
  grid-column: 1 / -1;
  color: #c6b995;
  font: 600 10px/1 var(--display);
  letter-spacing: .12em;
  text-transform: uppercase;
}
#goalName {
  overflow: hidden;
  color: #f1e2c2;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#goalValue { color: #d5c8a9; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#goalBar { grid-column: 1 / -1; width: 100%; height: 4px; border: 0; background: #3d4030; accent-color: var(--amber); }
#goalBar::-webkit-progress-bar { background: #3d4030; }
#goalBar::-webkit-progress-value { background: var(--amber); }
#goalBar::-moz-progress-bar { background: var(--amber); }

#homeLeaderboard {
  margin-top: 9px;
  padding: 8px 10px 6px;
  border: 1px solid #3f4331;
  background: #1b2018f2;
}
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.board-count { color: #c5c3ab; font-size: 11px; white-space: nowrap; }
.board-status { margin-top: 3px; padding: 0; border: 0; background: none; font-size: 12px; line-height: 1.3; }
#retryRecordsBtn { min-height: 40px; margin-block-start: 6px; font-size: 15px; }

#leaderboard {
  width: 100%;
  margin-top: 2px;
  border-collapse: collapse;
  table-layout: fixed;
  color: #f1e7cc;
  font-size: clamp(12px, 3.4cqw, 14px);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
#leaderboard :is(th, td) { padding: 2px 0; text-align: start; }
#leaderboard thead th {
  border-block-end: 1px solid #71664d;
  color: var(--muted);
  font-size: 11px;
  font-weight: 620;
  line-height: 1.15;
}
#leaderboard thead th:nth-child(1) { width: 12%; }
#leaderboard thead th:nth-child(2) { width: 42%; }
#leaderboard thead th:nth-child(3) { width: 27%; }
#leaderboard thead th:nth-child(4) { width: 19%; }
#leaderboard :is(th, td):nth-child(n + 3) { text-align: end; }
#leaderboard :is(th, td):nth-child(3) { padding-inline-end: 6px; }
#leaderboard tbody :is(td, th) {
  height: clamp(26px, 3.2dvh, 32px);
  border-block-end: 1px solid #c5c3ab24;
  overflow-wrap: anywhere;
}
#leaderboard tbody th { padding-inline-end: 6px; font-weight: 580; }
#leaderboard tbody td:first-child { color: #ebc475; font-weight: 680; }
#leaderboard tbody td:nth-child(3) { font-weight: 650; }
#leaderboard tbody td:last-child { color: var(--muted); }
#leaderboard tbody tr.own { background: #3a3121; }

.achievements-head { display: flex; align-items: end; justify-content: space-between; gap: 8px; padding-top: 10px; }
.achievements-head .menu-status { color: #f1ce89; font-variant-numeric: tabular-nums; text-align: end; }
.achievement-filters { display: flex; gap: 6px; margin: 8px 0 2px; }
.achievement-filters button {
  min-height: 44px;
  padding: 4px 12px;
  border: 1px solid #575843;
  background: #242a21;
  color: #dfd2b6;
  font-size: 13px;
  font-weight: 650;
}
.achievement-filters button[aria-pressed="true"] { border-color: #b78d47; background: #3a3121; color: #ffda92; }
#achievementsEmpty { margin-top: 10px; }
#achievementsList h2 { margin: 16px 0 6px; color: #e6d7b4; font: 650 19px/1.2 var(--display); }
.achievement-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid #605b43; }
.achievement { padding: 9px 6px; border-bottom: 1px solid #4f4d3b; }
.achievement.earned { background: #3b3424; }
.achievement-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.achievement-top strong { font-size: 14px; }
.achievement-top span { color: #d5c8a9; font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.achievement.earned .achievement-top span { color: #ffda92; font-weight: 650; }
.achievement p { margin: 3px 0 0; color: #d3c8ad; font-size: 13px; line-height: 1.4; }
.achievement progress { display: block; width: 100%; height: 5px; margin-top: 7px; border: 0; background: #4c4d38; accent-color: var(--amber); }
.achievement progress::-webkit-progress-bar { background: #4c4d38; }
.achievement progress::-webkit-progress-value { background: var(--amber); }
.achievement progress::-moz-progress-bar { background: var(--amber); }

.workshop-list { margin: 12px 0 0; border-top: 1px solid #605b43; }
.shop-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 4px;
  border-bottom: 1px solid #4f4d3b;
}
.shop-icon {
  width: 48px;
  height: 48px;
  border: 1px solid #806f4a;
  background: #252a1e;
  object-fit: contain;
}
.shop-copy { display: grid; gap: 2px; min-width: 0; }
.shop-copy strong { color: #f6e5c1; font: 650 14px/1.15 var(--display); }
.shop-copy p { margin: 0; color: #d3c8ad; font-size: 12px; line-height: 1.3; }
.shop-copy small { color: #b7a986; font-size: 10px; font-variant-numeric: tabular-nums; }
.shop-item button {
  min-width: 88px;
  min-height: 40px;
  padding: 5px 8px;
  border: 1px solid #b78d47;
  background: #3a3121;
  color: #ffda92;
  font: 650 12px/1.15 var(--display);
  font-variant-numeric: tabular-nums;
}
.shop-item button:disabled {
  border-color: #4f4d3b;
  background: #242a21;
  color: #8f866f;
}
.shop-note { margin: 14px 0 0; color: #a99d83; font-size: 12px; line-height: 1.4; }

.menu-screen.showing-profile .menu-scroll { background: #101511f4; }

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  align-items: center;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #6d6248;
  background:
    radial-gradient(circle at 12% 30%, #4a432b66, transparent 52%),
    linear-gradient(140deg, #282d23, #1a1f18);
  box-shadow: 0 3px 0 #0a0e0b80;
}
.profile-portrait {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
}
#profileHero {
  width: 74%;
  height: 74%;
  border: 1px solid #635b45;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 18%;
  background: #3c3d2c;
}
#profileFrame {
  position: absolute;
  inset: -9px;
  width: calc(100% + 18px);
  height: calc(100% + 18px);
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 3px #00000080);
}
.profile-rank {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 1px 2px #000000cc);
}
.profile-identity { min-width: 0; }
.profile-rank-name {
  display: block;
  color: #e6bd72;
  font: 600 10px/1.1 var(--display);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.profile-identity h2 {
  margin: 2px 0 0;
  overflow: hidden;
  color: #ffe3ab;
  font: 700 clamp(21px, 5.8cqw, 27px)/1.05 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.profile-title {
  display: inline-block;
  margin: 4px 0 0;
  padding: 2px 6px;
  border: 1px solid #8d7248;
  background: #3a3121;
  color: #ffda92;
  font-size: 11px;
  line-height: 1.2;
}
.profile-patches {
  grid-column: 2;
  display: flex;
  gap: 4px;
  min-height: 1px;
}
.profile-patches img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 1px 0 #00000080);
}
.profile-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 8px 0 0;
  border: 1px solid #4b4e39;
  background: #4b4e39;
}
.profile-stats > div { display: grid; gap: 1px; padding: 5px 6px; background: #1d231b; min-width: 0; }
.profile-stats dt {
  overflow: hidden;
  color: #c9bd9d;
  font: 600 8px/1.1 var(--display);
  letter-spacing: .05em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.profile-stats dd {
  margin: 0;
  color: #ffd17a;
  font: 700 clamp(13px, 4cqw, 17px)/1 var(--display);
  font-variant-numeric: tabular-nums;
}

.profile-section {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #55513d;
}
.profile-section summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  cursor: pointer;
  list-style: none;
}
.profile-section summary::-webkit-details-marker { display: none; }
.profile-section summary::after {
  content: "+";
  color: #b9ab8a;
  font: 600 18px/1 var(--display);
}
.profile-section[open] summary::after { content: "−"; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-note { color: #b9ab8a; font-size: 10px; font-variant-numeric: tabular-nums; text-align: end; }
#rankProgress {
  width: 100%;
  height: 5px;
  margin-top: 5px;
  border: 0;
  background: #3d4030;
  accent-color: var(--amber);
  appearance: none;
  -webkit-appearance: none;
}
#rankProgress::-webkit-progress-bar { background: #3d4030; }
#rankProgress::-webkit-progress-value { background: var(--amber); }
#rankProgress::-moz-progress-bar { background: var(--amber); }
#rankProgressText { margin-top: 4px; font-size: 11px; }

.rank-track {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.rank-track li {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 4px 2px;
  border: 1px solid #414433;
  background: #1b2018;
  color: #8f866f;
  font: 600 8px/1.1 var(--display);
  text-align: center;
  text-transform: uppercase;
}
.rank-track li img { width: 30px; height: 30px; object-fit: contain; filter: grayscale(.8); opacity: .55; }
.rank-track li.passed { border-color: #656044; color: #c9b995; }
.rank-track li.passed img { filter: none; opacity: .8; }
.rank-track li.current { border-color: #c3934c; background: #3a3121; color: #ffda92; }
.rank-track li.current img { filter: none; opacity: 1; }

.chip-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.cosmetic-chip {
  display: grid;
  gap: 1px;
  min-height: 42px;
  padding: 5px 9px;
  border: 1px solid #575843;
  background: #242a21;
  color: #dfd2b6;
  text-align: start;
}
.cosmetic-chip span { font-size: 12px; font-weight: 650; }
.cosmetic-chip small { color: #b7a986; font-size: 9px; }
.cosmetic-chip.owned { border-color: #756446; }
.cosmetic-chip.equipped { border-color: #c3934c; background: #3a3121; color: #ffda92; }
.cosmetic-chip.equipped small { color: #ffd17a; }
.cosmetic-chip:disabled, .frame-card:disabled, .patch-card:disabled, .theme-card:disabled {
  border-color: #3c3f30;
  background: #1b2018;
  color: #7e7662;
  opacity: .75;
}
.frame-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.frame-card, .patch-card, .theme-card {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 6px 4px;
  border: 1px solid #575843;
  background: #242a21;
  color: #dfd2b6;
  text-align: center;
}
.frame-card img { width: 74px; height: 74px; object-fit: contain; }
.frame-card span, .patch-card span, .theme-card span { font-size: 11px; font-weight: 650; line-height: 1.15; }
.frame-card small, .patch-card small, .theme-card small { color: #b7a986; font-size: 9px; }
.frame-card.owned, .patch-card.owned, .theme-card.owned { border-color: #756446; }
.frame-card.equipped, .patch-card.equipped, .theme-card.equipped { border-color: #c3934c; background: #3a3121; color: #ffda92; }
.frame-card.equipped small, .patch-card.equipped small, .theme-card.equipped small { color: #ffd17a; }
.patch-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.patch-card img { width: 46px; height: 46px; object-fit: contain; }
.theme-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
.theme-swatch {
  display: block;
  width: 100%;
  height: 26px;
  border: 1px solid #6c644c;
  background: linear-gradient(135deg, #4a3b25, #d5a34b 48%, #222a1d);
}
.theme-swatch[data-swatch="signal"] { background: linear-gradient(135deg, #2a2418, #e0a63f 48%, #4b2a20); }
.theme-swatch[data-swatch="ash"] { background: linear-gradient(135deg, #2b2d29, #b9b7a6 48%, #1b1f1b); }
.theme-swatch[data-swatch="rust"] { background: linear-gradient(135deg, #3a241a, #b85c35 48%, #20241c); }

#app[data-hud-theme="signal"] { --amber: #e3a13f; --ink: #f6e7c8; --acid: #c1d773; }
#app[data-hud-theme="ash"] { --amber: #cfc5a5; --ink: #f1eee0; --acid: #aebda0; }
#app[data-hud-theme="rust"] { --amber: #c97042; --ink: #f5e1cd; --acid: #b6b36d; }

@media (max-height: 700px) {
  .menu-head { padding-top: calc(6px + var(--safe-top)); padding-bottom: 4px; }
  .wordmark { font-size: 30px; }
  .brand-sub { font-size: 8px; }
  .hero-stage { padding-top: 6px; }
  .hero-current { min-height: 104px; }
  .hero-dots button { width: 34px; height: 34px; }
  .home-record { margin-top: 4px; }
  .home-record > div { padding: 3px 8px 4px; }
  .home-record b { font-size: 17px; }
  .launch { margin-top: 5px; }
  .launch .primary-btn { min-height: 46px; font-size: 19px; }
  .goal-strip { margin-top: 5px; padding: 4px 8px 5px; }
  #goalName { font-size: 12px; }
  #homeLeaderboard { margin-top: 6px; padding: 6px 8px 4px; }
  .board-status { font-size: 11px; }
  #leaderboard { font-size: 12px; }
  #leaderboard thead th { font-size: 10px; }
  #leaderboard tbody :is(td, th) { height: 23px; }
  .menu-scroll { padding-bottom: calc(8px + var(--safe-bottom)); }
  .achievement { padding: 7px 6px; }
}

@media (max-width: 340px) {
  .menu-head { padding-inline: 10px; }
  .wordmark { font-size: 28px; }
  .hero-stage { padding-top: 4px; }
  .hero-picker { grid-template-columns: 36px minmax(0, 1fr) 36px; }
  .hero-current { grid-template-columns: 76px minmax(0, 1fr); min-height: 88px; }
  .loadout { padding: 6px 8px; }
  .hero-identity h2 { font-size: 22px; }
  .hero-dots { gap: 2px; }
  .hero-dots button { width: 30px; height: 30px; }
  .home-record > div { padding: 2px 7px 3px; }
  .home-record b { font-size: 15px; }
  .launch { margin-top: 5px; }
  .launch .primary-btn { min-height: 42px; font-size: 18px; }
  .goal-strip { margin-top: 4px; padding: 4px 8px 5px; }
  #homeLeaderboard { margin-top: 4px; padding: 5px 7px 4px; }
  #leaderboard { font-size: 11.5px; }
  #leaderboard tbody :is(td, th) { height: 21px; }
  .menu-scroll { padding-inline: 10px; padding-bottom: calc(6px + var(--safe-bottom)); }
}

@media (orientation: landscape) and (max-height: 560px) {
  #app:has(.menu-screen:not(.hidden)) { inline-size: min(100vw, 640px); }
  .menu-head { padding-top: calc(5px + var(--safe-top)); padding-bottom: 4px; }
  .wordmark { font-size: 30px; }
  .brand-sub { display: none; }
  .tabs button { min-height: 40px; }
  .menu-scroll { padding-bottom: calc(8px + var(--safe-bottom)); }
  .hero-current { grid-template-columns: clamp(58px, 14cqw, 80px) minmax(0, 1fr); min-height: 82px; }
  .hero-identity h2 { font-size: 24px; }
  .home-record b { font-size: 18px; }
  .launch .primary-btn { min-height: 44px; }
  #leaderboard tbody :is(td, th) { height: 24px; }
  #leaderboard thead th { padding-block: 2px; }
}

@media (orientation: landscape) and (max-width: 520px) {
  .hero-current { grid-template-columns: minmax(60px, 22%) minmax(0, 1fr); }
}
