/* Nopal: a patchwork desert garden */
.np-col { gap: 6px; padding: 6px 8px; }
.np-board {
  --n: 7;
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  grid-template-rows: repeat(var(--n), 1fr);
  direction: ltr;
  width: 280px; height: 280px;
  padding: 3px;
  border-radius: 14px;
  background: #1B0829;
  box-shadow: 0 0 0 2px rgba(255, 182, 39, 0.55), 0 10px 28px rgba(0, 0, 0, 0.45);
  touch-action: none;
  -webkit-user-select: none; user-select: none;
}
.np-cell {
  position: relative;
  min-width: 0; min-height: 0;
  margin: 0; padding: 0;
  border: 0 solid #1B0829;
  border-radius: 4px;
  background: var(--c);
  background-image: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 55%);
  box-shadow: inset 0 0 0 1px rgba(27, 8, 41, 0.28);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}
.np-cell:focus-visible { outline: 3px solid #FFF3E0; outline-offset: -3px; z-index: 2; }
.np-p0 { --c: #E9805A; } .np-p1 { --c: #F4D58D; } .np-p2 { --c: #5CCFC0; } .np-p3 { --c: #FFB627; }
.np-p4 { --c: #F59AB5; } .np-p5 { --c: #B594E0; } .np-p6 { --c: #C5DE6E; } .np-p7 { --c: #86BDEB; }
.np-cell svg { position: absolute; left: 6%; top: 6%; width: 88%; height: 88%; pointer-events: none; overflow: visible; }
.np-cell .np-peb { left: 30%; top: 32%; width: 40%; height: 40%; }
.np-cell .np-cac { animation: np-pop 0.22s cubic-bezier(.3, 1.6, .5, 1); }
.np-cell.is-bad { box-shadow: inset 0 0 0 3px #E8452C, inset 0 0 14px 4px rgba(232, 69, 44, 0.75); }
.np-cell.is-bad .np-cac { animation: np-shake 0.3s; }
.np-fl { transform-box: fill-box; transform-origin: center; transform: scale(0); }
.np-cell.is-bloom .np-fl { animation: np-bloom 0.55s cubic-bezier(.3, 1.7, .5, 1) forwards; animation-delay: var(--d, 0s); }
.np-cell.is-bloom .np-fl + .np-fl { animation-delay: calc(var(--d, 0s) + 0.1s); }
.np-cell.is-bloom .np-fl + .np-fl + .np-fl { animation-delay: calc(var(--d, 0s) + 0.2s); }
.np-cell.is-bloom .np-cac { animation: np-sway 0.6s ease-in-out; animation-delay: var(--d, 0s); }
@keyframes np-pop { from { transform: scale(0.3); } to { transform: scale(1); } }
@keyframes np-shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
@keyframes np-bloom { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes np-sway { 30% { transform: scale(1.12) rotate(-4deg); } 65% { transform: scale(1.06) rotate(3deg); } }
#sub { min-height: 26px; font-size: 0.95rem; }
#sizes .fa-seg button { min-height: 38px; min-width: 56px; }
@media (max-height: 600px) { #sizes .fa-seg button { min-height: 34px; } #sub { min-height: 22px; } }
@media (prefers-reduced-motion: reduce) {
  .np-cell .np-cac, .np-cell.is-bad .np-cac, .np-cell.is-bloom .np-cac { animation: none; }
  .np-cell.is-bloom .np-fl { animation: none; transform: none; }
}
@media (max-width: 359px) { #solved-chip { display: none; } }
