.table { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; margin: auto; }
.turn-hud {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: min(100%, 720px);
    height: 32px;
    margin: 0;
    color: #28232d;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-variant-numeric: tabular-nums;
}
.turn-hud--right { margin-bottom: 16px; }
.turn-hud--left { margin-top: 16px; }
.board-stack { display: grid; flex: 0 0 auto; grid-template-rows: auto auto auto; justify-items: center; width: 100%; min-height: 0; }
.turn-hud__value { text-decoration: none; text-decoration-thickness: .125rem; text-underline-offset: .25rem; }
.turn-hud__value--active, .turn-hud__value--winner { font-weight: 700; }
.turn-hud__value--active { text-decoration: underline; }
.board { display: grid; flex: 0 0 auto; width: min(100%, 56vh, 600px); }
.board-cell { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.board-cell--nihil { z-index: 1; }
.board-cell--gate { z-index: 2; }
.cell-art, .gate-art, .nihil-art { position: absolute; top: 50%; left: 50%; width: 106.666%; transform: translate(-50%, -50%); pointer-events: none; }
.gate-art { width: 123.33%; z-index: 1; }
.nihil-art { width: 150%; z-index: 1; }
.gate-art--blue { transform: translate(-50%, -50%) rotate(180deg); filter: hue-rotate(210deg); }
.token { position: relative; z-index: 4; display: block; width: 80.897%; aspect-ratio: 1; }
.token img { position: absolute; }
.token-frame { position: absolute; inset: 0; width: 100%; height: 100%; }
.token-frame__body { fill: #fff; stroke: #151515; stroke-width: 49.72; stroke-miterlimit: 22.9256; }
.token--selected .token-frame__body { stroke: #f00; }
.token--blue.token--selected .token-frame__body { stroke: #0088ff; }
.token-symbol { width: 49%; height: 49%; left: 25.5%; top: 35%; }
.token--blue { transform: rotate(180deg); }
.token--blue .token-symbol { filter: hue-rotate(210deg); }
.token-dots { position: absolute; top: 22%; left: 0; display: flex; justify-content: center; gap: 5%; width: 100%; }
.token-dots i { width: 7%; aspect-ratio: 1; background: red; border-radius: 50%; }
.token--blue .token-dots i { background: #0088ff; }
.card-tray { display: flex; justify-content: center; align-items: center; gap: 16px; min-height: 92px; }
.card { width: clamp(62px, 10vh, 108px); aspect-ratio: 756 / 890; padding: 0; border: 0; border-radius: 4px; box-shadow: inset 0 0 0 var(--piece-outline-width, 2px) #151515; background: #fff; cursor: pointer; }
.card--selected { outline: 3px solid #f00; outline-offset: 2px; }
.card--blue.card--selected { outline-color: #0088ff; }
.card--locked { opacity: .45; }
.card--disabled { cursor: default; }
.card-face { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.card--blue .card-face { transform: rotate(180deg); }
.card-art { position: absolute; left: -4.894%; top: -14.719%; width: 109.836%; height: 144.706%; max-width: none; }
.card-art--arrow-only { clip-path: inset(0 0 73% 0); }
.card-dots, .legacy-grid { position: absolute; top: 26.405%; left: 13.095%; width: 73.545%; height: 62.472%; display: grid; }
.dot-cell { display: grid; place-items: center; position: relative; }
.dot-cell img, .dot-cell i { width: 37%; aspect-ratio: 1; }
.dot-cell i { position: absolute; border-radius: 50%; background: #f00; }
.card--blue .dot-cell i { background: #0088ff; }
.legacy-grid { grid-template-rows: repeat(5, 1fr); border-top: 1px solid #111; border-left: 1px solid #111; }
.legacy-grid span { border-right: 1px solid #111; border-bottom: 1px solid #111; }
.move-hint { position: absolute; z-index: 4; inset: 0; margin: 8px; border: .140625rem solid currentColor; border-radius: 50%; opacity: .88; pointer-events: none; }
.move-hint--move { color: #080; background: #0806; }
.move-hint--capture { color: #f00; background: #f006; }
.saved-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.saved-row span { flex: 1; overflow-wrap: anywhere; }
@media (min-width: 950px) and (min-height: 550px) {
    .table { flex-direction: row; justify-content: center; }
    .board-stack { order: 1; width: min(53vw, 72vh, 650px); }
    .board { width: 100%; }
    .card-tray { width: min(20vw, 250px); flex-wrap: wrap; }
    .card-tray--red { order: 0; }
    .card-tray--blue { order: 2; }
}

@media (min-width: 1240px) {
    .turn-hud--right, .turn-hud--left { display: none; }
}

.board-cell[data-navigation-cursor]:focus,
.card[data-navigation-cursor]:focus {
    position: relative;
    z-index: 3;
    outline: none;
}

.board-cell[data-navigation-cursor]:focus::after,
.card[data-navigation-cursor]:focus::after {
    content: '';
    position: absolute;
    z-index: 3;
    inset: 0;
    border: .140625rem solid #808;
    background: #8086;
    opacity: .88;
    pointer-events: none;
}

.board-cell[data-navigation-cursor]:focus .token,
.card[data-navigation-cursor]:focus .card-face { z-index: 4; }
