/* Battleship Solitaire */
.bs { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.bs-loading { padding: 60px 10px; text-align: center; font-weight: 800; opacity: .85; }
.bs-bar { display: flex; align-items: center; gap: 12px; width: min(560px, 100%); justify-content: space-between; }
.bs-time, .bs-title { font-weight: 800; font-variant-numeric: tabular-nums; }
.bs-board { --n: 8; display: grid; grid-template-columns: 30px repeat(var(--n), 1fr); gap: 3px; width: min(560px, 100%); padding: 10px; border-radius: 16px;
  background: linear-gradient(160deg, #0b3a66, #0a2742); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.bs-corner { width: 30px; }
.bs-num { display: flex; align-items: center; justify-content: center; font: 900 17px system-ui, sans-serif; color: #e0f2fe; min-height: 28px; border-radius: 6px; transition: background .2s, color .2s; }
.bs-num.is-done { color: #86efac; background: rgba(34, 197, 94, .12); }
.bs-num.is-over { color: #fca5a5; background: rgba(239, 68, 68, .15); }
.bs-cell { position: relative; aspect-ratio: 1; border: 0; border-radius: 6px; cursor: pointer; padding: 0; background: rgba(255, 255, 255, .1); transition: background .15s, transform .1s; }
.bs-cell:hover { background: rgba(255, 255, 255, .2); }
.bs-cell:active { transform: scale(.94); }
.bs-cell:focus-visible { outline: 3px solid #fde047; outline-offset: 1px; z-index: 1; }
.bs-cell.is-water { background: radial-gradient(circle at 30% 30%, #7dd3fc, #0284c7); }
.bs-cell.is-water::after { content: "〰"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, .7); font-size: 60%; font-weight: 900; }
.bs-cell.is-ship { background: rgba(255, 255, 255, .1); }
.bs-cell i { position: absolute; inset: 12%; background: linear-gradient(160deg, #e2e8f0, #64748b); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.bs-cell .bs-sq { border-radius: 3px; }
.bs-cell .bs-sub { border-radius: 50%; }
.bs-cell .bs-mid { inset: 12% 0; } .bs-cell .bs-mid { border-radius: 0; }
.bs-cell .bs-end-l { inset: 12% 0 12% 12%; border-radius: 50% 0 0 50%; }
.bs-cell .bs-end-r { inset: 12% 12% 12% 0; border-radius: 0 50% 50% 0; }
.bs-cell .bs-end-u { inset: 12% 12% 0 12%; border-radius: 50% 50% 0 0; }
.bs-cell .bs-end-d { inset: 0 12% 12% 12%; border-radius: 0 0 50% 50%; }
.bs-cell.is-given { box-shadow: inset 0 0 0 2px #fde047; cursor: default; }
.bs-cell.is-wrong { box-shadow: inset 0 0 0 3px #ef4444; background: rgba(239, 68, 68, .35); }
.bs-cell.is-hint { animation: bs-hint 1.2s ease-out; }
@keyframes bs-hint { 0% { box-shadow: 0 0 0 0 #fde047; } 50% { box-shadow: 0 0 0 6px rgba(253, 224, 71, .6); } }
.bs-board.is-won { animation: bs-won .8s ease-out; }
@keyframes bs-won { 40% { transform: scale(1.02); box-shadow: 0 0 30px #38bdf8; } }
.bs-fleet { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bs-ship { display: inline-flex; gap: 2px; padding: 3px; border-radius: 6px; background: var(--color-bg-alt, #1c1f27); opacity: .55; }
.bs-ship i { width: 14px; height: 14px; border-radius: 3px; background: #64748b; }
.bs-ship.is-found { opacity: 1; box-shadow: 0 0 0 2px #22c55e; }
.bs-ship.is-found i { background: #22c55e; }
.bs-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.bs-actions .btn { padding: 8px 12px; font-size: 14px; }
.bs-msg { min-height: 28px; text-align: center; font-weight: 700; opacity: 0; transition: opacity .2s; }
.bs-msg.is-on { opacity: 1; }
.bs-msg .btn { margin-left: 8px; padding: 6px 12px; }
.bs-setup-help { margin-top: 14px; font-size: 13px; line-height: 1.5; opacity: .9; }
@media (max-width: 480px) { .bs-board { gap: 2px; padding: 6px; grid-template-columns: 22px repeat(var(--n), 1fr); } .bs-num { font-size: 13px; } .bs-corner { width: 22px; } }
@media (prefers-reduced-motion: reduce) { .bs-cell.is-hint, .bs-board.is-won { animation: none; } }
