/* Shared button styles for the game pages, kept out of each game's own CSS: the Back buttons ("Back to game",
   "Back to matches"...), the Battle/Versus setup Cancel buttons, and Number Connect's best-score chip. Back
   buttons get a frosted chip with the arrow in its own accent disc, which slides left on hover.

   Loaded after each game's own stylesheet and kept apart from it. Each game's CSS still styles these
   buttons the old way (a transparent outline pill, with !important in places), so every rule here is
   prefixed with body:not(#gsBackNone) to outrank those - including Fruit Frenzy's per-difficulty
   colour rules. display is set without !important so the inline display:none that hides some of these
   buttons still applies. */

/* The chip's glass. Plain colours, not --section-background-color - that one is a gradient, which colour-mix
   can't take. */
body { --gs-back-ground: rgba(255, 255, 255, 0.78); --gs-back-ground-hover: rgba(255, 255, 255, 0.96); }
body[data-theme="Dark"] { --gs-back-ground: rgba(255, 255, 255, 0.07); --gs-back-ground-hover: rgba(118, 107, 255, 0.18); }

body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
    #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
    #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
    #ffBackFromHelpBtn, #ffBackFromSpectateBtn) {
    --gs-back-accent: var(--input-button-background-color, #766BFF);
    cursor: pointer; display: inline-flex; align-items: center; gap: 9px; user-select: none; vertical-align: middle;
    margin: 0 0 14px 0; padding: 5px 16px 5px 5px; line-height: 20px; font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
    text-decoration: none !important; color: var(--body-text-color, #34363E) !important;
    border: 1px solid color-mix(in srgb, var(--gs-back-accent) 22%, transparent) !important; border-radius: 999px;
    background: var(--gs-back-ground) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.08) !important;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

    /* The arrow disc - replaces the old back.png icon. */
    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn)::before {
        content: ""; float: none; flex: none; display: block; width: 26px; height: 26px; margin: 0; border-radius: 50%; filter: none;
        background-color: var(--gs-back-accent);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H6M11.5 6.5 6 12l5.5 5.5'/%3E%3C/svg%3E");
        background-repeat: no-repeat; background-position: center; background-size: 15px;
        box-shadow: 0 2px 6px color-mix(in srgb, var(--gs-back-accent) 45%, transparent);
        transition: transform .2s ease;
    }

    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn):hover {
        color: var(--body-text-color, #34363E) !important;
        border-color: color-mix(in srgb, var(--gs-back-accent) 45%, transparent) !important;
        background: var(--gs-back-ground-hover) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 22px color-mix(in srgb, var(--gs-back-accent) 22%, transparent) !important;
    }

        body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
            #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
            #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
            #ffBackFromHelpBtn, #ffBackFromSpectateBtn):is(:hover, :active)::before { filter: none; transform: translateX(-3px); }

    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn):active { transform: scale(0.96); }

    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn):focus-visible { outline: 2px solid var(--gs-back-accent); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn),
    body:not(#gsBackNone) :is(#backToGameBtn, #backFromHelpBtn, #backFromDailyHighScoresBtn, #backFromActivityBtn, #backFromSpectateBtn, #battleBackBtn, #backFromBattleLeaderboardBtn,
        #backToSecretWordGameBtn, #backFromSecretWordHelpBtn, #secretWordVersusBackBtn, #swLettersShopBack,
        #backToShellBreachGameBtn, #backFromShellBreachHelpBtn, #sbVersusBackBtn,
        #ffBackFromHelpBtn, #ffBackFromSpectateBtn)::before { transition: none; }
}

/* ---- Cancel buttons on the Battle / Versus setup panels ----
   Number Connect's and Word Snaps' setup Cancel was bare text (each game's CSS clears its background,
   border and colour with !important). Here it becomes a secondary to the purple Continue beside it: the
   same frosted glass as the Back chips, with an x that turns red on hover. Layout - flex basis and
   padding - stays with the game's own CSS. The doubled :not() outranks those games' (1,2,0) !important rules. */
body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn) {
    --gs-cancel-red: #E5484D;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px; opacity: 1;
    color: var(--body-text-color, #34363E) !important;
    border: 1px solid rgba(128, 128, 128, 0.32) !important;
    background: var(--gs-back-ground) !important;
    -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.1) !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease, transform .15s ease;
}

    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn)::before {
        content: ""; flex: none; width: 14px; height: 14px; background-color: currentColor; opacity: 0.75;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E") center / contain no-repeat;
        transition: transform .2s ease, opacity .2s ease;
    }

    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn):hover {
        color: var(--gs-cancel-red) !important;
        border-color: color-mix(in srgb, var(--gs-cancel-red) 55%, transparent) !important;
        background: var(--gs-back-ground-hover) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 22px color-mix(in srgb, var(--gs-cancel-red) 20%, transparent) !important;
    }

        body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn):hover::before { opacity: 1; transform: rotate(90deg); }

    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn):active { transform: scale(0.97); }

body[data-theme="Dark"]:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn) { --gs-cancel-red: #FF6B70; border-color: rgba(255, 255, 255, 0.18) !important; }
    body[data-theme="Dark"]:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn):hover { background: rgba(255, 107, 112, 0.12) !important; border-color: rgba(255, 107, 112, 0.5) !important; }

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn),
    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn)::before { transition: none; }
    body:not(#gsBackNone):not(#gsBackNone2) :is(.nm-battle-setup-cancel-btn, .secret-word-versus-setup-cancel-btn):hover::before { transform: none; }
}

/* ---- Number Connect: the best score in the HUD ----
   Tapping the best score (top right, above the board) opens the leaderboard - it stands in for the hidden
   "View High Scores" / "View Scores" links (Compact HUD in numbersMatchup.js) - but it read as a plain
   number. Here it becomes a chip: a "High scores >" label over the trophy and score, mirroring the Score
   label on the left, in the same frosted glass as the Back chips. Daily's streak line sits underneath.
   display is left without !important so the inline display:none for guests and the other mode applies. */
body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore) {
    display: grid; grid-template-columns: auto auto; grid-template-areas: "label label" "icon pts" "sub sub";
    align-items: center; justify-content: end; column-gap: 4px; row-gap: 1px;
    padding: 5px 10px 6px 10px; border-radius: 12px; line-height: 1.15;
    border: 1px solid color-mix(in srgb, var(--input-button-background-color, #766BFF) 30%, transparent);
    background: var(--gs-back-ground);
    -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}

    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore)::before { grid-area: icon; margin: 0; top: 0; }
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore) .points { grid-area: pts; }
    body:not(#gsBackNone) #nmHud #dailyHighScoreStreak { grid-area: sub; text-align: right; }
    body:not(#gsBackNone) #nmHud #dailyHighScoreStreak:empty { display: none; }

    /* The label - the accent colour, with a chevron that nudges right on hover. */
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore)::after {
        content: "High scores \203A"; grid-area: label; justify-self: end; white-space: nowrap;
        font-size: 11px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
        color: var(--input-button-background-color, #766BFF); transition: transform .2s ease;
    }
    body:not(#gsBackNone) #nmHud #dailyHighScore::after { content: "Leaderboard \203A"; }
    body[data-theme="Dark"]:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore)::after { color: #B3A9FF; }

    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore):hover {
        background: var(--gs-back-ground-hover);
        border-color: color-mix(in srgb, var(--input-button-background-color, #766BFF) 60%, transparent);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 22px rgba(118, 107, 255, 0.25);
    }
        body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore):hover::after { transform: translateX(2px); }
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore):active { transform: scale(0.96); }

@media screen and (max-width: 420px) {
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore) { padding: 4px 8px 5px 8px; }
        body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore)::after { font-size: 10px; letter-spacing: 0.3px; }
}

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore),
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore)::after { transition: none; }
    body:not(#gsBackNone) #nmHud :is(#highScore, #dailyHighScore):hover::after { transform: none; }
}

/* ---- Title screen option icons ----
   A small line icon ahead of each option under a game's Play button - How to play, High scores /
   Leaderboard, Sound on|off, Music on|off, Quick tour and Live games. Keyed off data-title-action, so the
   markup stays as it is; the sound and music icons follow aria-pressed, which flips along with their
   "on" / "off" text. The icon is a mask
   filled with currentColor, so it takes whatever text colour the game and theme give the option. */
body:not(#gsBackNone) .gs-title-option:is([data-title-action="howto"], [data-title-action="scores"], [data-title-action="sound"], [data-title-action="music"], [data-title-action="tour"], [data-title-action="watch"]) {
    display: inline-flex; align-items: center; gap: 6px;
}
    body:not(#gsBackNone) .gs-title-option:is([data-title-action="howto"], [data-title-action="scores"], [data-title-action="sound"], [data-title-action="music"], [data-title-action="tour"], [data-title-action="watch"])::before {
        content: ""; flex: none; width: 15px; height: 15px; background-color: currentColor;
        -webkit-mask: var(--gs-option-icon) center / contain no-repeat; mask: var(--gs-option-icon) center / contain no-repeat;
        transition: transform .2s ease;
    }
    body:not(#gsBackNone) .gs-title-option:is([data-title-action="howto"], [data-title-action="scores"], [data-title-action="sound"], [data-title-action="music"], [data-title-action="tour"], [data-title-action="watch"]):hover::before { transform: scale(1.12); }

body:not(#gsBackNone) .gs-title-option[data-title-action="howto"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M9.4 9.3a2.7 2.7 0 0 1 5.2 1c0 1.8-2.6 2.3-2.6 3.9'/%3E%3Cpath d='M12 17.3h.01'/%3E%3C/svg%3E");
}
body:not(#gsBackNone) .gs-title-option[data-title-action="scores"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h8v5.5a4 4 0 0 1-8 0z'/%3E%3Cpath d='M8 6.5H5.2a3 3 0 0 0 3.1 4'/%3E%3Cpath d='M16 6.5h2.8a3 3 0 0 1-3.1 4'/%3E%3Cpath d='M12 13.5V17'/%3E%3Cpath d='M8.5 20h7'/%3E%3C/svg%3E");
}
body:not(#gsBackNone) .gs-title-option[data-title-action="sound"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='M15.5 9a4 4 0 0 1 0 6'/%3E%3Cpath d='M18.2 6.4a7.6 7.6 0 0 1 0 11.2'/%3E%3C/svg%3E");
}
body:not(#gsBackNone) .gs-title-option[data-title-action="sound"][aria-pressed="false"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='m16 9.5 5 5'/%3E%3Cpath d='m21 9.5-5 5'/%3E%3C/svg%3E");
}

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone) .gs-title-option[data-title-action]::before { transition: none; }
    body:not(#gsBackNone) .gs-title-option[data-title-action]:hover::before { transform: none; }
}

