.game-header .score,
.game-header .timer {
    display: none;
}

.game-container {
    max-width: 900px;
}

/* ── Cell size by difficulty ─────────────────────────────────────────────────── */

:root { --ng-cell: 34px; }

.ng-easy  { --ng-cell: 44px; }
.ng-medium { --ng-cell: 34px; }
.ng-hard  { --ng-cell: 26px; }

/* ── Layout ──────────────────────────────────────────────────────────────────── */

.ng-outer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px 20px;
    gap: 12px;
}

.ng-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.ng-puzzle-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.ng-time {
    font-variant-numeric: tabular-nums;
}

/* Grid + clue wrapper */
.ng-wrap {
    display: inline-grid;
    grid-template-areas:
        "corner col-clues"
        "row-clues grid";
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    gap: 0;
}

/* ── Clue panels ─────────────────────────────────────────────────────────────── */

.ng-col-clues {
    grid-area: col-clues;
    display: grid;
    /* columns set by JS */
    align-items: end;
}

.ng-row-clues {
    grid-area: row-clues;
    display: grid;
    /* rows set by JS */
    align-items: center;
}

.ng-corner {
    grid-area: corner;
}

/* Individual clue stacks */
.ng-clue-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    width: var(--ng-cell);
    padding-bottom: 4px;
    gap: 1px;
    border-right: 1px solid rgba(255,255,255,0.06);
    box-sizing: border-box;
}

.ng-clue-col:first-child { border-left: 1px solid rgba(255,255,255,0.06); }

.ng-clue-col.ng-group-left {
    border-left: 2px solid rgba(255,255,255,0.18);
}

.ng-clue-col span {
    font-size: clamp(0.6rem, 1.4vw, 0.78rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    line-height: 1.15;
}

.ng-clue-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    height: var(--ng-cell);
    padding-right: 6px;
    gap: 3px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-sizing: border-box;
}

.ng-clue-row:first-child { border-top: 1px solid rgba(255,255,255,0.06); }

.ng-clue-row.ng-group-top {
    border-top: 2px solid rgba(255,255,255,0.18);
}

.ng-clue-row span {
    font-size: clamp(0.6rem, 1.4vw, 0.78rem);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

/* Satisfied clue fade */
.ng-clue-done span {
    color: rgba(255,255,255,0.2);
}

/* ── Grid ────────────────────────────────────────────────────────────────────── */

.ng-grid {
    grid-area: grid;
    display: grid;
    border: 3px solid var(--accent-gold);
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
}

/* ── Cells ───────────────────────────────────────────────────────────────────── */

.ng-cell {
    width: var(--ng-cell);
    height: var(--ng-cell);
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-sizing: border-box;
    font-size: clamp(0.55rem, 1.3vw, 0.72rem);
    font-weight: 700;
    transition: background 0.07s ease;
}

.ng-cell:hover:not(.ng-filled):not(.ng-marked) {
    background: rgba(255,255,255,0.1);
}

.ng-cell.ng-group-left {
    border-left: 2px solid rgba(255,255,255,0.22);
}

.ng-cell.ng-group-top {
    border-top: 2px solid rgba(255,255,255,0.22);
}

.ng-cell.ng-filled {
    background: var(--accent-gold);
    border-color: transparent;
}

.ng-cell.ng-filled.ng-error {
    background: #ef4444;
}

.ng-cell.ng-marked {
    color: rgba(255,255,255,0.35);
    background: rgba(255,255,255,0.03);
}

/* ── Picker overlay ──────────────────────────────────────────────────────────── */

.ng-picker {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal, 1000);
}

.ng-picker.show { display: flex; }

.ng-picker-card {
    background: linear-gradient(145deg, var(--bg-primary, #0f1f0f) 0%, var(--bg-secondary, #1a2e1a) 100%);
    border: 2px solid var(--accent-gold);
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 380px;
    width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ng-picker-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin: 0;
    text-align: center;
}

.ng-picker-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
    max-height: 52vh;
}

.ng-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    transition: background 0.1s ease, border-color 0.1s ease;
}

.ng-picker-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.ng-picker-item.current {
    border-color: var(--accent-gold);
    background: rgba(212,175,55,0.12);
}

.ng-picker-item.done .ng-picker-name {
    color: rgba(255,255,255,0.55);
}

.ng-picker-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #888);
    min-width: 18px;
}

.ng-picker-name { flex: 1; }

.ng-picker-check {
    color: var(--accent-gold);
    font-size: 0.85rem;
    font-weight: 700;
}

.ng-picker-footer {
    display: flex;
    justify-content: center;
}

/* ── Mode button active state ────────────────────────────────────────────────── */

#ng-mode-btn.active {
    background: rgba(212,175,55,0.18);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ── Result info in win overlay ──────────────────────────────────────────────── */

.ng-result-info {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 8px 0 24px;
}

.ng-result-info strong {
    color: var(--accent-gold);
    font-weight: 700;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .ng-easy   { --ng-cell: clamp(32px, 12vw, 44px); }
    .ng-medium { --ng-cell: clamp(24px, 6.5vw, 34px); }
    .ng-hard   { --ng-cell: clamp(18px, 5vw, 26px); }

    .ng-outer { padding: 10px 8px 16px; gap: 8px; }
    .ng-picker-card { padding: 20px; }
}

@media (max-width: 480px) {
    .ng-easy   { --ng-cell: clamp(28px, 14vw, 44px); }
    .ng-medium { --ng-cell: clamp(22px, 7.5vw, 34px); }
    .ng-hard   { --ng-cell: clamp(16px, 5.5vw, 24px); }

    .ng-clue-col span,
    .ng-clue-row span { font-size: clamp(0.5rem, 1.8vw, 0.7rem); }
}
