/* /Components/AccountPanel.razor.rz.scp.css */
.account[b-7v9oe30jct] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.account-user[b-7v9oe30jct] {
    font-weight: 600;
    color: #e6edf3;
    margin-right: auto;
}

.account-danger[b-7v9oe30jct] {
    color: #f0a89e;
    font-size: 0.82rem;
    line-height: 1.4;
}

.menu-btn[b-7v9oe30jct] {
    font-size: 1rem;
    line-height: 1;
    padding: 6px 10px;
}

.menu-btn.active[b-7v9oe30jct] {
    background: #388bfd22;
    border-color: #388bfd;
}

.account-input[b-7v9oe30jct] {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #e6edf3;
    padding: 8px 10px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

.account-input:focus[b-7v9oe30jct] {
    outline: none;
    border-color: #388bfd;
}

.account-actions[b-7v9oe30jct],
.friends-add[b-7v9oe30jct] {
    display: flex;
    gap: 8px;
}

.friends-add[b-7v9oe30jct] {
    align-items: center;
}

.friends-add .account-input[b-7v9oe30jct] {
    flex: 1;
}

.friend-lastseen[b-7v9oe30jct] {
    font-size: 0.78rem;
    color: #8b949e;
}

.invite-btn[b-7v9oe30jct] {
    padding: 4px 8px;
    line-height: 1;
}
/* /Components/ChallengePanel.razor.rz.scp.css */
.challenges[b-y28i6tcjn4] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.challenge-panel[b-y28i6tcjn4] {
    max-width: 480px;
}

.challenge-note[b-y28i6tcjn4] {
    font-size: 0.78rem;
    color: #8b949e;
}
/* /Components/SettingsPanel.razor.rz.scp.css */
.settings[b-lahx0wqq8p] {
    position: relative;
    display: inline-flex;
}

.settings-btn[b-lahx0wqq8p] {
    padding: 0.4rem 0.8rem;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .settings-btn:hover[b-lahx0wqq8p] { background: #30363d; color: #e6edf3; }
}

.settings-btn.active[b-lahx0wqq8p] {
    background: #388bfd22;
    border-color: #388bfd;
    color: #58a6ff;
}

/* Anchored to the button on wide screens; falls back to in-flow on phones. */
.settings-pane[b-lahx0wqq8p] {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: min(21rem, calc(100vw - 2.5rem));
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.8rem 0.9rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(1, 4, 9, 0.7);
    text-align: left;
}

.settings-h[b-lahx0wqq8p] {
    margin: 0 0 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b949e;
}

.settings-row[b-lahx0wqq8p] {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    cursor: pointer;
    user-select: none;
}

.settings-row input[b-lahx0wqq8p] {
    accent-color: #388bfd;
    cursor: pointer;
    margin-top: 0.15rem;
    flex: none;
}

.settings-label[b-lahx0wqq8p] {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.86rem;
    font-weight: 600;
    color: #e6edf3;
}

.settings-hint[b-lahx0wqq8p] {
    font-size: 0.74rem;
    font-weight: 400;
    color: #8b949e;
    line-height: 1.35;
}

.settings-note[b-lahx0wqq8p] {
    margin: 0.2rem 0 0;
    font-size: 0.72rem;
    color: #6e7681;
    line-height: 1.4;
}

@media (max-width: 600px) {
    .settings[b-lahx0wqq8p] { display: block; width: 100%; }
    .settings-pane[b-lahx0wqq8p] {
        position: static;
        width: auto;
        box-shadow: none;
        margin-top: 0.4rem;
    }
}
/* /Components/WhatsNewPanel.razor.rz.scp.css */
.whatsnew[b-6nvuqtosep] {
    position: relative;
    display: inline-flex;
}

.whatsnew-btn[b-6nvuqtosep] {
    padding: 0.4rem 0.8rem;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .whatsnew-btn:hover[b-6nvuqtosep] { background: #30363d; color: #e6edf3; }
}

.whatsnew-btn.active[b-6nvuqtosep] {
    background: #2a2000;
    border-color: #e3b341;
    color: #e3b341;
}

.whatsnew-pane[b-6nvuqtosep] {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 40;
    width: min(24rem, calc(100vw - 2.5rem));
    max-height: min(60vh, 30rem);
    overflow-y: auto;
    padding: 0.8rem 0.9rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(1, 4, 9, 0.7);
    text-align: left;
}

.whatsnew-head[b-6nvuqtosep] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.whatsnew-h[b-6nvuqtosep] {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #8b949e;
}

.whatsnew-close[b-6nvuqtosep] {
    background: none;
    border: none;
    color: #8b949e;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 2px 4px;
}

@media (hover: hover) {
    .whatsnew-close:hover[b-6nvuqtosep] { color: #e6edf3; }
}

.whatsnew-release + .whatsnew-release[b-6nvuqtosep] {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid #21262d;
}

.whatsnew-version[b-6nvuqtosep] {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.whatsnew-tag[b-6nvuqtosep] {
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(227, 179, 65, 0.12);
    border: 1px solid #e3b341;
    color: #e3b341;
    font-size: 0.7rem;
    font-weight: 700;
}

.whatsnew-title[b-6nvuqtosep] {
    color: #e6edf3;
    font-size: 0.86rem;
    font-weight: 600;
}

.whatsnew-date[b-6nvuqtosep] {
    color: #6e7681;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.whatsnew-list[b-6nvuqtosep] {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.3rem;
}

.whatsnew-list li[b-6nvuqtosep] {
    color: #c9d1d9;
    font-size: 0.82rem;
    line-height: 1.45;
}

.whatsnew-empty[b-6nvuqtosep] {
    margin: 0;
    color: #8b949e;
    font-size: 0.82rem;
}

.whatsnew-more[b-6nvuqtosep] {
    margin-top: 0.7rem;
    background: none;
    border: none;
    color: #58a6ff;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0;
}

@media (max-width: 600px) {
    .whatsnew[b-6nvuqtosep] { display: block; width: 100%; }
    .whatsnew-pane[b-6nvuqtosep] {
        position: static;
        width: auto;
        box-shadow: none;
        margin-top: 0.4rem;
    }
}
/* /Layout/MainLayout.razor.rz.scp.css */
main[b-epr7g1k5cp] {
    min-height: 100vh;
    padding: 0.5rem;
}
/* /Pages/Home.razor.rz.scp.css */
/* ── Layout ─────────────────────────────────────────────────────────────── */
.game-wrapper[b-60lwy4v93z] {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    padding-left: calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
    padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    user-select: none;
}

/* ── Update banner ──────────────────────────────────────────────────────── */
.update-banner[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: #0d2440;
    border: 1px solid #388bfd;
    border-radius: 8px;
    color: #79c0ff;
    font-size: 0.88rem;
    font-weight: 600;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.game-header[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
}

.game-title[b-60lwy4v93z] {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #e6edf3;
    margin: 0;
    text-shadow: 0 0 20px rgba(248, 81, 73, 0.5);
}

/* Blazor's FocusOnNavigate focuses this heading on load (for screen readers);
   suppress the resulting focus ring so it isn't visible to sighted users. */
.game-title:focus[b-60lwy4v93z],
.game-title:focus-visible[b-60lwy4v93z] {
    outline: none;
}

.game-subtitle[b-60lwy4v93z] {
    font-size: 0.78rem;
    color: #8b949e;
    margin: 0.15rem 0 0;
}

.controls[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.difficulty-group[b-60lwy4v93z] {
    display: flex;
    border: 1px solid #30363d;
    border-radius: 6px;
    overflow: hidden;
}

.diff-btn[b-60lwy4v93z] {
    padding: 0.4rem 0.9rem;
    background: #21262d;
    color: #8b949e;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .diff-btn:hover[b-60lwy4v93z] { background: #30363d; color: #e6edf3; }
}

.diff-btn.active[b-60lwy4v93z] {
    background: #388bfd22;
    color: #58a6ff;
    box-shadow: inset 0 0 0 1px #388bfd55;
}

.new-game-btn[b-60lwy4v93z] {
    padding: 0.4rem 1rem;
    background: #21262d;
    color: #e6edf3;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .new-game-btn:hover[b-60lwy4v93z] {
        background: #388bfd22;
        border-color: #388bfd88;
    }
}

.new-game-btn.inline[b-60lwy4v93z] {
    margin-left: 1rem;
    padding: 0.3rem 0.8rem;
}

.mode-toggle[b-60lwy4v93z] {
    padding: 0.4rem 0.8rem;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .mode-toggle:hover[b-60lwy4v93z] { background: #30363d; color: #e6edf3; }
}

.mode-toggle.active[b-60lwy4v93z] {
    background: #0d2d31;
    border-color: #1f9aaa;
    color: #76e3ea;
    box-shadow: 0 0 8px rgba(31, 154, 170, 0.35);
}

.flag-toggle[b-60lwy4v93z] {
    padding: 0.4rem 0.8rem;
    background: #21262d;
    color: #8b949e;
    border: 1px solid #30363d;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.flag-toggle.active[b-60lwy4v93z] {
    background: #2d1f40;
    border-color: #8957e5;
    color: #d2a8ff;
    box-shadow: 0 0 8px rgba(137, 87, 229, 0.4);
}

/* Mouse users flag with right-click; hide the toggle to reduce clutter. */
@media (pointer: fine) {
    .flag-toggle[b-60lwy4v93z] { display: none; }
}

/* ── Daily puzzle bar ───────────────────────────────────────────────────── */

.challenge-bar[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    background: linear-gradient(180deg, #161b22, #12181f);
    border: 1px solid #30363d;
    border-left: 3px solid #388bfd;
    border-radius: 8px;
}

.challenge-title[b-60lwy4v93z] {
    color: #e6edf3;
    font-size: 0.92rem;
    margin-right: auto;
}

.challenge-attempts[b-60lwy4v93z] {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #3a1a1a;
    border: 1px solid #f8514955;
    color: #ff7b72;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.account-btn.ghost.danger[b-60lwy4v93z] {
    color: #ff7b72;
    border-color: #f8514955;
}

@media (hover: hover) {
    .account-btn.ghost.danger:hover[b-60lwy4v93z] {
        background: #3a1a1a;
        border-color: #f85149;
    }
}








.diff-btn.daily-btn[b-60lwy4v93z] { border-right: 1px solid #30363d; }

/* The streak rescue is a distinct, time-limited affordance — not a second daily. */
.diff-btn.rescue-btn[b-60lwy4v93z] {
    color: #d29922;
}

.diff-btn.rescue-btn.active[b-60lwy4v93z] {
    background: #3a2e0a;
    color: #e3b341;
    box-shadow: inset 0 0 0 1px #e3b34155;
}

.diff-btn.daily-btn.active[b-60lwy4v93z] {
    background: #2a2000;
    color: #e3b341;
    box-shadow: inset 0 0 0 1px #e3b34155;
}

/* ── Stats bar ──────────────────────────────────────────────────────────── */
.stats-bar[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.6rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    flex-wrap: wrap;
}

.stat[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-wide[b-60lwy4v93z] { flex: 1; min-width: 140px; }

.stat-label[b-60lwy4v93z] {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #8b949e;
    min-width: 2.5rem;
}

.stat-value[b-60lwy4v93z] {
    font-size: 0.85rem;
    font-weight: 600;
    color: #c9d1d9;
    white-space: nowrap;
}

/* Daily figures sit in the stats bar; a rule marks where they start. */
.stat.daily-stat[b-60lwy4v93z] {
    border-left: 1px solid #30363d;
    padding-left: 1rem;
}

.stat-value.solved[b-60lwy4v93z] { color: #3fb950; }

/* Secondary detail inside a stat value (best run, attempt count). */
.stat-sub[b-60lwy4v93z] {
    font-weight: 400;
    font-size: 0.74rem;
    color: #8b949e;
}

.time-value[b-60lwy4v93z] {
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.04em;
}

.pause-btn[b-60lwy4v93z] {
    background: #21262d;
    color: #c9d1d9;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 0.7rem;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    -webkit-tap-highlight-color: transparent;
}

.pause-btn:hover[b-60lwy4v93z] {
    background: #388bfd22;
    border-color: #388bfd;
    color: #58a6ff;
}

/* Pausing hides the board so the layout can't be studied off the clock. */
.board.hidden-board[b-60lwy4v93z] {
    visibility: hidden;
}

.pause-overlay[b-60lwy4v93z] {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    text-align: center;
    background: #0d1117e6;
    border: 1px solid #30363d;
    border-radius: 10px;
}

.pause-title[b-60lwy4v93z] {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: #58a6ff;
}

.pause-note[b-60lwy4v93z] {
    font-size: 0.82rem;
    color: #8b949e;
    max-width: 32ch;
}

.stat-value.gold[b-60lwy4v93z] { color: #e3b341; }

.level-badge[b-60lwy4v93z] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 0 8px currentColor;
}

.progress-track[b-60lwy4v93z] {
    flex: 1;
    height: 8px;
    background: #21262d;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #30363d;
    min-width: 60px;
}

.progress-fill[b-60lwy4v93z] {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.hp-fill[b-60lwy4v93z] { background: linear-gradient(90deg, #f85149, #ff7b72); }
.xp-fill[b-60lwy4v93z] { background: linear-gradient(90deg, #388bfd, #58a6ff); }

/* ── Result banner ──────────────────────────────────────────────────────── */
.result-banner[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    gap: 0.5rem;
}

.result-message[b-60lwy4v93z] {
    min-width: 0;
}

.score-pill[b-60lwy4v93z] {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(13, 17, 23, 0.35);
    border: 1px solid currentColor;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.medal-pill[b-60lwy4v93z] {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(227, 179, 65, 0.12);
    border: 1px solid #e3b341;
    color: #e3b341;
    font-size: 0.88rem;
    text-shadow: none;
    white-space: nowrap;
}

.result-banner.won[b-60lwy4v93z] {
    background: #1a3a1a;
    border: 1px solid #3fb950;
    color: #3fb950;
    text-shadow: 0 0 12px rgba(63, 185, 80, 0.6);
}

.result-banner.lost[b-60lwy4v93z] {
    background: #3a1a1a;
    border: 1px solid #f85149;
    color: #f85149;
    text-shadow: 0 0 12px rgba(248, 81, 73, 0.6);
    animation: shake-b-60lwy4v93z 0.4s ease;
}

@keyframes shake-b-60lwy4v93z {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ── Level-up flash ─────────────────────────────────────────────────────── */
.levelup-overlay[b-60lwy4v93z] {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    background: radial-gradient(circle at center,
        rgba(227, 179, 65, 0.28) 0%,
        rgba(227, 179, 65, 0.10) 40%,
        rgba(13, 17, 23, 0) 75%);
    animation: levelup-flash-b-60lwy4v93z 1.5s ease-out forwards;
}

.levelup-content[b-60lwy4v93z] {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    animation: levelup-pop-b-60lwy4v93z 1.5s cubic-bezier(0.18, 1.4, 0.4, 1) forwards;
}

.levelup-title[b-60lwy4v93z] {
    font-size: clamp(2rem, 8vw, 3.5rem);
    font-weight: 900;
    letter-spacing: 0.12em;
    color: #e3b341;
    text-shadow:
        0 0 18px rgba(227, 179, 65, 0.9),
        0 0 60px rgba(227, 179, 65, 0.5),
        0 2px 0 #6b4e00;
}

.levelup-badge[b-60lwy4v93z] {
    width: 4rem;
    height: 4rem;
    font-size: 2rem;
}

@keyframes levelup-flash-b-60lwy4v93z {
    0%   { opacity: 0; }
    12%  { opacity: 1; }
    70%  { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes levelup-pop-b-60lwy4v93z {
    0%   { transform: scale(0.3); opacity: 0; }
    18%  { transform: scale(1.15); opacity: 1; }
    30%  { transform: scale(1); }
    75%  { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.35); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .levelup-overlay[b-60lwy4v93z], .levelup-content[b-60lwy4v93z] { animation-duration: 0.6s; }
}

/* ── Board ──────────────────────────────────────────────────────────────── */
/* position: relative anchors the pause overlay to the visible board area. */
.board-scroll[b-60lwy4v93z] { overflow-x: auto; position: relative; min-height: 6rem; }

.board[b-60lwy4v93z] {
    display: inline-grid;
    grid-template-columns: repeat(var(--cols), var(--cell-size, 36px));
    gap: 2px;
    padding: 6px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    min-width: min-content;
}

/* Wrap topologies: dashed seams mark the glued edges */
.board.cylinder[b-60lwy4v93z] {
    border-left: 3px dashed #1f9aaa;
    border-right: 3px dashed #1f9aaa;
}

.board.torus[b-60lwy4v93z] {
    border: 3px dashed #1f9aaa;
}

/* ── Cells ──────────────────────────────────────────────────────────────── */
.cell[b-60lwy4v93z] {
    width: var(--cell-size, 36px);
    height: var(--cell-size, 36px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    transition: filter 0.1s, transform 0.08s;
    position: relative;
    box-sizing: border-box;
    line-height: 1;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

.cell:active[b-60lwy4v93z] { transform: scale(0.92); }

/* Hidden */
.cell.hidden[b-60lwy4v93z] {
    background: #21262d;
    border: 1px solid #30363d;
    box-shadow: inset 0 1px 0 #3d444d;
}

@media (hover: hover) {
    .cell.hidden:hover[b-60lwy4v93z] {
        background: #2d333b;
        border-color: #444c56;
        box-shadow: 0 0 6px rgba(88, 166, 255, 0.15);
    }
}

/* Flagged */
.cell.flagged[b-60lwy4v93z] {
    background: #2d1f40;
    border: 1px solid #8957e5;
    color: #d2a8ff;
    font-size: 0.9rem;
}

/* Safe revealed */
.cell.safe[b-60lwy4v93z] {
    background: #161b22;
    border: 1px solid #21262d;
    cursor: default;
}

.cell.safe.empty[b-60lwy4v93z] { color: transparent; }

/* Adjacent sum number colours */
.cell.safe.s1[b-60lwy4v93z]  { color: #58a6ff; }
.cell.safe.s2[b-60lwy4v93z]  { color: #3fb950; }
.cell.safe.s3[b-60lwy4v93z]  { color: #ffa657; }
.cell.safe.s4[b-60lwy4v93z]  { color: #f85149; }
.cell.safe.s5[b-60lwy4v93z]  { color: #ff7b72; }
.cell.safe.s6[b-60lwy4v93z]  { color: #d2a8ff; }
.cell.safe.s7[b-60lwy4v93z]  { color: #e3b341; }
.cell.safe.s8[b-60lwy4v93z]  { color: #79c0ff; }
.cell.safe.low[b-60lwy4v93z]  { }
.cell.safe.mid[b-60lwy4v93z]  { }
.cell.safe.high[b-60lwy4v93z] { color: #f85149; }
.cell.safe.danger[b-60lwy4v93z] { color: #ff0000; font-size: 0.7rem; }

/* Spirit-mode sums: negative (spirits outweigh) and cancelled-to-zero cells */
.cell.safe.neg[b-60lwy4v93z]  { color: #76e3ea; }
.cell.safe.zero[b-60lwy4v93z] { color: #8b949e; font-style: italic; }

/* Monster cells – level colours */
.cell.monster[b-60lwy4v93z] { cursor: default; font-size: 0.85rem; font-weight: 900; }

/* Distinct creature glyph with a small level tag in the corner */
.monster-glyph[b-60lwy4v93z] {
    font-size: 1.05em;
    line-height: 1;
    filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

.monster-lv-tag[b-60lwy4v93z] {
    position: absolute;
    right: 1px;
    bottom: 1px;
    font-size: 0.55em;
    font-weight: 900;
    line-height: 1;
    padding: 1px 2px;
    border-radius: 3px;
    background: rgba(13, 17, 23, 0.75);
}

.cell.monster.lv-1[b-60lwy4v93z] { background: #1c3a2a; border: 1px solid #2ea043; color: #56d364; }
.cell.monster.lv-2[b-60lwy4v93z] { background: #1a2f4a; border: 1px solid #1f6feb; color: #79c0ff; }
.cell.monster.lv-3[b-60lwy4v93z] { background: #3a2e0a; border: 1px solid #bb8009; color: #e3b341; }
.cell.monster.lv-4[b-60lwy4v93z] { background: #3a1f0a; border: 1px solid #bd561d; color: #ffa657; }
.cell.monster.lv-5[b-60lwy4v93z] { background: #3a0d0d; border: 1px solid #b91c1c; color: #f85149; }
.cell.monster.lv-6[b-60lwy4v93z] { background: #280d3a; border: 1px solid #7928ca; color: #d2a8ff; }
.cell.monster.lv-7[b-60lwy4v93z] { background: #1a0808; border: 1px solid #6e0000; color: #ff7b72; text-shadow: 0 0 8px #f85149; }
.cell.monster.lv-8[b-60lwy4v93z] { background: #0d0d0d; border: 1px solid #484f58; color: #e6edf3; text-shadow: 0 0 12px #ffffff; }

/* Defeated monster overlay */
.cell.monster.defeated[b-60lwy4v93z] {
    opacity: 0.65;
    font-size: 1rem;
}

.cell.monster.defeated .monster-glyph[b-60lwy4v93z],
.legend-cell.dead-cell .monster-glyph[b-60lwy4v93z] {
    filter: grayscale(0.85) drop-shadow(0 0 3px rgba(0, 0, 0, 0.6));
}

.cell.monster.defeated[b-60lwy4v93z]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    border-radius: 3px;
}

/* Exposed (game-over) monster */
.cell.monster.exposed[b-60lwy4v93z] {
    animation: pulse-danger-b-60lwy4v93z 0.8s ease-in-out infinite alternate;
}

/* Spirit cells – ethereal glow */
.cell.spirit[b-60lwy4v93z] { cursor: default; font-size: 0.85rem; font-weight: 900; }

.cell.spirit.lv-1[b-60lwy4v93z] { background: #0b2d33; border: 1px solid #1f9aaa; color: #76e3ea; }
.cell.spirit.lv-2[b-60lwy4v93z] { background: #0b2440; border: 1px solid #2f81f7; color: #a5d6ff; }
.cell.spirit.lv-3[b-60lwy4v93z] { background: #21203b; border: 1px solid #8957e5; color: #d2a8ff; }

.cell.spirit.consumed[b-60lwy4v93z] {
    opacity: 0.65;
}

.cell.spirit.consumed[b-60lwy4v93z]::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    border-radius: 3px;
}

.cell.spirit.exposed[b-60lwy4v93z] {
    animation: pulse-spirit-b-60lwy4v93z 1.2s ease-in-out infinite alternate;
}

@keyframes pulse-spirit-b-60lwy4v93z {
    from { box-shadow: 0 0 4px rgba(118, 227, 234, 0.4); }
    to   { box-shadow: 0 0 12px rgba(118, 227, 234, 0.9); }
}

@keyframes pulse-danger-b-60lwy4v93z {
    from { box-shadow: 0 0 4px rgba(248,81,73,0.5); }
    to   { box-shadow: 0 0 12px rgba(248,81,73,1); }
}

/* ── Level badge colours ────────────────────────────────────────────────── */
.level-badge.lv-1[b-60lwy4v93z] { background: #1c3a2a; color: #56d364; }
.level-badge.lv-2[b-60lwy4v93z] { background: #1a2f4a; color: #79c0ff; }
.level-badge.lv-3[b-60lwy4v93z] { background: #3a2e0a; color: #e3b341; }
.level-badge.lv-4[b-60lwy4v93z] { background: #3a1f0a; color: #ffa657; }
.level-badge.lv-5[b-60lwy4v93z] { background: #3a0d0d; color: #f85149; }
.level-badge.lv-6[b-60lwy4v93z] { background: #280d3a; color: #d2a8ff; }
.level-badge.lv-7[b-60lwy4v93z] { background: #1a0808; color: #ff7b72; }
.level-badge.lv-8[b-60lwy4v93z] { background: #2a2000; color: #e3b341; box-shadow: 0 0 12px #e3b341; }

/* ── Legend ─────────────────────────────────────────────────────────────── */
.legend[b-60lwy4v93z] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 2rem;
    padding: 0.6rem 1rem;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    font-size: 0.78rem;
    color: #8b949e;
    align-items: center;
}

.legend-section[b-60lwy4v93z] {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.legend-section strong[b-60lwy4v93z] { color: #c9d1d9; }
.legend-section.dim[b-60lwy4v93z] { font-style: italic; }

.legend-entry[b-60lwy4v93z] {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.monster-count[b-60lwy4v93z] {
    font-size: 0.75rem;
    font-weight: 700;
    color: #8b949e;
    font-variant-numeric: tabular-nums;
    margin-right: 0.35rem;
}

.monster-count.cleared[b-60lwy4v93z] { color: #3fb950; }

.legend-cell[b-60lwy4v93z] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 22px;
    height: 22px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: default;
}

/* Reuse monster cell styles from board */
.legend-cell.monster-cell.lv-1[b-60lwy4v93z] { background: #1c3a2a; color: #56d364; border: 1px solid #2ea043; }
.legend-cell.monster-cell.lv-2[b-60lwy4v93z] { background: #1a2f4a; color: #79c0ff; border: 1px solid #1f6feb; }
.legend-cell.monster-cell.lv-3[b-60lwy4v93z] { background: #3a2e0a; color: #e3b341; border: 1px solid #bb8009; }
.legend-cell.monster-cell.lv-4[b-60lwy4v93z] { background: #3a1f0a; color: #ffa657; border: 1px solid #bd561d; }
.legend-cell.monster-cell.lv-5[b-60lwy4v93z] { background: #3a0d0d; color: #f85149; border: 1px solid #b91c1c; }
.legend-cell.monster-cell.lv-6[b-60lwy4v93z] { background: #280d3a; color: #d2a8ff; border: 1px solid #7928ca; }
.legend-cell.monster-cell.lv-7[b-60lwy4v93z] { background: #1a0808; color: #ff7b72; border: 1px solid #6e0000; }
.legend-cell.monster-cell.lv-8[b-60lwy4v93z] { background: #0d0d0d; color: #e6edf3; border: 1px solid #484f58; }

.legend-cell.spirit-cell.lv-1[b-60lwy4v93z] { background: #0b2d33; color: #76e3ea; border: 1px solid #1f9aaa; }
.legend-cell.spirit-cell.lv-2[b-60lwy4v93z] { background: #0b2440; color: #a5d6ff; border: 1px solid #2f81f7; }
.legend-cell.spirit-cell.lv-3[b-60lwy4v93z] { background: #21203b; color: #d2a8ff; border: 1px solid #8957e5; }

.legend-cell.hidden-cell[b-60lwy4v93z]  { background: #21262d; border: 1px solid #30363d; }
.legend-cell.flag-cell[b-60lwy4v93z]    { background: #2d1f40; border: 1px solid #8957e5; color: #d2a8ff; }
.legend-cell.dead-cell[b-60lwy4v93z]    { background: #161b22; border: 1px solid #30363d; color: #8b949e; opacity: 0.65; }

/* ── Leaderboard ────────────────────────────────────────────────────────── */
.leaderboard-panel[b-60lwy4v93z] {
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, #161b22, #11161d);
    border: 1px solid #30363d;
    border-radius: 8px;
}

.leaderboard-header[b-60lwy4v93z] {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.leaderboard-header h2[b-60lwy4v93z] {
    margin: 0.15rem 0 0;
    font-size: 1rem;
    color: #e6edf3;
}

.leaderboard-kicker[b-60lwy4v93z] {
    margin: 0;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #8b949e;
}

.leaderboard-difficulty[b-60lwy4v93z] {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: #21262d;
    border: 1px solid #30363d;
    color: #79c0ff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.medal-row[b-60lwy4v93z] {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.medal-badge[b-60lwy4v93z] {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.medal-badge.earned[b-60lwy4v93z] {
    background: rgba(227, 179, 65, 0.12);
    border: 1px solid #e3b341;
    color: #e3b341;
}

.medal-badge.locked[b-60lwy4v93z] {
    background: #21262d;
    border: 1px solid #30363d;
    color: #8b949e;
    opacity: 0.7;
}

.medal-scope[b-60lwy4v93z] {
    margin: 0 0 0.85rem;
    font-size: 0.72rem;
    color: #6e7681;
}

.leaderboard-empty[b-60lwy4v93z] {
    margin: 0;
    color: #8b949e;
    font-size: 0.86rem;
}

.leaderboard-list[b-60lwy4v93z] {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.leaderboard-item[b-60lwy4v93z] {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.65rem 0.8rem;
    border-radius: 6px;
    background: #0d1117;
    border: 1px solid #21262d;
}

.leaderboard-rank[b-60lwy4v93z] {
    min-width: 2.5rem;
    color: #e3b341;
    font-weight: 800;
}

.leaderboard-time[b-60lwy4v93z] {
    color: #e6edf3;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.leaderboard-medals[b-60lwy4v93z] {
    display: flex;
    gap: 0.25rem;
}

.medal-icon[b-60lwy4v93z] {
    color: #e3b341;
    font-size: 0.85rem;
    cursor: default;
}

.leaderboard-date[b-60lwy4v93z] {
    color: #8b949e;
    font-size: 0.8rem;
    white-space: nowrap;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    /* Reclaim vertical space for the board: the subtitle is explanatory, not
       operational, and the title can be smaller. */
    .game-subtitle[b-60lwy4v93z] { display: none; }
    .game-title[b-60lwy4v93z] { font-size: 1.25rem; }
    .game-header[b-60lwy4v93z] { padding: 0.5rem 0.75rem; gap: 0.5rem; }
    .stat.daily-stat[b-60lwy4v93z] { border-left: none; padding-left: 0; }
    /* Fit the board to the viewport width instead of forcing horizontal scroll. */
    .board[b-60lwy4v93z] {
        /* 100vw minus wrapper/board padding, a possible scrollbar, and ~1px gap per column. */
        --cell-size: clamp(22px, calc((100vw - 60px) / var(--cols) - 1px), 34px);
        gap: 1px;
    }
    .cell[b-60lwy4v93z]  { font-size: 0.65rem; }
    .game-header[b-60lwy4v93z] { flex-direction: column; align-items: flex-start; }
    /* Stack the result banner: message on its own line, pills and button below. */
    .result-banner[b-60lwy4v93z] { padding: 0.75rem 1rem; }
    .result-message[b-60lwy4v93z] { flex-basis: 100%; }
    .result-banner .new-game-btn.inline[b-60lwy4v93z] { margin-left: 0; }
    /* Keep the stats bar to as few wrapped rows as possible: drop the secondary
       detail and let the HP/XP meters shrink instead of forcing a new line. */
    .stat-sub[b-60lwy4v93z] { display: none; }
    .stat-wide[b-60lwy4v93z] { min-width: 96px; }
    .stats-bar[b-60lwy4v93z] { gap: 0.5rem 0.75rem; padding: 0.5rem 0.75rem; }
    .leaderboard-header[b-60lwy4v93z] { flex-direction: column; }
    .leaderboard-item[b-60lwy4v93z] { grid-template-columns: auto auto 1fr; }
    .leaderboard-date[b-60lwy4v93z] { grid-column: 1 / -1; }
}
