.games-hero { margin-bottom: 1rem; }
.game-card-image { display: block; width: 100%; height: auto; margin-bottom: .8rem; border-radius: .55rem; }
.game-teaser { margin-block: 1.4rem; }
.game-teaser-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem 1rem;
}
.game-teaser h2 { font-size: 1.35rem; }
.game-teaser-head .game-link { gap: .35rem; }
.game-teaser .home-game-grid { margin-block: .7rem 0; }
.home-game-grid .tool-card {
    display: grid;
    grid-template-columns: minmax(0, 32%) minmax(0, 1fr);
    align-items: center;
    gap: .8rem;
    padding: .8rem;
}
.home-game-grid .game-card-image { aspect-ratio: 1; object-fit: cover; margin: 0; }
.game-heading > p:not(.game-tag), .game-info p { color: var(--muted); }
.game-tag, .tool-card .game-tag {
    margin: 0 0 .3rem;
    color: #285a4b;
    font-size: .85rem;
    font-weight: 750;
}
.game-heading { margin-bottom: 1rem; }
.game-heading h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.15; margin-bottom: .3rem; }
.game-layout { display: grid; gap: 1rem; align-items: start; }
.game-panel {
    min-width: 0;
    padding: clamp(.65rem, 3vw, 1.25rem);
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: var(--card);
}
.game-toolbar, .game-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem .8rem;
}
.game-panel h2 { font-size: 1.13rem; }
.game-panel button, .game-panel select, .game-link {
    font: inherit;
    color: var(--ink);
}
.game-panel button:not(.dots-buttons button, .sudoku-cell), .game-panel select, .game-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .25rem .7rem;
    border: 1px solid #997e6c;
    border-radius: .55rem;
    background: #fffdf9;
    font-weight: 700;
}
.game-panel button, .game-panel select { cursor: pointer; }
.game-panel button:hover:not(:disabled, .dots-buttons button, .sudoku-cell), .game-link:hover {
    background: #ecf3ec;
    border-color: #285a4b;
}
.game-panel button:disabled { cursor: default; opacity: .65; }
.game-panel :is(button, select):focus-visible { outline: 3px solid #913b1b; outline-offset: 2px; z-index: 1; }
.game-options { justify-content: flex-start; margin-top: .65rem; }
.game-option { display: grid; gap: .2rem; max-width: 100%; }
.game-options label { font-weight: 700; }
.game-options select { max-width: 100%; }
.game-info ol { margin: .55rem 0 0; padding-inline-start: 1.3rem; }
.game-info li + li { margin-top: .4rem; }
.game-score {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
    margin: .7rem 0 .35rem;
}
.game-score > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .35rem;
    border-radius: .55rem;
    padding: .45rem .65rem;
    background: #e4f0f8;
    color: #144d75;
    font-weight: 700;
}
.game-score > div:nth-child(2) { background: #f9e9e0; color: #873b27; }
.game-score > div:nth-child(3) { background: #e0eee1; color: #235a3c; }
.game-score > div:nth-child(4) { background: #eee4f4; color: #65447b; }
.game-score dd { margin: 0; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.game-status { min-height: 1.65rem; margin-block: .4rem; font-weight: 700; overflow-wrap: anywhere; }
.dots-board {
    --dot-count: 4;
    --selected-dot: #144d75;
    position: relative;
    width: min(100%, 24rem);
    margin: 0 auto;
    aspect-ratio: 1;
    border-radius: .75rem;
    background: #f5f1e8;
    touch-action: none;
    user-select: none;
}
.dots-board svg, .dots-buttons { position: absolute; inset: 0; width: 100%; height: 100%; }
.dots-board[data-size="5"] { --dot-count: 5; }
.dots-board[data-size="6"] { --dot-count: 6; }
.dots-buttons {
    display: grid;
    grid-template-columns: repeat(var(--dot-count), minmax(0, 1fr));
    grid-template-rows: repeat(var(--dot-count), minmax(0, 1fr));
}
.dots-buttons button {
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: .55rem;
    -webkit-tap-highlight-color: transparent;
}
.dots-buttons button[aria-disabled="true"] { cursor: default; }
.dots-buttons button::after {
    content: "";
    width: clamp(.65rem, 2.4vw, .95rem);
    aspect-ratio: 1;
    border-radius: 50%;
    background: #3b3b39;
}
.dots-buttons button[aria-pressed="true"]::after {
    box-shadow: 0 0 0 .3rem #fffdf9, 0 0 0 .48rem var(--selected-dot);
}
.dots-board[data-turn="2"] { --selected-dot: #873b27; }
.dots-board[data-turn="3"] { --selected-dot: #235a3c; }
.dots-board[data-turn="4"] { --selected-dot: #65447b; }
.game-line { stroke-width: 7; stroke-linecap: round; }
.player-1 { stroke: #176496; }
.player-2 { stroke: #a94a2d; }
.player-3 { stroke: #347950; }
.player-4 { stroke: #77558c; }
.preview-line { stroke: #615d57; stroke-dasharray: 8 11; }
.box-owner-1 { fill: #d7e9f4; }
.box-owner-2 { fill: #f3d9cc; }
.box-owner-3 { fill: #d5e8d7; }
.box-owner-4 { fill: #e7d9ef; }
.owner-mark { font: 750 37px system-ui, sans-serif; text-anchor: middle; dominant-baseline: central; }
.owner-mark-1 { fill: #144d75; }
.owner-mark-2 { fill: #873b27; }
.owner-mark-3 { fill: #235a3c; }
.owner-mark-4 { fill: #65447b; }
@media (min-width: 45rem) {
    .game-layout { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
}
.game-room { margin-top: .65rem; padding: .65rem; border: 1px solid var(--line); border-radius: .65rem; background: #f5f5eb; }
.game-room p { margin-bottom: .4rem; }
.game-room label { display: block; font-weight: 700; }
.game-room input { width: 100%; min-height: 2.75rem; font: inherit; padding-inline: .45rem; border: 1px solid #997e6c; border-radius: .45rem; }
.game-room button { margin-top: .35rem; }
.game-panel [hidden] { display: none !important; }
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    width: min(100%, 26rem);
    margin-inline: auto;
    overflow: hidden;
    border: 2px solid #455d50;
    border-radius: .45rem;
}
.game-panel .sudoku-cell {
    aspect-ratio: 1;
    min-width: 0;
    padding: 0;
    color: #194d78;
    background: #fffdf9;
    border: 0;
    border-inline-end: 1px solid #c6c7bf;
    border-block-end: 1px solid #c6c7bf;
    font-size: clamp(.95rem, 4vw, 1.35rem);
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}
.sudoku-cell:nth-child(3n) { border-inline-end: 2px solid #455d50; }
.sudoku-cell:nth-child(9n) { border-inline-end: 0; }
.sudoku-cell:nth-child(n+19):nth-child(-n+27), .sudoku-cell:nth-child(n+46):nth-child(-n+54) { border-block-end: 2px solid #455d50; }
.sudoku-cell:nth-child(n+73) { border-block-end: 0; }
.game-panel .sudoku-cell[data-clue="true"] { color: #302923; background: #eeeae2; }
.sudoku-cell[data-related="true"] { background: #e9f1ec; }
.sudoku-cell[aria-pressed="true"] { background: #c8e4d8; box-shadow: inset 0 0 0 2px #346353; }
.game-panel .sudoku-cell[aria-invalid="true"] { color: #802817; text-decoration: underline; background: #f8e0d9; }
.sudoku-keypad, .sudoku-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem; margin-top: .65rem; }
.sudoku-keypad button { min-width: 2.75rem; }
.share-puzzle { margin-top: .75rem; }
.game-reminder { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .85rem; }
.game-reminder button { margin-top: .45rem; }
.game-reminder p { margin-top: .35rem; }
.game-reminder #reminder-status:empty { display: none; }
