/* Towers of Hanoi (wwwroot/js/hanoi.js): three pegs side by side, disks as coloured bars, a green arrow over the peg to reach. */
.hanoi-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; max-width: 560px; margin: 0 auto; }
.hn-peg { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 300px; padding: 0 4px 6px; border: 2px solid transparent; border-radius: 12px; background: #f8f9fa; cursor: pointer; }
.hn-peg:focus-visible { outline: 3px solid var(--bs-primary); outline-offset: 2px; }
.hn-selected { border-color: var(--bs-primary); background: #e7f1ff; }
.hn-hint-from { border-color: var(--bs-warning); }
.hn-hint-to { background: #fff3bf; }
.hn-target { position: absolute; top: 4px; left: 0; right: 0; text-align: center; color: #2f9e44; font-size: 1.4rem; visibility: hidden; }
.hn-goal .hn-target { visibility: visible; }
.hn-rod { position: absolute; bottom: 6px; top: 36px; width: 10px; border-radius: 5px 5px 0 0; background: #868e96; }
.hn-base { position: absolute; bottom: 0; left: 6px; right: 6px; height: 8px; border-radius: 4px; background: #495057; }
.hn-stack { position: relative; display: flex; flex-direction: column-reverse; align-items: center; width: 100%; margin-bottom: 8px; gap: 3px; }
.hn-disk { display: block; height: 26px; line-height: 26px; border-radius: 13px; color: #fff; font-weight: 800; font-size: .85rem; text-align: center; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .12s; }
.hn-lifted { transform: translateY(-18px); }
.hn-d0 { background: #e03131; } .hn-d1 { background: #f08c00; } .hn-d2 { background: #2f9e44; } .hn-d3 { background: #1c7ed6; }
.hn-d4 { background: #7048e8; } .hn-d5 { background: #d6336c; } .hn-d6 { background: #0c8599; }
@media (max-width: 480px) { .hn-peg { height: 260px; } .hn-disk { height: 22px; line-height: 22px; } }
