:root {
  color-scheme: light;
  --ink: #173a3a;
  --muted: #52716c;
  --mint: #c9f0e9;
  --paper: #fffaf0;
  --coral: #ef5c45;
  --yellow: #ffd35a;
  font-family: 'DM Sans', 'Trebuchet MS', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--mint);
  background-image: radial-gradient(rgba(23, 58, 58, .08) .7px, transparent .7px);
  background-size: 9px 9px;
}

button, a { color: inherit; }

.page {
  width: min(1120px, 100% - 64px);
  min-height: 100vh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 58, 58, .2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: 'Lilita One', Impact, sans-serif;
  font-size: 21px;
  line-height: 1;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--coral);
  font-family: 'DM Sans', sans-serif;
  font-size: 21px;
  font-weight: 800;
  transform: rotate(-35deg);
}

.wordmark-light { color: var(--coral); }

.topbar-note, .flight-label, .best-label, .game-footer, .page-footer, .asset-credit {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.topbar-note { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.live-dot, .flight-dot { width: 7px; height: 7px; border-radius: 50%; background: #64a76e; }
.sound-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(23, 58, 58, .27);
  border-radius: 50%;
  background: rgba(255, 250, 240, .54);
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.sound-button:hover { background: var(--paper); transform: rotate(-7deg); }
.sound-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-off { display: none; }
.sound-button[aria-pressed='true'] .sound-on { display: none; }
.sound-button[aria-pressed='true'] .sound-off { display: block; }

.game-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(300px, 440px);
  align-items: center;
  gap: clamp(36px, 9vw, 130px);
  padding: 36px 5.5% 42px;
}

.intro { align-self: center; padding-bottom: 18px; animation: rise-in .55s both; }
.eyebrow { margin: 0 0 17px; color: var(--coral); font-size: 11px; font-weight: 800; }
h1 {
  margin: 0;
  font-family: 'Lilita One', Impact, sans-serif;
  font-size: clamp(45px, 6vw, 72px);
  font-weight: 400;
  line-height: .91;
}
h1 span { color: var(--coral); }
.intro-copy { margin: 21px 0 35px; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.7; }
.best-score { display: grid; grid-template-columns: 31px auto; align-items: center; column-gap: 9px; width: fit-content; }
.best-icon { grid-row: span 2; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font-size: 16px; }
.best-label { color: var(--muted); }
.best-score strong { font-family: 'Lilita One', Impact, sans-serif; font-size: 21px; font-weight: 400; line-height: 1.1; }

.game-column { width: 100%; max-width: 440px; justify-self: center; animation: rise-in .65s .08s both; }
.game-topline { min-height: 39px; display: flex; align-items: flex-start; justify-content: space-between; }
.flight-label { display: flex; align-items: center; gap: 7px; padding-top: 6px; color: var(--muted); }
.flight-dot { width: 6px; height: 6px; }
.scoreboard { display: flex; align-items: baseline; gap: 9px; }
.scoreboard span { color: var(--muted); font-size: 9px; font-weight: 800; }
.scoreboard strong { font-family: 'Lilita One', Impact, sans-serif; font-size: 25px; font-weight: 400; line-height: 1; }
.game-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 2 / 3;
  border: 5px solid var(--paper);
  border-radius: 5px;
  background: #98d7cc;
  box-shadow: 7px 8px 0 rgba(23, 58, 58, .13), 0 14px 34px rgba(30, 75, 67, .13);
}
canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; cursor: pointer; }
.frame-stamp { position: absolute; right: 12px; bottom: 11px; color: rgba(255, 250, 240, .78); font-size: 9px; font-weight: 800; pointer-events: none; }
.game-footer { min-height: 39px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 9px; }
kbd { padding: 4px 5px; border: 1px solid rgba(23, 58, 58, .25); border-radius: 3px; color: var(--ink); background: rgba(255, 250, 240, .45); font: inherit; }
.footer-divider { height: 12px; width: 1px; margin-inline: 3px; background: rgba(23, 58, 58, .25); }
.asset-credit { margin-left: auto; color: var(--muted); text-decoration: none; font-size: 8px; }
.asset-credit:hover { color: var(--coral); }
.page-footer { min-height: 43px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid rgba(23, 58, 58, .2); color: var(--muted); font-size: 9px; }
.footer-sun { color: var(--coral); font-size: 15px; animation: slow-spin 18s linear infinite; }

@keyframes rise-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slow-spin { to { transform: rotate(360deg); } }

@media (min-height: 900px) {
  .game-column { max-width: 410px; }
}

@media (max-width: 700px) {
  .page { width: min(100% - 32px, 440px); }
  .topbar { height: 65px; }
  .topbar-note { display: none; }
  .game-layout { display: flex; flex-direction: column; align-items: stretch; gap: 23px; padding: 25px 0 20px; }
  .intro { padding: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; column-gap: 10px; }
  .eyebrow { grid-column: 1 / -1; margin-bottom: 9px; font-size: 9px; }
  h1 { font-size: 43px; line-height: .9; }
  .intro-copy { margin: 0 0 2px; font-size: 10px; line-height: 1.55; }
  .best-score { display: none; }
  .game-column { max-width: 370px; }
  .game-topline { min-height: 32px; }
  .game-footer { min-height: 34px; font-size: 8px; gap: 6px; }
  .asset-credit { display: none; }
  .page-footer { min-height: 34px; font-size: 8px; }
}

@media (max-width: 380px) {
  .game-layout { padding-top: 19px; gap: 16px; }
  h1 { font-size: 37px; }
  .intro-copy { font-size: 9px; }
  .game-footer { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}