body:not(#gsBackNone) .gs-title-option[data-title-action="music"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E");
}
body:not(#gsBackNone) .gs-title-option[data-title-action="music"][aria-pressed="false"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}

/* Quick tour - a compass; Live games (Fruit Frenzy) - a broadcast signal. */
body:not(#gsBackNone) .gs-title-option[data-title-action="tour"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m15.5 8.5-2 5-5 2 2-5z'/%3E%3C/svg%3E");
}
body:not(#gsBackNone) .gs-title-option[data-title-action="watch"] {
    --gs-option-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='1.8'/%3E%3Cpath d='M8.3 15.7a5.2 5.2 0 0 1 0-7.4'/%3E%3Cpath d='M15.7 8.3a5.2 5.2 0 0 1 0 7.4'/%3E%3Cpath d='M5.4 18.6a9.3 9.3 0 0 1 0-13.2'/%3E%3Cpath d='M18.6 5.4a9.3 9.3 0 0 1 0 13.2'/%3E%3C/svg%3E");
}

/* ---- Dock music button ----
   Games with music (GameShell's Menu music) get a round button at the end of the dock, after a divider -
   the same size and feel as the dock's Home button - so the music can be turned off without going back to
   the title screen. Note icon, struck through when off. */
body:not(#gsBackNone) #gsDock .gs-dock-music {
    flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border-radius: 50%; color: inherit;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background-color .2s ease-in-out, transform .15s ease-in-out, opacity .2s ease-in-out;
}
    body:not(#gsBackNone) #gsDock .gs-dock-music::before {
        content: ""; width: 20px; height: 20px; background-color: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
    }
    body:not(#gsBackNone) #gsDock .gs-dock-music[aria-pressed="false"] { opacity: 0.6; }
        body:not(#gsBackNone) #gsDock .gs-dock-music[aria-pressed="false"]::before {
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat;
        }
    body:not(#gsBackNone) #gsDock .gs-dock-music:hover { opacity: 1; background-color: rgba(0, 0, 0, 0.08); background-color: var(--link-hover-background-color); }
    body:not(#gsBackNone) #gsDock .gs-dock-music:active { transform: scale(0.9); }

@media screen and (max-width: 775px) {
    body:not(#gsBackNone) #gsDock .gs-dock-music { width: 40px; height: 40px; }
}
/* On a phone the dock sits inside the game card, and the music button costs each mode tab about 12px - enough
   to wrap "Casual" and "Versus" onto two lines. Only for a dock that has the button (Shell Breach's has none):
   slightly smaller tab icons and padding, a smaller music button with no divider, and labels kept to one line. */
@media screen and (max-width: 440px) {
    body:not(#gsBackNone) #gsDock.gs-dock-inline:has(.gs-dock-music) .gs-dock-tab { gap: 3px; padding: 0 5px 0 4px; white-space: nowrap; }
        body:not(#gsBackNone) #gsDock.gs-dock-inline:has(.gs-dock-music) .gs-dock-tab img { width: 16px; height: 16px; }
    body:not(#gsBackNone) #gsDock.gs-dock-inline .gs-dock-music { width: 32px; height: 32px; }
        body:not(#gsBackNone) #gsDock.gs-dock-inline .gs-dock-music::before { width: 18px; height: 18px; }
    body:not(#gsBackNone) #gsDock.gs-dock-inline .gs-dock-music-divider { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone) #gsDock .gs-dock-music { transition: none; }
    body:not(#gsBackNone) #gsDock .gs-dock-music:active { transform: none; }
}

/* ---- App header music button ----
   The app version (body[data-mode="spa"]) swaps the dock for its bottom tab bar on screens 775px and under,
   so the mid-game music switch sits in its header instead - right of the Theme button, in the same round
   chip (spa.css's .themeQuickSelect::before). Not on the title screen, which has its own Music option. */
header .gs-header-music { display: none; }
@media screen and (max-width: 775px) {
    body[data-mode="spa"]:not(.gs-title-showing) header .gs-header-music {
        display: flex; align-items: center; justify-content: center; float: left; position: relative;
        width: 34px; height: 34px; margin: 14px 0 0 2px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
        pointer-events: auto; color: #FFF; background: var(--theme-selector-background-color);
        -webkit-tap-highlight-color: transparent; transition: transform .15s ease-in-out, opacity .2s ease-in-out;
    }
        body[data-mode="spa"] header .gs-header-music::before {
            content: ""; width: 18px; height: 18px; background-color: currentColor;
            -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E") center / contain no-repeat;
        }
        body[data-mode="spa"] header .gs-header-music[aria-pressed="false"] { opacity: 0.65; }
            body[data-mode="spa"] header .gs-header-music[aria-pressed="false"]::before {
                -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E") center / contain no-repeat;
            }
        body[data-mode="spa"] header .gs-header-music:active { transform: scale(0.9); }
        body[data-mode="spa"] header .gs-header-music:focus-visible { outline: 2px solid #864cff; outline-offset: 2px; }
}
@media screen and (max-width: 775px) {
    /* Light theme: the chip is light there, and the Theme button's icon dark - the note follows suit. */
    body[data-mode="spa"][data-theme="Default"]:not(.gs-title-showing) header .gs-header-music { color: #34363E; }
}

/* ---- Sound and Music in the game card ----
   Number Connect: #muteBtn is the board's Sound switch ("Sound on" / "Sound off"); #nmMusicBtn beside it is
   the game shell's Music switch (.gs-music-toggle). Word Snaps: #swMusicBtn, the same Music switch, at the
   foot of the game card. The Music buttons take the look numbersMatchup.css gives #muteBtn, and both games
   swap the old note / empty-set characters for line icons - a speaker for sound, a note for music - struck
   through when off. */
body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn) {
    float: right; cursor: pointer; display: inline-block; user-select: none; line-height: 18px;
    color: #34363E; color: var(--body-text-color); padding: 5px 10px; margin: 0 3px; font-size: 14px;
    border-radius: 20px; background-color: transparent; transition: all .2s ease-in-out;
}
    body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn):hover { background-color: rgba(0, 0, 0, 0.1); background-color: var(--link-hover-background-color); box-shadow: rgba(0, 0, 0, 0.4) 0 2px 4px; }
    body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn):active { transform: scale(0.9); }
    body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn)[aria-pressed="false"] { opacity: 0.45; }
body:not(#gsBackNone) :is(#muteBtn, #nmMusicBtn, #swMusicBtn):focus-visible { outline: 2px solid #864cff; outline-offset: 2px; }

body:not(#gsBackNone) :is(#muteBtn, #nmMusicBtn, #swMusicBtn)::before {
    content: ""; display: inline-block; width: 14px; height: 14px; margin: -3px 5px 0 0; vertical-align: middle;
    background-color: currentColor; -webkit-mask: var(--gs-board-icon) center / contain no-repeat; mask: var(--gs-board-icon) center / contain no-repeat;
}
body:not(#gsBackNone) #muteBtn { --gs-board-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='M15.5 9a4 4 0 0 1 0 6'/%3E%3Cpath d='M18.2 6.4a7.6 7.6 0 0 1 0 11.2'/%3E%3C/svg%3E"); }
body:not(#gsBackNone) #muteBtn.muted { --gs-board-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9.5h3.5L12 5.5v13l-4.5-4H4z'/%3E%3Cpath d='m16 9.5 5 5'/%3E%3Cpath d='m21 9.5-5 5'/%3E%3C/svg%3E"); }
body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn) { --gs-board-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3C/svg%3E"); }
body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn)[aria-pressed="false"] { --gs-board-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 17.5V5.5l10-2v12'/%3E%3Ccircle cx='6.5' cy='17.5' r='2.5'/%3E%3Ccircle cx='16.5' cy='15.5' r='2.5'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E"); }

@media (prefers-reduced-motion: reduce) {
    body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn) { transition: none; }
    body:not(#gsBackNone) :is(#nmMusicBtn, #swMusicBtn):active { transform: none; }
}
/* New game, Music and Sound share one row under the board - a little tighter on a phone, so all three fit. */
@media screen and (max-width: 420px) {
    body:not(#gsBackNone) :is(#newGame, #muteBtn, #nmMusicBtn) { padding: 5px 7px; margin-left: 1px; margin-right: 1px; }
}

/* ---- Word Snaps: Letters mode (secretWordLetters.js) ----
   Cream tiles and keys - the title screen's mode-card cream - so the new tab reads as part of the game. Its
   guess rows reuse the other tabs' .secret-word-guess-row look as-is. */
#swLettersHolder, #swVersusLetters, #swTitleDemo, .sw-casual-tiles {
    --swl-cream: #F4E9D8;
    --swl-cream-hover: #FBF3E6;
    --swl-cream-edge: #B99A74;
    --swl-cream-text: #3A2716;
    --swl-gold: #F6B92B;
    --swl-gold-edge: #C8860B;
    --swl-gold-soft: #FFE7A6;
    --swl-gold-text: #5A3A04;
    --swl-hit: #2F9E5B;
    --swl-hit-edge: #1E6E3E;
    --swl-error: #C2410C;
    clear: both;
}
body[data-theme="Dark"] #swLettersHolder, body[data-theme="Dark"] #swVersusLetters, body[data-theme="Dark"] #swTitleDemo, body[data-theme="Dark"] .sw-casual-tiles { --swl-error: #FB923C; --swl-hit-text: #4ADE80; }
/* Tile colors from the shop (LettersCosmetics) - each repaints the cream of the tiles and keys. Set on the holder
   for the one in use, and on each shop preview for its own. */
#swLettersHolder [data-swl-theme="classic"] { --swl-cream: #F4E9D8; --swl-cream-hover: #FBF3E6; --swl-cream-edge: #B99A74; --swl-cream-text: #3A2716; }
#swLettersHolder[data-swl-theme="mint"], #swLettersHolder [data-swl-theme="mint"] { --swl-cream: #D4F0E0; --swl-cream-hover: #E4F7EC; --swl-cream-edge: #6DAF8B; --swl-cream-text: #123B26; }
#swLettersHolder[data-swl-theme="sky"], #swLettersHolder [data-swl-theme="sky"] { --swl-cream: #D6E7FA; --swl-cream-hover: #E6F0FC; --swl-cream-edge: #6E98CC; --swl-cream-text: #12304F; }
#swLettersHolder[data-swl-theme="berry"], #swLettersHolder [data-swl-theme="berry"] { --swl-cream: #F5D6E4; --swl-cream-hover: #FAE6EF; --swl-cream-edge: #BD7397; --swl-cream-text: #4A1530; }
#swLettersHolder[data-swl-theme="sunset"], #swLettersHolder [data-swl-theme="sunset"] { --swl-cream: #FFD9BD; --swl-cream-hover: #FFE6D3; --swl-cream-edge: #D9875A; --swl-cream-text: #4D2408; }
#swLettersHolder[data-swl-theme="slate"], #swLettersHolder [data-swl-theme="slate"] { --swl-cream: #3B4252; --swl-cream-hover: #465063; --swl-cream-edge: #1C212C; --swl-cream-text: #ECEFF4; --swl-cream-price: #F6B92B; }
#swLettersHolder[data-swl-theme="lavender"], #swLettersHolder [data-swl-theme="lavender"] { --swl-cream: #E4DBF7; --swl-cream-hover: #EEE8FB; --swl-cream-edge: #9A86CD; --swl-cream-text: #2E1F57; }
#swLettersHolder[data-swl-theme="coral"], #swLettersHolder [data-swl-theme="coral"] { --swl-cream: #FFD3C9; --swl-cream-hover: #FFE1DA; --swl-cream-edge: #DC7C69; --swl-cream-text: #521A10; }
#swLettersHolder[data-swl-theme="ocean"], #swLettersHolder [data-swl-theme="ocean"] { --swl-cream: #2A6B9C; --swl-cream-hover: #3279AE; --swl-cream-edge: #164366; --swl-cream-text: #F0F7FF; --swl-cream-price: #FFD27A; }
/* Navy tiles with gold letters - the top of the range. */
#swLettersHolder[data-swl-theme="midnight"], #swLettersHolder [data-swl-theme="midnight"] { --swl-cream: #1B2340; --swl-cream-hover: #253055; --swl-cream-edge: #0A0F22; --swl-cream-text: #F6B92B; --swl-cream-price: #FFE7A6; }
/* Each tile color has lettering of its own as well - a typeface (with a stand-in for when the web font hasn't
   loaded or is blocked), the weight it comes in, and a nudge to its size so the letters of all ten fill a tile
   about equally. Classic keeps the page's own font: its three values are cleared, so the var() fallbacks below
   apply - which also puts Classic's preview right in the shop while another color is in use. The web fonts are
   loaded by secretWordLetters.js (ensureThemeFonts), capital letters only. */
#swLettersHolder [data-swl-theme="classic"] { --swl-font: initial; --swl-font-weight: initial; --swl-font-scale: initial; }
#swLettersHolder[data-swl-theme="mint"], #swLettersHolder [data-swl-theme="mint"] { --swl-font: "Patrick Hand", "Comic Sans MS", cursive; --swl-font-weight: 400; --swl-font-scale: 1.2; }
#swLettersHolder[data-swl-theme="sky"], #swLettersHolder [data-swl-theme="sky"] { --swl-font: "Bebas Neue", "Arial Narrow", Impact, sans-serif; --swl-font-weight: 400; --swl-font-scale: 1.25; }
#swLettersHolder[data-swl-theme="lavender"], #swLettersHolder [data-swl-theme="lavender"] { --swl-font: "Playfair Display", Georgia, serif; --swl-font-weight: 800; --swl-font-scale: 1; }
#swLettersHolder[data-swl-theme="berry"], #swLettersHolder [data-swl-theme="berry"] { --swl-font: "Chewy", "Comic Sans MS", cursive; --swl-font-weight: 400; --swl-font-scale: 1.08; }
#swLettersHolder[data-swl-theme="coral"], #swLettersHolder [data-swl-theme="coral"] { --swl-font: "Baloo 2", "Arial Rounded MT Bold", sans-serif; --swl-font-weight: 800; --swl-font-scale: 1.05; }
#swLettersHolder[data-swl-theme="sunset"], #swLettersHolder [data-swl-theme="sunset"] { --swl-font: "Righteous", Impact, sans-serif; --swl-font-weight: 400; --swl-font-scale: 1; }
#swLettersHolder[data-swl-theme="ocean"], #swLettersHolder [data-swl-theme="ocean"] { --swl-font: "Alfa Slab One", Rockwell, serif; --swl-font-weight: 400; --swl-font-scale: 0.9; }
#swLettersHolder[data-swl-theme="slate"], #swLettersHolder [data-swl-theme="slate"] { --swl-font: "Space Mono", Consolas, monospace; --swl-font-weight: 700; --swl-font-scale: 1; }
#swLettersHolder[data-swl-theme="midnight"], #swLettersHolder [data-swl-theme="midnight"] { --swl-font: "Cinzel", "Trajan Pro", Georgia, serif; --swl-font-weight: 800; --swl-font-scale: 0.95; }
/* Where the lettering shows: the word's tiles, the letter on each key, the shop's previews and the letter on the
   Buy pill. --swl-size is each one's own size (smaller on a phone, further down), which the color's scale multiplies. */
#swLettersHolder .sw-letters-tile { --swl-size: 24px; }
#swLettersHolder .sw-letters-key-letter { --swl-size: 16px; }
#swLettersHolder .sw-letters-shop-tile, #swLettersHolder .sw-letters-buy-letter { --swl-size: 15px; }
#swLettersHolder :is(.sw-letters-tile, .sw-letters-key-letter, .sw-letters-shop-tile, .sw-letters-buy-letter) { font-family: var(--swl-font, inherit); font-weight: var(--swl-font-weight, 800); font-size: calc(var(--swl-size) * var(--swl-font-scale, 1)); line-height: 1; }
@media screen and (max-width: 480px) {
    #swLettersHolder .sw-letters-tile { --swl-size: 20px; }
    #swLettersHolder .sw-letters-key-letter { --swl-size: 15px; }
}
.gs-title-mode.sw-title-mode-letters { background-image: url(../../Assets/Games/Images/letters.svg); }
/* Word Snaps' title screen has three mode buttons now that Letters has joined Casual and Versus. The shell lays
   mode buttons out two to a row, which left the third on a line of its own - so here they're one even set:
   three across, all the same size, where there's room (wider than the Play button above, and centred under
   it); on a phone, three rows the Play button's width. Only for a title screen that has the Letters button. */
#gsTitleScreen .gs-title-modes:has(.sw-title-mode-letters) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 696px; max-width: calc(100vw - 56px); }
    #gsTitleScreen .gs-title-modes:has(.sw-title-mode-letters) .gs-title-mode { max-width: none; min-height: 62px; justify-content: center; padding-right: 10px; }
    /* Short enough for one line on the wider layouts, and kept there - a card that wraps makes the row ragged. */
    #gsTitleScreen .gs-title-modes:has(.sw-title-mode-letters) .gs-title-mode-status { line-height: 1.25; }
@media (max-width: 790px) {
    #gsTitleScreen .gs-title-modes:has(.sw-title-mode-letters) { grid-template-columns: 1fr; gap: 9px; width: min(325px, 100%); max-width: 100%; }
        #gsTitleScreen .gs-title-modes:has(.sw-title-mode-letters) .gs-title-mode { min-height: 58px; }
}
/* The title animation's Letters round (SecretWord.js playLettersRound): it takes the ranked guess list's place
   under the demo's input - same height, so nothing below it moves - with a coin count and a line of
   commentary, the word's tiles, and a short row of letter keys. Tiles and keys are the Letters tab's, smaller. */
.sw-title-demo-letters { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 11px; min-height: 166px; transition: opacity .3s ease-in, transform .3s ease-in; }
    .sw-title-demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 24px; }
    .sw-title-demo-coins { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px 2px 4px; border-radius: 12px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--swl-gold-text); background: var(--swl-gold-soft); box-shadow: inset 0 0 0 1.5px var(--swl-gold); }
        .sw-title-demo-coins .sw-letters-coin { width: 16px; height: 16px; }
        .sw-title-demo-coins.sw-title-demo-coins-bump { animation: swTitleCoinsBump .35s ease-out; }
    .sw-title-demo-note { font-size: 12px; font-weight: 600; text-align: right; opacity: 0.8; }
        .sw-title-demo-note.sw-title-demo-note-good { opacity: 1; font-weight: 700; color: var(--swl-hit-text, var(--swl-hit)); }
    .sw-title-demo-tiles { display: flex; gap: 5px; }
        .sw-title-demo-tile { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 42px; border-radius: 8px; font-size: 20px; font-weight: 800; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 3px 0 var(--swl-cream-edge); opacity: 0.55; }
            .sw-title-demo-tile.sw-title-demo-tile-shown { opacity: 1; animation: swLettersFlip .35s ease-out both; }
            /* Solved: each tile hops and turns green, one after the other (the delay is set per tile). */
            .sw-title-demo-tile.sw-title-demo-tile-solved { color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); animation: swTitleTileWin .45s ease-out both; }
    .sw-title-demo-keys { display: flex; gap: 4px; }
        .sw-title-demo-key { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 38px; height: 42px; border-radius: 8px; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 3px 0 var(--swl-cream-edge); transition: transform .15s ease-out, background-color .15s ease-out, opacity .2s ease-out; }
            .sw-title-demo-key-letter { font-size: 15px; font-weight: 800; line-height: 1; }
            .sw-title-demo-key-price { font-size: 9px; font-weight: 700; line-height: 1; white-space: nowrap; color: var(--swl-gold-text); }
            .sw-title-demo-key.sw-title-demo-key-picked { background: var(--swl-gold); box-shadow: 0 3px 0 var(--swl-gold-edge); transform: translateY(-3px); }
            .sw-title-demo-key.sw-title-demo-key-hit { color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
                .sw-title-demo-key.sw-title-demo-key-hit .sw-title-demo-key-price { color: #FFF; font-weight: 600; }
            .sw-title-demo-key.sw-title-demo-key-miss { opacity: 0.45; box-shadow: none; }
                .sw-title-demo-key.sw-title-demo-key-miss .sw-title-demo-key-letter { text-decoration: line-through; }
@keyframes swTitleCoinsBump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes swTitleTileWin {
    0% { transform: translateY(0); color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 3px 0 var(--swl-cream-edge); }
    45% { transform: translateY(-7px); color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
    100% { transform: translateY(0); color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
}
/* Leaving the title screen: the ranked rows slide off (SecretWord.css) - this board shrinks away with the input. */
#swTitleDemo.sw-title-demo-leaving .sw-title-demo-letters { opacity: 0; transform: scale(0.9); }
@media (prefers-reduced-motion: reduce) {
    .sw-title-demo-tile.sw-title-demo-tile-shown, .sw-title-demo-tile.sw-title-demo-tile-solved, .sw-title-demo-coins.sw-title-demo-coins-bump { animation: none; }
    .sw-title-demo-key, .sw-title-demo-letters { transition: none; }
}
/* The player's coins on the Letters button - a gold pill in its top corner (secretWordLetters.js setTitleCoins). */
.gs-title-mode .sw-title-coins { position: absolute; top: 8px; right: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 1px 8px 1px 3px; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 16px; font-variant-numeric: tabular-nums; color: #5A3A04; background: #FFE7A6; box-shadow: inset 0 0 0 1px #F6B92B; }
    .gs-title-mode .sw-title-coins .sw-letters-coin { width: 14px; height: 14px; }
/* Letters' own page background - the lake the other tabs use (SecretWord.css, --ws-background-*), in the coins'
   gold and green: a mint morning, and a green night with a gold moon. */
.body-background.custom-background[data-mode="letters"] { background-image: url(../../Assets/Games/Images/WordSnapsBg/wordsnaps-letters-bg-light.webp); }
body[data-theme="Dark"] .body-background.custom-background[data-mode="letters"] { background-image: url(../../Assets/Games/Images/WordSnapsBg/wordsnaps-letters-bg-dark.webp); }

/* Word Snaps' dock has four tabs with Letters - on a phone, where it sits in the card, each tab stacks its icon
   over its label so all four still fit on one line. */
@media screen and (max-width: 520px) {
    body:not(#gsBackNone) #gsDock.gs-dock-inline:has(.gs-dock-tab[data-mode="letters"]) .gs-dock-tab { flex-direction: column; gap: 1px; height: 46px; padding: 0 2px; font-size: 11px; line-height: 1.1; white-space: nowrap; }
        body:not(#gsBackNone) #gsDock.gs-dock-inline:has(.gs-dock-tab[data-mode="letters"]) .gs-dock-tab img { width: 18px; height: 18px; }
}

/* Word Snaps: the Daily tab's two challenges - the ranked word (Classic) and the Tiles word of the day. A
   small pair of pills at the top of the tab; the one that's showing is gold, and Tiles carries a dot while
   its word is still waiting to be played. */
#swDailyKinds { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 auto 12px auto; }
    .sw-daily-kind { position: relative; padding: 5px 18px; border-radius: 999px; border: 1px solid rgba(128, 128, 128, 0.5); background: transparent; color: inherit; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.3; cursor: pointer; opacity: 0.8; transition: opacity .15s ease-out, background-color .15s ease-out; }
        .sw-daily-kind:hover { opacity: 1; }
        .sw-daily-kind:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
        .sw-daily-kind.sw-daily-kind-active { opacity: 1; color: #5A3A04; background: #F6B92B; border-color: #C8860B; cursor: default; }
        .sw-daily-kind.sw-daily-kind-new:not(.sw-daily-kind-active)::after { content: ""; position: absolute; top: -3px; right: -2px; width: 9px; height: 9px; border-radius: 50%; background: #E5484D; }

/* Today's word - the strip above the start screen and the game: what it is, where the player stands on it,
   and the way in, out, or to share it. Gold while it's waiting, green once it's done. */
#swLettersDaily { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 9px 12px; margin-bottom: 14px; border-radius: 12px; background: rgba(246, 185, 43, 0.14); border: 1px solid rgba(246, 185, 43, 0.6); }
    #swLettersDaily.sw-letters-daily-done { background: rgba(47, 158, 91, 0.1); border-color: rgba(47, 158, 91, 0.4); }
    .sw-letters-daily-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; text-align: left; }
    .sw-letters-daily-title { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
        .sw-letters-daily-title::before { content: ""; flex: none; width: 18px; height: 18px; background: url(../../Assets/Games/Images/dailychallenge.png) center / contain no-repeat; }
    .sw-letters-daily-status { font-size: 12px; opacity: 0.8; }
    .sw-letters-daily-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
    .sw-letters-btn.sw-letters-daily-btn { padding: 6px 16px; }
/* Share - an arrow out of a tray, in the text color. */
.sw-letters-btn.sw-letters-share-btn { display: inline-flex; align-items: center; gap: 6px; }
    .sw-letters-btn.sw-letters-share-btn::before {
        content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7.5 7.5 12 3l4.5 4.5M5 12v7a1.5 1.5 0 0 0 1.5 1.5h11A1.5 1.5 0 0 0 19 19v-7'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3M7.5 7.5 12 3l4.5 4.5M5 12v7a1.5 1.5 0 0 0 1.5 1.5h11A1.5 1.5 0 0 0 19 19v-7'/%3E%3C/svg%3E") center / contain no-repeat;
    }

#swLettersStart { text-align: center; padding: 6px 4px 10px 4px; }
    /* How to play, in three lines - each with a little letter tile for a bullet. */
    .sw-letters-steps { display: flex; flex-direction: column; gap: 7px; max-width: 430px; margin: 0 auto 14px auto; padding: 0; list-style: none; text-align: left; font-size: 14px; line-height: 1.45; }
        .sw-letters-steps li { position: relative; padding-left: 26px; }
            .sw-letters-steps li::before { content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border-radius: 4px; background: var(--swl-cream); box-shadow: 0 2px 0 var(--swl-cream-edge); }
    .sw-letters-balance { margin: 0 0 12px 0; font-size: 14px; }
    /* The day's goals: a tick, the goal, what it pays. Also shown under the result once a word is over. */
    .sw-letters-goals { max-width: 430px; margin: 16px auto 0 auto; padding: 10px 12px; border-radius: 12px; text-align: left; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); background: rgba(127, 127, 127, 0.07); }
        .sw-letters-goals.sw-letters-goals-after { margin: 0 auto 14px auto; }
        .sw-letters-goals.sw-letters-goals-play { margin: 14px auto 12px auto; }
        /* On the title screen, which spaces its own rows and is outside Letters' colours. */
        .sw-letters-goals.sw-title-goals { --swl-hit: #2F9E5B; box-sizing: border-box; width: 100%; margin: 0 auto; }
        /* Tapping the top row's goals count (below) brings the list into view with a ring that fades. */
        .sw-letters-goals.sw-letters-goals-flash { animation: swLettersGoalsFlash 1.2s ease-out; }
    /* "Goals 1/3" beside Shop - on phones, where the list itself is a scroll below the keyboard. */
    #swLettersGoalsBtn { display: none; font-variant-numeric: tabular-nums; }
    @media (max-width: 520px) {
        #swLettersGoalsBtn:not([hidden]) { display: inline-block; }
    }
    @keyframes swLettersGoalsFlash {
        0% { box-shadow: 0 0 0 3px rgba(118, 107, 255, 0.7); }
        100% { box-shadow: 0 0 0 3px rgba(118, 107, 255, 0); }
    }
    @media (prefers-reduced-motion: reduce) {
        .sw-letters-goals.sw-letters-goals-flash { animation: none; }
    }
        .sw-letters-goals-title { margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.7; }
        .sw-letters-goal { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; }
            .sw-letters-goal-check { flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.35; }
            .sw-letters-goal-text { flex: 1 1 auto; }
            .sw-letters-goal-reward { flex: none; display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-variant-numeric: tabular-nums; }
                .sw-letters-goal-reward .sw-letters-coin { width: 15px; height: 15px; }
            .sw-letters-goal.sw-letters-goal-done .sw-letters-goal-check { opacity: 1; border-color: var(--swl-hit); background: var(--swl-hit) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
            .sw-letters-goal.sw-letters-goal-done .sw-letters-goal-text, .sw-letters-goal.sw-letters-goal-done .sw-letters-goal-reward { opacity: 0.55; }
            .sw-letters-goal.sw-letters-goal-done .sw-letters-goal-text { text-decoration: line-through; }
    /* The rest of the rules, for whoever wants them. */
    .sw-letters-more { max-width: 520px; margin: 14px auto 0 auto; font-size: 13px; text-align: left; }
        .sw-letters-more summary { cursor: pointer; text-align: center; font-weight: 600; opacity: 0.8; }
            .sw-letters-more summary:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; border-radius: 4px; }
        .sw-letters-more ul { margin: 10px 0 0 0; padding-left: 18px; line-height: 1.5; opacity: 0.85; }
        .sw-letters-more .sw-letters-legend { margin: 10px 0 0 0; }
    .sw-letters-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 6px; margin-bottom: 16px; }
    .sw-letters-legend-chip { padding: 4px 10px; border-radius: 12px; font-size: 12px; letter-spacing: 0.5px; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 2px 0 var(--swl-cream-edge); }
        .sw-letters-legend-chip strong { color: var(--swl-cream-price, var(--swl-gold-text)); }

.sw-letters-btn { display: inline-block; padding: 6px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); background: transparent; color: inherit; font-family: inherit; }
    .sw-letters-btn:hover { background-color: rgba(118, 107, 255, 0.1); }
    .sw-letters-btn:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }
.sw-letters-btn.sw-letters-btn-main { padding: 8px 18px; border: 0; color: #FFF; color: var(--input-button-text-color); background: #766BFF; background: var(--input-button-background-color); }
    .sw-letters-btn.sw-letters-btn-main:hover { background: #4D5577; background: var(--input-button-hover-background-color); }

#swLettersTopBar { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; font-size: 13px; }
    .sw-letters-top-left { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .sw-letters-top-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; }
    .sw-letters-top-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; }
    /* The Daily tab's rank block (#secretWordTopScore in SecretWord.css), for Letters. */
    #swLettersRank { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; padding-bottom: 3px; text-align: center; cursor: pointer; }
        #swLettersRank .sw-letters-rank-points { display: inline-flex; align-items: center; gap: 4px; font-size: 18px; }
            #swLettersRank .sw-letters-rank-points::before { content: ""; width: 20px; height: 20px; background: url(../../Assets/icons/highscore.png) center / 20px no-repeat; }
        #swLettersRank .sw-letters-rank-sub { margin-top: 1px; font-size: 11px; }
        #swLettersRank .sw-letters-rank-link { margin-top: 2px; font-size: 12px; opacity: 0.85; text-decoration: underline; }
        #swLettersRank:hover .sw-letters-rank-link { opacity: 1; }
        #swLettersRank:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; border-radius: 6px; }
    #swLettersCoins, #swLettersShopCoins { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 14px; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--swl-gold-text); background: var(--swl-gold-soft); box-shadow: inset 0 0 0 1.5px var(--swl-gold); }
    .sw-letters-coin { display: inline-block; width: 20px; height: 20px; background: url(../../Assets/Games/Images/letters.svg) center / contain no-repeat; }
    #swLettersGuessCount, #swLettersPrize { opacity: 0.75; }
    /* The solve streak, with the flame from the badges. */
    #swLettersStreak { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--swl-error); cursor: help; }
        #swLettersStreak::before { content: ""; width: 14px; height: 14px; background: url(../../Assets/Games/Images/LettersBadges/flame.svg) center / contain no-repeat; }
    .sw-letters-guest-note { max-width: 520px; margin: 10px auto 0 auto; font-size: 12px; opacity: 0.75; }
.sw-letters-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 12px; }
.sw-letters-board-link, .sw-letters-shop-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; text-decoration: underline; cursor: pointer; user-select: none; }
    .sw-letters-board-link::before, .sw-letters-shop-link::before { content: ""; width: 16px; height: 16px; background: url(../../Assets/icons/highscore.png) center / contain no-repeat; }
    /* A storefront, drawn in the text color (a mask, so it follows the theme) - on the start screen's Shop link
       and the Shop button in the top bar. */
    .sw-letters-shop-link::before, #swLettersShopBtn::before {
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 4h15L21 9H3z'/%3E%3Cpath d='M3 9a3 3 0 0 0 6 0a3 3 0 0 0 6 0a3 3 0 0 0 6 0'/%3E%3Cpath d='M5 12.5V20h14v-7.5M10 20v-4.5h4V20'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 4h15L21 9H3z'/%3E%3Cpath d='M3 9a3 3 0 0 0 6 0a3 3 0 0 0 6 0a3 3 0 0 0 6 0'/%3E%3Cpath d='M5 12.5V20h14v-7.5M10 20v-4.5h4V20'/%3E%3C/svg%3E") center / contain no-repeat;
    }
#swLettersShopBtn { display: inline-flex; align-items: center; gap: 6px; }
    #swLettersShopBtn::before { content: ""; flex: none; width: 15px; height: 15px; }
    .sw-letters-board-link:focus-visible, .sw-letters-shop-link:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; border-radius: 4px; }
.sw-letters-name-badge { width: 16px; height: 16px; margin-left: 4px; vertical-align: -3px; }

/* The shop - a grid of cards per kind, each with a preview, a name, and Use / In use / its price. */
/* Back, title, coins - the outer columns share the leftover width so the title stays centered. */
.sw-letters-shop-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-bottom: 10px; }
    .sw-letters-shop-head > :first-child { justify-self: start; }
    .sw-letters-shop-head > :last-child { justify-self: end; }
    .sw-letters-shop-title { margin: 0; font-size: 20px; font-weight: 800; text-align: center; }
    /* The shared Back chip (top of this file), minus its bottom margin - here it sits in the header row. */
    body:not(#gsBackNone) #swLettersShop #swLettersShopBack { margin: 0; font-family: inherit; white-space: nowrap; }
.sw-letters-shop-intro { margin: 0 0 6px 0; font-size: 13px; line-height: 1.5; opacity: 0.8; text-align: center; }
.sw-letters-shop-heading { margin: 18px 0 2px 0; font-size: 15px; font-weight: 800; }
.sw-letters-shop-sub { margin: 0 0 10px 0; font-size: 12px; opacity: 0.75; }
.sw-letters-shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.sw-letters-shop-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border-radius: 14px; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); background: rgba(127, 127, 127, 0.07); transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out; }
    .sw-letters-shop-item.sw-letters-shop-item-in-use { border-color: var(--swl-hit); box-shadow: inset 0 0 0 1px var(--swl-hit); }
    .sw-letters-shop-item.sw-letters-shop-item-picked { border-color: var(--swl-gold); box-shadow: inset 0 0 0 1px var(--swl-gold); }
    .sw-letters-shop-preview { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; }
        .sw-letters-shop-preview img { width: 34px; height: 34px; }
        .sw-letters-shop-preview.sw-letters-shop-preview-none::before { content: ""; width: 28px; height: 28px; border-radius: 50%; border: 2px dashed currentColor; opacity: 0.35; }
    .sw-letters-shop-tile { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 30px; border-radius: 6px; font-size: 15px; font-weight: 800; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 2px 0 var(--swl-cream-edge); }
    .sw-letters-shop-name { font-size: 14px; font-weight: 700; }
    .sw-letters-shop-actions { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; }
    .sw-letters-shop-in-use { padding: 5px 12px; border-radius: 14px; font-size: 12px; font-weight: 700; color: var(--swl-hit-text, var(--swl-hit)); background: rgba(47, 158, 91, 0.12); }
    .sw-letters-btn.sw-letters-shop-use { padding: 6px 16px; }
    /* The price, before it's picked - a quiet gold outline; picking turns it into the solid Buy pill. */
    .sw-letters-shop-price { display: inline-flex; align-items: center; height: 32px; padding: 0 12px 0 8px; cursor: pointer; border-radius: 16px; font-family: inherit; font-size: 13px; font-weight: 800; color: var(--swl-gold-text); background: var(--swl-gold-soft); border: 1.5px solid var(--swl-gold); transition: filter .15s ease-in-out; }
        .sw-letters-shop-price:hover:not(:disabled) { filter: brightness(1.04); }
        .sw-letters-shop-price:disabled { cursor: not-allowed; opacity: 0.45; }
        .sw-letters-shop-price:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }
        .sw-letters-shop-price .sw-letters-buy-price { height: auto; padding: 0; background: none; }
    .sw-letters-buy.sw-letters-buy-compact { height: 32px; padding: 0 4px 0 14px; font-size: 13px; }
        .sw-letters-buy.sw-letters-buy-compact .sw-letters-buy-price { height: 24px; }
    /* Celebration cards: an icon of each, which plays it when tapped (secretWordLetters.js playEffect). */
    .sw-letters-shop-preview-effect:not(.sw-letters-shop-preview-none) { cursor: pointer; border-radius: 10px; transition: transform .15s ease-in-out; }
        .sw-letters-shop-preview-effect:not(.sw-letters-shop-preview-none):hover { transform: scale(1.12); }
        .sw-letters-shop-preview-effect:not(.sw-letters-shop-preview-none):focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }
        .sw-letters-shop-preview-effect:not(.sw-letters-shop-preview-none)::before { content: ""; width: 40px; height: 40px; background: center / contain no-repeat; }
        .sw-letters-shop-preview-effect[data-effect="confetti"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Crect x='6' y='8' width='5' height='9' rx='1' fill='%23F6B92B' transform='rotate(-25 8 12)'/%3E%3Crect x='17' y='4' width='5' height='9' rx='1' fill='%23766BFF' transform='rotate(15 19 8)'/%3E%3Crect x='28' y='9' width='5' height='9' rx='1' fill='%232F9E5B' transform='rotate(35 30 13)'/%3E%3Crect x='10' y='22' width='5' height='9' rx='1' fill='%2338BDF8' transform='rotate(50 12 26)'/%3E%3Crect x='22' y='19' width='5' height='9' rx='1' fill='%23F43F5E' transform='rotate(-40 24 23)'/%3E%3Crect x='30' y='26' width='5' height='9' rx='1' fill='%23FB923C' transform='rotate(10 32 30)'/%3E%3Crect x='17' y='30' width='5' height='8' rx='1' fill='%23F6B92B' transform='rotate(-15 19 34)'/%3E%3C/svg%3E"); }
        .sw-letters-shop-preview-effect[data-effect="coins"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg stroke='%23C8860B' stroke-width='1.6'%3E%3Cellipse cx='12' cy='12' rx='7' ry='7' fill='%23F6B92B'/%3E%3Cellipse cx='28' cy='18' rx='4' ry='7' fill='%23E3A21A'/%3E%3Cellipse cx='17' cy='29' rx='7' ry='7' fill='%23F6B92B'/%3E%3C/g%3E%3Cg fill='%23FFE7A6'%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Ccircle cx='15' cy='27' r='2'/%3E%3C/g%3E%3C/svg%3E"); }
        .sw-letters-shop-preview-effect[data-effect="fireworks"]::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40' stroke-linecap='round' stroke-width='2.4'%3E%3Cg stroke='%23766BFF'%3E%3Cpath d='M15 15V6M15 15H6M15 15l-6-6M15 15l6-6M15 15l-6 6'/%3E%3C/g%3E%3Cg stroke='%23F6B92B'%3E%3Cpath d='M27 26v-7M27 26h7M27 26l5 5M27 26l5-5M27 26v7M27 26l-5 5'/%3E%3C/g%3E%3Ccircle cx='15' cy='15' r='2' fill='%23F43F5E'/%3E%3Ccircle cx='27' cy='26' r='2' fill='%232F9E5B'/%3E%3C/svg%3E"); }
#swLettersShopMessage { min-height: 20px; margin-top: 14px; font-size: 13px; text-align: center; }
    #swLettersShopMessage[data-kind="error"] { color: var(--swl-error); }
    #swLettersShopMessage[data-kind="good"] { color: var(--swl-hit-text, var(--swl-hit)); font-weight: 600; }
@media screen and (max-width: 480px) {
    #secretWordLettersHighScoresHolder table.user-score-table tbody .user-score-image { width: 30px; height: 30px; margin-right: 6px; }
    #secretWordLettersHighScoresHolder table.user-score-table tbody .user-score-name { font-size: 12px; }
    #secretWordLettersHighScoresHolder table.user-score-table .rank-cell { padding-right: 8px; }
}

#swLettersTiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 16px 0; }
    .sw-letters-tile { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 48px; border-radius: 9px; font-size: 24px; font-weight: 800; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 3px 0 var(--swl-cream-edge); opacity: 0.55; }
        .sw-letters-tile.sw-letters-tile-shown { opacity: 1; animation: swLettersFlip .35s ease-out; }
    #swLettersTiles.sw-letters-solved .sw-letters-tile { opacity: 1; color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
    #swLettersTiles.sw-letters-revealed .sw-letters-tile { opacity: 0.85; }
@keyframes swLettersFlip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }

#swLettersBanner { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; margin-bottom: 14px; border-radius: 12px; text-align: center; background: rgba(47, 158, 91, 0.12); border: 1px solid rgba(47, 158, 91, 0.45); }
    #swLettersBanner.sw-letters-banner-revealed { background: rgba(127, 127, 127, 0.1); border-color: rgba(127, 127, 127, 0.35); }
    #swLettersBannerMain { font-size: 16px; font-weight: 700; }
    #swLettersBannerSub { font-size: 13px; opacity: 0.8; }
    #swLettersBannerGoals { font-size: 13px; font-weight: 700; color: var(--swl-hit-text, var(--swl-hit)); }
    .sw-letters-banner-actions { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 2px; }

/* The guess box mirrors the other tabs' (#secretWordInputHolder in SecretWord.css). */
#swLettersInputHolder { display: flex; gap: 8px; margin-bottom: 5px; }
    #swLettersInputWrapper { position: relative; flex: 1 1 auto; }
#swLettersGuessInput { width: 100%; box-sizing: border-box; font-size: 15px; border-radius: 15px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
#swLettersGuessSubmit { flex: 0 0 auto; position: relative; width: 40px; height: 40px; padding: 0; margin-top: 2px; cursor: pointer; border-radius: 15px; border: none; background: #766BFF; background: var(--input-button-background-color); transition: all .2s ease-in-out; }
    #swLettersGuessSubmit::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; margin: -7px 0 0 -9px; border-top: 2.5px solid #FFF; border-top-color: var(--input-button-text-color); border-right: 2.5px solid #FFF; border-right-color: var(--input-button-text-color); transform: rotate(45deg); }
    #swLettersGuessSubmit:hover { background-color: #4D5577; background-color: var(--input-button-hover-background-color); }
    #swLettersGuessSubmit:active { transform: scale(0.9); }
    #swLettersGuessSubmit:disabled { opacity: 0.5; cursor: default; }
#swLettersSuggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 260px; overflow-y: auto; box-sizing: border-box; border-radius: 10px; background: #FFF; background: var(--account-dropdown-background-color); border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }

#swLettersMessage { min-height: 20px; margin: 4px 0 8px 0; font-size: 13px; text-align: center; }
    #swLettersMessage[data-kind="error"] { color: var(--swl-error); }
    #swLettersMessage[data-kind="good"] { color: var(--swl-hit-text, var(--swl-hit)); font-weight: 600; }

#swLettersKeyboardLabel { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; min-height: 40px; margin-bottom: 8px; font-size: 13px; font-weight: 700; text-align: center; }
    .sw-letters-confirm { display: inline-flex; align-items: center; justify-content: center; gap: 8px; animation: swLettersPop .18s ease-out; }
    /* The button says it all - the question stays for screen readers. */
    .sw-letters-confirm-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    /* Buy: a gold pill - letter tile, "Buy", then the price on a coin chip. */
    .sw-letters-buy { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 5px 0 5px; cursor: pointer; border: 0; border-radius: 19px; font-family: inherit; font-size: 14px; font-weight: 800; color: var(--swl-gold-text); background: linear-gradient(180deg, #FFD05C 0%, var(--swl-gold) 100%); box-shadow: 0 3px 0 var(--swl-gold-edge), 0 6px 14px rgba(200, 134, 11, 0.28); transition: transform .1s ease-in-out, box-shadow .1s ease-in-out, filter .15s ease-in-out; }
        .sw-letters-buy:hover { filter: brightness(1.05); }
        .sw-letters-buy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--swl-gold-edge), 0 2px 6px rgba(200, 134, 11, 0.25); }
        .sw-letters-buy:focus-visible { outline: 2px solid #766BFF; outline-offset: 3px; }
        .sw-letters-buy-letter { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: 15px; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: inset 0 -2px 0 var(--swl-cream-edge); }
        .sw-letters-buy-label { letter-spacing: 0.3px; }
        .sw-letters-buy-price { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px 0 5px; border-radius: 14px; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, 0.55); }
            .sw-letters-buy-price .sw-letters-coin { width: 18px; height: 18px; }
    .sw-letters-cancel { position: relative; width: 32px; height: 32px; padding: 0; cursor: pointer; border-radius: 50%; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); background: transparent; color: inherit; transition: background-color .15s ease-in-out; }
        .sw-letters-cancel::before, .sw-letters-cancel::after { content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 1px; background: currentColor; opacity: 0.7; transform: rotate(45deg); }
        .sw-letters-cancel::after { transform: rotate(-45deg); }
        .sw-letters-cancel:hover { background-color: rgba(118, 107, 255, 0.1); }
        .sw-letters-cancel:hover::before, .sw-letters-cancel:hover::after { opacity: 1; }
        .sw-letters-cancel:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }
@keyframes swLettersPop { 0% { opacity: 0; transform: scale(0.92); } 100% { opacity: 1; transform: scale(1); } }
    .sw-letters-guess-cost { font-weight: normal; opacity: 0.7; }
#swLettersKeyboard { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-bottom: 18px; }
    .sw-letters-key-row { display: flex; justify-content: center; gap: 5px; max-width: 100%; }
    .sw-letters-key { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; flex: 0 1 40px; min-width: 0; width: 40px; height: 46px; padding: 0; cursor: pointer; border: 0; border-radius: 8px; font-family: inherit; color: var(--swl-cream-text); background: var(--swl-cream); box-shadow: 0 3px 0 var(--swl-cream-edge); transition: transform .1s ease-in-out, background-color .15s ease-in-out; }
        .sw-letters-key:hover:not(:disabled) { background: var(--swl-cream-hover); }
        .sw-letters-key:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 var(--swl-cream-edge); }
        .sw-letters-key:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }
        .sw-letters-key-letter { font-size: 16px; font-weight: 800; line-height: 1; }
        .sw-letters-key-price { font-size: 10px; font-weight: 700; line-height: 1; color: var(--swl-cream-price, var(--swl-gold-text)); white-space: nowrap; }
        /* Its own dark lettering, whatever the tile color's is - a dark tile color's light (or gold) letters vanish on the gold. */
        .sw-letters-key.sw-letters-key-selected { color: var(--swl-gold-text); background: var(--swl-gold); box-shadow: 0 3px 0 var(--swl-gold-edge); transform: translateY(-2px); }
            .sw-letters-key.sw-letters-key-selected .sw-letters-key-price { color: var(--swl-gold-text); }
            .sw-letters-key.sw-letters-key-selected:hover:not(:disabled) { background: var(--swl-gold); }
        .sw-letters-key.sw-letters-key-hit { cursor: default; color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
            .sw-letters-key.sw-letters-key-hit .sw-letters-key-price { color: #FFF; font-weight: 600; }
        .sw-letters-key.sw-letters-key-miss { cursor: default; opacity: 0.45; box-shadow: none; }
            .sw-letters-key.sw-letters-key-miss .sw-letters-key-letter { text-decoration: line-through; }
            .sw-letters-key.sw-letters-key-miss .sw-letters-key-price { font-weight: 600; }
        .sw-letters-key.sw-letters-key-short { cursor: not-allowed; opacity: 0.4; }
        .sw-letters-key.sw-letters-key-found { cursor: default; color: #FFF; background: var(--swl-hit); box-shadow: 0 3px 0 var(--swl-hit-edge); }
            .sw-letters-key.sw-letters-key-found .sw-letters-key-price { color: #FFF; font-weight: 600; }
        .sw-letters-key.sw-letters-key-busy { pointer-events: none; }

@media screen and (max-width: 480px) {
    .sw-letters-tile { width: 34px; height: 40px; font-size: 20px; }
    .sw-letters-key-row { gap: 4px; }
    .sw-letters-key { width: 31px; height: 44px; }
    .sw-letters-key-letter { font-size: 15px; }
    .sw-letters-key-price { font-size: 9px; }
}
/* The player's Letters coins, always on screen in Word Snaps: a gold count on the dock's Letters tab (and the app
   version's menu-bar item), added by secretWordLetters.js. Beside the label where the tab is a row with room
   for it; pinned to the tab's top corner where the dock sits in the card or the tab stacks icon over label. */
.sw-dock-coins { flex: none; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; text-shadow: none; color: #5A3A04; background: #FFE7A6; box-shadow: inset 0 0 0 1px #F6B92B; }
    .sw-dock-coins:empty { display: none; }
#gsDock.gs-dock-inline .gs-dock-tab .sw-dock-coins { position: absolute; top: -6px; right: 0; padding: 0 5px; font-size: 10px; line-height: 15px; box-shadow: inset 0 0 0 1px #F6B92B, 0 1px 3px rgba(0, 0, 0, 0.25); }
/* The app's menu bar styles (and, on a phone, hides) every span in an item as its label - this one is the
   count, up and to the right of the icon, so it's spelled out past those rules (Site.css, spa.css). */
#menu-bar a[data-item="letters"] { position: relative; }
    #menu-bar ul.non-admin-menu li a[data-item="letters"] span.sw-dock-coins { display: inline-block !important; position: absolute; top: 3px; left: 50%; right: auto; clear: none; margin: 0 0 0 6px; padding: 0 5px; overflow: visible; font-size: 10px; line-height: 15px; color: #5A3A04 !important; box-shadow: inset 0 0 0 1px #F6B92B, 0 1px 3px rgba(0, 0, 0, 0.25); }
@media (max-width: 520px) {
    #gsDock:not(.gs-dock-inline) .gs-dock-tab .sw-dock-coins { position: absolute; top: -4px; right: 4px; padding: 0 5px; font-size: 10px; line-height: 15px; }
}

/* An ante the player hasn't the coins for (numbersMatchup.js's renderBattleSetupAnteChoices). */
.nm-battle-setup-choice input:disabled + span { opacity: 0.4; cursor: default; }
.nm-battle-setup-choice:hover input:disabled + span { background-color: transparent; }

/* "Play the Computer" - a robot's head, drawn like the other three new-match buttons' icons (SecretWord.css sets
   theirs the same way, through --challenge-btn-icon, and colours and animates them). */
#secretWordVersusBotBtn, #battleBotBtn { --challenge-btn-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='8' width='16' height='12' rx='3'/%3E%3Cpath d='M12 8V5'/%3E%3Ccircle cx='12' cy='3.6' r='1.6' fill='black' stroke='none'/%3E%3Ccircle cx='9' cy='13' r='1.5' fill='black' stroke='none'/%3E%3Ccircle cx='15' cy='13' r='1.5' fill='black' stroke='none'/%3E%3Cpath d='M9.5 16.8h5M1.8 12.5v3M22.2 12.5v3'/%3E%3C/svg%3E"); }

/* Letters mode's two setup rows (shared letters, the ante) are only there while Letters mode is ticked - and the
   ante never against the computer. updateVersusSetupConditionalUI marks them collapsed; SecretWord.css's own
   collapse rule is written for the rank-wins row alone, so these need theirs. They change on a tick of a
   checkbox, not on every keystroke like that row, so they simply come and go. */
#secretWordVersusSharedRow.secret-word-versus-setup-row-collapsed, #secretWordVersusAnteRow.secret-word-versus-setup-row-collapsed { display: none; }

/* The Versus setup panel's two dropdowns (the computer's level, the ante) - on their own line under the label,
   sized and rounded like the panel's other field rather than the browser's bare select. */
#secretWordVersusBotLevel, #secretWordVersusAnte { display: block; width: auto; min-width: 200px; max-width: 100%; margin: 4px 0 2px 0; padding: 8px 10px; border-radius: 12px; font-family: inherit; font-size: 14px; color: inherit; cursor: pointer; background-color: #FFF; background-color: var(--account-dropdown-background-color); border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); }
    #secretWordVersusBotLevel:focus-visible, #secretWordVersusAnte:focus-visible { outline: 2px solid #766BFF; outline-offset: 2px; }

/* Versus in Letters mode (secretWordLetters.js renderVersus): the match's coins, tiles and letter keyboard,
   above the guess box. Tiles and keys are the Letters tab's own. */
/* Casual in Tiles mode: the same pieces as a Versus match's (below) - the tiles and the word's coins above the
   guess box (#swCasualTiles), the letter keyboard under it (#swCasualTilesKeys) - and the tick that turns it
   on, on Casual's start prompt. */
#swCasualTiles { margin: 0 0 4px 0; }
#swCasualTilesKeys { margin: 12px 0 14px 0; }
#secretWordCasualTilesRow { margin: 0 0 14px 0; font-size: 14px; }
    #secretWordCasualTilesRow label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
    #secretWordCasualTilesRow .sw-casual-tiles-hint { display: block; max-width: 460px; margin: 4px auto 0 auto; font-size: 12px; opacity: 0.75; }

#swVersusLetters { clear: both; margin: 4px 0 12px 0; }
    .sw-versus-letters-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 6px; font-size: 13px; }
        .sw-versus-letters-coins { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px 3px 5px; border-radius: 14px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--swl-gold-text); background: var(--swl-gold-soft); box-shadow: inset 0 0 0 1.5px var(--swl-gold); }
        .sw-versus-letters-info { opacity: 0.8; }
    .sw-versus-letters-prize { margin-bottom: 10px; font-size: 12px; opacity: 0.75; }
        .sw-versus-letters-prize.sw-versus-letters-prize-won { font-size: 14px; font-weight: 700; opacity: 1; color: var(--swl-hit-text, var(--swl-hit)); }
    .sw-versus-letters-tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 4px 0 12px 0; }
        /* Redrawn on every poll - no flip, or every tile would replay it each time. */
        .sw-versus-letters-tiles .sw-letters-tile.sw-letters-tile-shown { animation: none; }
    .sw-versus-letters-label { display: flex; align-items: center; justify-content: center; min-height: 40px; margin-bottom: 8px; font-size: 13px; font-weight: 700; text-align: center; }
    .sw-versus-letters-keyboard { display: flex; flex-direction: column; align-items: center; gap: 7px; }
        /* Not this player's turn (or a move in flight) - the keys wait. */
        .sw-versus-letters-keyboard.sw-versus-letters-keyboard-waiting { opacity: 0.55; }
            .sw-versus-letters-keyboard.sw-versus-letters-keyboard-waiting .sw-letters-key { cursor: default; }
    .sw-versus-letters-note { min-height: 18px; margin-top: 8px; font-size: 13px; text-align: center; }
        .sw-versus-letters-note[data-kind="error"] { color: var(--swl-error); }
        .sw-versus-letters-note[data-kind="good"] { color: var(--swl-hit-text, var(--swl-hit)); font-weight: 600; }

/* The celebration layer over the page, and its particles (secretWordLetters.js playEffect animates them). */
.sw-letters-effect-layer { position: fixed; inset: 0; z-index: 10000; overflow: hidden; pointer-events: none; perspective: 600px; }
    .sw-letters-confetti { position: absolute; width: 8px; height: 13px; margin: -6px 0 0 -4px; border-radius: 2px; }
    .sw-letters-coin-drop { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; background: url(../../Assets/Games/Images/letters.svg) center / contain no-repeat; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25)); }
    .sw-letters-spark { position: absolute; width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; border-radius: 50%; box-shadow: 0 0 10px 3px rgba(255, 230, 160, 0.7); }

@media (prefers-reduced-motion: reduce) {
    .sw-letters-tile.sw-letters-tile-shown { animation: none; }
    .sw-letters-key.sw-letters-key-selected { transform: none; }
    .sw-letters-confirm { animation: none; }
}

/* ---- Number Connect: coins (numberConnectCoins.js) ----
   The game's own coins: a hint button to the left of + and the balance to its right, + turning into a seller
   once its rows are used, "Keep going" on the game over screen, and the toast a payout arrives with. Classic
   only - the script hides the lot on the Daily and Battle tabs. Gold as Word Snaps' Letters coins are, with a
   star on the coin where Letters has its A. */
.nm-coin { display: inline-block; flex: none; width: 18px; height: 18px; vertical-align: middle; background: url(../../Assets/Games/Images/nm-coin.svg) center / contain no-repeat; }

/* The balance beside the best score on the menu screen: the coin, the count, "coins". */
.gs-title-best .nm-title-coins { white-space: nowrap; }
    .gs-title-best .nm-title-coins .nm-coin { width: 15px; height: 15px; margin-right: 4px; vertical-align: -2px; }

/* Hint and the balance sit either side of + without taking room in the row, so + stays in the middle: the
   hint by a negative margin as wide as itself and its gap, the balance by living in a box with no width. */
#buttons-holder #nmHintBtn { display: inline-block; position: relative; vertical-align: top; cursor: pointer; user-select: none; width: 50px; height: 50px; margin: 0 16px 0 -66px; box-sizing: border-box; border-radius: 50px; background: #766BFF; background: var(--input-button-background-color); border: 1px solid #766BFF; border: 1px solid var(--input-button-border-color); transition: all .2s ease-in-out; }
    #buttons-holder #nmHintBtn::after { content: ""; position: absolute; inset: 11px; background-color: #FFF; background-color: var(--input-button-text-color); -webkit-mask: var(--nm-hint-icon) center / contain no-repeat; mask: var(--nm-hint-icon) center / contain no-repeat; --nm-hint-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 21h4'/%3E%3Cpath d='M8.5 14.5c-1.5-1.2-2.5-3-2.5-5a6 6 0 0 1 12 0c0 2-1 3.800-2.500 5-.6.500-.9 1-.9 1.500H9.400c0-.5-.3-1-.9-1.500z'/%3E%3C/svg%3E"); }
    #buttons-holder #nmHintBtn:hover { background-color: #4D5577; background-color: var(--input-button-hover-background-color); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22); }
    #buttons-holder #nmHintBtn:active { background-color: #4D5577; background-color: var(--input-button-active-background-color); transform: scale(0.95); box-shadow: none; }
    #buttons-holder #nmHintBtn:focus-visible { outline: 2px solid #864cff; outline-offset: 2px; }
/* What a hint costs, where + shows its rows left - and what + shows once it is selling them. */
#buttons-holder #nmHintBtn .nm-coin-price,
#buttons-holder #addNewRow.nm-row-buy > span:first-child { position: absolute; top: -6px; right: -9px; width: auto; min-width: 22px; height: 20px; padding: 0 6px; box-sizing: border-box; border-radius: 10px; font-size: 12px; font-weight: 800; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; user-select: none; color: #5A3A04; background: #FFE7A6; border: 1px solid #F6B92B; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }

#buttons-holder #nmCoinsPill { display: inline-block; position: relative; vertical-align: top; width: 0; height: 50px; }
    #buttons-holder #nmCoinsPill .nm-coins-chip { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 6px; border-radius: 14px; white-space: nowrap; font-size: 15px; font-weight: 800; line-height: 20px; font-variant-numeric: tabular-nums; color: #5A3A04; background: #FFE7A6; box-shadow: inset 0 0 0 1.5px #F6B92B; }
        #buttons-holder #nmCoinsPill .nm-coins-chip.nm-coins-bump { animation: nmCoinsBump .45s ease-out; }
    /* The "No more moves" tip comes out of + on this side. */
    #buttons-holder #addNewRow:has(#nmAddRowTip) ~ #nmCoinsPill { visibility: hidden; }
@keyframes nmCoinsBump {
    0% { transform: translateY(-50%) scale(1); }
    40% { transform: translateY(-50%) scale(1.18); }
    100% { transform: translateY(-50%) scale(1); }
}

/* The pair a hint points out: a gold ring, gently pulsing, until the board is next touched. */
#game_wrapper table.numbers-table td.nm-hint { position: relative; z-index: 1; box-shadow: inset 0 0 0 3px #FFF, 0 0 0 3px #F6B92B, 0 0 16px 4px rgba(246, 185, 43, 0.75) !important; animation: nmHintPulse 1s ease-in-out infinite; }
@keyframes nmHintPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.09); }
}

/* Game over: carry on from here for coins. A gold pill under Start New Game, with what it does beneath. */
#nmContinueOffer { margin-top: 18px; }
    #nmContinueBtn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 6px 0 18px; cursor: pointer; border: 0; border-radius: 20px; font-family: inherit; font-size: 14px; font-weight: 800; color: #5A3A04; background: linear-gradient(180deg, #FFD05C 0%, #F6B92B 100%); box-shadow: 0 3px 0 #C8860B, 0 6px 14px rgba(200, 134, 11, 0.28); transition: transform .12s ease-out, box-shadow .12s ease-out, filter .15s ease-in-out; }
        #nmContinueBtn:hover:not(:disabled) { filter: brightness(1.05); }
        #nmContinueBtn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 1px 0 #C8860B, 0 2px 6px rgba(200, 134, 11, 0.25); }
        #nmContinueBtn:focus-visible { outline: 2px solid #864cff; outline-offset: 3px; }
        #nmContinueBtn:disabled { cursor: default; filter: grayscale(0.85); opacity: 0.6; box-shadow: none; }
        #nmContinueBtn .nm-coin-price { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px 0 5px; border-radius: 14px; font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, 0.55); }
    #nmContinueNote { max-width: 320px; margin: 10px auto 0 auto; font-size: 13px; line-height: 1.4; opacity: 0.8; text-wrap: balance; }

/* The day's three goals (numberConnectCoins.js) - on the menu screen and under the board. Laid out as Word
   Snaps' Letters goals are. */
.nm-goals { box-sizing: border-box; width: 100%; max-width: 430px; margin: 0 auto; padding: 10px 12px; border-radius: 12px; text-align: left; border: 1px solid #DDD; border: 1px solid var(--top-search-border-color); background: rgba(127, 127, 127, 0.07); }
    .nm-goals.nm-goals-game { margin: 18px auto 4px auto; }
    .nm-goals-title { margin-bottom: 4px; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; opacity: 0.7; }
    .nm-goal { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; line-height: 1.3; }
        .nm-goal-check { flex: none; box-sizing: border-box; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; opacity: 0.35; }
        .nm-goal-text { flex: 1 1 auto; }
            .nm-goal-count { margin-left: 6px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; opacity: 0.6; }
        .nm-goal-reward { flex: none; display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-variant-numeric: tabular-nums; }
            .nm-goal-reward .nm-coin { width: 15px; height: 15px; }
        .nm-goal.nm-goal-done .nm-goal-check { opacity: 1; border-color: #2E9E5B; background: #2E9E5B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FFF' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
        .nm-goal.nm-goal-done .nm-goal-text, .nm-goal.nm-goal-done .nm-goal-reward { opacity: 0.55; }
        .nm-goal.nm-goal-done .nm-goal-text { text-decoration: line-through; }

/* "+10 coins - Board cleared": slides up above the dock, and goes on its own. */
#nmCoinToast { position: fixed; left: 50%; bottom: 96px; z-index: 950; display: flex; align-items: center; gap: 10px; padding: 9px 18px 9px 10px; border-radius: 24px; pointer-events: none; white-space: nowrap; color: #5A3A04; background: linear-gradient(180deg, #FFE9A8 0%, #FFD05C 100%); box-shadow: inset 0 0 0 1.5px #F6B92B, 0 8px 24px rgba(0, 0, 0, 0.3); opacity: 0; transform: translate(-50%, 16px); transition: opacity .25s ease-out, transform .35s cubic-bezier(0.34, 1.56, 0.64, 1); }
    #nmCoinToast.visible { opacity: 1; transform: translate(-50%, 0); }
    #nmCoinToast .nm-coin { width: 28px; height: 28px; }
    #nmCoinToast .nm-coin-toast-text { display: flex; flex-direction: column; text-align: left; line-height: 1.25; }
        #nmCoinToast .nm-coin-toast-text strong { font-size: 15px; font-weight: 800; }
        #nmCoinToast .nm-coin-toast-text span { font-size: 12px; opacity: 0.85; }

/* The count on the app's menu-bar Classic item - see the same rule for Word Snaps' Letters item above. */
#menu-bar a[data-item="game"] { position: relative; }
    #menu-bar ul.non-admin-menu li a[data-item="game"] span.nm-dock-coins { display: inline-block !important; position: absolute; top: 3px; left: 50%; right: auto; clear: none; margin: 0 0 0 6px; padding: 0 5px; overflow: visible; font-size: 10px; line-height: 15px; color: #5A3A04 !important; box-shadow: inset 0 0 0 1px #F6B92B, 0 1px 3px rgba(0, 0, 0, 0.25); }

@media screen and (max-width: 420px) {
    #buttons-holder #nmHintBtn { margin: 0 12px 0 -62px; }
    #buttons-holder #nmCoinsPill .nm-coins-chip { left: 12px; padding: 3px 10px 3px 5px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    #buttons-holder #nmHintBtn { transition: none; }
    #buttons-holder #nmHintBtn:hover, #buttons-holder #nmHintBtn:active { transform: none; }
    #buttons-holder #nmCoinsPill .nm-coins-chip.nm-coins-bump { animation: none; }
    #game_wrapper table.numbers-table td.nm-hint { animation: none; }
    #nmContinueBtn { transition: none; }
    #nmContinueBtn:active:not(:disabled) { transform: none; }
    #nmCoinToast { transition: opacity .2s linear; transform: translate(-50%, 0); }
}
