:root {
  color-scheme: light;
  --ink: #223744;
  --muted: #4b626b;
  --line: #c8d5d2;
  --paper: #f5f7f1;
  --teal: #185c63;
  font: 16px "Avenir Next", Avenir, "Apple SD Gothic Neo", Roboto, system-ui, sans-serif;
  color: var(--ink);
  background: #c1d9df;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; overscroll-behavior: none; }
#app {
  position: fixed; inset-inline: 0; top: var(--view-top, 0px);
  height: 100%; height: var(--view-height, 100dvh);
  overflow: hidden; container-type: size; background: var(--paper);
}
button, input { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .4; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid #196d82; outline-offset: 2px; }
h1, p { margin: 0; }
.glyph { display: block; width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon {
  display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px;
  padding: 0; border-radius: 50%; background: #dce6e4; color: #263f4c;
}
.icon:active:enabled, .btn:active:enabled, .greet:active:enabled { filter: brightness(.92); }
.ship { display: inline-block; flex: none; aspect-ratio: 1; background: url('/media/rockets-v4.png') 0 0/1000% 700% no-repeat; background-position-y: calc(var(--row, 0) * 100% / 6); }
.wreck { background-position-x: 77.7778%; }
.screen-sky { height: 100%; position: relative; isolation: isolate; background: #c3e2f3 url('/media/sky-0.webp') center bottom/cover no-repeat; }
.launch { margin-inline: auto; width: min(100%, max(490px, 76cqh)); overflow: hidden; user-select: none; -webkit-user-select: none; }
#app[data-screen="home"], #app[data-screen="auth"] { background: #bddae6; }
.launch-zone { position: absolute; top: 0; bottom: 0; width: 50%; background: transparent; padding: 0; }
.launch-zone:focus-visible { outline-offset: -4px; border-radius: 6px; }
.launch-zone.left { left: 0; }
.launch-zone.right { right: 0; }
.launch-tools, .signin-tools {
  position: absolute; z-index: 2; inset: max(13px, env(safe-area-inset-top)) max(14px,env(safe-area-inset-right)) auto max(14px,env(safe-area-inset-left));
  display: flex; align-items: center; gap: 8px; pointer-events: none;
}
.launch-tools>span { flex: 1; }
.has-sheet .launch-tools { z-index: 5; }
.has-sheet .launch-tools .icon:disabled { pointer-events: none; opacity: .36; }
.launch-tools .icon, .signin-tools .icon { pointer-events: auto; background: #f3fbfa9c; }
.launch-art { position: absolute; inset: max(0px, env(safe-area-inset-top)) 0 max(0px, env(safe-area-inset-bottom)); pointer-events: none; text-align: center; }
.launch-title, .launch-ship, .tap-prompt { position: absolute; left: 50%; transform: translate(-50%, -50%); }
.launch-title { top: 28%; width: 95%; }
.launch-title h1, .auth-brand h1 { font-size: clamp(40px, min(13vw, 8cqh), 68px); line-height: 1.07; font-weight: 900; letter-spacing: -.065em; }
.best-pill {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 5px 12px 5px 9px; border-radius: 999px;
  background: #f8fbf5d9; box-shadow: 0 1px 3px #17384714, inset 0 0 0 1px #50788224;
  color: #3d5c66; font-size: 13px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.best-pill .glyph { width: 15px; height: 15px; color: #b5802f; stroke-width: 2; }
.best-pill b { font-weight: 800; color: #1f3a46; }
.launch-ship { top: 49%; display: grid; place-items: center; width: min(73%, 290px); }
.launch-ship .ship { width: clamp(74px, 17cqh, 145px); grid-area: 1/1; position: relative; }
.paths { width: 100%; height: auto; grid-area: 1/1; transform: translateY(-14%); fill: none; stroke: #456e7e; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1 8; opacity: .68; }
.tap-prompt { top: 62%; white-space: nowrap; display: flex; align-items: center; gap: 17px; font-size: clamp(15px, 2.7cqh, 21px); font-weight: 750; }
.tap-prompt span { display: inline-block; font-size: 1.12em; font-weight: 500; color: #416675; }
.signin { width: min(100%, max(490px, 76cqh)); margin: auto; display: grid; grid-template-rows: minmax(0, 1fr); }
.signin-tools { justify-content: flex-end; }
.auth-scroll, .scroll-pane { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.auth-scroll { display: flex; padding: max(56px, env(safe-area-inset-top)) 24px max(20px, env(safe-area-inset-bottom)); }
.auth-wrap { width: min(100%, 300px); margin: auto; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 1px; margin-bottom: clamp(16px, 3.8cqh, 32px); }
.auth-brand .ship { width: clamp(55px, 10cqh, 90px); }
.auth-brand h1 { font-size: clamp(36px, 6cqh, 53px); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; }
.form input { width: 100%; min-width: 0; min-height: 45px; font-size: 16px; padding: 9px 13px; border: 1px solid #91aeb5; background: #fbfdf9e8; border-radius: 10px; }
.form label.inline-choice { display: flex; align-items: center; min-height: 44px; gap: 12px; }
.inline-choice input { min-height: 20px; width: 20px; height: 20px; accent-color: var(--teal); }
.hint, .form-error { font-size: 12px; line-height: 1.45; color: var(--muted); }
.form-error, .danger { color: #983e31; }
.btn.danger-fill { background: #a8402f; color: #fffaf6; }
.form-page .hint { font-size: 13px; }
.btn, .quiet, .greet { min-height: 44px; }
.btn { padding: 10px 16px; border-radius: 23px; background: #dce7e4; font-size: 15px; font-weight: 750; }
.primary { background: var(--teal); color: white; }
.quiet { background: transparent; font-size: 13px; font-weight: 600; }
.signup .quiet { justify-self: center; padding: 4px 12px; }
.shell {
  height: 100%; width: min(100%, 490px); margin: auto;
  padding: max(9px,env(safe-area-inset-top)) max(17px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(17px,env(safe-area-inset-left));
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
}
.bar { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 8px; padding: 4px 0 12px; }
.bar h1 { grid-column: 2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; letter-spacing: -.045em; text-align: center; }
.bar-end { justify-self: end; }
.scroll-pane { padding: 4px 3px 8px; }
.pager { padding: 10px 1px 3px; }
.pager, .colors, .setting-row, .pilot-row { display: flex; align-items: center; }
.pager { justify-content: space-between; font-size: 13px; font-variant-numeric: tabular-nums; }
.pager .icon { background: transparent; }
.form-page, .privacy { max-width: 365px; margin: 12px auto; }
.privacy p { font-size: 14px; line-height: 1.7; margin-bottom: 14px; }
.empty { padding: clamp(32px,16cqh,110px) 12px; text-align: center; color: var(--muted); font-size: 14px; }
.entries { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.pilot-row small { display: block; color: var(--muted); font-size: 12px; }
.seat-ship { width: 68px; height: 68px; }
.colors { justify-content: center; gap: 7px; margin: 8px 0 14px; }
.swatch { display: grid; place-items: center; position: relative; width: 44px; height: 44px; border-radius: 50%; background: transparent; }
.swatch::before { content: ""; width: 27px; height: 27px; background: var(--paint); border-radius: 50%; border: 1px solid #0002; }
.swatch[aria-pressed=true]::after { content: ""; position: absolute; width: 36px; height: 36px; border: 2px solid var(--teal); border-radius: 50%; }
.greet { padding: 6px 11px; min-width: 44px; border-radius: 14px; background: #e6eeea; font-size: 14px; }
#count { text-align: center; font-size: 47px; font-weight: 800; font-variant-numeric: tabular-nums; }
.replay { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 155px; min-height: 48px; }
.replay .glyph { width: 18px; }
.rank-entry { min-height: 54px; display: grid; grid-template-columns: minmax(82px,max-content) minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.rank-entry>strong { overflow-wrap: anywhere; font-size: 15px; line-height: 1.35; }
.rank-entry.mine { margin-inline: -4px; padding-inline: 8px; border-radius: 13px; border-bottom-color: transparent; background: #e1eee8; box-shadow: inset 0 0 0 1px #2e6c6a29; }
.rank-entry.mine>strong { color: #17565c; }
.me-tag {
  display: inline-block; margin-inline-start: 6px; padding: 1px 6px; border-radius: 6px; vertical-align: 2px;
  background: var(--teal); color: #fbfdf8; font-size: 10.5px; font-weight: 750; line-height: 1.5; letter-spacing: .01em;
}
.copilot { display: block; }
.rank-entry>b, .rank-badge { font-variant-numeric: tabular-nums; }
.rank-entry>b { font-size: 14px; }
.rank-badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; font-weight: 500; }
.rank-emblem { width: 28px; height: 28px; flex: none; background: url('/media/rank-badges.png') 0 0/600% 100% no-repeat; }
.rank-emblem.silver { background-position-x: 20%; }
.rank-emblem.bronze { background-position-x: 40%; }
.rank-emblem.crown { background-position-x: 60%; }
.rank-emblem.double-chevron { background-position-x: 80%; }
.rank-emblem.chevron { background-position-x: 100%; }
.routes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; }
.route { display: grid; align-content: start; width: 100%; padding: 0; background: none; color: var(--ink); text-align: left; }
.route-thumb { display: grid; place-items: center; aspect-ratio: 5/8; overflow: hidden; border-radius: 9px; background: #e4ebe6; }
.route img { display: block; width: 100%; height: 100%; object-fit: contain; }
.route-caption { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 1px 5px; padding: 6px 1px 0; }
.route-caption strong { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.route-caption small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.route.locked { color: #61716f; }
.route.locked .route-thumb { border: 1px dashed #acbcb5; background: #eaf0ea; }
.route.locked .glyph { width: 21px; }
.gallery .pager { border-top: 1px solid var(--line); padding-top: 3px; }
#app[data-screen=artwork] { background: #14232b; }
.art-view { height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr) auto; color: #f8f6ee; padding: max(5px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(4px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left)); }
.art-view header, .art-nav { width: min(100%,720px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: center; }
.art-view header { padding-bottom: 7px; }
.art-view header h1 { font-size: 18px; }
.art-view header small, .art-nav span { color: #c4d3d3; font-size: 12px; font-variant-numeric: tabular-nums; }
.art-view .icon { background: #273a44; color: #f8f6ee; }
.art-viewport { display: flex; overflow: auto; container-type: size; overscroll-behavior: contain; }
.art-print { display: block; flex: none; margin: auto; width: min(100cqw,62.5cqh); height: auto; align-self: flex-start; aspect-ratio: 5/8; cursor: zoom-in; }
.art-view.zoomed .art-print { width: min(200cqw,125cqh); cursor: zoom-out; }
.art-nav { justify-content: center; padding-top: 5px; gap: 18px; }
.art-nav .icon { background: transparent; }
.locked .glyph { width: 16px; height: 17px; align-self: end; }
.settings { width: min(100%, 420px); margin: 0 auto; padding: 2px 0 10px; }
.pilot-row { gap: 12px; padding: 10px 16px 10px 10px; margin-top: 4px; border-radius: 18px; background: #e6eeea; }
.pilot-row>div { overflow-wrap: anywhere; min-width: 0; }
.pilot-row strong { font-size: 16px; }
.pilot-row small { margin-top: 2px; font-variant-numeric: tabular-nums; }
.setting-heading { margin: 20px 8px 7px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.setting-group { border-radius: 16px; background: #fbfcf8; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.setting-row { justify-content: space-between; gap: 12px; min-height: 52px; padding: 0 6px 0 16px; font-weight: 600; font-size: 15px; }
.setting-row+.setting-row { border-top: 1px solid var(--line); }
.setting-link { width: 100%; padding-inline-end: 14px; background: transparent; text-align: start; }
.setting-link .glyph { width: 18px; height: 18px; color: var(--muted); }
.setting-link:active { background: #eef3ef; }
.setting-group :focus-visible { outline-offset: -3px; }
.promo-form { margin-top: 20px; border: 1px solid var(--line); border-radius: 15px; padding: 12px 14px; background: #fbfcf7; }
.promo-form label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 700; }
.promo-form>div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.promo-form input { appearance: none; width: 100%; min-width: 0; height: 44px; padding: 0 10px; border: 1px solid #8caaae; border-radius: 9px; background: white; font-size: 16px; }
.promo-form .btn { border-radius: 10px; }
.promo-form #promo-feedback { padding-top: 7px; }
.unlock-dialog { width: min(320px,calc(100% - 32px)); max-height: 90%; overflow-y: auto; padding: 20px clamp(12px,5vw,22px) 10px; border: 1px solid #d8d0b9; border-radius: 21px; background: #fffcf3; text-align: center; color: var(--ink); font-size: 1rem; word-break: keep-all; overflow-wrap: break-word; text-wrap: balance; }
@supports (font: -apple-system-body) { .unlock-dialog { font: -apple-system-body; } }
.shell[inert] { pointer-events: none; }
.unlock-dialog.legacy-dialog { display: block; position: fixed; inset: 0; height: fit-content; margin: auto; box-shadow: 0 0 0 100vmax #1d374c66; }
.unlock-dialog::backdrop { background: #1d374c66; }
.unlock-art { width: 104px; height: 104px; margin: 0 auto 8px; border: 1px solid #dabb78; border-radius: 50%; background: #f8efd2; display: grid; place-items: center; }
.unlock-art .ship { width: 98px; }
.unlock-dialog h2 { margin: 0 0 7px; font-size: 1.5em; line-height: 1.25; letter-spacing: -.035em; overflow-wrap: normal; }
.unlock-dialog p { margin: 0 auto 18px; font-size: .94em; line-height: 1.5; color: var(--muted); }
.unlock-dialog p span { display: inline-block; max-width: 100%; }
.unlock-dialog .btn { width: 100%; font-size: 1em; }
.unlock-dialog .quiet { font-size: .875em; }
@media (max-width: 359px) {
  .unlock-dialog { width: calc(100% - 16px); padding-inline: 12px; }
  .unlock-dialog h2 { font-size: 1.25em; }
}
.app-version { margin: 22px 0 4px; text-align: center; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.toggle { position: relative; width: 48px; height: 44px; background: transparent; }
.toggle::before, .toggle::after { content: ""; position: absolute; top: 50%; transform: translateY(-50%); border-radius: 20px; }
.toggle::before { left: 2px; width: 43px; height: 25px; background: #8b9d9e; }
.toggle::after { left: 5px; width: 19px; height: 19px; background: white; }
.toggle[aria-checked=true]::before { background: var(--teal); }
.toggle[aria-checked=true]::after { left: 23px; }
.flight { height: 100%; position: relative; overflow: hidden; background: #c4e1ef center / cover no-repeat; user-select: none; touch-action: none; }
.flight-board { position: absolute; inset: 0; }
.flight canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.flight-readout { position: absolute; inset: env(safe-area-inset-top,0px) env(safe-area-inset-right,0px) auto env(safe-area-inset-left,0px); height: 98px; pointer-events: none; font: 750 13px/1 system-ui,sans-serif; color: #253943; -webkit-text-stroke: .11em #f4f5ebdd; paint-order: stroke fill; }
.flight-readout.light { color: white; -webkit-text-stroke-color: #23333cdd; }
.flight-readout b { font-weight: inherit; }
.flight-floor { position: absolute; top: 13px; right: 12px; font-size: 21px; }
.flight-destination { position: absolute; top: 38px; right: 12px; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.flight-destination i { width: 15px; height: 15px; }
.flight-speed { position: absolute; left: 10px; top: 67px; display: grid; gap: 4px; font-size: 11px; }
.flight-speed b { font-size: 12px; }
.flight .exit { position: absolute; z-index: 1; top: max(8px,env(safe-area-inset-top)); left: max(8px,env(safe-area-inset-left)); background: #f1f7f1b5; }
.callout { position: absolute; pointer-events: none; text-align: center; top: 27%; inset-inline: 8%; font-size: clamp(20px,6vw,38px); font-weight: 800; color: white; text-shadow: 0 1px 5px #132735; }
#notice { position: fixed; z-index: 5; bottom: max(14px,env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; border-radius: 12px; background: #203b46; color: white; padding: 9px 14px; text-align: center; font-size: 13px; pointer-events: none; opacity: 0; }
#notice.on { opacity: 1; }
.loading { height: 100%; display: grid; place-content: center; justify-items: center; gap: 16px; }
@container (max-height: 520px) {
  .auth-scroll { padding-block: 12px; }
  .auth-brand { flex-direction: row; justify-content: center; gap: 6px; margin-bottom: 10px; }
  .auth-brand .ship { width: 45px; }
  .signup { gap: 7px; }
  .launch-title { top: 25%; }
  .launch-title h1 { font-size: 34px; }
  .launch-ship { top: 49%; width: min(54%,190px); }
  .tap-prompt { top: 65%; }
}
@container (max-height: 350px) {
  .signin-tools { top: 5px; right: 5px; }
  .auth-scroll { padding-block: 5px; }
  .auth-brand { display: none; }
  .auth-wrap { width: min(calc(100% - 30px),290px); }
  .signup { gap: 4px; }
  .signup input { min-height: 36px; padding-block: 5px; }
  .signup .quiet { min-height: 34px; }
  .bar { padding-bottom: 3px; }
}

@supports not (container-type: size) {
  .launch, .signin { width: min(100%,490px); }
  .launch-ship .ship { width: clamp(78px,17vh,140px); }
  .auth-brand .ship { width: 80px; }
  .launch-title h1, .auth-brand h1 { font-size: 42px; }
  .art-print { width: 100%; height: 100%; object-fit: contain; }
  .art-view.zoomed .art-print { width: 200%; height: 200%; }
}
.launch-controls { position: absolute; inset: 0; }
.mode-switch { pointer-events: auto; position: relative; display: inline-flex; padding: 2px; border-radius: 26px; background: #e2efefdc; color: #254953; }
.mode-switch::before { content: ""; position: absolute; inset: 2px auto 2px 2px; width: 44px; border-radius: 50%; background: #fffcf0; box-shadow: inset 0 0 0 1.5px #497b84; }
.mode-switch[aria-checked=true]::before { transform: translateX(44px); }
.mode-switch span { position: relative; display: grid; place-items: center; width: 44px; height: 44px; pointer-events: none; }
.mode-switch .glyph { width: 26px; height: 26px; }
.mode-switch[aria-checked=true] span:first-child, .mode-switch[aria-checked=false] span:last-child { opacity: .62; }
@media (prefers-reduced-motion: no-preference) {
  .mode-switch.switched::before { animation: switch-off 150ms ease-out; }
  .mode-switch.switched[aria-checked=true]::before { animation-name: switch-on; }
  @keyframes switch-on { from { transform: translateX(0); } to { transform: translateX(44px); } }
  @keyframes switch-off { from { transform: translateX(44px); } to { transform: translateX(0); } }
}
.rocket-rig { display: inline-grid; place-items: center; position: relative; aspect-ratio: 1; }
.rocket-rig>.ship, .ignition-ring { grid-area: 1/1; }
.ignition-ring { display: none; position: relative; width: 96%; height: 96%; border-radius: 50%; border: 2px solid #1679af38; }
.ignition-ring::after { content: ""; position: absolute; inset: -2px; border: 2.5px solid transparent; border-top-color: #158bd7; border-right-color: #267eb9; border-radius: 50%; }
.firing .ignition-ring { display: block; }
.firing .ignition-ring::after { animation: orbit .95s linear infinite; }
.firing>.ship { animation: ignition .38s steps(1,end) infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes ignition {
  0%,100% { background-position-x: 11.1111%; }
  25% { background-position-x: 22.2222%; }
  50% { background-position-x: 33.3333%; }
  75% { background-position-x: 44.4444%; }
}
.launch-ship>.rocket-rig { grid-area: 1/1; }
.paint-anchor { grid-area: 1/1; position: relative; display: grid; place-items: center; }
.paint-trigger { display: grid; place-items: center; position: relative; pointer-events: auto; padding: 0; border-radius: 50%; background: transparent; }
.paint-edit { position: absolute; top: -3%; right: -12%; background: transparent; color: #254855; }
.paint-edit::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fffdf4; box-shadow: 0 1px 4px #173b4c30; border: 1px solid #577b802e; }
.paint-edit .glyph { position: relative; width: 20px; height: 20px; }
.paint-trigger[aria-expanded=true] .paint-edit::before { background: #243e48; }
.paint-trigger[aria-expanded=true] .paint-edit { color: #fffaf0; }
.paint-backdrop { position: absolute; inset: 0; z-index: 1; background: transparent; }
.painting .launch-art { z-index: 2; }
.painting .launch-tools { z-index: 3; }
.paint-pop {
  position: absolute; top: calc(100% + 4px); left: 50%; transform: translateX(-50%); pointer-events: auto;
  width: min(264px,calc(100vw - 30px)); max-height: max(115px,calc(50cqh - 82px)); overflow-y: auto;
  padding: 12px 14px 6px; text-align: left; border: 1px solid #839ba03d; border-radius: 18px;
  background: #fffcf4; box-shadow: 0 5px 18px #234e5b25;
}
.paint-pop h2 { margin: 0; font-size: 12px; font-weight: 750; color: var(--muted); }
.ship-list { display: flex; gap: 6px; margin: 6px 0 8px; }
.ship-choice { display: flex; flex: 1; align-items: center; justify-content: center; gap: 4px; min-height: 44px; border-radius: 10px; background: #eeefe8; font-size: 13px; font-weight: 700; }
.ship-choice[aria-pressed=true] { background: #e1eeea; box-shadow: inset 0 0 0 1.5px var(--teal); color: var(--teal); }
.ship-choice::before { content: ""; width: 38px; height: 38px; flex: none; background: url('/media/rockets-v4.png') 0 calc(var(--row) * 100% / 6) / 1000% 700% no-repeat; }
.ship-description, .ship-effect { font-size: 12px; line-height: 1.4; }
.ship-description { color: var(--muted); }
.ship-effect { color: var(--teal); font-weight: 700; margin: 3px 0 8px; }
.paint-caption { display: flex; justify-content: space-between; align-items: baseline; padding-top: 8px; border-top: 1px solid var(--line); }
.paint-caption span { color: var(--teal); font-size: 12px; }
.paint-pop .colors { margin: 0; justify-content: flex-start; gap: 3px; }
@container (max-height: 490px) {
  .painting .launch-title { visibility: hidden; }
  .painting .launch-ship { top: 24%; }
  .painting .paint-trigger .ship { width: 66px; }
  .paint-pop { max-height: calc(76cqh - 47px); }
}
.paint-pop .swatch[aria-pressed=true]::before { outline: 1.5px solid #344d53; outline-offset: 3px; }
.paint-pop .swatch[aria-pressed=true]::after { width: 12px; height: 7px; margin-top: -3px; border: solid white; border-width: 0 0 2px 2px; border-radius: 0; transform: rotate(-45deg); }
.rematch-status { line-height: 18px; min-height: 22px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.replay[aria-pressed=true] { background: #dbe9e4; color: #20595b; }
.leave-team { color: var(--muted); padding: 3px 15px; }
.crew-record {
  --record-panel: #e4edeb;
  height: 100%; display: grid; grid-template-rows: auto minmax(0,1fr);
  padding: max(4px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));
  color: var(--ink); background: var(--paper);
}
.crew-record header { display: flex; justify-content: center; }
.crew-rank {
  display: inline-flex; align-items: center; gap: 6px; min-width: 58px; min-height: 44px; justify-content: center;
  padding: 3px 13px; border-radius: 24px; background: var(--record-panel); color: var(--ink);
  font-size: 14px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.crew-rank>.glyph { width: 19px; height: 19px; }
.crew-rank .rank-emblem { width: 24px; height: 24px; }
.crew-record-body { min-height: 0; overflow: auto; overscroll-behavior: contain; display: flex; }
.crew-summary {
  width: min(100%,328px); margin: auto; padding-block: 12px; text-align: center;
  font-family: system-ui, sans-serif; font-weight: 400;
  /* The native flight log uses a 360-unit board and scales down on short screens. */
  --record-unit: clamp(.76px,min(.27778cqw,.17857cqh),1.15px);
  display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; gap: clamp(17px,3.5cqh,32px);
}
.crew-wrecks {
  display: flex; align-items: center; justify-content: center; height: 72px; height: clamp(54px,11cqh,96px);
}
.crew-wrecks .wreck { width: 104px; width: clamp(83px,14.7cqh,125px); }
.crew-wrecks .wreck:first-child { transform: translate(5%,-5%) rotate(-8deg); }
.crew-wrecks .wreck:last-child { transform: translate(-5%,7%) scaleX(-1) rotate(-5deg); }
.crew-wrecks .wreck:only-child { transform: rotate(-4deg); }
.crew-log-heading h1 { margin-top: 6px; font-weight: inherit; font-size: 32px; font-size: calc(35 * var(--record-unit)); line-height: 1.15; }
.crew-stats { background: var(--record-panel); border-radius: 18px; padding: 18px 18px 0; padding: clamp(14px,2.8cqh,24px) clamp(14px,4vw,21px) 0; }
.crew-floors { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.crew-floors dl { margin: 0; }
.crew-floors dl+dl { border-inline-start: 1px solid #758e9b50; color: var(--teal); }
.crew-floors dt, .record-pilot { font-size: 13px; color: var(--muted); }
.crew-floors dt { font-size: max(12px,calc(14 * var(--record-unit))); }
.crew-floors .fresh dt:first-child { display: inline-flex; align-items: center; gap: 3px; color: var(--teal); }
.crew-floors .fresh dt .glyph { width: 13px; height: 13px; }
.crew-floors .floor-count { margin: 2px 0 0; font-size: 42px; font-size: calc(42 * var(--record-unit)); font-variant-numeric: tabular-nums; line-height: 1.1; }
.crew-floors .speed-label { font-size: max(11px,calc(11.5 * var(--record-unit))); margin-top: 5px; }
.record-speed { margin: 0; font-size: 12px; font-size: max(11px,calc(10.35 * var(--record-unit))); color: var(--muted); font-variant-numeric: tabular-nums; }
.record-pilot {
  display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; gap: 8px;
  padding-block: 12px; margin-top: 14px; margin-top: clamp(12px,2.3cqh,19px); border-top: 1px solid #758e9b50; text-align: start;
}
.last-pilot { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.last-pilot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 5px; background: var(--paint); border: 1px solid #0002; }
.crew-actions { display: flex; flex-direction: column; align-items: center; }
.crew-actions .replay { min-width: min(100%,178px); color: var(--paper); }
.crew-actions .replay[aria-pressed=true] { color: var(--teal); background: var(--record-panel); box-shadow: inset 0 0 0 1px currentColor; }
.crew-actions .rematch-status { display: flex; justify-content: center; gap: 3px; min-width: 0; max-width: 100%; white-space: nowrap; }
.rematch-status .ready-name { overflow: hidden; text-overflow: ellipsis; }
.rematch-status .ready-name+span { flex: none; }
@media (max-height: 520px) {
  .crew-summary { gap: 10px; padding-block: 4px; }
  .crew-wrecks { height: 45px; }
  .crew-log-heading h1 { font-size: 24px; }
  .crew-stats { padding-top: 9px; }
  .record-pilot { padding-block: 5px; margin-top: 5px; }
  .crew-actions .rematch-status { min-height: 17px; margin: 0; }
}
@media (min-width: 530px) and (max-height: 520px) {
  .crew-summary { width: min(100%,620px); grid-template-columns: .85fr 1.15fr; align-items: center; column-gap: 24px; }
  .crew-log-heading { grid-row: span 2; }
}
@media (max-width: 529px) and (max-height: 380px) {
  .crew-record { padding-bottom: max(3px,env(safe-area-inset-bottom)); }
  .crew-summary { gap: 3px; padding-block: 0; }
  .crew-wrecks { height: 32px; }
  .crew-wrecks .wreck { width: 62px; }
  .crew-log-heading h1 { font-size: 20px; margin: 1px 0 0; }
  .crew-log-heading { display: flex; align-items: center; justify-content: center; }
  .crew-floors .floor-count { font-size: 26px; }
  .crew-floors .speed-label { margin-top: 1px; }
  .crew-actions { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; }
  .crew-actions .replay { min-width: 0; min-height: 44px; }
  .crew-actions .rematch-status { grid-area: 2 / 1 / 3 / 3; }
}
.progress-rocket { display: grid; place-items: center; margin: auto; padding: 14px; }
.progress-rocket .ship { width: 88px; }
.loading-scene { display: grid; place-items: center; }
.loading-scene .ship { width: 126px; }
.crew-layer { position: absolute; z-index: 4; inset: 0; display: grid; grid-template-rows: minmax(0,1fr); align-items: end; justify-items: center; padding: calc(max(13px,env(safe-area-inset-top)) + 54px) 10px max(12px,env(safe-area-inset-bottom)); }
.crew-shade { position: absolute; inset: 0; background: #53839818; }
.crew-sheet {
  position: relative; width: min(100%,370px); max-height: 100%; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden; border-radius: 21px;
  background: #f6f8f3; box-shadow: 0 3px 20px #203b491f; padding: 12px 16px;
}
.crew-sheet header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; }
.crew-sheet header h2 { margin: 0; font-size: 18px; font-weight: 770; letter-spacing: -.04em; }
.crew-sheet header .icon { background: transparent; width: 44px; height: 44px; }
.crew-sheet header .glyph { width: 19px; }
.crew-sheet-body { overflow: auto; min-height: 0; overscroll-behavior: contain; padding: 0 2px; }
.crew-choice { display: flex; width: 100%; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border-radius: 13px; font-size: 15px; font-weight: 700; }
.panel-choose { width: min(calc(100% - 16px),292px); border: 1px solid #476a722b; background: #fbfaf2; margin-bottom: clamp(0px,4cqh,34px); }
.panel-choose header { padding-left: 2px; }
/* The scrolling body clips the native focus ring. Reserve its full width on each edge. */
.panel-choose .crew-sheet-body { padding: 4px 6px 6px; }
.panel-choose .invite-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; }

.panel-choose header h2 { font-size: 20px; }
.panel-choose header .icon { color: #58727a; }
.crew-choice.primary { justify-content: flex-start; gap: 10px; padding: 0 15px; background: #184c55; color: #fffdf1; }
.crew-choice.primary>.glyph:first-child { color: #b9e9d7; }
.crew-choice.primary>.glyph:last-child { margin-left: auto; width: 16px; }
.crew-choice .glyph { width: 20px; height: 20px; }
.auto-choice { display: flex; align-items: center; gap: 8px; min-height: 44px; width: fit-content; cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 600; }
.auto-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.invite-row { display: flex; align-items: flex-end; gap: 10px; border-top: 1px solid var(--line); padding: 10px 0 3px; }
.invite-row>.icon { color: var(--teal); background: #e0ebe7; border-radius: 12px; }
.code-form { flex: 1; min-width: 0; }
.code-form label, .invite-code small { display: block; font-size: 12px; font-weight: 650; color: var(--muted); }
.code-form>div { display: grid; grid-template-columns: minmax(0,1fr) 44px; gap: 6px; margin-top: 5px; }
.code-form input { appearance: none; width: 100%; min-width: 0; height: 44px; padding: 6px 11px; border: 1px solid #8caaae; border-radius: 9px; background: white; font-size: 16px; letter-spacing: .07em; }
.code-form .icon { border-radius: 11px; background: #dce8e5; }
.crew-sheet .form-error:not([hidden]) { margin: 6px 0; }
.matching { inset: max(0px,env(safe-area-inset-top)) 0 max(0px,env(safe-area-inset-bottom)); padding: 0; }
.matching .crew-shade { background: transparent; }
.matching .crew-sheet { position: absolute; top: calc(44% + clamp(52px,11cqh,93px)); width: max-content; max-width: calc(100% - 24px); padding: 3px 4px 3px 15px; border-radius: 26px; background: #fbfaf2; border: 1px solid #4b727d38; }
.matching header { gap: 11px; }
.matching header h2 { font-size: 14px; color: #244953; }
.match-cancel { min-height: 44px; padding: 0 11px; display: inline-flex; align-items: center; gap: 3px; border-radius: 22px; background: #e3ede8; color: #25515a; font-weight: 700; font-size: 13px; }
.match-cancel .glyph { width: 15px; height: 15px; }
.launch:has(.matching) .launch-ship { top: 44%; }
.invite-code { display: flex; align-items: center; gap: 5px; padding: 6px 0; }
.invite-code>div { flex: 1; }
.invite-code b { display: block; font: 700 19px/1.45 ui-monospace,monospace; letter-spacing: .06em; user-select: all; }
.invite-code b span+span { margin-inline-start: .36em; }
.invite-code .glyph { width: 19px; height: 19px; }
.wait-caption { margin: 6px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.crew-effect { margin: 5px 0; color: var(--teal); font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.has-sheet .launch-title { top: 22%; }
.has-sheet .launch-ship { top: 42%; }
.crew-pilots { display: flex; padding: 7px 0; gap: 5px; border-block: 1px solid var(--line); }
.crew-pilot { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; }
.crew-pilot .ship { width: 37px; }
.crew-pilot>div { overflow: hidden; }
.crew-pilot strong, .crew-pilot small { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crew-pilot small { color: var(--muted); font-size: 11px; }
.crew-sheet .colors { margin: 4px 0; }
.crew-comms { display: flex; align-items: center; gap: 2px; }
.crew-comms>span { flex: 1; min-width: 0; max-height: 39px; overflow: hidden; font-size: 12px; overflow-wrap: anywhere; }
.crew-comms .greet { padding: 4px; min-width: 44px; background: transparent; }
.ready-flight { width: 100%; margin: 4px 0 2px; }
.panel-countdown .crew-pilots { justify-content: center; gap: 18px; border-bottom: 0; }
.panel-countdown .crew-pilot { flex: 0 1 auto; max-width: 46%; gap: 5px; }
.panel-countdown #count { display: block; padding: 2px 0 4px; color: var(--teal); font-size: 54px; line-height: 1.05; font-weight: 850; }
@container (max-height: 540px) {
  .has-sheet .launch-title { top: 23%; }
  .has-sheet .launch-ship { top: 45%; }
  .has-sheet:has(.panel-choose) .launch-title, .has-sheet:has(.panel-private) .launch-title { visibility: hidden; }
  .has-sheet:has(.panel-choose) .launch-ship, .has-sheet:has(.panel-private) .launch-ship { top: 25%; }
  .crew-sheet { padding: 6px 11px; }
  .panel-choose { margin-bottom: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .crew-layer.entering .crew-sheet { animation: sheet-in .26s cubic-bezier(.2,.9,.25,1) both; }
  .crew-layer.entering:not(.matching) .crew-shade { animation: shade-in .26s ease-out both; }
  .paint-pop.entering { animation: pop-in .2s cubic-bezier(.2,.9,.25,1) both; }
  /* The pad idles on one 3.6 s cycle: hull hover, two arrow nudges, three trail steps. */
  .launch:not(.busy):not(.painting) .paint-trigger { animation: hover 3.6s ease-in-out infinite; }
  .launch:not(.busy) .paths { animation: trail 1.2s linear infinite; }
  .tap-prompt>span:first-child { animation: nudge-left 1.8s ease-in-out infinite; }
  .tap-prompt>span:last-child { animation: nudge-right 1.8s ease-in-out infinite; }
  #count.tick { animation: count-in .42s cubic-bezier(.2,.9,.25,1); }
  .crew-floors .fresh dd { animation: best-in .5s .2s cubic-bezier(.2,.9,.3,1.25) both; }
  @keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
  @keyframes shade-in { from { opacity: 0; } }
  @keyframes pop-in { from { opacity: 0; transform: translate(-50%,-6px) scale(.94); } }
  @keyframes hover { 50% { transform: translateY(-5px); } }
  @keyframes trail { to { stroke-dashoffset: -9; } }
  @keyframes nudge-left { 50% { transform: translateX(-4px); } }
  @keyframes nudge-right { 50% { transform: translateX(4px); } }
  @keyframes count-in { from { opacity: .3; transform: scale(1.3); } }
  @keyframes best-in { from { opacity: 0; transform: scale(.75); } }
}
@media (prefers-reduced-motion: reduce) {
  .firing .ignition-ring::after, .firing>.ship { animation: none; }
  .firing>.ship { background-position-x: 22.2222%; }
}

.symbol-sheet { position: absolute; pointer-events: none; overflow: hidden; }
