/* Light Chase board: each light is a two-sided tile that turns in 3D. */
.pattern-icon { width: 62px; height: 62px; flex-shrink: 0; }
.pattern-icon rect { fill: #2b3e48; stroke: #53707e; stroke-width: .8; }
.pattern-icon rect.is-hit { fill: #e8d7a3; stroke: #ffefbe; }
.pattern-icon rect.is-tap { stroke: #f0d78c; stroke-width: 2; }

.lc-board { --size: 3; display: grid; grid-template-columns: repeat(var(--size), minmax(0, 1fr)); gap: clamp(6px, 1.6vw, 10px); width: min(100%, calc(var(--size) * 76px)); margin: 0 auto; }
.lc-cell { position: relative; aspect-ratio: 1; padding: 0; border: 0; background: none; perspective: 520px; border-radius: 12px; touch-action: manipulation; }
.lc-cell:focus-visible { outline: 2px solid var(--game-gold); outline-offset: 4px; }
.lc-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .62s cubic-bezier(.25, .8, .25, 1); }
.lc-face { position: absolute; inset: 0; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: grid; place-items: center; }
.lc-face.off { background: radial-gradient(circle at 50% 40%, #324a56, #283a43 70%); border: 1px solid #597583; box-shadow: inset 0 1px 1px #ffffff08; }
.lc-face.on { transform: rotateY(180deg); background: radial-gradient(circle at 50% 38%, #fff6c9, #e8d7a3 55%, #d6c07c); border: 1px solid #ffefbe; box-shadow: 0 0 20px #ecd2823a, inset 0 -3px 6px #b8a05a40; }
.lc-face.on::after { content: ''; width: 34%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, #fffbf0, #fff2c900 70%); }
.lc-cell:hover .lc-face.off { border-color: #869da8; }
.lc-cell:hover .lc-face.on { border-color: #fff; }
.lc-cell.is-hint::before { content: ''; position: absolute; inset: -5px; border: 2px dashed #f3d783; border-radius: 15px; z-index: 2; pointer-events: none; animation: lc-hint 1.4s ease-in-out infinite; }
.lc-ripple { position: absolute; inset: 0; border-radius: 12px; border: 2px solid #f0d78c; pointer-events: none; z-index: 3; animation: lc-ripple .6s ease-out forwards; }
.lc-board.is-solved .lc-face.off { animation: lc-glow 1.2s ease-in-out both; animation-delay: var(--wave, 0ms); }
.lc-board.no-anim .lc-flip { transition: none; }

@keyframes lc-ripple { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes lc-hint { 50% { opacity: .35; } }
@keyframes lc-glow { 40% { background: #d6cfbf; border-color: #f4dc92; box-shadow: 0 0 16px #f4dc9255; } }

.chase-table { border-collapse: collapse; margin: 6px 0 14px; font-variant-numeric: tabular-nums; }
.chase-table th, .chase-table td { border: 1px solid #d6cfbf; padding: 5px 12px; text-align: center; font-size: .9375rem; color: #4b5b63; }
.chase-table th { font-weight: 600; font-size: .8125rem; color: #7d5a10; }
.chase-table td { letter-spacing: .12em; }

@media (prefers-reduced-motion: reduce) {
  .lc-flip { transition: none; }
  .lc-ripple, .lc-cell.is-hint::before, .lc-board.is-solved .lc-face.off { animation: none; }
}
