:root {
  --ink:#12373b;
  --paper:#f4f7f3;
  --mint:#d6f5aa;
  --orange:#fb743f;
  --muted:#6a7e7e;
  --line:#d7e0dc;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--ink);
  background:var(--paper);
  font-synthesis:none;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
}
button,a {
  -webkit-tap-highlight-color:transparent;
}
button {
  font:inherit;
  cursor:pointer;
}
button:focus-visible,a:focus-visible,canvas:focus-visible {
  outline:3px solid #fb743f;
  outline-offset:5px;
}
button {
  border:0;
}
button:disabled {
  cursor:default;
}
button:active {
  transform:translateY(1px);
}
[hidden] {
  display:none!important;
}
.site-header {
  height:100px;
  max-width:1440px;
  margin:auto;
  padding:0 56px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand {
  display:flex;
  gap:4px;
  align-items:center;
  text-decoration:none;
  color:var(--ink);
  font-weight:900;
  font-size:23px;
  letter-spacing:-1.2px;
  white-space:nowrap;
}
.brand-mark {
  display:grid;
  place-items:center;
  background:var(--orange);
  width:35px;
  height:35px;
  border-radius:50%;
  font-size:34px;
  font-weight:bold;
  margin-right:9px;
  line-height:1;
}
.brand-light {
  font-weight:400;
}
.brand-dot {
  font-size:10px;
  align-self:flex-start;
  margin-top:7px;
}
.header-note {
  font-size:10px;
  font-weight:700;
  letter-spacing:2px;
  color:var(--muted);
}
nav {
  display:flex;
  gap:24px;
}
.quiet-button {
  white-space:nowrap;
  min-height:44px;
  background:none;
  color:var(--ink);
  font-size:12px;
  display:flex;
  gap:8px;
  align-items:center;
  padding:10px 0;
}
.quiet-button>span:first-child {
  font-size:18px;
}
main {
  max-width:1440px;
  margin:auto;
  padding:0 56px;
}
.above-game {
  border-top:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:22px 0 19px;
  font-size:10px;
  letter-spacing:1.7px;
  font-weight:700;
}
.above-game p {
  margin:0;
  display:flex;
  gap:10px;
  align-items:center;
}
.above-game>span {
  font-size:9px;
  color:var(--muted);
  letter-spacing:1.2px;
}
.live-dot {
  width:6px;
  height:6px;
  background:var(--orange);
  border-radius:50%;
}
.game-shell {
  height:620px;
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background:#b6e4dc;
  isolation:isolate;
  box-shadow:0 10px 30px #143c3510;
}
canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none;
}
.hud {
  position:absolute;
  top:28px;
  left:32px;
  right:32px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  pointer-events:none;
}
.route-label {
  display:flex;
  align-items:center;
  gap:10px;
}
.route-icon {
  display:grid;
  place-items:center;
  border:1px solid #1e4e4c55;
  border-radius:50%;
  width:31px;
  height:31px;
  font-size:20px;
}
.hud small {
  font-size:8px;
  letter-spacing:1.6px;
  display:block;
  font-weight:700;
}
.route-label strong {
  font-size:11px;
  letter-spacing:1.8px;
  display:block;
  margin-top:6px;
}
.best-wrap {
  text-align:right;
}
.best-wrap strong {
  font-size:22px;
  display:block;
  margin-top:4px;
  font-weight:800;
}
.best-wrap strong>span {
  font-size:19px;
  margin-right:5px;
}
.flight-hud {
  display:flex;
  gap:22px;
  align-items:center;
  text-align:center;
}
.flight-hud strong {
  font-size:32px;
  font-variant-numeric:tabular-nums;
}
.icon-button {
  pointer-events:auto;
  border-radius:50%;
  background:#f8fff8a6;
  width:44px;
  height:44px;
  color:var(--ink);
  font-weight:800;
}
.overlay {
  position:absolute;
}
.welcome {
  top:116px;
  left:53px;
}
.eyebrow {
  font-size:9px;
  letter-spacing:1.6px;
  font-weight:700;
}
h1 {
  font-family:'Arial Black','Arial',sans-serif;
  font-size:clamp(60px,6.4vw,92px);
  font-weight:950;
  line-height:.91;
  letter-spacing:-5px;
  margin:21px 0 19px;
  font-style:italic;
}
h1 span {
  color:#fffcef;
  text-shadow:0 2px 0 #488c7b16;
}
.welcome p {
  font-size:13px;
  line-height:1.7;
  margin:0 0 23px;
  color:#285453;
}
.primary-button {
  background:var(--ink);
  color:#f4ffd9;
  border-radius:7px;
  min-width:182px;
  padding:17px 22px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:38px;
  font-size:14px;
  font-weight:700;
  box-shadow:0 5px 0 #0b282b16;
  transition:background .15s,transform .15s;
}
.primary-button:hover {
  background:#23565b;
}
.primary-button span {
  font-size:23px;
  line-height:.8;
}
.launch-hint {
  font-size:8px;
  font-weight:700;
  letter-spacing:1.25px;
  display:block;
  margin-top:15px;
  color:#3c6861;
}
.scene-footer {
  position:absolute;
  bottom:21px;
  left:32px;
  right:32px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:8px;
  letter-spacing:1.4px;
  font-weight:700;
  pointer-events:none;
}
.tiny-cross {
  font-size:15px;
  margin-right:8px;
}
.coordinates {
  color:#224f49;
  font-family:monospace;
  letter-spacing:2px;
}
.flight-guide {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:35px;
  padding:32px 0;
}
.flight-guide article {
  display:flex;
  align-items:center;
  gap:14px;
}
.guide-icon {
  font-size:24px;
  border:1px solid #c9d8d2;
  border-radius:12px;
  display:grid;
  place-items:center;
  min-width:46px;
  height:46px;
}
.guide-icon.crosshair {
  font-size:30px;
}
.flight-guide h3 {
  font-size:12px;
  margin:0 0 8px;
  letter-spacing:-.1px;
}
.flight-guide p {
  font-size:10px;
  margin:0;
  color:var(--muted);
  line-height:1.6;
}
kbd {
  font:8px Arial,sans-serif;
  border:1px solid #a9bfb5;
  border-radius:3px;
  padding:2px 4px;
  white-space:nowrap;
}
.page-footer {
  border-top:1px solid var(--line);
  padding:22px 0;
  display:flex;
  justify-content:space-between;
  gap:20px;
  font-size:8px;
  letter-spacing:1.1px;
  color:var(--muted);
}
.footer-star {
  font-size:15px;
  color:var(--orange);
  vertical-align:middle;
  margin:0 12px;
}
.result,.pause-overlay {
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  text-align:center;
  padding:32px;
  border-radius:16px;
  background:#f4fff3ed;
  box-shadow:0 20px 80px #103c3325;
  min-width:410px;
  backdrop-filter:blur(10px);
}
h2 {
  font-size:44px;
  letter-spacing:-2px;
  line-height:1.02;
  margin:18px 0 24px;
}
h2 em {
  color:#e96b3a;
}
.result .primary-button,.pause-overlay .primary-button {
  margin:auto;
}
.result-stats {
  display:flex;
  justify-content:space-around;
  gap:24px;
}
.result-stats small {
  font-size:8px;
  letter-spacing:1px;
}
.result-stats strong {
  display:block;
  font-size:31px;
  margin-top:7px;
}
.result p {
  font-size:12px;
  margin:20px 0;
}
.text-button {
  display:block;
  margin:20px auto 0;
  background:none;
  color:#48716a;
  font-size:11px;
  text-decoration:underline;
  text-underline-offset:4px;
}
.game-toast {
  position:absolute;
  left:50%;
  top:110px;
  transform:translateX(-50%);
  color:var(--ink);
  background:#e9ffcce6;
  padding:10px 18px;
  border-radius:30px;
  font-size:12px;
  font-weight:bold;
  pointer-events:none;
  opacity:0;
  transition:opacity .15s;
  white-space:nowrap;
}
.game-toast.visible {
  opacity:1;
}
.game-toast.record {
  background:#fff4b1;
  border:2px solid #fb743f;
  box-shadow:0 4px 20px #12373b22;
}
#stability {
  display:flex;
  align-items:center;
  gap:10px;
  background:#f0ffe4d9;
  padding:8px 9px 8px 14px;
  border-radius:7px;
  pointer-events:auto;
}
.battery {
  width:85px;
  height:5px;
  background:#aec5ac;
  border-radius:4px;
  overflow:hidden;
}
#charge {
  height:100%;
  background:#21715d;
  transform-origin:left;
}
#stabilize {
  touch-action:none;
  user-select:none;
  background:var(--ink);
  border-radius:4px;
  color:#efffdc;
  padding:10px;
  font-size:9px;
  font-weight:bold;
}
#stabilize.active {
  background:#e86a39;
}
#stabilize kbd {
  margin-left:3px;
  border-color:#adc5af;
}
dialog {
  border:0;
  border-radius:18px;
  padding:38px;
  max-width:470px;
  color:var(--ink);
  background:#f5faee;
  box-shadow:0 20px 100px #0b252b50;
}
dialog::backdrop {
  background:#12373b88;
  backdrop-filter:blur(5px);
}
.dialog-close {
  position:absolute;
  top:15px;
  right:20px;
  font-size:28px;
  background:none;
  color:var(--ink);
}
dialog h2 {
  font-size:37px;
}
dialog ul {
  padding-left:20px;
  font-size:13px;
  line-height:1.7;
}
dialog li {
  padding-bottom:10px;
}
dialog p {
  font-size:12px;
  line-height:1.7;
}
dialog .primary-button {
  margin:23px 0;
}
.legal {
  font-size:9px;
  line-height:1.6;
  display:block;
  color:var(--muted);
}
@media(min-width:1600px) {
  .game-shell {
    height:660px;
  }
  .welcome {
    top:128px;
  }
  h1 {
    font-size:94px;
  }
}
@media(max-width:1050px) {
  .header-note {
    display:none;
  }
  .site-header {
    padding:0 30px;
    height:85px;
  }
  main {
    padding:0 30px;
  }
  .game-shell {
    height:590px;
  }
  .welcome {
    left:35px;
    top:126px;
  }
  h1 {
    font-size:75px;
  }
  .flight-guide {
    gap:18px;
  }
  .flight-guide article {
    align-items:flex-start;
  }
  .guide-icon {
    min-width:36px;
    height:36px;
  }
  .flight-guide p {
    font-size:10px;
  }
  .flight-guide h3 {
    line-height:1.4;
  }
  .scene-footer #scene-caption {
    font-size:7px;
  }
}
@media(max-width:650px) {
  .site-header {
    padding:0 18px;
    height:75px;
  }
  .brand {
    font-size:18px;
  }
  .brand-mark {
    width:29px;
    height:29px;
    font-size:29px;
    margin-right:5px;
  }
  nav {
    gap:14px;
  }
  .quiet-button {
    font-size:10px;
  }
  .quiet-button>span:first-child {
    display:none;
  }
  main {
    padding:0 12px;
  }
  .above-game {
    padding:17px 6px;
    font-size:8px;
    letter-spacing:1px;
  }
  .above-game>span {
    display:none;
  }
  .game-shell {
    height:640px;
    max-height:calc(100svh - 150px);
    min-height:490px;
    border-radius:12px;
  }
  .hud {
    top:22px;
    left:20px;
    right:20px;
  }
  .route-label {
    gap:7px;
  }
  .hud small {
    font-size:7px;
    letter-spacing:.8px;
  }
  .route-label strong {
    font-size:9px;
  }
  .best-wrap strong {
    font-size:19px;
  }
  .welcome {
    top:102px;
    left:27px;
  }
  .eyebrow {
    font-size:7px;
    letter-spacing:1px;
  }
  h1 {
    font-size:clamp(46px,14.5vw,60px);
    letter-spacing:-3px;
    margin:17px 0;
  }
  .welcome p {
    font-size:12px;
    margin-bottom:18px;
  }
  .primary-button {
    padding:15px 19px;
    min-width:165px;
    font-size:13px;
  }
  .launch-hint {
    font-size:7px;
  }
  .scene-footer {
    left:20px;
    right:20px;
    bottom:18px;
  }
  .scene-footer #scene-caption {
    font-size:6px;
    max-width:170px;
    line-height:1.5;
  }
  .coordinates {
    font-size:6px;
    letter-spacing:1px;
  }
  .flight-guide {
    grid-template-columns:1fr;
    padding:25px 10px;
    gap:18px;
  }
  .flight-guide article {
    align-items:center;
    gap:15px;
  }
  .flight-guide h3 {
    font-size:12px;
    margin-bottom:4px;
  }
  .flight-guide p {
    font-size:11px;
  }
  .page-footer {
    font-size:7px;
    line-height:1.6;
    flex-direction:column;
    align-items:center;
    padding:18px 6px;
    gap:9px;
  }
  .result,.pause-overlay {
    min-width:0;
    width:calc(100% - 28px);
    padding:28px 15px;
  }
  h2 {
    font-size:37px;
  }
  .result-stats {
    gap:10px;
  }
  .result-stats small {
    font-size:7px;
  }
  #stability {
    gap:8px;
    font-size:7px;
  }
  .battery {
    width:65px;
  }
  .scene-footer:has(#stability:not([hidden])) .coordinates {
    display:none;
  }
  .game-toast {
    top:90px;
    font-size:10px;
  }
  dialog {
    width:calc(100% - 30px);
    padding:30px 24px;
  }
  dialog h2 {
    font-size:33px;
  }
}
@media(prefers-reduced-motion:reduce) {
  * {
    transition:none!important;
  }
}

