/* DISCOVER: the sidebar from the hangar's top-right corner (discover.js). The
   menu is a fixed column on the right edge; a page opens beside it, or on a
   narrow screen in its place with BACK to return. */

#discover {
  --nav-width: 380px;
  --page-width: min(700px, calc(100vw - var(--nav-width)));
  position: fixed;
  inset: 0 0 0 auto;
  width: auto;
  max-width: 100vw;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid #6588a340;
  border-radius: 0;
  background: linear-gradient(180deg, #0f1b2c, #070d18 72%);
  box-shadow: -30px 0 90px #000a;
  color: #e0ebf8;
}
#discover[open] { display: block; animation: discover-in .34s cubic-bezier(.16, .84, .3, 1); }
#discover.is-closing { animation: discover-out .22s ease-in forwards; }
#discover::backdrop { background: #030811a8; backdrop-filter: blur(6px); animation: discover-fade .3s; }
#discover.is-closing::backdrop { animation: discover-fade .22s reverse forwards; }
@media (pointer: coarse) { #discover::backdrop { background: #030811d0; backdrop-filter: none; } }
@keyframes discover-in { from { transform: translateX(100%); } }
@keyframes discover-out { to { transform: translateX(100%); } }
@keyframes discover-fade { from { opacity: 0; } }
/* The hangar holds still behind the open sidebar. */
html:has(#discover[open]) { overflow: hidden; }

.discover-shell { display: grid; grid-template-columns: var(--nav-width); height: 100%; }
#discover.has-page .discover-shell { grid-template-columns: var(--nav-width) var(--page-width); }

/* --- Menu -------------------------------------------------------------- */

.discover-nav {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 24px 22px 20px;
  overflow-y: auto;
  scrollbar-color: #3d5870 transparent;
  scrollbar-width: thin;
}
.discover-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.discover-head .eyebrow { font-family: var(--font-display); font-weight: 500; }
#discover .icon-button:focus-visible { outline-offset: 2px; }

/* The pilot at the top of the menu; it opens STATS. */
.pilot-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(130% 150% at 100% 0%, #80e3fa1c, transparent 60%), #0b1626;
  text-align: left;
}
.pilot-name { overflow: hidden; font-family: var(--font-display); font-size: 20px; font-weight: 500; color: #eef6fd; text-overflow: ellipsis; white-space: nowrap; }
.pilot-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 1.1px; color: #6f879e; }
.pilot-facts b { margin-right: 3px; font-weight: 500; font-variant-numeric: tabular-nums; color: #d9e8f5; }

.nav-group { margin-top: 22px; }
.nav-group h3 { margin: 0 0 8px 4px; font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 2px; color: #5f7890; }
.nav-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 9px 10px 9px 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
  color: #9fb8cd;
}
.nav-item + .nav-item { margin-top: 2px; }
.nav-item > svg:first-child {
  width: 38px;
  height: 38px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1a2a;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: border-color .2s, color .2s;
}
.nav-copy { min-width: 0; }
.nav-copy strong { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 500; color: #dce9f5; }
.nav-copy small { display: block; margin-top: 2px; overflow: hidden; font-size: 12px; color: #7189a1; text-overflow: ellipsis; white-space: nowrap; }
.nav-chevron { width: 16px; height: 16px; fill: none; stroke: #4f6a83; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s, stroke .2s; }
/* The legal pages are a quieter, tighter list. */
[data-group='legal'] .nav-item { grid-template-columns: 30px minmax(0, 1fr) 16px; padding: 6px 10px 6px 8px; }
[data-group='legal'] .nav-item > svg:first-child { width: 30px; height: 30px; padding: 6px; }
[data-group='legal'] .nav-copy strong { font-size: 14px; color: #b9cde0; }
@media (hover: hover) {
  .pilot-card:hover { border-color: #80e3fa55; }
  .nav-item:hover { border-color: var(--line); background: #13233699; }
  .nav-item:hover .nav-chevron { transform: translateX(2px); stroke: #a0d4f2; }
}
.nav-item[aria-current] { border-color: #80e3fa4d; background: linear-gradient(90deg, #80e3fa1f, #80e3fa05); color: var(--cyan); }
.nav-item[aria-current] > svg:first-child { border-color: #80e3fa66; }
.nav-item[aria-current] .nav-copy strong { color: #fff; }
.nav-item[aria-current] .nav-chevron { stroke: var(--cyan); }

/* --- Page -------------------------------------------------------------- */

.discover-page { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-left: 1px solid var(--line); background: #08111dcc; }
.discover-page.is-entering { animation: discover-page-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes discover-page-in { from { opacity: 0; transform: translateX(18px); } }
.page-head { display: flex; align-items: center; gap: 14px; padding: 22px 28px 16px; border-bottom: 1px solid var(--line); }
.page-title { flex: 1; min-width: 0; }
.page-title .eyebrow { font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; }
.page-title h2 { margin: 4px 0 0; overflow: hidden; font-size: 26px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
/* BACK: only where the page covers the menu (below). */
.page-back { display: none; align-items: center; gap: 6px; padding: 8px 10px 8px 0; background: transparent; font-family: var(--font-display); font-size: var(--label-md); font-weight: 500; letter-spacing: var(--track-md); color: #a0d4f2; }
.page-back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.page-body { flex: 1; min-height: 0; padding: 20px 28px 28px; overflow-y: auto; scrollbar-color: #3d5870 transparent; scrollbar-gutter: stable; scrollbar-width: thin; }
.page-body:focus-visible { outline: none; }

/* --- Stats ------------------------------------------------------------- */

.stats-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.stats-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #7ea6c033;
  border-radius: 20px;
  background: #0a1522;
  font-family: var(--font-display);
  font-size: var(--label-sm);
  font-weight: 500;
  letter-spacing: 1.3px;
  color: #8fa6bd;
}
.stats-tabs button::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tree-color); opacity: .7; }
.stats-tabs button[aria-selected='true'] { border-color: color-mix(in srgb, var(--tree-color) 60%, transparent); background: color-mix(in srgb, var(--tree-color) 14%, #0a1522); color: #fff; }
.stats-tabs button[aria-selected='true']::before { opacity: 1; box-shadow: 0 0 8px var(--tree-color); }
@media (hover: hover) { .stats-tabs button:hover { border-color: color-mix(in srgb, var(--tree-color) 45%, transparent); color: #d7ecfa; } }

.stats-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  margin-bottom: 10px;
  padding: 8px 18px 8px 10px;
  border: 1px solid color-mix(in srgb, var(--tree-color) 30%, transparent);
  border-radius: 10px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--tree-color) 14%, #0b1626), #0a1320 70%);
}
.stats-hero-all { padding-left: 18px; }
.stats-ship { flex: none; width: 120px; height: 90px; filter: drop-shadow(0 8px 12px #0009); }
.stats-hero.locked .stats-ship { opacity: .45; filter: grayscale(.8) drop-shadow(0 8px 12px #0009); }
.stats-kicker { font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 1.6px; color: var(--tree-color); }
.stats-hero h3 { margin: 4px 0 2px; overflow: hidden; font-size: 24px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.stats-hero p { margin: 0; font-size: 12px; color: #8ea6bd; }

.stats-lead, .stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stats-lead { margin-bottom: 8px; }
.stat-tile { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #0b1626b3; }
.stat-tile span { display: block; font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 1.3px; color: #7690a8; }
.stat-tile strong { display: block; margin-top: 6px; overflow: hidden; font-family: var(--font-display); font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; color: #e7f3fc; text-overflow: ellipsis; white-space: nowrap; }
.stat-tile small { display: block; margin-top: 3px; overflow: hidden; font-size: 10.5px; color: #62798f; text-overflow: ellipsis; white-space: nowrap; }
.stats-lead .stat-tile { border-color: color-mix(in srgb, var(--tree-color) 24%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--tree-color) 9%, #0b1626), #0a1320); }
.stats-lead .stat-tile strong { font-size: 27px; color: #fff; }

.stats-heading { margin: 24px 0 10px 2px; font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 2px; color: #5f7890; }
.stats-trees { display: grid; gap: 6px; }
.stats-tree {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 72px 84px 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 10px 10px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #0b1626b3;
  text-align: left;
}
.stats-tree.locked { opacity: .5; }
@media (hover: hover) { .stats-tree:hover { border-color: color-mix(in srgb, var(--tree-color) 50%, transparent); } }
.tree-name { font-family: var(--font-display); font-size: var(--label-md); font-weight: 500; letter-spacing: 1.3px; color: var(--tree-color); }
.tree-bar { height: 4px; overflow: hidden; border-radius: 2px; background: #54708933; }
.tree-bar em { display: block; height: 100%; border-radius: 2px; background: var(--tree-color); }
.tree-value { font-family: var(--font-display); font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; color: #d3e3f1; white-space: nowrap; }
.tree-value small { font-size: 9px; letter-spacing: 1px; color: #6f879e; }
.stats-empty { margin: 16px 0 0; padding: 13px 16px; border: 1px dashed #7ea6c033; border-radius: 8px; font-size: 12.5px; line-height: 1.6; color: #8ea6bd; }

/* --- Leaderboard ------------------------------------------------------- */

.board-tabs { display: flex; gap: 5px; margin-bottom: 14px; }
.board-tabs button {
  flex: 1;
  min-width: 0;
  padding: 9px 4px;
  border: 1px solid #7ea6c033;
  border-radius: 4px;
  background: #0a1522;
  font-family: var(--font-display);
  font-size: var(--label-sm);
  font-weight: 500;
  letter-spacing: 1.1px;
  color: #8fa6bd;
}
.board-tabs button[aria-selected='true'] { border-color: #80e3fa88; background: #14324a; color: #e3f5ff; box-shadow: 0 0 10px #80e3fa33; }
@media (hover: hover) { .board-tabs button:hover { border-color: #7ad1f388; color: #d7ecfa; } }
.board-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.board-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid transparent; border-radius: 6px; background: #0b1626b3; }
.board-rank { font-family: var(--font-display); font-size: 12px; font-variant-numeric: tabular-nums; color: #5f7890; }
.board-name { overflow: hidden; font-family: var(--font-display); font-size: 14px; font-weight: 500; color: #d3e3f1; text-overflow: ellipsis; white-space: nowrap; }
.board-name small { margin-left: 8px; padding: 1px 5px; border: 1px solid #80e3fa66; border-radius: 3px; font-size: 9px; letter-spacing: 1.2px; vertical-align: 2px; color: var(--cyan); }
.board-row strong { font-family: var(--font-display); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; color: #e7f3fc; }
.podium-1 { --podium: #f2d18b; }
.podium-2 { --podium: #cfdbe6; }
.podium-3 { --podium: #e0a877; }
[class*='podium-'] { border-color: color-mix(in srgb, var(--podium) 22%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--podium) 12%, #0b1626), #0b1626b3 65%); }
[class*='podium-'] .board-rank { font-weight: 600; color: var(--podium); }
.board-row.is-you { border-color: #80e3fa66; background: #14324a99; }
.board-own { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.board-state { display: grid; place-items: center; align-content: center; gap: 10px; min-height: 220px; font-size: 13px; text-align: center; color: #8ea6bd; }
.board-state p { max-width: 320px; margin: 0; line-height: 1.6; }
.board-loading { font-family: var(--font-display); font-size: var(--label-md); letter-spacing: 2.4px; color: #6f879e !important; animation: board-pulse 1.4s ease-in-out infinite; }
@keyframes board-pulse { 50% { opacity: .35; } }
.board-note { margin: 14px 0 0; font-size: 12px; color: #7f97ae; }

/* --- How to play ------------------------------------------------------- */

.guide section + section { margin-top: 24px; }
.guide h3, .legal h3 { margin: 0 0 8px; font-family: var(--font-display); font-size: var(--label-md); font-weight: 500; letter-spacing: var(--track-md); text-transform: uppercase; color: #a4b7ce; }
.guide-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 22px; }
.guide-key { display: grid; grid-template-columns: 128px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.guide-key kbd { justify-self: start; padding: 4px 6px; font-family: var(--font-display); font-weight: 500; letter-spacing: .6px; }
.guide-key span { font-size: 13px; color: #b9cde0; }
.guide-note { margin: 10px 0 0; font-size: 12px; color: #6f879e; }
.guide-steps { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.guide-steps li { position: relative; padding: 11px 14px 11px 48px; border: 1px solid var(--line); border-radius: 8px; background: #0b1626b3; font-size: 13px; line-height: 1.6; color: #98adc6; counter-increment: step; }
.guide-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; top: 11px; left: 15px; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: var(--cyan); }
.guide-steps b { font-weight: 600; color: #e7f3fc; }
.guide-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.guide-mode { padding: 11px 14px; border: 1px solid color-mix(in srgb, var(--mode-color) 30%, transparent); border-left: 3px solid var(--mode-color); border-radius: 6px; background: color-mix(in srgb, var(--mode-color) 7%, #0b1626); }
.guide-mode strong { display: block; font-family: var(--font-display); font-size: var(--label-md); font-weight: 500; letter-spacing: 1.4px; color: var(--mode-color); }
.guide-mode span { display: block; margin-top: 4px; font-size: 12.5px; color: #98adc6; }

/* --- Soundtrack -------------------------------------------------------- */

.tracklist { margin: 0; padding: 0; list-style: none; }
.track {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
}
.track:first-child { border-top: 0; }
.track-number { font-size: var(--label-sm); letter-spacing: 1px; font-variant-numeric: tabular-nums; color: #5f7890; }
.track-title { overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; color: #d3e3f1; }
.track-time { grid-column: 4; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; color: #7f97ae; }
.track-state { grid-column: 3; display: none; align-items: center; gap: 8px; font-size: var(--label-sm); font-weight: 500; letter-spacing: 1.4px; color: var(--cyan); }
.track.is-playing .track-state { display: inline-flex; }
.track.is-playing .track-title, .track.is-playing .track-number { color: var(--cyan); }
/* Three bouncing bars beside the track playing now. */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 10px; }
.eq b { width: 2px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; animation: eq 1.1s ease-in-out infinite; }
.eq b:nth-child(2) { animation-delay: -.4s; }
.eq b:nth-child(3) { animation-delay: -.75s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* --- Credits: centred like the end credits of a film, each card rising in turn. */

.end-credits { display: grid; align-content: center; gap: 44px; min-height: 100%; padding: 12px 0 20px; text-align: center; }
.end-credit { display: grid; gap: 7px; margin: 0; animation: credit-rise .9s cubic-bezier(.2, .7, .2, 1) calc(var(--i) * .22s) both; }
.end-credit-work { font-family: var(--font-display); font-size: 13px; font-weight: 500; letter-spacing: 4px; color: #a4b7ce; }
.end-credit-role { font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 3px; color: #647d95; }
.end-credit-name { font-family: var(--font-display); font-size: 27px; font-weight: 500; letter-spacing: .5px; color: #e7f3fc; }
@keyframes credit-rise { from { opacity: 0; transform: translateY(14px); } }

/* --- Legal pages ------------------------------------------------------- */

.legal section + section { margin-top: 18px; }
.legal h3 { margin-bottom: 6px; }
.legal p, .legal li { margin: 0; font-size: 13px; line-height: 1.7; color: #98adc6; }
.legal p + p, .legal p + ul, .legal ul + p { margin-top: 6px; }
.legal ul { margin: 0; padding-left: 18px; }
.legal li + li { margin-top: 6px; }
.legal b { font-weight: 600; color: #d3e3f1; }
.legal code { font-size: 12px; color: #d3e3f1; }
.legal a { color: #a0d4f2; }
.legal-button {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: var(--label-sm);
  font-weight: 500;
  letter-spacing: 1.4px;
  color: #a9c6dd !important;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}
.legal-button:hover { border-color: #7ad1f3; color: #e3f5ff !important; }
.legal-updated { margin-top: 22px !important; padding-top: 12px; border-top: 1px solid var(--line); font-size: 11px !important; color: #6f879e !important; }
/* Outside English: the texts are English only, and say so first. */
.legal .legal-language { margin-bottom: 16px; padding: 10px 14px; border: 1px dashed #7ea6c033; border-radius: 8px; font-size: 12.5px; color: #8ea6bd; }

/* --- Language ------------------------------------------------------------ */

.language-intro { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: #98adc6; }
.language-list { display: grid; gap: 6px; }
.language-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 10px 14px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0b1626b3;
  text-align: left;
  color: #9fb8cd;
  transition: border-color .2s, background .2s;
}
.language-code {
  display: grid;
  place-items: center;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d1a2a;
  font-family: var(--font-display);
  font-size: var(--label-md);
  font-weight: 500;
  letter-spacing: 1.2px;
  color: #a4b7ce;
}
.language-names { min-width: 0; }
.language-names strong { display: block; font-family: var(--font-display); font-size: 15px; font-weight: 500; color: #dce9f5; }
.language-names small { display: block; margin-top: 2px; font-size: 12px; color: #7189a1; }
.language-current { font-family: var(--font-display); font-size: var(--label-sm); font-weight: 500; letter-spacing: 1.4px; color: var(--cyan); }
.language-check { grid-column: 4; width: 18px; height: 18px; fill: none; stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
@media (hover: hover) { .language-option:hover { border-color: #7ad1f355; background: #13233699; } }
.language-option[aria-checked='true'] { border-color: #80e3fa66; background: linear-gradient(90deg, #80e3fa1f, #80e3fa05); }
.language-option[aria-checked='true'] .language-code { border-color: #80e3fa66; color: var(--cyan); }
.language-option[aria-checked='true'] .language-names strong { color: #fff; }
.language-option[aria-checked='true'] .language-check { opacity: 1; transform: none; }

/* --- Narrow screens: one pane at a time -------------------------------- */

@media (max-width: 760px) {
  #discover { --nav-width: min(400px, 100vw); }
  #discover.has-page { width: 100vw; }
  #discover.has-page .discover-shell { grid-template-columns: minmax(0, 1fr); }
  #discover.has-page .discover-nav { display: none; }
  .discover-page { border-left: 0; }
  .page-back { display: inline-flex; }
  .page-head { gap: 10px; padding: 14px 18px 12px; }
  .page-title h2 { font-size: 21px; }
  .page-body { padding: 16px 18px 24px; }
  .stats-lead .stat-tile strong { font-size: 21px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-tree { grid-template-columns: 74px minmax(0, 1fr) 64px 16px; }
  .stats-tree .tree-value:last-of-type { display: none; }
  .guide-keys, .guide-modes { grid-template-columns: minmax(0, 1fr); }
  .track { grid-template-columns: 24px minmax(0, 1fr) 40px; }
  .track-time { grid-column: 3; }
  .track-state { grid-row: 2; grid-column: 2; }
  .end-credit-name { font-size: 23px; }
}
@media (max-width: 420px) {
  .stats-lead { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-lead .stat-tile:first-child { grid-column: 1 / -1; }
  .stats-ship { width: 96px; height: 72px; }
  .board-tabs button { letter-spacing: .6px; }
}

/* --- Short screens (the phone app lays out at about 1300 x 590) -------- */

@media (max-height: 700px) {
  .discover-nav { padding: 14px 16px 12px; }
  .discover-head { margin-bottom: 12px; }
  .pilot-card { gap: 6px; padding: 10px 12px; }
  .pilot-name { font-size: 17px; }
  .nav-group { margin-top: 14px; }
  .nav-group h3 { margin-bottom: 4px; }
  .nav-item { grid-template-columns: 32px minmax(0, 1fr) 16px; padding: 5px 10px 5px 6px; }
  .nav-item > svg:first-child { width: 32px; height: 32px; padding: 7px; }
  .nav-copy small { display: none; }
  .page-head { padding: 12px 24px 10px; }
  .page-title h2 { font-size: 20px; }
  .page-body { padding: 14px 24px 20px; }
  .stats-hero { min-height: 0; }
  .stats-ship { width: 96px; height: 72px; }
  .stats-hero h3 { font-size: 20px; }
  .stat-tile { padding: 9px 12px; }
  .stats-lead .stat-tile strong { font-size: 22px; }
  .stat-tile strong { margin-top: 4px; font-size: 17px; }
}

/* --- Android app ------------------------------------------------------- */

/* Clear of the camera cutout, and a wider page: a phone has the room beside the menu. */
html.is-app #discover { --page-width: min(840px, calc(100vw - var(--nav-width) - var(--cutout-right))); padding-right: var(--cutout-right); }
html.is-app #discover button:focus-visible { outline: none; }
