.duck-hunt-button {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 8;
  border: 2px solid #000;
  background: var(--startup);
  box-shadow: 5px 5px 0 #000;
  padding: 11px 14px;
  color: #000;
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.duck-hunt-button:hover,
.duck-hunt-button:focus-visible {
  outline: none;
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 #000;
}

.duck-hunt-overlay {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: none;
  background: rgba(5, 5, 5, 0.22);
}

.duck-hunt-overlay.open {
  display: block;
}

.duck-hunt-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 19;
  max-height: 88vh;
  overflow-y: auto;
  border: 3px solid #000;
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  background:
    linear-gradient(var(--grid-small) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-small) 1px, transparent 1px),
    var(--paper);
  background-size: 18px 18px;
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.24);
  padding: 10px 16px 22px;
  transform: translateY(105%);
  transition: transform 220ms ease;
}

.duck-hunt-panel.open {
  transform: translateY(0);
}

.duck-hunt-handle {
  width: 54px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.32);
}

.duck-hunt-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.duck-hunt-eyebrow {
  margin: 0 0 4px;
  color: var(--blue);
  border-bottom: 3px solid currentColor;
  display: inline-block;
  font-size: 13px;
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.duck-hunt-head h2 {
  margin: 0;
  color: var(--blue);
  font-size: clamp(34px, 10vw, 54px);
  line-height: 0.95;
  font-weight: var(--font-heavy);
}

.duck-hunt-close {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 4px 4px 0 #000;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  font-weight: var(--font-heavy);
}

.duck-hunt-copy {
  margin: 12px 0 14px;
  font-size: 17px;
  line-height: 1.35;
  font-weight: var(--font-book);
}

.duck-progress-card,
.duck-collection {
  border: 2px solid #000;
  background: rgba(255, 254, 248, 0.9);
  box-shadow: 5px 5px 0 #000;
  padding: 12px;
  margin-top: 14px;
}

.duck-progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--blue);
  font-size: 17px;
  font-weight: var(--font-medium);
}

.duck-progress-track {
  height: 14px;
  margin-top: 10px;
  border: 2px solid #000;
  background: #fff;
  overflow: hidden;
}

.duck-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--blue);
  transition: width 420ms ease;
}

.duck-collection h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
  font-weight: var(--font-heavy);
}

.duck-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.duck-card {
  border: 2px solid #000;
  background: #fff;
  min-height: 92px;
  padding: 8px 6px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.9);
  transition: transform 180ms ease;
}

.duck-card.just-found {
  animation: duck-pop 520ms ease;
}

.duck-card img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.duck-card-name {
  color: #000;
  text-align: center;
  font-size: 12px;
  line-height: 1.05;
  font-weight: var(--font-medium);
}

.duck-card.locked {
  color: rgba(0, 0, 0, 0.42);
  border-style: dashed;
  box-shadow: none;
  background: rgba(255, 255, 255, 0.58);
}

.duck-card.locked .duck-mystery {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.14);
  color: var(--blue);
  font-size: 28px;
  font-weight: var(--font-heavy);
}

.duck-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 86px;
  z-index: 30;
  display: none;
  border: 3px solid #000;
  background: var(--paper);
  box-shadow: 8px 8px 0 #000;
  padding: 14px;
  color: #000;
}

.duck-toast.show {
  display: block;
  animation: duck-slide 260ms ease;
}

.duck-toast strong {
  display: block;
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
  font-weight: var(--font-heavy);
}

.duck-toast p {
  margin: 6px 0 0;
  font-size: 17px;
  line-height: 1.25;
  font-weight: var(--font-book);
}

.duck-confetti {
  position: fixed;
  inset: 0;
  z-index: 29;
  pointer-events: none;
  overflow: hidden;
}

.duck-confetti span {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 18px;
  background: var(--blue);
  animation: duck-confetti 1200ms ease-in forwards;
}

@keyframes duck-pop {
  0% {
    transform: scale(0.92) rotate(-2deg);
  }
  55% {
    transform: scale(1.08) rotate(2deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

@keyframes duck-slide {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes duck-confetti {
  to {
    transform: translateY(110vh) rotate(280deg);
    opacity: 0.2;
  }
}

@media (min-width: 760px) {
  .duck-hunt-panel {
    left: auto;
    width: min(430px, 92vw);
    border-left: 3px solid #000;
  }
}

@media (max-width: 380px) {
  .duck-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .duck-hunt-button {
    right: 8px;
    bottom: 8px;
    min-height: 44px;
    padding: 9px 12px;
    box-shadow: 4px 4px 0 #000;
  }
}
