/* Hex keeps its two goals distinct through both colour and letter labels. */
.hex-widget { --hex-red: #a74740; --hex-blue: #306a97; --hex-red-tint: #f0d9d1; --hex-blue-tint: #d6e5ef; }
.hex-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin: 18px 0 12px; }
.hex-widget .hex-opponent { margin: 0; font: 13px/1.6 var(--sans); }
.hex-settings label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font: 13px/1.6 var(--sans); }
.hex-settings select { max-width: 100%; min-height: 44px; padding: 8px 26px 8px 10px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: var(--paper); font: 13px var(--sans); }
.hex-widget .hex-caption { margin: 12px 0; font: 13px/1.7 var(--sans); color: var(--muted); }
.hex-board { position: relative; width: 100%; max-width: 600px; margin: 20px auto 14px; isolation: isolate; }
.hex-board > svg, .hex-board > img { display: block; width: 100%; height: 100%; margin: 0; }
.hex-board > .hex-overlay { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.hex-outline { fill: var(--paper); stroke: var(--line); stroke-width: .035; }
.hex-red { --hex-cell-fill: var(--hex-red-tint); --hex-cell-ink: var(--hex-red); }
.hex-blue { --hex-cell-fill: var(--hex-blue-tint); --hex-cell-ink: var(--hex-blue); }
.hex-border { fill: none; stroke: var(--hex-cell-ink); stroke-width: .14; stroke-linecap: round; stroke-linejoin: round; }
.hex-board .hex-cell { position: absolute; display: grid; place-items: center; padding: 0; border: 0; border-radius: 0; min-height: 0; clip-path: polygon(50% 2%, 98% 26%, 98% 74%, 50% 98%, 2% 74%, 2% 26%); background: var(--hex-cell-fill, var(--paper)); color: var(--hex-cell-ink, var(--ink)); font: 13px var(--mono); z-index: 1; }
.hex-cell span { display: grid; place-items: center; width: 65%; aspect-ratio: 1; border-radius: 50%; }
.hex-cell:not(:disabled):hover { background: var(--tint); }
.hex-cell:focus-visible { outline: none; background: var(--tint); }
.hex-cell:focus-visible span { outline: 2px solid var(--green); outline-offset: 2px; }
.hex-cell.is-last span { border: 1px solid currentColor; }
.hex-cell.is-winner { background: var(--hex-cell-fill); }
.hex-board .hex-cell:disabled { opacity: 1; }
.hex-chain { fill: none; stroke: var(--ink); stroke-width: .08; stroke-dasharray: .16 .13; stroke-linecap: round; }
.hex-coast-stubs { fill: none; stroke: var(--muted); stroke-width: .05; }
.hex-coast { fill: none; stroke: var(--ink); stroke-width: .1; stroke-linecap: round; stroke-linejoin: round; }
.hex-walker { fill: var(--paper); stroke: var(--ink); stroke-width: .065; }
.hex-port-label { position: absolute; z-index: 4; transform: translate(-50%, 4px); pointer-events: none; color: var(--ink); font: 12px/1.5 var(--sans); }
.hex-port-north { transform: translate(-50%, calc(-100% - 4px)); }
.hex-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; font: 12px/1.6 var(--sans); }
.hex-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.hex-key { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--hex-cell-fill); color: var(--hex-cell-ink); font: normal 11px var(--mono); }
.hex-line-key { display: inline-block; width: 20px; border-top: 2px solid var(--ink); }
.hex-chain-key { border-top-style: dashed; }
.hex-widget .hex-status { min-height: 3.4em; margin: 16px 0; color: var(--green); font: 13px/1.7 var(--sans); }
.hex-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hex-actions button { min-height: 44px; }
.hex-secondary { padding: 9px 14px; border: 1px solid var(--green); border-radius: 3px; background: var(--paper); color: var(--green); font-size: 12px; }
.hex-secondary:hover { background: var(--tint); }
@media (max-width: 500px) {
  .hex-widget .hex-settings { gap: 10px 16px; }
  .hex-settings label { flex: 1 1 100%; justify-content: space-between; }
  .hex-board .hex-cell { font-size: 11px; }
}
