/* Games hub */
.games-hub-intro {
    margin: 0 0 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.games-daily-note {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    background: var(--tint-accent-subtle);
    border: 1px solid var(--tint-accent-medium);
    border-radius: 999px;
}

.games-daily-note i {
    color: var(--accent);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}

.game-card {
    position: relative;
    display: block;
    padding: 1.15rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    color: var(--text-light);
    text-decoration: none;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.game-card.is-done-today {
    border-color: var(--border-success-strong);
    box-shadow: inset 0 0 0 1px var(--inset-success);
}

.game-card.is-done-today::after {
    content: '✓';
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-success);
    background: var(--tint-success);
    border-radius: 50%;
}

.game-card.is-done-today .game-card-icon {
    background: var(--tint-success-strong);
    color: var(--color-success);
}

.game-card.is-done-today:hover {
    border-color: var(--border-success-focus);
    box-shadow: 0 8px 28px var(--tint-success);
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: 0 8px 28px var(--tint-accent);
}

.game-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--tint-accent-2);
    color: var(--accent-2);
    font-size: 1.05rem;
}

.game-card h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin: 0 0 0.3rem;
}

.game-card p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.game-meta {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.game-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .game-toolbar > button[id$="Share"] {
        display: none;
    }
}

.game-toolbar > button[id$="Share"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.share-text-preview {
    width: 100%;
    min-height: 7rem;
    margin-bottom: 0.85rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
    resize: vertical;
}

.share-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.share-actions-row .btn {
    flex: 1 1 auto;
}

.game-mistakes {
    display: flex;
    gap: 0.35rem;
    margin-left: auto;
}

.game-hint-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.game-hints-left {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.game-hints-left[hidden] {
    display: none;
}

@keyframes game-hint-pulse {
    0%, 100% { box-shadow: 0 0 0 2px var(--border-accent-medium); }
    50% { box-shadow: 0 0 0 3px var(--outline-accent); }
}

.game-mistake-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--surface-border);
}

.game-mistake-dot.is-used {
    background: var(--color-error);
}

.game-toast {
    margin: 0.75rem 0 0;
    padding: 0.55rem 0.85rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
}

.game-toast[hidden] {
    display: none;
}

