/* Pixel Logic extras on top of ../assets/site.css */
#board { cursor: pointer; }
#board-wrap { aspect-ratio: auto; max-width: 520px; }

.pct-track {
  display: block; height: 6px; margin: 4px 6px 2px;
  border-radius: 99px; background: var(--line); overflow: hidden;
}
.pct-bar {
  display: block; height: 100%; width: 0;
  border-radius: 99px;
  background: var(--brand-grad);
  transition: width .35s ease;
}

/* Fill / Cross out switch */
.modes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  max-width: 340px; margin: 18px auto 0; padding: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.mode {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; border: 0; border-radius: 13px;
  background: transparent; color: var(--muted);
  font: inherit; font-weight: 900; font-size: 16px; cursor: pointer;
  transition: background .15s, color .15s, transform .1s;
  touch-action: manipulation;
}
.mode:hover:not(.on) { background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--ink); }
.mode:active { transform: scale(.97); }
.mode:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.mode.on { background: var(--brand-grad); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 40%, transparent); }
.mode-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 15px; line-height: 1; }
.mode-ico.fill { background: currentColor; }
.mode-ico.cross { border: 2px solid currentColor; font-size: 12px; }

#mistakes.bad { color: #ff3b5c; }
.board-wrap.oops .board { animation: oops .32s ease; }
@keyframes oops {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-3px); }
}
@media (prefers-reduced-motion: reduce) { .board-wrap.oops .board { animation: none; } }

/* "It's a ...!" label after solving */
.reveal {
  position: absolute; left: 50%; bottom: -30px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  font-weight: 900; font-size: 17px; white-space: nowrap; z-index: 2;
  animation: reveal-in .5s cubic-bezier(.2,1.4,.4,1) both;
}
.reveal-emoji { font-size: 22px; }
.board-wrap:has(.reveal:not([hidden])) { margin-bottom: 34px; }
@keyframes reveal-in { from { opacity: 0; transform: translate(-50%, 12px) scale(.8); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@media (prefers-reduced-motion: reduce) { .reveal { animation: none; } }
