/* Kōnane — a carved koa board with lava and coral stones. The board itself is drawn on the canvas. */
.kn-col { padding: 2px 6px 6px; gap: 6px; }
.kn-wrap { direction: ltr; flex: 0 1 auto; aspect-ratio: 1 / 1; max-width: 600px; }
.kn-wrap canvas { cursor: pointer; touch-action: manipulation; }

.kn-status { gap: 8px; min-height: 30px; font-size: 0.97rem; line-height: 1.2; text-align: center; }
.kn-pip { flex: none; display: inline-block; width: 15px; height: 15px; border-radius: 50%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.kn-pip--a { background: radial-gradient(circle at 35% 30%, #77706B, #2B2623 55%, #0C0A09); }
.kn-pip--b { background: radial-gradient(circle at 35% 30%, #FFFFFF, #EFE6D2 55%, #B5A27C); }

/* moves left: one bar for each side, because mobility is the whole game */
.kn-meters { direction: ltr; flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 14px; width: 100%; max-width: 600px; padding: 0 4px; }
.kn-meters__label { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 11px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mist-dim); }
html[lang="ar"] .kn-meters__label { letter-spacing: 0; font-size: 12.5px; }
.kn-meter { display: flex; align-items: center; gap: 8px; padding: 5px 9px; border-radius: 12px; border: 1px solid transparent; opacity: 0.72; transition: opacity 0.2s linear, border-color 0.2s linear; }
.kn-meter.is-turn { opacity: 1; border-color: var(--hairline); background: rgba(234, 217, 168, 0.07); }
.kn-meter b { min-width: 1.4em; text-align: end; font-size: 1.05rem; font-variant-numeric: tabular-nums; color: var(--parchment); }
.kn-bar { flex: 1 1 auto; height: 9px; border-radius: 5px; background: var(--lapis-deep); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.kn-bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, var(--w-bronze), var(--gold)); transition: width 0.35s ease, background-color 0.2s linear; }
.kn-meter.is-low .kn-bar i { background: var(--w-vermilion); }

/* the new-game panel */
.kn-opts { display: grid; gap: 12px; text-align: start; }
.kn-opt { transition: opacity 0.2s linear; }
.kn-opt.is-off { opacity: 0.35; pointer-events: none; }
.kn-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"] .kn-opt__label { letter-spacing: 0; font-size: 13px; }
.kn-opts .fa-seg { display: flex; width: 100%; border-radius: 16px; }
.kn-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) {
  .kn-status { font-size: 0.9rem; min-height: 26px; }
  .kn-col { gap: 4px; }
  .kn-meter { padding: 4px 7px; gap: 6px; }
}
/* a phone on its side: status, board and meters sit in a row so the board keeps the full height */
@media (orientation: landscape) and (max-height: 500px) {
  .kn-col { flex-direction: row; gap: 14px; padding: 4px 12px; }
  .kn-wrap { flex: 0 0 auto; width: auto; height: 100%; }
  .kn-status { flex: 1 1 0; min-width: 0; flex-wrap: wrap; }
  .kn-meters { flex: 1 1 0; min-width: 0; width: auto; grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .kn-bar i { transition: none; } }
