/* Whitelist page: the barn-guarding game and the application form. */

.wl-hero { padding-bottom: 90px; grid-template-areas: "pitch"; grid-template-columns: minmax(0, 1fr); }
.wl-hero h1 { max-width: 16ch; }
.wl-count { margin: 0; font: 700 18px var(--display); }

main.wl .wl-game { grid-column: 1; grid-row: span 2; }

.hud {
  display: flex;
  justify-content: space-between;
  font: 700 20px var(--display);
  margin-bottom: 10px;
}

/* 3×3 pens; a sheep or a wolf pops up in one */
.pens {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: var(--grass);
  border: var(--line);
  border-radius: 4px;
  margin-bottom: 12px;
  touch-action: manipulation;
  user-select: none;
}
.pen {
  aspect-ratio: 1;
  border: 3px solid var(--grass-dark);
  border-radius: 8px;
  background: #8cbf62 radial-gradient(circle at 50% 78%, #5d8f3d 0 34%, transparent 35%);
  padding: 6px;
  cursor: pointer;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.pen img {
  width: 92%;
  image-rendering: pixelated;
  transform: translateY(110%);
  transition: transform .12s ease-out;
  pointer-events: none;
}
.pen.up img { transform: translateY(0); }
.pen.hit { background-color: #e0a526; }
.pen.miss { background-color: #c96a5c; animation: shake .25s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.gamemsg { min-height: 1.5em; margin: 0 0 12px; font-weight: 600; }
.gamemsg.ok { color: var(--grass-dark); }
.gamemsg.bad { color: var(--barn); }

/* forms */
#form, #done { display: grid; gap: 6px; }
#form label, #done label { font-weight: 600; font-size: 14px; margin-top: 6px; }
#form input, #done input, .checkrow input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
  font: 500 15px var(--body);
}
#form .btn.primary { margin-top: 12px; }
.formmsg { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }
.formmsg.bad { color: var(--barn); }
.refnote { margin: 6px 0 0; font-size: 14px; color: var(--grass-dark); font-weight: 600; }

.points { font: 700 22px var(--display); margin: 0 0 6px; }
.linkrow, .checkrow { display: flex; gap: 8px; }
.linkrow input { flex: 1; min-width: 0; font-size: 14px; }
a.btn.share { margin-top: 12px; justify-self: start; }

@media (max-width: 860px) {
  main.wl .wl-game { grid-row: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pen img { transition: none; }
  .pen.miss { animation: none; }
}

/* sections toggled with the hidden attribute (display: grid above would override it) */
.wl [hidden] { display: none !important; }
main.wl .board { align-self: start; }
.linkrow .btn, .checkrow .btn { flex: none; white-space: nowrap; }
