@font-face {
    font-family: Manrope;
    src: url("../../../fonts/manrope-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: Manrope;
    src: url("../../../fonts/manrope-cyrillic-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
    unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
:root {
    color-scheme: light;
    background: #f4f3ee;
    color: #181818;
    font-family: Manrope, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; }
.game { width: min(calc(100% - 32px), 480px); margin: 0 auto; padding: 24px 0 40px; }
header p, .legend, .instructions { margin: 8px 0 16px; line-height: 24px; text-wrap: pretty; }
h1 { margin: 12px 0 4px; font-size: 36px; line-height: 40px; text-wrap: balance; }
a { color: #1846cb; text-underline-offset: 3px; }
.skip { position: absolute; top: 8px; left: 8px; background: #fff; padding: 8px 12px; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; margin: 16px 0 8px; }
.stats div { background: #fff; border: 1px solid #dedbd3; border-radius: 8px; padding: 8px; }
.stats dt, .legend { color: #525960; font-size: 12px; line-height: 16px; }
.stats dd { margin: 2px 0 0; font-size: 20px; line-height: 28px; font-weight: 700; font-variant-numeric: tabular-nums; }
.board { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; }
.cell { display: grid; place-items: center; aspect-ratio: 1; background: #fff; border: 1px solid #dedbd3; border-radius: 8px; font-size: 20px; font-weight: 700; }
.cell.wall { background: #272727; border-color: #272727; }
.cell.token { background: #ffedc9; color: #8a4708; }
.cell.finish { background: #e5ebff; color: #1642bf; }
.cell.player { background: #234fd8; border-color: #234fd8; color: #fff; }
.status { min-height: 48px; margin: 12px 0 4px; line-height: 24px; text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
button { min-height: 48px; padding: 8px 12px; border: 1px solid #d7d9de; border-radius: 8px; background: #fff; color: #181818; font: inherit; font-weight: 600; cursor: pointer; }
button.primary { background: #234fd8; border-color: #234fd8; color: #fff; }
button:hover:not(:disabled) { filter: brightness(.94); }
button:active:not(:disabled) { transform: scale(.98); }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #214fe1; outline-offset: 3px; }
.direction-pad { display: grid; grid-template-columns: repeat(3, 48px); grid-template-areas: ". up ." "left down right"; gap: 8px; }
.direction-pad button { font-size: 20px; }
.up { grid-area: up; }
.left { grid-area: left; }
.down { grid-area: down; }
.right { grid-area: right; }
.legend { margin-top: 16px; }
