#halma-view { width: 100%; }
#halma-view [hidden] { display: none !important; }
.halma-options { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin-bottom: 20px; }
.halma-ai-options { display: grid; gap: 12px; margin: 16px 0; padding-top: 16px; border-top: 1px solid var(--border); }
#halma-ai-toggles { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); width: 100%; gap: 8px; }
#halma-ai-toggles .game-btn { min-width: 0; white-space: normal; line-height: 1.4; }
.halma-ai-options .gomoku-speed-label { justify-content: space-between; }
.halma-ai-options .gomoku-online-help { display: block; margin: 0; }
#halma-budget { display: block; line-height: 1.7; }
.halma-board { position: relative; width: 100%; aspect-ratio: 1.05; border: 1px solid var(--border); border-radius: 14px; background: var(--button-bg); box-sizing: border-box; overflow: hidden; touch-action: manipulation; }
.halma-grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.halma-edge { stroke: var(--border); stroke-width: .25; }
.halma-camp { opacity: .15; stroke: var(--muted); stroke-width: .3; }
.halma-trail { stroke: var(--accent-strong); stroke-width: .6; stroke-dasharray: 1 1; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.halma-cell, .halma-moving { position: absolute; width: 4.9%; aspect-ratio: 1; padding: 0; transform: translate(-50%, -50%); border-radius: 50%; box-sizing: border-box; }
.halma-cell { border: 1px solid var(--border); background: var(--camp-bg, var(--surface)); cursor: default; -webkit-tap-highlight-color: transparent; }
.halma-cell.occupied, .halma-moving { background: radial-gradient(circle at 32% 26%, #ffffff90, transparent 58%), var(--piece); border: 1px solid #0003; box-shadow: 0 2px 4px #0003; }
.halma-moving { z-index: 3; pointer-events: none; }
.halma-cell.selected { outline: 3px solid var(--accent-strong); outline-offset: 2px; }
.halma-cell.destination { background: color-mix(in srgb, var(--accent) 27%, var(--surface)); border: 2px dashed var(--accent-strong); }
.halma-cell.destination::after { content: ''; position: absolute; inset: 34%; border-radius: 50%; background: var(--accent-strong); }
.halma-cell.last:not(.selected) { outline: 1px solid var(--accent-strong); outline-offset: 2px; }
.halma-cell[aria-disabled="false"] { cursor: pointer; }
.halma-cell:focus-visible { outline: 3px solid var(--text); outline-offset: 2px; z-index: 2; }
#halma-side { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.halma-player { display: inline-flex; align-items: center; gap: 7px; }
.halma-player::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--piece); }
.halma-player.current { color: var(--text); font-weight: 650; text-decoration: underline; text-underline-offset: 5px; }
#halma-view .game-tips { line-height: 1.9; margin-top: 22px; }
#halma-detail { min-height: 24px; font-variant-numeric: tabular-nums; }
#halma-estimate-text { display: flex; flex-wrap: wrap; gap: 6px 16px; }
@media (max-width: 680px) { .halma-options { gap: 12px; } #halma-side { display: flex; margin-bottom: 12px; } }
