.drift-menu-overlay[hidden] {
  display: none !important;
}

.drift-menu-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 8, 12, .78);
  backdrop-filter: blur(8px);
}

.drift-menu-card {
  width: min(100%, 480px);
  max-height: calc(100% - 20px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #11161c;
}

.drift-menu-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.drift-menu-head h2 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -.04em;
}

.menu-close-button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.25rem;
  cursor: pointer;
}

.menu-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.menu-stat {
  padding: 13px 10px;
  border-right: 1px solid var(--line);
}

.menu-stat:last-child {
  border-right: 0;
}

.menu-stat span,
.menu-stat strong {
  display: block;
}

.menu-stat span {
  color: var(--muted);
  font-size: .66rem;
}

.menu-stat strong {
  margin-top: 3px;
  font-size: 1.35rem;
}

.menu-actions {
  display: grid;
  gap: 10px;
}

.menu-action {
  width: 100%;
  min-height: 50px;
}

.give-up-button {
  margin-top: 10px;
  border-color: #704242;
  background: #2a1719;
  color: #ffd2d2;
}

.menu-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.6;
}

.falling-bird {
  position: absolute;
  z-index: 18;
  width: 72px;
  height: 48px;
  pointer-events: none;
}

.falling-bird .bird-wing,
.falling-bird .bird-body {
  animation-play-state: paused;
}

.projectile {
  width: 42px;
  height: 7px;
}

.drift-menu-button {
  min-width: 120px;
  background: #fff;
  color: #111;
  border-color: #fff;
}

.drift-menu-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

body:has(.drift-menu-overlay:not([hidden])) .raft,
body:has(.drift-menu-overlay:not([hidden])) .wave,
body:has(.drift-menu-overlay:not([hidden])) .bird-wing {
  animation-play-state: paused;
}

@media (max-width: 620px) {
  .drift-menu-overlay {
    padding: 10px;
  }

  .drift-menu-card {
    padding: 18px;
  }

  .drift-menu-head h2 {
    font-size: 1.65rem;
  }

  .menu-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu-stat {
    padding: 11px 6px;
    text-align: center;
  }

  .menu-stat span {
    font-size: .58rem;
  }

  .menu-stat strong {
    font-size: 1.18rem;
  }

  .drift-menu-button {
    width: 100%;
  }
}
