        .xp-wordgame {
            position: absolute;
            inset: 14px 14px 40px 14px;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 4;
        }
        .xp-wordgame__window {
            width: min(920px, 97vw);
            height: min(620px, calc(100vh - 90px));
            background: #1b2342;
            border: 3px solid #9fd7ff;
            box-shadow: 0 8px 20px rgba(0,0,0,0.42), 0 0 0 2px #243361 inset;
            display: flex;
            flex-direction: column;
            color: #dff4ff;
            image-rendering: pixelated;
            font-family: var(--xp-game-font-en), var(--xp-game-font-zh);
        }
        .xp-wordgame__titlebar {
            min-height: 34px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 6px 10px;
            background:
                repeating-linear-gradient(90deg, #67bbff 0 6px, #4695ff 6px 12px),
                linear-gradient(180deg, #5db8ff 0%, #2c6fd4 100%);
            color: #f8feff;
            font-size: 13px;
            font-weight: bold;
            letter-spacing: 0.5px;
            text-shadow: 2px 2px 0 rgba(0,0,0,0.55);
            border-bottom: 3px solid #8de0ff;
        }
        .xp-wordgame__titletext {
            font-family: var(--xp-game-font-zh), var(--xp-game-font-en);
            font-size: 30px;
            line-height: 1;
            letter-spacing: 1px;
            color: #7df7ff;
            text-shadow:
                0 0 4px rgba(125, 247, 255, 0.95),
                0 0 10px rgba(71, 176, 255, 0.8),
                2px 2px 0 rgba(0, 0, 0, 0.7);
        }
        .xp-wordgame__close {
            width: 24px;
            height: 24px;
            border: 2px solid #ffd6cf;
            border-radius: 0;
            background: repeating-linear-gradient(90deg, #ff8c70 0 4px, #d7492a 4px 8px);
            color: #fff;
            font-weight: bold;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.45);
            cursor: pointer;
            box-shadow: 2px 2px 0 rgba(0,0,0,0.35);
        }
        .xp-wordgame__close:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.35); }
        .xp-wordgame__setup,
        .xp-wordgame__play {
            flex: 1;
            padding: 14px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            min-height: 0;
        }
        .xp-wordgame__setup {
            background:
                repeating-linear-gradient(0deg, rgba(152, 213, 255, 0.1) 0 8px, rgba(37, 70, 132, 0.08) 8px 16px),
                radial-gradient(circle at 25% 20%, rgba(146, 231, 255, 0.16), transparent 40%),
                linear-gradient(#17264b, #111a33);
            border: 2px solid #5bb4ff;
            box-shadow: 0 0 0 2px #0a2d62 inset;
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .xp-wordgame__setup p {
            margin: 0;
            width: min(92%, 640px);
            font-size: 20px;
            line-height: 1.45;
            color: #fff2a8;
            text-shadow: 2px 2px 0 rgba(0,0,0,0.7);
            font-family: var(--xp-game-font-zh), var(--xp-game-font-en);
        }
        .xp-wordgame__setup label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: min(92%, 420px);
            font-size: 22px;
            color: #d7f4ff;
            letter-spacing: 0.3px;
            text-shadow: 2px 2px 0 rgba(0,0,0,0.65);
            font-family: var(--xp-game-font-zh), var(--xp-game-font-en);
        }
        .xp-wordgame__setup .ribbon-select {
            min-width: 180px;
            height: 44px;
            border: 2px solid #7ec7ff;
            border-radius: 0;
            background: #0f1f44;
            color: #e9f7ff;
            font-family: inherit;
            font-size: 26px;
            box-shadow: 0 0 0 2px #071733 inset;
        }
        .xp-wordgame__btn {
            width: fit-content;
            min-width: 110px;
            padding: 10px 18px;
            border: 2px solid #ffe88a;
            border-radius: 0;
            background: repeating-linear-gradient(90deg, #ffc447 0 6px, #f3a71e 6px 12px);
            color: #2a1a00;
            font-size: 22px;
            font-family: inherit;
            cursor: pointer;
            text-transform: uppercase;
            box-shadow: 2px 2px 0 rgba(0,0,0,0.35);
        }
        .xp-wordgame__btn:hover { filter: brightness(1.06); }
        .xp-wordgame__btn:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.35); }
        .xp-wordgame__hud {
            display: flex;
            gap: 14px;
            flex-wrap: wrap;
            font-size: 12px;
            color: #d9efff;
            background: #121d3b;
            border: 2px solid #4ca9f3;
            padding: 8px 10px;
            box-shadow: 0 0 0 2px #0a2a5a inset;
        }
        .xp-wordgame__arena {
            position: relative;
            flex: 1;
            min-height: 260px;
            border: 3px solid #88d4ff;
            background:
                repeating-linear-gradient(90deg, rgba(170,225,255,0.2) 0 8px, rgba(45,88,164,0.2) 8px 16px),
                repeating-linear-gradient(0deg, rgba(18,36,84,0.55) 0 8px, rgba(22,42,96,0.55) 8px 16px),
                linear-gradient(to bottom, #2153a5, #163b7a 55%, #0d224f);
            overflow: hidden;
            image-rendering: pixelated;
            box-shadow: 0 0 0 2px #0a2a5a inset;
        }
        .xp-wordgame__line {
            position: absolute;
            left: 0; right: 0; bottom: 0;
            height: 34px;
            background: repeating-linear-gradient(90deg, #2f7a36 0 6px, #255f2a 6px 12px);
            color: #d6ffd1;
            font-size: 11px;
            display: flex;
            align-items: center;
            justify-content: center;
            letter-spacing: 1.2px;
            border-top: 2px solid #7de886;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.45);
        }
        .xp-wordgame__enemy {
            position: absolute;
            left: 0;
            top: 0;
            transform: translate(-50%, 0);
            padding: 4px 8px;
            border: 2px solid #ff9f9f;
            border-radius: 0;
            background: repeating-linear-gradient(90deg, #df4f4f 0 4px, #b73131 4px 8px);
            color: #fff;
            font-size: 13px;
            line-height: 1.2;
            box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
            white-space: nowrap;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.35);
        }
        .xp-wordgame__enemy.hit {
            background: repeating-linear-gradient(90deg, #58b26a 0 4px, #2f8c40 4px 8px);
            border-color: #b4ffd0;
        }
        .xp-wordgame__laser {
            position: absolute;
            left: 0;
            top: 0;
            height: 3px;
            border-radius: 2px;
            transform-origin: 0 50%;
            box-shadow: 0 0 8px currentColor;
            pointer-events: none;
            opacity: 0.95;
            z-index: 3;
            animation: xpWordLaser 140ms linear forwards;
        }
        .xp-wordgame__laser.hit { color: #7dff8d; background: #7dff8d; }
        .xp-wordgame__laser.miss { color: #ffd07a; background: #ffd07a; }
        @keyframes xpWordLaser {
            from { opacity: 0.98; }
            to { opacity: 0; }
        }
        .xp-wordgame__impact {
            position: absolute;
            width: 12px;
            height: 12px;
            border: 2px solid #a8ffb3;
            border-radius: 50%;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 4;
            animation: xpWordImpact 180ms ease-out forwards;
        }
        @keyframes xpWordImpact {
            from { opacity: 0.95; transform: translate(-50%, -50%) scale(0.55); }
            to { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
        }
        .xp-wordgame__explosion {
            position: absolute;
            width: 8px;
            height: 8px;
            transform: translate(-50%, -50%);
            pointer-events: none;
            z-index: 5;
        }
        .xp-wordgame__explosion-p {
            position: absolute;
            left: 50%;
            top: 50%;
            width: 4px;
            height: 4px;
            transform: translate(-50%, -50%);
            background: #ffd45f;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
            image-rendering: pixelated;
            animation: xpWordExplosion 260ms steps(6, end) forwards;
        }
        .xp-wordgame__explosion-p:nth-child(2n) { background: #ff8f4a; }
        .xp-wordgame__explosion-p:nth-child(3n) { background: #fff4a3; }
        @keyframes xpWordExplosion {
            from { opacity: 0.98; }
            to { opacity: 0; }
        }
        .xp-wordgame__controls {
            display: flex;
            gap: 8px;
        }
        .xp-wordgame__controls input {
            flex: 1;
            min-width: 0;
            border: 2px solid #63b7ff;
            padding: 6px 8px;
            font-size: 14px;
            font-family: inherit;
            background: #0e1d41;
            color: #e9f6ff;
            box-shadow: 0 0 0 2px #071734 inset;
        }
        .xp-wordgame__controls input::placeholder { color: #95b7df; }
        .xp-wordgame__hint {
            font-size: 12px;
            color: #a9d7ff;
            min-height: 16px;
            text-shadow: 1px 1px 0 rgba(0,0,0,0.35);
        }
