/* Hasami Shogi — wooden shogi men on a kaya board. The board itself is drawn on the canvas. */
.hs-col { padding: 2px 6px 6px; gap: 6px; }
.hs-wrap { direction: ltr; flex: 0 1 auto; aspect-ratio: 1 / 1; max-width: 600px; }
.hs-wrap canvas { cursor: pointer; touch-action: manipulation; }

.hs-status { gap: 8px; min-height: 30px; font-size: 0.97rem; line-height: 1.2; text-align: center; }
/* a little shogi man: light points up, dark points down */
.hs-pip { flex: none; display: inline-block; width: 15px; height: 17px; clip-path: polygon(50% 0, 88% 24%, 100% 100%, 0 100%, 12% 24%); }
.hs-pip--a { background: linear-gradient(135deg, #FFF8E4, #E2C58C); }
.hs-pip--b { background: linear-gradient(135deg, #8A5540, #3A1D13); transform: rotate(180deg); box-shadow: inset 0 0 0 1.5px rgba(246, 166, 193, 0.5); }

/* men left on each side, and the quiet-turn countdown between them */
.hs-tally { direction: ltr; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; width: 100%; max-width: 600px; padding: 0 2px; }
.hs-side { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 6px 10px; border-radius: 12px; border: 1px solid transparent; opacity: 0.7; color: var(--mist); font-size: 0.9rem; transition: opacity 0.2s linear, border-color 0.2s linear; }
.hs-side span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hs-side:last-child { justify-content: flex-end; }
.hs-side.is-turn { opacity: 1; border-color: var(--hairline); background: rgba(246, 166, 193, 0.09); }
.hs-side b { font-size: 1.2rem; font-variant-numeric: tabular-nums; color: var(--parchment); }
.hs-quiet { margin: 0; min-width: 0; text-align: center; font-size: 12px; line-height: 1.2; color: var(--w-blossom); }

/* the new-game panel */
.hs-opts { display: grid; gap: 12px; text-align: start; }
.hs-opt { transition: opacity 0.2s linear; }
.hs-opt.is-off { opacity: 0.35; pointer-events: none; }
.hs-opt__label { margin: 0 0 5px; font-size: 12px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); }
html[lang="ar"] .hs-opt__label { letter-spacing: 0; font-size: 13px; }
.hs-opts .fa-seg { display: flex; width: 100%; border-radius: 16px; }
.hs-opts .fa-seg button { flex: 1 1 0; min-width: 0; min-height: 44px; padding: 4px 6px; border-radius: 13px; line-height: 1.15; }

@media (max-width: 360px) {
  .hs-status { font-size: 0.9rem; min-height: 26px; }
  .hs-col { gap: 4px; }
  .hs-side { padding: 4px 7px; gap: 6px; }
}
/* a phone on its side: status, board and tally sit in a row so the board keeps the full height */
@media (orientation: landscape) and (max-height: 500px) {
  .hs-col { flex-direction: row; gap: 14px; padding: 4px 12px; }
  .hs-wrap { flex: 0 0 auto; width: auto; height: 100%; }
  .hs-status { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
  .hs-tally { flex: 1 1 0; min-width: 0; width: auto; grid-template-columns: 1fr; }
  .hs-side:last-child { justify-content: flex-start; flex-direction: row-reverse; }
}
@media (prefers-reduced-motion: reduce) { .hs-side { transition: none; } }
