/* Sliding tile — puzzle-specific styles (play chrome uses magic-square ms-* + word-games wg-play-flash) */

.st-hero-svg {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

/* ========== Sliding tile board (inside .ms-board-wrap) ========== */
.st-board {
    display: grid;
    gap: 6px;
    padding: 10px;
    margin: 0 auto;
    border-radius: 16px;
    background: var(--bg-dark);
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow:
        inset 0 2px 12px rgba(0, 0, 0, 0.35),
        0 8px 32px rgba(0, 0, 0, 0.25);
    aspect-ratio: 1;
    width: 100%;
    max-width: min(100%, 20rem);
}

[data-theme="light"] .st-board {
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 8px 24px rgba(15, 23, 42, 0.08);
}

.st-board--size-4 {
    max-width: min(100%, 22rem);
}

.st-board--size-5 {
    max-width: min(100%, 24rem);
}

.st-board--size-6 {
    max-width: min(100%, 26rem);
}

.st-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    border-radius: 12px;
    font-weight: 800;
    font-size: clamp(0.95rem, 3.8vw, 1.4rem);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    background: var(--bg-cell);
    border: 1px solid var(--border-grid);
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
    user-select: none;
    touch-action: manipulation;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .st-tile {
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.st-tile:hover:not(:disabled):not(.st-tile--blank) {
    background: rgba(29, 155, 240, 0.14);
    border-color: rgba(29, 155, 240, 0.45);
    transform: translateY(-1px);
}

.st-tile:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.st-tile--blank {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    cursor: default;
    visibility: hidden;
}

.st-tile--movable {
    border-color: rgba(29, 155, 240, 0.55);
    box-shadow:
        0 0 0 1px rgba(29, 155, 240, 0.25),
        0 4px 14px rgba(29, 155, 240, 0.15);
}

/* ========== Print layout ========== */
.st-print-grid {
    display: inline-grid;
    gap: 3px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f8f8f8;
}

.st-print-cell {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.st-print-cell--blank {
    background: #eee;
}

@media print {
    .ms-play-actions,
    .ms-play-sidebar {
        display: none !important;
    }
}
