.hc-menu h2 {
  margin-bottom: 16px;
}

.hc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 780px;
  margin: 0 auto 8px;
}

.hc-card.kg-card {
  min-width: 0;
  padding: 6px 6px 12px;
  overflow: hidden;
  background: #fffaf0;
  border-color: #e8d9bc;
}

.hc-card:hover {
  border-color: #b7772b;
}

.hc-card__art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 42%;
  background: #fff;
  border-radius: 12px;
}

.hc-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 205px;
  align-items: start;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto;
}

.hc-toolbar {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e8d9bc;
  border-radius: 16px;
  background: #fffaef;
}

.hc-count-group {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 8px;
  align-items: center;
  width: 100%;
  color: #503618;
  text-align: left;
}

.hc-count-label {
  font-size: 14px;
}

.hc-count {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.hc-meter {
  grid-column: 1 / -1;
  width: 100%;
  height: 8px;
  accent-color: #b85a19;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #f0e2cb;
}

.hc-meter::-webkit-progress-bar { background: #f0e2cb; }
.hc-meter::-webkit-progress-value { background: #b85a19; }
.hc-meter::-moz-progress-bar { background: #b85a19; }

.hc-hint.kg-btn {
  background: #fff0c9;
  border-color: #e8ca7e;
  color: #563716;
}

.hc-hint:not(:disabled):hover { background: #ffe6a5; }
.hc-hint:disabled { cursor: default; opacity: .58; }

.hc-status {
  width: 100%;
  min-height: 2.8em;
  margin: 0;
  color: #584833;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.hc-board {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid #daccb4;
  border-radius: 16px;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.hc-board__art {
  display: block;
  width: 100%;
  height: auto;
}

.hc-target {
  position: absolute;
  width: max(40px, var(--cat-width));
  height: max(40px, var(--cat-height));
  padding: 0;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  background: transparent;
  visibility: hidden;
  touch-action: manipulation;
}

.hc-board--ready .hc-target { visibility: visible; }

.hc-target:focus-visible {
  z-index: 2;
  outline: 3px solid #1859a2;
  outline-offset: 1px;
}

.hc-target--found {
  cursor: default;
  box-shadow: inset 0 0 0 2px #bd4c15;
  background: radial-gradient(ellipse, #ffc061b8, #ffa43666 66%, #f3962a22);
  mix-blend-mode: multiply;
}

.hc-target--found::after {
  content: '✓';
  content: '✓' / '';
  position: absolute;
  top: -5px;
  right: -5px;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #a34316;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.hc-target--hint {
  z-index: 1;
  border: 3px dashed #1859a2;
  box-shadow: 0 0 0 5px #65bcff75;
  animation: hc-hint-pulse .75s ease-in-out infinite alternate;
}

.hc-miss {
  position: absolute;
  width: 26px;
  height: 26px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  border: 2px solid #746956;
  border-radius: 50%;
  animation: hc-miss .55s ease-out forwards;
}

@keyframes hc-miss {
  to { transform: translate(-50%, -50%) scale(1.6); opacity: 0; }
}

@keyframes hc-hint-pulse {
  to { box-shadow: 0 0 0 9px #65bcff40; }
}

@media (min-width: 641px) {
  .hc-toolbar { position: sticky; top: calc(var(--header-h, 0px) + 12px); }
}

@media (max-width: 640px) {
  .hc-screen { grid-template-columns: minmax(0, 1fr); max-width: 420px; gap: 8px; }
  .hc-toolbar { grid-column: 1; justify-content: space-between; padding: 6px 10px; gap: 4px 12px; }
  .hc-count-group { flex: 1 1 140px; }
  .hc-status { min-height: 2.8em; text-align: left; }
  .hc-board { grid-row: 2; }
}

@media (max-width: 460px) {
  .hc-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 380px; gap: 8px; }
  .hc-card.kg-card { padding: 5px 5px 9px; }
  .hc-card .kg-card__name { font-size: 15px; }
}
