/* Numbrix — puzzle-specific styles (play chrome reuses magic-square ms-* + word-games wg-play-flash) */

.nx-hero-svg {
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
    margin: 0 auto;
}

.nx-board {
    display: grid;
    gap: 4px;
    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%, 22rem);
}

[data-theme="light"] .nx-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);
}

.nx-board--size-5 { max-width: min(100%, 24rem); }
.nx-board--size-6 { max-width: min(100%, 26rem); }
.nx-board--size-7 { max-width: min(100%, 28rem); }

.nx-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    border-radius: 10px;
    background: var(--bg-cell);
    border: 1px solid var(--border-grid);
    position: relative;
}

[data-theme="light"] .nx-cell {
    background: #fff;
}

.nx-cell--given {
    background: rgba(29, 155, 240, 0.12);
    border-color: rgba(29, 155, 240, 0.35);
}

.nx-cell--given .nx-given {
    font-weight: 800;
    font-size: clamp(0.75rem, 2.8vw, 1.15rem);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    user-select: none;
}

.nx-input {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-align: center;
    font-weight: 700;
    font-size: clamp(0.7rem, 2.6vw, 1.05rem);
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
    padding: 0;
    border-radius: 10px;
    -moz-appearance: textfield;
}

.nx-input::-webkit-outer-spin-button,
.nx-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.nx-input:focus {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    background: rgba(29, 155, 240, 0.1) !important;
}

.nx-cell--selected:not(.nx-cell--given) {
    box-shadow: 0 0 0 2px var(--accent);
}

.nx-print-grid {
    display: inline-grid;
    gap: 3px;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f8f8f8;
}

.nx-print-cell {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.nx-print-cell--empty {
    background: #fafafa;
}

@media print {
    .ms-play-actions,
    .ms-play-sidebar {
        display: none !important;
    }
}
