body {
  padding: var(--page-top) 24px 24px;
  max-width: 720px;
  margin: 0 auto;
}

.find-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0 0 4px;
  text-align: center;
}
.find-blurb {
  font-size: 14px;
  color: #666;
  margin: 0 0 20px;
  text-align: center;
}
.find-random {
  display: block;
  margin: 0 auto 24px;
  background: #1c1c1c;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 22px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.find-random:hover {
  background: #333;
}
.chooser-section {
  margin-bottom: 24px;
}
.chooser-section h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #999;
  margin: 0 0 10px;
  font-weight: 600;
}
.chooser-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.find-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: #1c1c1c;
  text-decoration: none;
  font-size: 14px;
}
.find-pill:hover {
  background: #f0f0f0;
}
.find-pill-count {
  color: #999;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.find-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.find-cat {
  font-size: 22px;
  font-weight: 600;
  color: #1c1c1c;
  flex: 1;
}
.find-count {
  font-size: 14px;
  color: #666;
}
.find-time {
  font-size: 14px;
  color: #666;
}
.find-input-wrap {
  position: relative;
  margin-bottom: 12px;
}
.find-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
  font-size: 16px;
  background: #fff;
}
.find-input:focus {
  outline: none;
  border-color: #1c1c1c;
}
.find-input.wrong {
  border-color: #c5302d;
  background: #fff5f5;
}
.find-input.shake {
  animation: find-shake 200ms ease;
}
@keyframes find-shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}
.find-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  list-style: none;
  padding: 4px 0;
  margin: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  max-height: 280px;
  overflow-y: auto;
  z-index: 10;
}
.find-suggestions li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  cursor: pointer;
}
.find-suggestions li.selected,
.find-suggestions li:hover {
  background: #f0f0f0;
}
.find-suggestions span {
  font-size: 14px;
}
.find-found,
.find-missed {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.find-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid #ddd;
  overflow: hidden;
  cursor: zoom-in;
}
.find-tile img {
  width: 100%;
  height: 100%;
  display: block;
}
.find-tile::after {
  content: attr(data-name);
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c1c;
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 80ms;
  z-index: 10;
}
.find-tile:hover::after {
  opacity: 1;
}
.find-found .find-tile {
  animation: find-tile-in 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes find-tile-in {
  0%   { transform: scale(0.6); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.missed-title {
  font-size: 14px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin: 24px 0 12px;
  text-align: left;
}
.find-missed {
  text-align: left;
}
.result-links {
  margin: 24px 0 0;
}
.result-links a {
  text-decoration: none;
  margin: 0 6px;
}
.result-links a:hover {
  text-decoration: underline;
}
