.app-shell { overflow-y: auto; }
.game-preview { display: flex; flex: 1 0 auto; flex-direction: column; align-items: center; gap: 16px; width: 100%; margin: 0 auto; }
.board-stack { display: grid; flex: 0 0 auto; grid-template-rows: auto auto auto; justify-items: center; width: 100%; min-height: 0; }
.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; }
.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; }
.tray { display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; gap: 8px; width: min(100%, 720px); min-height: 72px; }
.tray button { position: relative; flex: 0 0 calc(var(--cell-width, 52px) * 0.78256); width: calc(var(--cell-width, 52px) * 0.78256); aspect-ratio: 902.18 / 1018.48; border: 0; padding: 0; background: transparent; cursor: pointer; }
.board { position: relative; width: min(100%, 720px); aspect-ratio: 9 / 8.0829; }
.board-cell { position: absolute; width: 11.1111%; height: 14.2857%; border: 0; padding: 0; background: transparent; cursor: pointer; overflow: visible; touch-action: manipulation; }
.cell-graphic { position: absolute; left: 50%; top: 50%; width: 102.993%; height: auto; transform: translate(-50%, -50%); pointer-events: none; }
.game-piece { position: absolute; z-index: 4; inset: 7.7%; pointer-events: none; }
.game-piece:not(.block):not(.pylon) { inset: auto; top: 50%; left: 50%; width: 78.256%; height: 76.5027%; transform: translate(-50%, -50%); }
.game-piece img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; }
.game-piece .symbol { inset: 30%; width: 40%; height: 40%; }
.game-piece.blue img { filter: hue-rotate(210deg); }
.game-piece.pylon img { filter: brightness(0); }
.game-piece.block, .game-piece.pylon { inset: 9%; }
.tray .game-piece:not(.block):not(.pylon) { inset: 0; width: 100%; height: 100%; transform: none; }
.tray button.tray-button--block { flex-basis: calc(var(--cell-width, 52px) * 0.82); width: calc(var(--cell-width, 52px) * 0.82); aspect-ratio: 0.8660254; }
.tray .game-piece.block { inset: 0; }
.game-piece.block.blue img { filter: hue-rotate(210deg); }
.game-piece.selected > img:first-child { filter: url(#selected-outline); }
.game-piece.selected.blue > img:first-child { filter: url(#selected-outline) hue-rotate(210deg); }
.move-hint { position: absolute; z-index: 5; top: 50%; left: 50%; width: calc(100% - 16px); aspect-ratio: 1; transform: translate(-50%, -50%); border: .140625rem solid #080; border-radius: 50%; background: #0806; opacity: .88; pointer-events: none; }
.board-cell:focus-visible, .tray button:focus-visible { outline: .14rem solid #808; outline-offset: -2px; }
.settings-player label { color: var(--player-accent-color); }
.modal textarea { width: 100%; }
.game-preview--horizontal { flex-direction: row; align-items: stretch; justify-content: center; }
.game-preview--horizontal .board-stack { order: 1; align-self: center; width: var(--board-width); }
.game-preview--horizontal .board { width: 100%; }
.game-preview--horizontal .tray { flex: 1 1 0; width: auto; min-width: 0; align-content: center; }
.game-preview--horizontal .tray--left { order: 0; }
.game-preview--horizontal .tray--right { order: 2; }
@media (min-width: 1240px) {
    .turn-hud--right, .turn-hud--left { display: none; }
}

.board-cell[data-navigation-cursor]:focus, .tray button[data-navigation-cursor]:focus { outline: none; }
.board-cell[data-navigation-cursor]:focus::after, .tray button[data-navigation-cursor]:focus::after { content: ''; position: absolute; z-index: 6; inset: 0; border: .140625rem solid #808; background: #8086; opacity: .88; pointer-events: none; }
.board-cell[data-navigation-cursor]:focus::after {
    border: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 115.47' preserveAspectRatio='none'%3E%3Cpath d='M50 1.5 L98.5 29.5 L98.5 86 L50 113.97 L1.5 86 L1.5 29.5 Z' fill='%23880088' fill-opacity='.4' stroke='%23880088' stroke-width='2.25' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.tray button[data-navigation-cursor]:focus::after { inset: -4px; }
