        .game-18words {
            --bg:#ffffff;
            --ink:#1c1c1e;
            --tile:#d9d5c8;
            --tile-shadow:#c9c4b5;
            --blue:#4169f1;
            --blue-dark:#2f50d8;
            --green:#2e9e5b;
            --green-dark:#278a4f;
            --orange:#f59e0b;
            --red:#e0524a;
            --muted:#b8b8b4;
            --card:#ffffff;
            --line:#ece9e0;
            --radius:18px;
        }
        .game-18words * {
            font-family: "Baloo 2", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
            margin: 0; padding: 0; box-sizing: border-box;
            -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
        }
        html:has(.game-18words), body:has(.game-18words) {
            min-height: 100dvh;
            height: auto;
            overflow-x: hidden;
            overflow-y: auto;
            background: transparent;
            color: var(--ink);
            touch-action: manipulation;
            transition: background .2s ease, color .2s ease;
        }
        body:has(.game-18words) {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 0;
        }
        .game-18words .content {
            position: relative;
            flex: 1 1 auto;
            width: 100%;
            max-width: 1403px;
            min-height: 700px;
            display: flex !important;
            flex-direction: column;
            align-items: center;
            background: transparent;
            box-sizing: border-box;
            line-height: normal;
        }
        @media (max-width: 768px) {
            html:has(.game-18words), body:has(.game-18words) {
                height: 100dvh;
                max-height: 100dvh;
                min-height: 0;
                overflow: hidden;
            }
            .game-18words .content {
                min-height: 0 !important;
            }
            .game-18words .game-shell {
                min-height: 0;
            }
            .game-18words .screen {
                min-height: 0;
                padding-top: 28px;
                padding-bottom: 16px;
            }
        }
        .game-18words .game-shell {
            width: 100%;
            max-width: 440px;
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
            line-height: normal;
            padding: 0 16px;
            box-sizing: border-box;
        }


        /* Help button, shown in the platform chrome slot */
        .game-18words .w18-help {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            color: var(--ink);
            text-decoration: none;
            background: none;
            border: none;
            padding: 0;
            cursor: pointer;
            position: static;
        }
        .game-18words .w18-top-right {
            display: flex;
            align-items: center;
            gap: 8px;
            position: static;
        }
        .game-18words .w18-help svg {
            width: 30px;
            height: 30px;
            display: block;
        }
        @media (hover: hover) {
            .game-18words .w18-help:hover { color: var(--blue); }
        }
        .game-18words .w18-help:focus, .game-18words .w18-help:focus-visible {
            outline: none;
        }


        /* Screens — top-aligned under the chrome bar */
        .game-18words .screen {
            display: none;
            flex-direction: column;
            max-width: 440px;
            width: 100%;
            margin: 0 auto;
            padding: 36px 6px calc(40px + env(safe-area-inset-bottom));
            min-height: 0;
            flex: 1;
            touch-action: none;
            text-align: center;
            justify-content: flex-start;
            box-sizing: border-box;
        }
        .game-18words .screen.active { display: flex; }
        .game-18words .screen.active:not(.is-instant) {
            animation: eighteenwords-screenIn .4s cubic-bezier(.22,1,.36,1) both;
        }
        /* Result / completion: unlock page scroll (locked during play above). */
        html:has(.game-18words.is-done),
        body:has(.game-18words.is-done),
        html:has(.game-18words):has(#result.active),
        body:has(.game-18words):has(#result.active) {
            height: auto !important;
            max-height: none !important;
            min-height: 100dvh !important;
            overflow-x: hidden !important;
            overflow-y: auto !important;
        }
        @media (max-width: 768px) {
            .game-18words.is-done .content,
            .game-18words.is-done .game-shell {
                min-height: auto !important;
                height: auto !important;
            }
        }
        .game-18words #result {
            height: auto;
            min-height: 0;
            overflow: visible;
            touch-action: auto;
            justify-content: flex-start;
            padding-top: 0;
            flex: none;
            gap: 8px;
        }
        @media (max-width: 768px) {
            .game-18words #result {
                min-height: 0;
                padding-top: 0;
            }
        }
        .game-18words #result .pd-complete-panel {
            margin-top: 0;
            margin-bottom: 20px;
            padding-left: 0;
            padding-right: 0;
        }
        .game-18words #result .pd-c-score {
            position: relative;
            z-index: auto;
            color: var(--ink);
            margin-top: 4px;
            margin-bottom: 16px;
            font-size: clamp(26px, 7vw, 32px);
            white-space: nowrap;
        }
        @keyframes eighteenwords-screenIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

        /* Buttons */
        .game-18words .btn {
            font-family: 'Baloo 2', sans-serif;
            padding: 15px 40px;
            font-size: 19px;
            font-weight: 800;
            border-radius: 999px;
            cursor: pointer;
            transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
            touch-action: manipulation;
            border: none;
            width: fit-content;
            margin-left: auto;
            margin-right: auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 9px;
            color: #fff;
        }
        .game-18words .btn:focus,
        .game-18words .btn:focus-visible { outline: none; }
        .game-18words .btn:active { transform: scale(.98); }
        .game-18words .btn-primary { background: var(--blue); box-shadow: 0 8px 20px rgba(65,105,241,.28); }
        .game-18words .btn-primary:hover { background: var(--blue-dark); }
        .game-18words .btn-play {
            background: var(--pd-colour-heading, #161613);
            color: #fff;
            box-shadow: 0 8px 20px rgba(22, 22, 19, 0.22);
            font-family: var(--pd-font-ui);
            font-size: 19px;
            padding: 15px 40px;
            margin-top: 10px!important;
        }
        .game-18words .btn-play:hover { background: #2b2b2b; color: #fff; }
        /* Persistent progress grid — stays put across welcome / play / result */
        .game-18words .w18-grid-slot {
            flex-shrink: 0;
            width: 100%;
            max-width: 440px;
            margin: 0 auto;
            padding: 0;
            box-sizing: border-box;
        }
        .game-18words .w18-grid-slot[hidden] {
            display: none !important;
        }
        /* Play stack: squares → 20px → timer → 20px → word → 20px → letters */
        .game-18words .w18-grid-slot .game-grid {
            margin-bottom: 20px;
        }
        /* Completion: keep the grid in normal flow (no sticky) so the score
           sits clearly underneath instead of painting over the squares. */
        .game-18words .w18-grid-slot.is-result {
            position: relative;
            z-index: auto;
            background: var(--pd-colour-background, #fff);
            padding-bottom: 0;
            margin-bottom: 20px;
        }

        /* Welcome — shared .pd-welcome-* styles; grid stays hidden */
        .game-18words #welcome.pd-welcome-screen {
            gap: 28px;
            padding-top: 48px;
            padding-left: 22px;
            padding-right: 22px;
            align-items: center;
        }
        .game-18words .welcome-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 16px;
            width: 100%;
            max-width: 400px;
            margin: 0 auto;
        }
        .game-18words .welcome-actions > .btn-play {
            margin: 0;
        }
        .game-18words .btn-secondary {
            background: var(--card); color: var(--ink);
            border: 2px solid var(--muted);
            box-shadow: 0 6px 16px rgba(0,0,0,.08);
            margin-top: 30px;
        }
        .game-18words .btn-secondary:hover { color: var(--blue); border-color: var(--blue); background: var(--card); }

        /* Stages stagger after the grid pop; panel itself stays put */
        .game-18words .pd-complete-panel {
            opacity: 1;
            transform: none;
            transition: none;
        }
        .game-18words .pd-complete-panel:not(.is-shown) {
            visibility: hidden;
            pointer-events: none;
        }
        .game-18words .pd-complete-panel.is-shown {
            visibility: visible;
            pointer-events: auto;
        }
        .game-18words .w18-c-stage {
            opacity: 0;
            transform: translateY(22px);
            transition: opacity 0.45s cubic-bezier(.22,1,.36,1), transform 0.45s cubic-bezier(.22,1,.36,1);
        }
        .game-18words .w18-c-stage.is-in {
            opacity: 1;
            transform: none;
        }
        .game-18words .w18-c-score-block {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
        }
        .game-18words .pd-complete-panel.is-instant .w18-c-stage {
            transition: none;
        }

        /* Perfect-game celebration */
        .game-18words .confetti-canvas {
            position: fixed;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 1500;
            display: none;
        }
        .game-18words .confetti-canvas.on { display: block; }

        /* Completion word list — the list itself is styled in completion.css */
        .game-18words .pd-c-word-list .def-alt {
            margin-left: 2px;
            font-size: 0.85em;
        }

        /* Game — grid lives above in .w18-grid-slot */
        .game-18words .game-screen {
            gap: 20px;
            padding: 0 0 calc(24px + env(safe-area-inset-bottom));
            justify-content: flex-start;
        }
        @media (max-width: 768px) {
            .game-18words .game-screen {
                padding-top: 0;
            }
        }
        .game-18words .content {
            --w18-letter: 82px;
            --w18-letter-gap: 6px;
            --w18-letters-4: calc(4 * var(--w18-letter) + 3 * var(--w18-letter-gap));
            /* Squares grid — between letter-row width and the tighter size */
            --pg-cell: clamp(32px, 8.5vw, 42px);
            --pg-gap: clamp(6px, 1.7vw, 9px);
            --pg-row-width: calc(6 * var(--pg-cell) + 5 * var(--pg-gap));
            --w18-word-size: clamp(34px, 9vw, 40px);
        }
        /* In-game progress grid: 3x6 grey squares that fill green/red as you play. */
        .game-18words .game-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--pg-gap); width: var(--pg-row-width); margin: 0 auto; }
        .game-18words .game-grid.result-grid,
        .game-18words .w18-grid-slot.is-result .game-grid { margin-bottom: 20px; width: var(--pg-row-width); }
        .game-18words .pg-cell { width: var(--pg-cell); height: var(--pg-cell); border-radius: 8px; background: var(--tile); transition: background .3s ease; }
        .game-18words .pg-cell.solved { background: var(--green); }
        .game-18words .pg-cell.missed { background: var(--red); }
        .game-18words .pg-cell.pop { animation:eighteenwords-pgPop .35s cubic-bezier(.34,1.56,.64,1); }
        @keyframes eighteenwords-pgPop { 50% { transform: scale(1.25); } }
        .game-18words .game-progress { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }
        .game-18words .gp-timer-row {
            display: grid;
            grid-template-columns: 56px 1fr 56px;
            align-items: center;
            justify-items: center;
            width: var(--pg-row-width);
            margin: 0 auto;
            gap: 0;
        }
        .game-18words .gp-side-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 56px;
            height: 56px;
            margin: 0;
            padding: 0;
            border: none;
            border-radius: 0;
            background: transparent;
            color: var(--ink);
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        /* Extra invisible hit area beyond the visible button box */
        .game-18words .gp-side-btn::before {
            content: '';
            position: absolute;
            inset: -6px;
        }
        .game-18words .gp-side-btn svg {
            width: 32px;
            height: 32px;
            display: block;
        }
        .game-18words .gp-side-btn svg .filled {
            fill: currentColor;
        }
        .game-18words .gp-side-btn.used {
            opacity: .35;
            cursor: not-allowed;
        }
        @media (hover: hover) {
            .game-18words .gp-side-btn:hover:not(.used) { color: var(--blue); }
        }
        .game-18words .gp-side-btn:focus,
        .game-18words .gp-side-btn:focus-visible {
            outline: none;
        }
        .game-18words .gp-timer-row .gp-timer {
            justify-self: center;
        }
        .game-18words .gp-headline {
            display: none;
            font-family: 'Baloo 2', sans-serif;
            font-weight: 800;
            font-size: clamp(20px, 5.2vw, 24px);
            letter-spacing: .35px;
            text-transform: uppercase;
            color: #616162;
            opacity: .95;
            white-space: nowrap;
        }
        .game-18words .gp-timer {
            font-family: 'Baloo 2', sans-serif; font-weight: 800;
            font-size: 36px; line-height: 1;
            color: var(--ink);
            font-variant-numeric: tabular-nums;
            transition: color .2s ease, transform .2s ease;
        }
        .game-18words .gp-timer-unit {
            font-size: 16px;
            color: var(--ink);
            opacity: .6;
            margin-left: 2px;
        }
        .game-18words .gp-timer.low .gp-timer-unit,
        .game-18words .gp-timer.zero .gp-timer-unit {
            color: inherit;
            opacity: 1;
        }
        .game-18words .gp-timer.low { color: var(--red); animation:eighteenwords-timerPulse .5s ease infinite; }
        .game-18words .gp-timer.zero { color: var(--red); }
        @keyframes eighteenwords-timerPulse { 50% { transform: scale(1.06); } }

        /* Forming word — plain blue text above the letter grid (Zanagrams-style). */
        .game-18words .word-display {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            font-family: 'Baloo 2', sans-serif;
            font-size: var(--w18-word-size);
            font-weight: 800;
            line-height: 1;
            letter-spacing: .5px;
            text-transform: uppercase;
            text-align: center;
            color: var(--blue);
            cursor: default;
            user-select: none;
            white-space: nowrap;
            /* Font + vertical padding — keeps letter grid still when typing starts */
            min-height: calc(var(--w18-word-size) + 28px);
            margin: 0;
            padding: 14px 28px;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: color .2s ease, transform .26s cubic-bezier(.34,1.56,.64,1), opacity .2s ease;
        }
        .game-18words .word-display.found { color: var(--green); }
        .game-18words .word-display.missed { color: var(--red); cursor: default; gap: 0; }
        .game-18words .word-display .word-alt {
            display: inline-block;
            color: #8a8a8b;
            font-weight: 800;
            margin-left: 0.12em;
        }
        .game-18words .word-display.found .word-alt {
            color: #8a8a8b;
        }
        .game-18words .word-display .word-alt-ch {
            display: inline-block;
            animation: eighteenwords-wordAltCh .28s cubic-bezier(.34, 1.56, .64, 1) both;
        }
        @keyframes eighteenwords-wordAltCh {
            0%   { opacity: 0; transform: translateY(6px) scale(.7); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }
        .game-18words .word-display .missed-letter {
            display: inline-block;
            opacity: 0;
            color: var(--red);
        }
        .game-18words .word-display .missed-letter.show {
            animation:eighteenwords-missedReveal .34s cubic-bezier(.34,1.56,.64,1) both;
        }
        @keyframes eighteenwords-missedReveal {
            0%   { opacity: 0; transform: translateY(10px) scale(.55); }
            55%  { opacity: 1; transform: translateY(0) scale(1.14); }
            100% { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* Letter grid */
        .game-18words .letter-row {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            align-items: center;
            gap: 6px;
            margin: 0 auto;
        }

        .game-18words .letter {
            width: var(--w18-letter);
            height: var(--w18-letter);
            background: var(--tile);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-family: 'Baloo 2', sans-serif;
            font-size: 36px;
            font-weight: 700;
            color: var(--ink);
            cursor: pointer;
            user-select: none;
            touch-action: manipulation;
            transition: background .18s ease, color .18s ease, transform .12s ease-out, box-shadow .18s ease;
        }
        @media (hover: hover) { .game-18words .letter:hover { transform: translateY(-2px); } }
        .game-18words .letter:active { transform: scale(0.9); }
        .game-18words .letter.selected { background: var(--blue); color: #fff; box-shadow: 0 4px 14px rgba(65,105,241,.35); }
        .game-18words .letter.selected.correct { background: var(--green); box-shadow: 0 4px 14px rgba(46,158,91,.35); }
        .game-18words .letter.selected.incorrect { background: var(--red); box-shadow: 0 4px 14px rgba(224,82,74,.35); }
        .game-18words .letter.removed { visibility: hidden; pointer-events: none; }

        /* Reveal letter button (hidden for now) */
        .game-18words .reveal-btn {
            display: none!important;
            margin: 4px auto 0;
            display: inline-flex;
            align-items: center;
            font-family: 'Baloo 2', sans-serif;
            font-weight: 800;
            font-size: 16px;
            color: #616162;
            background: var(--card);
            border: 2px solid #616162;
            border-radius: 999px;
            padding: 12px 22px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0,0,0,.06);
            transition: border-color .12s, color .12s, transform .08s, opacity .12s;
            -webkit-tap-highlight-color: transparent;
        }
        @media (hover: hover) { .game-18words .reveal-btn:hover { border-color: var(--blue); color: var(--blue); } }
        .game-18words .reveal-btn:active { transform: scale(.97); }
        .game-18words .reveal-btn:focus,
        .game-18words .reveal-btn:focus-visible { outline: none; }
        .game-18words .reveal-btn:disabled { opacity: .4; cursor: not-allowed; border-color: var(--line); color: var(--muted); box-shadow: none; }
        .game-18words .reveal-count { color: inherit; }

        /* Skip button (relax mode) */
        .game-18words .skip-btn {
            display: none;
            margin: 4px auto 0;
            align-items: center;
            gap: 8px;
            font-family: 'Baloo 2', sans-serif;
            font-weight: 800;
            font-size: 16px;
            color: #616162;
            background: var(--card);
            border: 2px solid #8a8a8b;
            border-radius: 999px;
            padding: 12px 26px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0,0,0,.06);
            transition: border-color .12s, color .12s, transform .08s;
            -webkit-tap-highlight-color: transparent;
        }
        @media (hover: hover) { .game-18words .skip-btn:hover { border-color: var(--blue); color: var(--blue); } }
        .game-18words .skip-btn:active { transform: scale(.97); }
        .game-18words .skip-btn:focus,
        .game-18words .skip-btn:focus-visible { outline: none; }

        /* Modal — faded page (via #pd-page-frost) + white bordered card */
        .game-18words .modal {
            display: none;
            position: fixed;
            inset: 0;
            background: transparent;
            z-index: 1000;
            align-items: center;
            justify-content: center;
            padding: 20px;
            overflow: hidden;
            overscroll-behavior: none;
            touch-action: none;
        }
        .game-18words .modal.active { display: flex; }
        .game-18words .modal-content,
        .game-18words .modal-content * {
            font-family: var(--pd-font-ui);
        }
        .game-18words .modal-content {
            position: relative;
            background: var(--pd-colour-background, #fff);
            border-radius: 12px;
            padding: 28px 16px 22px;
            max-width: 400px;
            width: 100%;
            max-height: min(58dvh, calc(100dvh - 96px));
            overflow: hidden;
            overscroll-behavior: none;
            border: 2px solid var(--ink);
            box-shadow: none;
            animation:eighteenwords-rise .22s ease;
            box-sizing: border-box;
        }
        body:has(.game-18words):has(.modal.active) {
            overflow: hidden !important;
            overscroll-behavior: none;
        }
        @keyframes eighteenwords-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
        .game-18words .modal-header {
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            margin-bottom: 12px;
            padding: 0 28px;
            min-height: 28px;
        }
        .game-18words .modal-header h2 {
            font-family: var(--pd-font-ui);
            font-size: 24px;
            font-weight: 800;
            line-height: 28px;
            margin: 0;
            text-align: center;
        }
        .game-18words .close-modal {
            position: absolute;
            top: 25px; /* centered on title row */
            right: 12px;
            display: grid;
            place-items: center;
            background: none;
            border: none;
            font-size: 32px;
            font-weight: 600;
            line-height: 1;
            cursor: pointer;
            color: var(--ink);
            width: 34px;
            height: 34px;
            border-radius: 8px;
            outline: none;
            transition: background .12s, color .12s;
            z-index: 2;
            padding: 0;
        }
        .game-18words .close-modal:hover { color: var(--ink); background: rgba(0,0,0,.06); }
        .game-18words .modal-bottom-close {
            width: 100%;
            margin-top: 16px;
        }
        .game-18words .feedback-form {
            display: flex;
            flex-direction: column;
            gap: 12px;
            text-align: left;
        }
        .game-18words .feedback-form label {
            font-family: "Baloo 2", sans-serif;
            font-size: 14px;
            font-weight: 700;
            color: #616162;
            margin-bottom: -6px;
        }
        .game-18words .feedback-form input, .game-18words .feedback-form textarea {
            width: 100%;
            border: 2px solid var(--line);
            border-radius: 12px;
            padding: 12px 14px;
            font-size: 16px;
            color: var(--ink);
            background: var(--bg);
            font-family: "Baloo 2", sans-serif;
        }
        .game-18words .feedback-form textarea {
            min-height: 140px;
            resize: vertical;
        }
        .game-18words .feedback-form input:focus, .game-18words .feedback-form textarea:focus {
            outline: none;
            border-color: var(--blue);
        }
        .game-18words .feedback-form .btn {
            margin-top: 6px;
        }
        .game-18words .feedback-error {
            color: var(--red);
            font-family: "Baloo 2", sans-serif;
            font-size: 14px;
            font-weight: 700;
            margin: -2px 0 0;
        }
        .game-18words .feedback-success {
            text-align: center;
            padding: 18px 6px 6px;
        }
        .game-18words .feedback-success-icon {
            width: 60px;
            height: 60px;
            margin: 0 auto 14px;
            border-radius: 50%;
            background: var(--green);
            color: #fff;
            font-size: 34px;
            line-height: 60px;
            font-weight: 800;
            animation:eighteenwords-winPop .4s cubic-bezier(.34,1.56,.64,1) both;
        }
        .game-18words .feedback-success p {
            font-family: "Baloo 2", sans-serif;
            font-size: 17px;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: 18px;
        }

        .game-18words.is-paused #gameGrid {
            visibility: hidden;
        }
        /* Hide scramble while paused so letters can't be peeked around the modal */
        .game-18words.is-paused #letterRow, .game-18words.is-paused #wordDisplay {
            visibility: hidden;
        }

        /* Animations */
        @keyframes eighteenwords-pulse { 50% { transform: scale(1.05); } }
        @keyframes eighteenwords-shake {
            0%,100% { transform: translateX(0); }
            20% { transform: translateX(-4px); }
            40% { transform: translateX(4px); }
            60% { transform: translateX(-3px); }
            80% { transform: translateX(3px); }
        }
        @keyframes eighteenwords-letterPop {
            0% { opacity: 0; transform: scale(0.3); }
            70% { transform: scale(1.08); }
            100% { opacity: 1; transform: scale(1); }
        }
        .game-18words .pulse { animation:eighteenwords-pulse 0.3s; }
        .game-18words .word-display.shake { animation:eighteenwords-shake .32s ease; color: var(--red) !important; }
        .game-18words .letter-row.shake { animation:eighteenwords-shake .32s ease; }
        .game-18words .letter.entering { animation:eighteenwords-letterPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) both; }

        /* Keyboard hint toast (desktop) */
        .game-18words .kb-toast {
            position: fixed;
            left: 50%;
            bottom: calc(40px + env(safe-area-inset-bottom));
            transform: translateX(-50%) translateY(16px);
            background: var(--ink);
            color: var(--bg);
            padding: 13px 22px;
            border-radius: 999px;
            font-family: var(--pd-font-ui);
            font-weight: 700;
            font-size: 16px;
            box-shadow: 0 10px 28px rgba(0,0,0,.22);
            opacity: 0;
            pointer-events: none;
            white-space: nowrap;
            z-index: 2000;
            transition: opacity .2s ease, transform .2s ease;
        }
        .game-18words .kb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

        /* Desktop-only control lines in How to play (mouse / fine pointer) */
        .game-18words .w18-how-desktop { display: none; }
        @media (hover: hover) and (pointer: fine) {
            .game-18words .w18-how-desktop { display: list-item; }
        }

/* Site-wide dark theme */
html[data-theme="dark"] .game-18words {
  --bg: #141412;
  --ink: #dddace;
  --tile: #2e2c28;
  --tile-shadow: #242220;
  --muted: #9a9a92;
  --card: #1c1c19;
  --line: #3a3a35;
}
html[data-theme="dark"] .game-18words .content {
  background: transparent;
}
