/* Nine Men's Morris — a board scratched into grey stone, ivory and vermilion men. The board is drawn on the canvas. */
.mr-col { padding: 2px 6px 6px; gap: 6px; }
.mr-wrap { direction: ltr; flex: 0 1 auto; aspect-ratio: 1 / 1; max-width: 600px; }
.mr-wrap canvas { cursor: pointer; touch-action: manipulation; }

.mr-status { gap: 8px; min-height: 30px; font-size: 0.97rem; line-height: 1.2; text-align: center; }
.mr-pip { flex: none; display: inline-block; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.mr-pip--a { background: radial-gradient(circle at 35% 30%, #FFFDF2, #EAD9A8 55%, #9C8752); }
.mr-pip--b { background: radial-gradient(circle at 35% 30%, #FF9C80, #E2553A 55%, #7E2414); }

/* nine men for each side: solid on the board, ringed while still in hand, dark once taken */
.mr-sides { direction: ltr; flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 600px; padding: 0 2px; }
.mr-side { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 9px; border-radius: 12px; border: 1px solid transparent; opacity: 0.7; transition: opacity 0.2s linear, border-color 0.2s linear; }
.mr-side.is-turn { opacity: 1; border-color: var(--hairline); background: rgba(234, 217, 168, 0.07); }
.mr-side b { min-width: 1em; text-align: end; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--parchment); }
.mr-dots { display: flex; flex: 1 1 auto; gap: 3px; min-width: 0; }
.mr-dot { flex: 0 1 12px; aspect-ratio: 1 / 1; max-width: 12px; border-radius: 50%; box-sizing: border-box; }
.mr-dot--a { background: var(--w-ivory); }
.mr-dot--b { background: var(--w-vermilion); }
.mr-dot.is-hand { background: transparent; border: 2px solid var(--w-ivory); }
.mr-dot--b.is-hand { border-color: var(--w-vermilion); }
.mr-dot.is-lost { background: var(--lapis-deep); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }

/* the new-game panel */
.mr-opts { display: grid; gap: 12px; text-align: start; }
.mr-opt { transition: opacity 0.2s linear; }
.mr-opt.is-off { opacity: 0.35; pointer-events: none; }
.mr-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"] .mr-opt__label { letter-spacing: 0; font-size: 13px; }
.mr-opts .fa-seg { display: flex; width: 100%; border-radius: 16px; }
.mr-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) {
  .mr-status { font-size: 0.9rem; min-height: 26px; }
  .mr-col { gap: 4px; }
  .mr-side { padding: 5px 6px; gap: 4px; }
  .mr-dots { gap: 2px; }
}
/* a phone on its side: status, board and counters sit in a row so the board keeps the full height */
@media (orientation: landscape) and (max-height: 500px) {
  .mr-col { flex-direction: row; gap: 14px; padding: 4px 12px; }
  .mr-wrap { flex: 0 0 auto; width: auto; height: 100%; }
  .mr-status { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
  .mr-sides { flex: 1 1 0; min-width: 0; width: auto; grid-template-columns: 1fr; gap: 6px; }
}
/* a long name: let it fit the bar on a phone */
body[data-game="morris"] .fa-title { font-size: clamp(0.92rem, 4.3vw, 1.35rem); letter-spacing: 0.02em; }
