/* Chinese Checkers — a dimpled wooden star with glass marbles. The board is drawn on the canvas. */
.hm-col { padding: 2px 4px 6px; gap: 5px; }
.hm-wrap { direction: ltr; flex: 0 1 auto; width: 100%; max-width: 620px; aspect-ratio: 139 / 161; }
.hm-wrap canvas { cursor: pointer; touch-action: manipulation; }

.hm-status { gap: 8px; min-height: 28px; font-size: 0.97rem; line-height: 1.2; text-align: center; }
.hm-pip { flex: none; display: inline-block; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.hm-pip--a { background: radial-gradient(circle at 35% 30%, #D9FFF0, #2FB58F 45%, #0C4A3C); }
.hm-pip--b { background: radial-gradient(circle at 35% 30%, #FFE3D6, #E2553A 45%, #6E1B0C); }

/* marbles home: the race at a glance */
.hm-homes { direction: ltr; flex: none; display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; max-width: 640px; }
.hm-homes__label { margin: 0; font-size: 11px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist-dim); }
html[lang="ar"] .hm-homes__label { letter-spacing: 0; font-size: 12.5px; }
.hm-home { display: flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 12px; border: 1px solid transparent; font-size: 0.9rem; color: var(--mist); opacity: 0.75; transition: opacity 0.2s linear, border-color 0.2s linear; }
.hm-home.is-turn { opacity: 1; border-color: var(--hairline); background: rgba(234, 217, 168, 0.07); }
.hm-home b { font-size: 1.02rem; font-variant-numeric: tabular-nums; color: var(--parchment); }

/* the new-game panel */
.hm-opts { display: grid; gap: 10px; text-align: start; }
.hm-opts__label { margin: 0 0 5px; font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
html[lang="ar"] .hm-opts__label { letter-spacing: 0; font-size: 13px; }
.hm-opts .fa-seg { display: flex; width: 100%; border-radius: 16px; }
.hm-opts .fa-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 6px; border-radius: 13px; line-height: 1.15; }
.hm-note { margin: 10px 0 0; font-size: 0.86rem; font-style: italic; color: var(--mist); }

@media (max-width: 360px) {
  .hm-status { font-size: 0.9rem; min-height: 24px; }
  .hm-col { gap: 3px; padding-bottom: 4px; }
  .hm-home { padding: 3px 8px; font-size: 0.84rem; }
}
/* a phone on its side: the board keeps the full height, status and counters sit beside it */
@media (orientation: landscape) and (max-height: 500px) {
  .hm-col { flex-direction: row; gap: 10px; padding: 2px 12px; }
  .hm-wrap { flex: 0 0 auto; width: 50%; height: 100%; }
  .hm-status { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
  .hm-homes { flex: 1 1 0; min-width: 0; width: auto; flex-direction: column; gap: 4px; }
}
/* the long English name needs a little room next to the wins chip on narrow phones */
@media (max-width: 380px) { html[lang="en"] body[data-game="halma"] .fa-title { font-size: 1rem; letter-spacing: 0.01em; } }