/* Connections */
.conn-solved {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.conn-solved-row {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.conn-solved-row strong {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

.conn-solved-row span {
    font-size: 0.8125rem;
    font-weight: 600;
}

.game-lvl-0 { background: rgba(234, 179, 8, 0.35); color: #fde68a; }
.game-lvl-1 { background: var(--border-success); color: #bbf7d0; }
.game-lvl-2 { background: var(--border-accent); color: #bfdbfe; }
.game-lvl-3 { background: var(--tint-accent-2); color: #ddd6fe; }

.conn-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.conn-tile {
    min-height: 3.25rem;
    padding: 0.55rem 0.35rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition), transform 0.12s ease;
}

.conn-tile:hover {
    border-color: var(--border-accent);
}

.conn-tile.is-selected {
    background: var(--tint-accent-strong);
    border-color: var(--accent);
}

.conn-tile.is-hinted {
    animation: game-hint-pulse 1.5s ease-in-out infinite;
    border-color: var(--accent);
}

/* Mini Sudoku */
.sudoku-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(2.4rem, 3rem));
    gap: 0;
    width: fit-content;
    margin: 0 auto 1rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.sudoku-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border: 1px solid var(--surface-border);
    background: var(--surface);
    font-weight: 600;
}

.sudoku-cell.is-given {
    background: var(--surface-raised);
    color: var(--text-light);
}

.sudoku-cell.sudoku-box-left {
    border-left-width: 2px;
}

.sudoku-cell.sudoku-box-top {
    border-top-width: 2px;
}

.sudoku-cell input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    outline: none;
}

.sudoku-cell input.is-conflict {
    color: var(--color-error);
    background: var(--color-error-bg);
}

.sudoku-cell input.is-hint-wrong {
    outline: 2px dashed var(--color-error);
    outline-offset: -2px;
}

.sudoku-cell.is-hint-filled {
    background: var(--tint-accent);
}

.sudoku-cell.is-hint-filled input {
    color: var(--accent);
}

/* Queens */
.queens-grid {
    display: grid;
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1rem;
    padding: 2px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.queens-cell {
    aspect-ratio: 1;
    min-width: 2.2rem;
    min-height: 2.2rem;
    border: 1px solid transparent;
    border-radius: 4px;
    background: var(--surface);
    color: var(--accent);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow var(--transition);
}

.queens-cell:hover {
    box-shadow: inset 0 0 0 2px var(--border-accent);
}

.queens-cell.has-queen {
    background: var(--tint-accent-medium);
}

.queens-cell.is-conflict {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.queens-cell.is-impossible {
    opacity: 0.3;
    cursor: not-allowed;
}

.queens-cell.is-impossible::after {
    content: '×';
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.7;
}

@media (max-width: 768px) {
    .conn-board {
        grid-template-columns: repeat(2, 1fr);
    }

    .sudoku-grid {
        grid-template-columns: repeat(6, minmax(2rem, 1fr));
        width: 100%;
    }
}

/* Pinpoint */
.pin-clues {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pin-clue {
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-light);
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
}

.pin-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pin-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-light);
    font: inherit;
}

.pin-guesses-left {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* Word Ladder */
.ladder-rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 28rem;
    margin: 0 auto 1rem;
}

.ladder-row {
    display: grid;
    grid-template-columns: 1.75rem 1fr 5.5rem;
    gap: 0.65rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
}

.ladder-row.is-correct {
    border-color: var(--border-success-medium);
}

.ladder-row.is-wrong {
    border-color: var(--border-error);
}

.ladder-row.is-revealed {
    border-color: var(--border-success-medium);
    background: color-mix(in srgb, var(--tint-success) 28%, var(--surface));
}

.ladder-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
}

.ladder-clue {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.ladder-input,
.ladder-solved-word {
    width: 100%;
    padding: 0.35rem 0.45rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-align: center;
    text-transform: uppercase;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface-raised);
    color: var(--accent);
}

.ladder-input {
    background: var(--surface);
    font-size: 16px;
}

.ladder-solved-word {
    display: block;
    min-height: 2.25rem;
    line-height: 1.35;
    border-color: var(--border-success);
    background: color-mix(in srgb, var(--tint-success) 35%, var(--surface-raised));
    color: var(--color-success);
}

/* Shared drag-to-select grid foundation (Word Search, Strands, Zip, …) */
.game-drag-grid {
    user-select: none;
    touch-action: none;
    -webkit-touch-callout: none;
}

.game-drag-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: none;
}

/* Zip */
.zip-grid {
    display: grid;
    gap: 3px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1rem;
    padding: 3px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.zip-cell {
    aspect-ratio: 1;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: none;
    border-radius: 4px;
    background: var(--surface);
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 700;
    transition: background var(--transition), box-shadow var(--transition);
}

.zip-cell.has-waypoint {
    color: var(--accent);
    font-size: 1rem;
}

.zip-cell.is-path {
    background: var(--tint-accent-strong);
}

.zip-cell.is-tip {
    box-shadow: inset 0 0 0 2px var(--accent);
}

.zip-cell.is-hinted {
    animation: game-hint-pulse 1.5s ease-in-out infinite;
}

/* Tango */
.tango-grid {
    display: grid;
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 0.5rem;
    padding: 0.65rem;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.tango-legend {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin: 0 0 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tango-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tango-legend-eq::before,
.tango-legend-neq::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    font-size: 0.625rem;
    font-weight: 800;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
}

.tango-legend-eq::before { content: '='; }
.tango-legend-neq::before { content: '×'; }

.tango-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-width: 2.4rem;
    min-height: 2.4rem;
    border: none;
    border-radius: 4px;
    background: var(--surface);
    cursor: pointer;
    transition: background var(--transition);
}

.tango-cell .bi {
    font-size: 1.15rem;
    pointer-events: none;
}

.tango-cell.has-sun {
    color: #facc15;
}

.tango-cell.has-moon {
    color: #a5b4fc;
}

.tango-cell.is-given {
    background: var(--surface-raised);
    cursor: default;
}

.tango-cell.is-hint-filled {
    background: var(--tint-accent);
}

.tango-cell.is-hint-wrong {
    outline: 2px dashed var(--color-error);
    outline-offset: -2px;
}

.tango-cell[data-constraint-right="eq"]::after,
.tango-cell[data-constraint-right="neq"]::after {
    position: absolute;
    top: 50%;
    right: calc(-0.55rem / 2 - 0.55em);
    transform: translate(50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-muted);
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.tango-cell[data-constraint-right="eq"]::after { content: '='; }
.tango-cell[data-constraint-right="neq"]::after { content: '×'; }

.tango-cell[data-constraint-down="eq"]::before,
.tango-cell[data-constraint-down="neq"]::before {
    position: absolute;
    left: 50%;
    bottom: calc(-0.55rem / 2 - 0.55em);
    transform: translate(-50%, 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    height: 1.15em;
    font-size: 0.625rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-muted);
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
}

.tango-cell[data-constraint-down="eq"]::before { content: '='; }
.tango-cell[data-constraint-down="neq"]::before { content: '×'; }

@media (max-width: 768px) {
    .ladder-row {
        grid-template-columns: 1.5rem 1fr;
        grid-template-areas:
            "num clue"
            "word word";
        gap: 0.45rem 0.65rem;
        padding: 0.65rem 0.75rem;
    }

    .ladder-num {
        grid-area: num;
    }

    .ladder-clue {
        grid-area: clue;
    }

    .ladder-input,
    .ladder-solved-word {
        grid-area: word;
        width: 100%;
        min-height: 2.5rem;
        font-size: 16px;
    }

    .game-toast {
        position: sticky;
        bottom: 0.5rem;
        z-index: 2;
        box-shadow: var(--shadow-md);
    }

    .zip-cell {
        min-width: 2rem;
        min-height: 2rem;
    }

    .tango-cell {
        min-width: 2rem;
        min-height: 2rem;
        font-size: 0.95rem;
    }
}

/* Daily Word */
.dw-attempts {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.dw-category {
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.75rem;
}

.dw-board {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: fit-content;
    margin: 0 auto 0.75rem;
}

.dw-board.dw-shake {
    animation: dw-shake 0.35s ease;
}

@keyframes dw-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.dw-row {
    display: flex;
    gap: 0.35rem;
}

.dw-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
    transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.dw-row.dw-shake {
    animation: dw-shake 0.35s ease;
}

.dw-tile.is-correct {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #fff;
}

.dw-tile.is-present {
    background: #ca8a04;
    border-color: #ca8a04;
    color: #fff;
}

.dw-tile.is-absent {
    background: #475569;
    border-color: #475569;
    color: #e2e8f0;
}

.dw-tile.is-flip {
    animation: dw-flip 0.38s ease;
}

@keyframes dw-flip {
    0% { transform: rotateX(0deg); }
    50% { transform: rotateX(90deg); }
    100% { transform: rotateX(0deg); }
}

.dw-key.is-ready {
    background: var(--accent);
    color: #fff;
}

.dw-tile.is-hint {
    border-color: var(--accent);
    animation: game-hint-pulse 1.5s ease-in-out infinite;
}

.dw-row.is-active .dw-tile.is-filled {
    border-color: var(--text-muted);
    animation: dw-pop 0.08s ease;
}

@keyframes dw-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.dw-form {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.dw-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 32rem;
    margin: 0 auto 1rem;
}

.dw-kb-row {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
}

.dw-key {
    min-width: 2rem;
    height: 2.5rem;
    padding: 0 0.45rem;
    border: none;
    border-radius: 4px;
    background: var(--surface-raised);
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.dw-key-wide {
    min-width: 3.25rem;
    font-size: 0.6875rem;
}

.dw-key.is-correct { background: var(--color-success); color: #fff; }
.dw-key.is-present { background: #eab308; color: #fff; }
.dw-key.is-absent { background: var(--surface-border); color: var(--text-muted); }
.dw-key.is-eliminated { opacity: 0.35; text-decoration: line-through; }

@media (max-width: 768px) {
    .dw-tile {
        width: 2.35rem;
        height: 2.35rem;
        font-size: 1rem;
    }

    .dw-key {
        min-width: 1.65rem;
        height: 2.25rem;
        padding: 0 0.3rem;
    }
}

/* Nerdle */
.nd-attempts {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
}

.nd-board {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: fit-content;
    margin: 0 auto 0.75rem;
}

.nd-board.nd-shake {
    animation: dw-shake 0.35s ease;
}

.nd-row {
    display: flex;
    gap: 0.3rem;
}

.nd-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(2.4rem + (8 - var(--nd-cols, 8)) * -0.05rem);
    min-width: 1.85rem;
    height: 2.5rem;
    border: 2px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-light);
}

.nd-tile.is-correct { background: var(--color-success); border-color: var(--color-success); color: #fff; }
.nd-tile.is-present { background: #ca8a04; border-color: #ca8a04; color: #fff; }
.nd-tile.is-absent { background: #475569; border-color: #475569; color: #e2e8f0; }
.nd-tile.is-hint { border-color: var(--accent); animation: game-hint-pulse 1.5s ease-in-out infinite; }
.nd-tile.is-flip { animation: dw-flip 0.38s ease; }

.nd-form {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.nd-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 28rem;
    margin: 0 auto 1rem;
}

.nd-kb-row {
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.nd-key {
    min-width: 2rem;
    height: 2.5rem;
    padding: 0 0.45rem;
    border: none;
    border-radius: 4px;
    background: var(--surface-raised);
    color: var(--text-light);
    font-size: 0.8125rem;
    font-weight: 700;
    cursor: pointer;
}

.nd-key-wide { min-width: 3.5rem; font-size: 0.6875rem; }
.nd-key.is-ready { background: var(--accent); color: #fff; }
.nd-key.is-correct { background: var(--color-success); color: #fff; }
.nd-key.is-present { background: #eab308; color: #fff; }
.nd-key.is-absent { background: var(--surface-border); color: var(--text-muted); }
.nd-key.is-eliminated { opacity: 0.35; text-decoration: line-through; }

/* Word Search */
.ws-theme {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
}

.ws-grid {
    display: grid;
    grid-template-columns: repeat(var(--ws-size, 10), minmax(1.65rem, 2rem));
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1rem;
    padding: 3px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.ws-cell {
    aspect-ratio: 1;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--surface);
    color: var(--text-light);
    border-radius: 3px;
}

.ws-cell.is-selected {
    background: var(--tint-accent-strong);
    color: var(--accent);
}

.ws-cell.is-hinted {
    animation: game-hint-pulse 1.5s ease-in-out infinite;
    box-shadow: inset 0 0 0 2px var(--accent);
}

.ws-word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.ws-word-item {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
}

.ws-word-item.is-found {
    text-decoration: line-through;
    opacity: 0.55;
    border-color: var(--border-success);
    color: var(--color-success);
}

/* Nonogram */
.ng-board-wrap {
    overflow-x: auto;
    margin-bottom: 1rem;
}

.ng-layout {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 0.35rem;
    width: fit-content;
    margin: 0 auto;
    --ng-cell: minmax(1.75rem, 2rem);
}

.ng-corner {
    grid-column: 1;
    grid-row: 1;
    min-width: 2.75rem;
    min-height: 2rem;
}

.ng-clues-col {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(var(--ng-size, 8), var(--ng-cell));
    gap: 2px;
    align-items: end;
}

.ng-clues-row {
    grid-column: 1;
    grid-row: 2;
    display: grid;
    grid-template-rows: repeat(var(--ng-size, 8), var(--ng-cell));
    gap: 2px;
    align-items: stretch;
}

.ng-clue-line {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    min-height: 100%;
    padding: 0 0.25rem;
    font-size: 0.6875rem;
    font-weight: 700;
    color: var(--text-muted);
    user-select: none;
}

.ng-clues-row .ng-clue-line {
    flex-direction: row;
}

.ng-clues-col .ng-clue-line {
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 2rem;
    padding: 0.15rem 0;
}

.ng-clue-num {
    line-height: 1.1;
    min-width: 0.65rem;
    text-align: center;
}

.ng-grid {
    grid-column: 2;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(var(--ng-size, 8), var(--ng-cell));
    grid-template-rows: repeat(var(--ng-size, 8), var(--ng-cell));
    gap: 2px;
    padding: 3px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.ng-cell {
    aspect-ratio: 1;
    border: none;
    border-radius: 3px;
    background: var(--surface);
    cursor: pointer;
    transition: background var(--transition);
}

.ng-cell.is-filled { background: var(--accent); }
.ng-cell.is-marked {
    background: var(--surface-raised);
    box-shadow: inset 0 0 0 2px var(--text-muted);
}
.ng-cell.is-marked::after {
    content: '×';
    font-size: 0.75rem;
    color: var(--text-muted);
}
.ng-cell.is-hint-filled { background: var(--tint-accent); }
.ng-cell.is-hint-marked { outline: 2px dashed var(--accent); }
.ng-cell.is-hint-row { opacity: 0.85; }

/* 2048 */
.g2-score,
.g2-best {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0.35rem 0.65rem;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
}

.g2-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(3.5rem, 4.5rem));
    gap: 0.45rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 0.5rem;
    padding: 0.55rem;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
    outline: none;
}

.g2-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border-radius: var(--radius-sm);
}

.g2-tile {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--text-light);
    background: var(--tint-accent-medium);
}

.g2-tile-2 { background: #eee4da; color: #776e65; }
.g2-tile-4 { background: #ede0c8; color: #776e65; }
.g2-tile-8 { background: #f2b179; color: #f9f6f2; }
.g2-tile-16 { background: #f59563; color: #f9f6f2; }
.g2-tile-32 { background: #f67c5f; color: #f9f6f2; }
.g2-tile-64 { background: #f65e3b; color: #f9f6f2; }
.g2-tile-128 { background: #edcf72; color: #f9f6f2; font-size: 0.95rem; }
.g2-tile-256 { background: #edcc61; color: #f9f6f2; font-size: 0.95rem; }
.g2-tile-512 { background: #edc850; color: #f9f6f2; font-size: 0.95rem; }
.g2-tile-1024 { background: #edc53f; color: #f9f6f2; font-size: 0.8rem; }
.g2-tile-2048 { background: #edc22e; color: #f9f6f2; font-size: 0.8rem; }

.g2-controls-hint {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
}

/* Spelling Bee */
.sb-score {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 0.35rem 0.65rem;
    background: var(--surface-raised);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
}

.sb-hive {
    position: relative;
    width: 14rem;
    height: 12rem;
    margin: 0 auto 1rem;
}

.sb-letter {
    position: absolute;
    left: 50%;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    margin: -1.5rem;
    border: none;
    border-radius: 50%;
    font-size: 1.125rem;
    font-weight: 800;
    background: var(--surface-raised);
    color: var(--text-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.12s ease;
}

.sb-letter:hover { transform: scale(1.06); }

.sb-center {
    z-index: 2;
    background: #facc15;
    color: #422006;
    cursor: default;
}

.sb-outer {
    transform: rotate(calc(var(--sb-i) * 60deg)) translateY(-4.25rem) rotate(calc(var(--sb-i) * -60deg));
}

.sb-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.sb-input {
    flex: 1 1 10rem;
    min-width: 0;
    max-width: 16rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-light);
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sb-found {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: center;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    max-height: 8rem;
    overflow-y: auto;
}

.sb-found li {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 4px;
}

.sb-found li.is-pangram {
    border-color: #facc15;
    background: rgba(250, 204, 21, 0.15);
}

/* Geosnap */
.gs-flag {
    font-size: 5rem;
    line-height: 1;
    text-align: center;
    margin: 0 0 1rem;
}

.gs-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.gs-input {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-light);
    font: inherit;
}

.gs-guesses-left {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.gs-history {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.gs-guess-item {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
}

.gs-guess-item.is-correct {
    border-color: var(--border-success);
    background: var(--tint-success);
}

.gs-guess-item.is-before span,
.gs-guess-item.is-after span {
    color: var(--text-muted);
    font-size: 0.75rem;
}

@media (max-width: 768px) {
    .nd-tile {
        min-width: 1.65rem;
        height: 2.15rem;
        font-size: 0.875rem;
    }

    .ws-grid {
        grid-template-columns: repeat(var(--ws-size, 10), minmax(1.45rem, 1fr));
        width: 100%;
    }

    .ng-grid,
    .ng-clues-col {
        grid-template-columns: repeat(var(--ng-size, 8), minmax(1.45rem, 1fr));
        --ng-cell: minmax(1.45rem, 1fr);
    }

    .g2-board {
        grid-template-columns: repeat(4, minmax(2.75rem, 1fr));
        width: 100%;
    }

    .gs-flag { font-size: 4rem; }
}

.games-hub-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-muted);
}

.games-hub-stats strong {
    color: var(--text);
}

.games-streak-sep {
    opacity: 0.5;
}

/* Strands */
.st-theme {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
}

.st-grid {
    display: grid;
    grid-template-columns: repeat(var(--st-cols, 6), minmax(1.65rem, 2rem));
    gap: 2px;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1rem;
    padding: 3px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.st-cell {
    aspect-ratio: 1;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--surface);
    color: var(--text-light);
    border-radius: 3px;
}

.st-cell.is-selected {
    background: var(--tint-accent-strong);
    color: var(--accent);
}

.st-cell.is-found {
    background: var(--tint-success-strong);
    color: var(--color-success);
}

.st-cell.is-hinted {
    animation: game-hint-pulse 1.5s ease-in-out infinite;
    box-shadow: inset 0 0 0 2px var(--accent);
}

.st-word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: center;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
}

.st-word-item {
    padding: 0.35rem 0.65rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: 999px;
}

.st-word-item.is-found {
    text-decoration: line-through;
    opacity: 0.55;
    border-color: var(--border-success);
    color: var(--color-success);
}

.st-word-spangram {
    border-style: dashed;
    color: var(--accent-2);
}

/* Mini crossword */
.mc-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.mc-grid {
    display: grid;
    grid-template-columns: repeat(var(--mc-size, 5), minmax(2rem, 2.5rem));
    gap: 1px;
    padding: 3px;
    background: var(--surface-border);
    border-radius: var(--radius-sm);
}

.mc-cell {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface);
    border-radius: 2px;
}

.mc-cell.is-block {
    background: var(--surface-border);
}

.mc-cell-num {
    position: absolute;
    top: 1px;
    left: 2px;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
    pointer-events: none;
}

.mc-cell-input {
    width: 100%;
    height: 100%;
    border: 0;
    background: transparent;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 0;
}

.mc-cell-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 2px;
}

.mc-clues {
    flex: 1 1 220px;
    min-width: 200px;
}

.mc-clues h3 {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin: 0 0 0.35rem;
}

.mc-clues h3:not(:first-child) {
    margin-top: 1rem;
}

.mc-clue-list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mc-clue-list li {
    margin-bottom: 0.35rem;
    cursor: pointer;
}

.mc-clue-list li:hover {
    color: var(--accent);
}

/* Memory match */
.mem-theme {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--accent);
}

.mem-stats {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.mem-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(3.5rem, 4.5rem));
    gap: 0.55rem;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 1rem;
    perspective: 1100px;
}

.mem-card {
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    position: relative;
    transform-style: preserve-3d;
    animation: mem-deal-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--mem-deal-delay, 0ms);
}

.mem-card.is-locked:not(.is-flipped):not(.is-matched) {
    cursor: default;
}

.mem-card.is-flipped {
    z-index: 2;
}

.mem-card-scene {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    perspective: inherit;
}

.mem-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
    transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
    will-change: transform;
}

.mem-card.is-flipped .mem-card-inner,
.mem-card.is-matched .mem-card-inner,
.mem-card.is-held .mem-card-inner {
    transform: rotateY(180deg);
}

.mem-card.is-match-pop .mem-card-inner {
    animation: mem-match-pop 0.42s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.mem-face {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: inherit;
    user-select: none;
    overflow: hidden;
}

.mem-face span {
    display: block;
    transform: translateZ(1px);
}

.mem-front {
    background: linear-gradient(145deg, var(--accent) 0%, var(--accent-2) 100%);
    color: #fff;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 0.25),
        0 4px 14px rgb(0 0 0 / 0.18);
}

.mem-front::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgb(255 255 255 / 0.18), transparent 55%);
    pointer-events: none;
}

.mem-back {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    transform: rotateY(180deg);
    font-size: 1.85rem;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 0.04),
        0 6px 18px rgb(0 0 0 / 0.12);
}

.mem-card.is-matched .mem-back {
    background: var(--tint-success-strong);
    border-color: var(--border-success);
}

.mem-card.is-held .mem-back {
    box-shadow:
        inset 0 0 0 2px var(--accent),
        0 6px 18px rgb(0 0 0 / 0.12);
}

.mem-card:focus-visible .mem-card-scene {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.mem-card:not(.is-locked):not(.is-flipped):hover .mem-card-inner {
    transform: rotateY(0deg) translateY(-2px);
}

.mem-card:not(.is-locked):not(.is-flipped):hover .mem-front {
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 0.25),
        0 8px 20px rgb(0 0 0 / 0.22);
}

@keyframes mem-deal-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes mem-match-pop {
    0% { transform: rotateY(180deg) scale(1); }
    45% { transform: rotateY(180deg) scale(1.1); }
    100% { transform: rotateY(180deg) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .mem-card {
        animation: none;
    }

    .mem-card-inner {
        transition: none;
    }

    .mem-card.is-match-pop .mem-card-inner {
        animation: none;
    }
}

@media (max-width: 768px) {
    .st-grid {
        grid-template-columns: repeat(var(--st-cols, 6), minmax(1.45rem, 1fr));
        width: 100%;
    }

    .mc-grid {
        grid-template-columns: repeat(var(--mc-size, 5), minmax(1.75rem, 1fr));
    }

    .mem-grid {
        grid-template-columns: repeat(4, minmax(2.75rem, 1fr));
        width: 100%;
    }
}
