html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0f0f11;
    color-scheme: dark;
}

a, .btn-link {
    color: #d8d8de;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================================
   Nathan's Games design system (global so every component — Home,
   GameHost, NTriviaGame, future games — shares the same look).
   ============================================================ */

.pg-stage {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Stacks the game card + a Leave link, centered. */
.pg-playwrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.pg-card {
    width: 100%;
    max-width: 440px;
    background: #18181b;
    border: 1px solid #2a2a30;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    text-align: center;
    color: #ededf0;
}

.pg-fade { animation: pg-fade-in 0.2s ease-out; }

@keyframes pg-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.pg-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    color: #fafafa;
}

.pg-heading {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 1.25rem;
    color: #fafafa;
}

.pg-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.7rem;
    font-weight: 600;
    color: #8a8a92;
    margin: 0 0 0.5rem;
}

.pg-subtitle {
    color: #9a9aa2;
    margin: 0.4rem 0 1.5rem;
    font-size: 0.95rem;
}

.pg-menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.pg-btn {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.pg-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.pg-btn-primary { background: #fafafa; color: #18181b; }
.pg-btn-primary:hover:not(:disabled) { background: #e3e3e6; }
.pg-btn-ghost { background: transparent; border-color: #3a3a42; color: #d8d8de; }
.pg-btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.05); }

/* Card header with a back button: title stays centered in the full card; the back button is
   positioned at the left (out of flow) so it no longer pushes the title sideways. */
.pg-cardhead {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.pg-cardhead .pg-heading { margin: 0; }

.pg-back {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8a8a92;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0;
}

.pg-back:hover { color: #d8d8de; }

.pg-leave {
    background: none;
    border: none;
    color: #6a6a72;
    cursor: pointer;
    margin-top: 0.85rem;
    font-size: 0.85rem;
}

.pg-leave:hover { color: #9a9aa2; text-decoration: underline; }

.pg-label {
    display: block;
    text-align: left;
    font-weight: 600;
    color: #b4b4bc;
    margin: 1rem 0 0.4rem;
    font-size: 0.85rem;
}

.pg-input {
    width: 100%;
    background: #111113;
    border: 1px solid #33333a;
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
    font-size: 1rem;
    color: #fafafa;
    outline: none;
    transition: border-color 0.15s ease;
    box-sizing: border-box;
}

.pg-input::placeholder { color: #5a5a62; }
.pg-input:focus { border-color: #7a7a84; }

.pg-input-code {
    text-transform: uppercase;
    letter-spacing: 0.45rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
}

.pg-error {
    color: #d4d4d8;
    background: #2a2a30;
    border-radius: 6px;
    text-align: left;
    padding: 0.5rem 0.7rem;
    margin: 0.75rem 0 0;
    font-size: 0.85rem;
}

.pg-games {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.pg-game {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    text-align: left;
    background: #141417;
    border: 1px solid #2c2c33;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pg-game:hover { border-color: #45454f; }
.pg-game.selected { border-color: #fafafa; background: #1d1d22; }
.pg-game-name { font-weight: 600; color: #f0f0f3; }
.pg-game-tag { color: #8a8a92; font-size: 0.82rem; }

.pg-code {
    font-size: 2.6rem;
    font-weight: 700;
    letter-spacing: 0.45rem;
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    color: #fafafa;
    background: #111113;
    border: 1px solid #2c2c33;
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.25rem;
}

.pg-players {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin: 1.25rem 0 0.5rem;
}

.pg-player {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #141417;
    border: 1px solid #2c2c33;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.pg-player.ready { border-color: #6a6a72; background: #1d1d22; }

.pg-player-name {
    font-weight: 600;
    color: #f0f0f3;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.pg-player-status { color: #7a7a82; font-size: 0.85rem; }
.pg-player.ready .pg-player-status { color: #fafafa; font-weight: 600; }

.pg-host-tag, .pg-you-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    background: #2e2e35;
    color: #b4b4bc;
}

.pg-you-tag { background: #3a3a42; color: #d8d8de; }

.pg-waiting {
    color: #6a6a72;
    font-size: 0.85rem;
    margin: 0.75rem 0 1.25rem;
}

/* --- Host game settings (lobby, collapsible <details>) --- */
.pg-settings {
    text-align: left;
    background: #141417;
    border: 1px solid #2c2c33;
    border-radius: 10px;
    padding: 0.45rem 0.85rem 0.6rem;
    margin: 0.25rem 0 1rem;
}
.pg-settings-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    color: #d8d8de;
    padding: 0.35rem 0;
    list-style: none;
    user-select: none;
}
.pg-settings-summary::-webkit-details-marker { display: none; }
.pg-settings-summary::before {
    content: "\25B8"; /* ▸ */
    display: inline-block;
    margin-right: 0.5rem;
    color: #6a6a72;
    transition: transform 0.15s ease;
}
.pg-settings[open] .pg-settings-summary::before { transform: rotate(90deg); }
.pg-settings-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding-top: 0.5rem;
    margin-top: 0.35rem;
    border-top: 1px solid #2a2a30;
}
.pg-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.pg-setting-label { font-size: 0.88rem; color: #b4b4bc; }
.pg-setting-sub {
    font-size: 0.76rem;
    color: #8a8a92;
    margin: 0.6rem 0 0.1rem;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
}
.pg-num {
    width: 4.5rem;
    background: #111113;
    border: 1px solid #33333a;
    border-radius: 7px;
    padding: 0.4rem 0.5rem;
    font-size: 0.95rem;
    color: #fafafa;
    outline: none;
    text-align: center;
    box-sizing: border-box;
}
.pg-num:focus { border-color: #7a7a84; }
.pg-toggle {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: #d8d8de;
    cursor: pointer;
}
.pg-thresholds {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem 0.75rem;
}
.pg-threshold {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.pg-threshold-stage { font-size: 0.85rem; color: #b4b4bc; }

/* ============================================================
   Shared game-UI framework. Components in Components/Games/Shared
   render only these pg- classes (scoped CSS can't reach consumers).
   Values mirror NTrivia's nt.css so the games stay visually unified;
   the `default` variant adds no modifier, --variant adds flair.
   ============================================================ */

/* --- whole-card entrance (any game's card can pick one) --- */
.pg-card-anim-0 { animation: pg-anim-fade 0.45s ease-out; }
.pg-card-anim-1 { animation: pg-anim-slide 0.45s ease-out; }
.pg-card-anim-2 { animation: pg-anim-grow 0.40s ease-out; }
.pg-card-anim-3 { animation: pg-anim-drop 0.50s ease-out; }
.pg-card-anim-4 { animation: pg-anim-pop 0.50s cubic-bezier(0.2, 1.4, 0.4, 1); }

@keyframes pg-anim-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pg-anim-slide { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pg-anim-grow { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes pg-anim-drop { from { opacity: 0; transform: translateY(-32px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pg-anim-pop { 0% { opacity: 0; transform: scale(0.6); } 70% { transform: scale(1.04); } 100% { opacity: 1; transform: scale(1); } }

/* whole-card exit — after the entrances so it wins. Scoped to .pg-card so `pg-card-out`
   can never bleed onto status rows (this is what dissolves the old nt-out double-meaning). */
.pg-card.pg-card-out { animation: pg-card-out 0.5s ease-in forwards; }
@keyframes pg-card-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(14px) scale(0.97); } }

/* --- prompt (heading + optional image) --- */
.pg-prompt-img { max-height: 140px; max-width: 100%; border-radius: 8px; margin-bottom: 0.5rem; }
.pg-prompt--hero .pg-heading { font-size: 2rem; }

/* --- options / inputs entrance (fade + slide up when they appear) --- */
.pg-options { animation: pg-slideup 0.35s ease-out; }
@keyframes pg-slideup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.pg-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.pg-choices--grid { display: grid; grid-template-columns: repeat(2, 1fr); }
.pg-entry { display: flex; flex-direction: column; gap: 0.5rem; }
.pg-entry--inline { flex-direction: row; }

/* per-option reveal states (opt-in via ChoiceButtons Highlight) */
.pg-choice--correct { border-color: #fafafa; color: #fafafa; }
.pg-choice--selected { border-color: #7a7a84; }
.pg-choice--wrong { opacity: 0.45; }

/* --- countdown / timer bar: CSS-deplete + red urgency flush; restarts via a keyed remount --- */
.pg-timerbar {
    height: 4px;
    background: #2a2a30;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.pg-timerfill {
    height: 100%;
    width: 100%;
    background: #fafafa;
    /* width is set from the server's remaining time each tick; the transition smooths between ticks. A keyed
       remount (new phase/timer) replaces the element, so a reset snaps to full instead of animating a refill. */
    transition: width 1s linear, background 0.3s ease;
}
.pg-timerfill--urgent { background: #d14b4b; }
.pg-timerbar--slim { height: 3px; margin-bottom: 0.8rem; }

/* --- leaderboard / scoreboard (corner overlay = default) --- */
.pg-leaderboard {
    position: fixed;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 30;
    min-width: 8.5rem;
    max-width: 12rem;
    background: rgba(20, 20, 23, 0.92);
    border: 1px solid #2c2c33;
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
    backdrop-filter: blur(2px);
}
.pg-lb-title { color: #8a8a92; text-transform: uppercase; letter-spacing: 1px; font-size: 0.6rem; margin-bottom: 0.25rem; }
.pg-lb-row { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.08rem 0; color: #d0d0d6; }
.pg-lb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-lb-me { color: #fafafa; font-weight: 700; }
.pg-lb-out { color: #6a6a72; text-decoration: line-through; }
.pg-lb-score { font-variant-numeric: tabular-nums; }
.pg-lb-rank { color: #8a8a92; font-variant-numeric: tabular-nums; min-width: 1.3rem; }
.pg-lb-tag {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
    padding: 0.05rem 0.4rem; border-radius: 4px; background: #3a3a42; color: #fafafa; margin-left: 0.4rem;
}

/* inline panel / podium variants (not a fixed overlay) */
.pg-leaderboard--panel, .pg-leaderboard--podium {
    position: static; top: auto; right: auto;
    width: 100%; min-width: 0; max-width: none;
    background: none; border: none; padding: 0; backdrop-filter: none;
    font-size: 0.95rem;
    display: flex; flex-direction: column; gap: 0.5rem;
}
.pg-leaderboard--panel .pg-lb-row, .pg-leaderboard--podium .pg-lb-row {
    align-items: center; background: #141417; border: 1px solid #2c2c33; border-radius: 8px; padding: 0.6rem 0.85rem;
}
.pg-leaderboard--panel .pg-lb-name, .pg-leaderboard--podium .pg-lb-name { flex: 1; font-weight: 600; color: #f0f0f3; }
.pg-leaderboard--panel .pg-lb-score, .pg-leaderboard--podium .pg-lb-score { font-weight: 700; color: #d8d8de; }
.pg-leaderboard--podium .pg-lb-row.pg-lb-win { border-color: #fafafa; background: #1d1d22; }
.pg-leaderboard--podium .pg-lb-win .pg-lb-rank { color: #fafafa; }

/* --- answer reveal --- */
.pg-answer { color: #ededf0; margin: 0.25rem 0 0.75rem; }
.pg-answer strong { color: #fafafa; }
.pg-result-correct { color: #fafafa; font-weight: 700; }
.pg-result-partial { color: #b4b4bc; font-weight: 600; }
.pg-result-wrong { color: #6a6a72; }
.pg-tick { font-weight: 700; font-size: 0.85rem; }
.pg-reveal-who { display: flex; flex-direction: column; align-items: flex-start; gap: 0.1rem; min-width: 0; flex: 1; margin-right: 0.6rem; }
.pg-given { font-size: 0.8rem; font-style: italic; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- section / round announcement (big intro card, NTrivia "Stage N" style) --- */
.pg-section-intro { text-align: center; padding: 2.5rem 1.5rem; }
.pg-section-kicker { text-transform: uppercase; letter-spacing: 3px; font-size: 0.75rem; color: #8a8a92; margin: 0 0 0.3rem; }
.pg-section-big { font-size: 3.2rem; font-weight: 800; color: #fafafa; line-height: 1; margin: 0 0 0.6rem; }
.pg-section-anim-0 { animation: pg-si-zoom 0.6s ease-out; }
.pg-section-anim-1 { animation: pg-si-rise 0.6s ease-out; }
.pg-section-anim-2 { animation: pg-si-drop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1); }
.pg-section-anim-3 { animation: pg-si-swing 0.7s ease-out; }
@keyframes pg-si-zoom { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }
@keyframes pg-si-rise { from { opacity: 0; transform: translateY(48px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pg-si-drop { 0% { opacity: 0; transform: translateY(-70px) scale(0.85); } 70% { transform: translateY(8px) scale(1.03); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pg-si-swing { from { opacity: 0; transform: rotate(-6deg) scale(0.7); } to { opacity: 1; transform: rotate(0) scale(1); } }

/* --- NInvention donation reveal (DOM built by wwwroot/js/ninv.js, so these must be global) --- */
.ninv-rv { text-align: center; }
/* ~1 s randomized entrance for the invention card (reuses the pg card-entrance keyframes) */
.ninv-rv-e0 { animation: pg-anim-grow 0.9s ease-out; }
.ninv-rv-e1 { animation: pg-anim-drop 0.9s cubic-bezier(0.2, 1.4, 0.4, 1); }
.ninv-rv-e2 { animation: pg-anim-fade 0.9s ease-out; }
.ninv-rv-e3 { animation: pg-anim-slide 0.9s ease-out; }
.ninv-rv-name { font-size: 1.8rem; font-weight: 800; color: #fafafa; margin-bottom: 0.5rem; }
.ninv-rv-pic { background: #ffffff; border-radius: 8px; width: 100%; min-height: 8rem; margin-bottom: 0.6rem; }
.ninv-rv-who { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.7rem; }
.ninv-rv-inventor { font-weight: 600; color: #d8d8de; }
.ninv-rv-money {
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-weight: 800; font-size: 1.3rem; color: #fafafa;
    transition: color 0.2s ease;
}
.ninv-rv-money-up { color: #ffffff; text-shadow: 0 0 12px rgba(255, 255, 255, 0.5); }
/* the "+$new" figure sits beside the pool, then flies up into it */
.ninv-rv-moneywrap { position: relative; display: inline-block; }
.ninv-rv-incoming {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 0.15rem;
    white-space: nowrap;
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-weight: 800;
    font-size: 1.05rem;
    color: #fafafa;
    transition: transform 0.6s ease-in, opacity 0.6s ease-in;
}
.ninv-rv-incoming.fly { transform: translateY(-2.3rem) scale(0.85); opacity: 0; }
.ninv-rv-donations { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }
.ninv-rv-coin {
    background: #141417;
    border: 1px solid #2c2c33;
    border-radius: 999px;
    padding: 0.3rem 0.95rem;
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-weight: 700;
    color: #ededf0;
    animation: ninv-rv-pop 0.3s ease-out;
}
@keyframes ninv-rv-pop { from { opacity: 0; transform: scale(0.6) translateY(-8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.ninv-rv-total {
    margin-top: 0.7rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: #fafafa;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.ninv-rv-total.show { opacity: 1; transform: translateY(0); }

/* --- mobile / small screens (party players join on phones) --- */
@media (max-width: 560px) {
    .pg-stage { padding: 0.75rem; align-items: flex-start; }
    .pg-card { padding: 1.25rem; border-radius: 10px; }
    .pg-title { font-size: 1.7rem; }
    .pg-heading { font-size: 1.25rem; }
    .pg-code { font-size: 1.7rem; letter-spacing: 0.32rem; }
    .pg-btn { padding: 0.85rem 1rem; }       /* larger tap targets */
    .pg-input { font-size: 16px; }            /* keep iOS from zooming on focus */
    .pg-players { gap: 0.35rem; }
    /* on phones the fixed corner would cover the card (and the sound toggle) — drop it into normal flow
       below the card instead of overlaying. */
    .pg-leaderboard {
        position: static;
        width: 100%;
        max-width: 440px;
        margin: 0.6rem auto 0;
        font-size: 0.78rem;
    }
}