.result-actions {
  display:flex;
  gap:10px;
}
.result-actions > button {
  flex:1;
  min-width:0;
  white-space:nowrap;
  gap:16px;
}
.secondary-button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  min-height:46px;
  padding:13px 17px;
  border:1px solid #8ca79b;
  border-radius:7px;
  background:#e4efd7;
  color:var(--ink);
  text-decoration:none;
  font-size:13px;
  font-weight:700;
}
.secondary-button:hover { background:#d6f5aa; }
#share-dialog {
  width:calc(100% - 28px);
  max-width:480px;
  max-height:calc(100svh - 28px);
  padding:27px;
}
#share-heading {
  font-size:27px;
  letter-spacing:-1px;
  margin:16px 0 20px;
}
#share-preview {
  display:block;
  width:100%;
  height:auto;
  max-height:42svh;
  object-fit:contain;
  border-radius:8px;
}
.share-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
}
.share-actions > .primary-button {
  width:100%;
  margin:0;
}
.share-actions > .secondary-button { flex:1; }
#share-status {
  font-size:11px;
  line-height:1.5;
  margin:14px 0 0;
}
#share-caption {
  width:100%;
  padding:10px;
  margin-top:12px;
  border:1px solid #8ca79b;
  border-radius:6px;
  color:var(--ink);
  background:#fffef6;
  font:12px/1.5 Arial,sans-serif;
  resize:vertical;
}
@media(max-width:360px) {
  .result-actions > button { font-size:12px; padding:13px 10px; }
  #share-dialog { padding:24px 18px; }
  #share-heading { font-size:23px; }
  .share-actions > .secondary-button { font-size:12px; padding:12px 8px; }
}

.game-shell.night .hud,
.game-shell.night .coordinates {
  color:#edf8ee;
  text-shadow:0 1px 4px #101831;
}
.game-shell.night .route-icon { border-color:#c4e8f87a; }
