        .xp-c4game {
            position: absolute;
            inset: 12px 12px 38px 12px;
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 5;
        }
        .xp-c4game__window {
            width: min(980px, 98vw);
            height: min(640px, calc(100vh - 84px));
            border: 2px solid #636973;
            box-shadow: 0 12px 24px rgba(0,0,0,0.45), 0 0 0 3px #4b515d inset;
            background: linear-gradient(180deg, #8e6c47 0%, #7a5d3e 55%, #6b5339 100%);
            color: #e6edf6;
            display: flex;
            flex-direction: column;
            font-family: var(--xp-game-font-en), var(--xp-game-font-zh);
            overflow: hidden;
            position: relative;
            image-rendering: pixelated;
        }
        .xp-c4game__window::before {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            background:
                radial-gradient(circle at center, rgba(255, 0, 0, 0.08) 0%, rgba(0,0,0,0) 52%),
                repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 2px, rgba(0,0,0,0.02) 2px 4px);
            opacity: 0.35;
        }
        .xp-c4game__top {
            position: relative;
            z-index: 1;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 8px 12px;
            border-bottom: 2px solid #58606b;
            background: linear-gradient(180deg, #303845, #252d38);
        }
        .xp-c4game__title { font-size: 16px; color: #f0db89; text-shadow: 0 0 8px rgba(240,219,137,0.55); }
        .xp-c4game__close {
            width: 26px; height: 26px; border: 2px solid #ffd4d4; background: #8f1a1a; color: #fff; cursor: pointer;
            box-shadow: 2px 2px 0 rgba(0,0,0,0.35); font-weight: bold;
        }
        .xp-c4game__close:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.35); }
        .xp-c4game__setup, .xp-c4game__play {
            position: relative;
            z-index: 1;
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 14px;
            gap: 12px;
            min-height: 0;
        }
        .xp-c4game__battle {
            display: grid;
            grid-template-columns: minmax(260px, 36%) 1fr;
            gap: 14px;
            flex: 1;
            min-height: 0;
        }
        .xp-c4game__play {
            border: 2px solid #5e646f;
            background: linear-gradient(180deg, #8f6f4a 0%, #7a5f3f 52%, #6a5338 100%);
            box-shadow: 0 0 0 3px #4d545f inset, 0 8px 18px rgba(0,0,0,0.42);
            overflow: hidden;
        }
        .xp-c4game__play::before,
        .xp-c4game__play::after {
            content: '';
            position: absolute;
            left: -16px;
            right: -16px;
            height: 14px;
            background: #5f6168;
            box-shadow: 0 0 0 2px #4a4d53 inset;
            z-index: 0;
        }
        .xp-c4game__play::before { top: 22%; transform: rotate(-2deg); }
        .xp-c4game__play::after { bottom: 15%; transform: rotate(1.8deg); }
        .xp-c4game__device {
            position: relative;
            border: 2px solid #5e646f;
            background: linear-gradient(180deg, #8f6f4a 0%, #7a5f3f 52%, #6a5338 100%);
            box-shadow: 0 0 0 3px #4d545f inset, 0 8px 18px rgba(0,0,0,0.42);
            padding: 12px 10px 10px;
            display: grid;
            grid-template-rows: auto auto 1fr;
            gap: 10px;
            min-height: 0;
            overflow: hidden;
        }
        .xp-c4game__device::before,
        .xp-c4game__device::after {
            content: '';
            position: absolute;
            left: -16px;
            right: -16px;
            height: 14px;
            background: #5f6168;
            box-shadow: 0 0 0 2px #4a4d53 inset;
        }
        .xp-c4game__device::before { top: 18%; transform: rotate(-2deg); }
        .xp-c4game__device::after { bottom: 16%; transform: rotate(1.6deg); }
        .xp-c4game__wires {
            position: absolute;
            inset: 0;
            pointer-events: none;
            z-index: 1;
        }
        .xp-c4game__tapes {
            position: absolute;
            inset: 0;
            z-index: 1;
            pointer-events: none;
        }
        .xp-c4game__tape {
            position: absolute;
            height: 20px;
            background:
                repeating-linear-gradient(90deg, rgba(118,122,127,0.9) 0 14px, rgba(95,99,106,0.9) 14px 28px);
            box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 -1px 0 rgba(0,0,0,0.25) inset;
            opacity: 0.92;
            transform-origin: center;
        }
        .xp-c4game__tape.top { left: -4%; top: 22%; width: 108%; transform: rotate(-2.2deg); }
        .xp-c4game__tape.bottom { left: -3%; bottom: 17%; width: 106%; transform: rotate(1.7deg); }
        .xp-c4game__extra-wire {
            position: absolute;
            z-index: 2;
            pointer-events: none;
            border-radius: 8px;
            opacity: 0.95;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.24);
        }
        .xp-c4game__extra-wire.blue {
            width: 170px;
            height: 4px;
            background: #3c61be;
            right: 8%;
            top: 74px;
            transform: rotate(-34deg);
        }
        .xp-c4game__extra-wire.white {
            width: 190px;
            height: 5px;
            background: #e5e2d8;
            left: 7%;
            bottom: 82px;
            transform: rotate(26deg);
        }
        .xp-c4game__panel {
            position: absolute;
            left: 14px;
            top: 14px;
            z-index: 2;
            width: 126px;
            border: 2px solid #39414b;
            background: linear-gradient(180deg, #57606d, #404852);
            box-shadow: 0 0 0 1px rgba(255,255,255,0.08) inset, 2px 2px 0 rgba(0,0,0,0.3);
            padding: 8px 6px 6px;
            pointer-events: none;
        }
        .xp-c4game__panel-label {
            display: block;
            font-size: 9px;
            color: #d8dee7;
            letter-spacing: 1px;
            margin-bottom: 5px;
            text-align: center;
            text-shadow: 0 1px 0 rgba(0,0,0,0.35);
        }
        .xp-c4game__panel-buttons {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 4px;
            margin-bottom: 6px;
        }
        .xp-c4game__panel-btn {
            height: 14px;
            border: 1px solid #2d3137;
            background: linear-gradient(180deg, #c7ccd4, #8b939f);
            box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset;
        }
        .xp-c4game__switch {
            height: 14px;
            border: 1px solid #2c343f;
            background: #2a3038;
            position: relative;
        }
        .xp-c4game__switch::after {
            content: '';
            position: absolute;
            width: 28px;
            height: 10px;
            left: 3px;
            top: 1px;
            border: 1px solid #1c2026;
            background: linear-gradient(180deg, #d5d9de, #949ba7);
        }
        .xp-c4game__screws {
            position: absolute;
            inset: 0;
            z-index: 2;
            pointer-events: none;
        }
        .xp-c4game__screw {
            position: absolute;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            border: 1px solid #2e333a;
            background: radial-gradient(circle at 35% 35%, #b8bec8, #656d78 70%);
        }
        .xp-c4game__screw.s1 { left: 10px; top: 10px; }
        .xp-c4game__screw.s2 { right: 10px; top: 10px; }
        .xp-c4game__screw.s3 { left: 10px; bottom: 10px; }
        .xp-c4game__screw.s4 { right: 10px; bottom: 10px; }
        .xp-c4game__leds {
            position: absolute;
            top: 8px;
            right: 10px;
            z-index: 3;
            display: flex;
            gap: 12px;
            pointer-events: none;
        }
        .xp-c4game__led {
            width: 22px;
            height: 22px;
            border-radius: 50%;
            border: 1px solid rgba(0,0,0,0.55);
            box-shadow: inset 0 0 0 1px rgba(255,255,255,0.24), 0 0 0 1px rgba(0,0,0,0.35);
            opacity: 0.48;
            transition: opacity 80ms linear, filter 80ms linear, box-shadow 80ms linear, transform 90ms ease;
        }
        .xp-c4game__led--red { background: #b41f1f; }
        .xp-c4game__led--green { background: #2ca73a; }
        .xp-c4game__led.is-active {
            opacity: 1;
            filter: saturate(1.35) brightness(1.15);
            animation: xpC4LedPulse 170ms ease-out;
            transform: scale(1.08);
        }
        .xp-c4game__led--red.is-active {
            box-shadow:
                inset 0 0 0 1px rgba(255,255,255,0.4),
                0 0 22px rgba(255,58,58,0.98),
                0 0 40px rgba(255,45,45,0.76),
                0 0 0 1px rgba(0,0,0,0.35);
        }
        .xp-c4game__led--green.is-active {
            box-shadow:
                inset 0 0 0 1px rgba(255,255,255,0.4),
                0 0 22px rgba(74,255,118,0.98),
                0 0 40px rgba(86,255,131,0.76),
                0 0 0 1px rgba(0,0,0,0.35);
        }
        @keyframes xpC4LedPulse {
            0% { transform: scale(0.9); }
            65% { transform: scale(1.14); }
            100% { transform: scale(1.08); }
        }
        .xp-c4game__wire {
            position: absolute;
            width: 3px;
            border-radius: 2px;
            opacity: 0.9;
        }
        .xp-c4game__wire.w-red { background: #b12424; height: 120px; left: 22%; top: -8px; transform: rotate(9deg); }
        .xp-c4game__wire.w-black { background: #1f2226; height: 138px; left: 45%; top: -16px; transform: rotate(-4deg); }
        .xp-c4game__wire.w-yellow { background: #af9a28; height: 160px; left: 70%; top: -12px; transform: rotate(8deg); }
        .xp-c4game__wire.w-red2 { background: #9f1d2d; height: 180px; left: 62%; top: 30%; transform: rotate(-28deg); }
        .xp-c4game__lcd {
            position: relative;
            z-index: 2;
            border: 2px solid #45515f;
            background: #111a12;
            box-shadow: 0 0 0 2px #6e7a87 inset;
            width: min(680px, 96%);
            margin: 2px auto 6px;
            min-height: 96px;
            padding: 18px 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .xp-c4game__lcd-input {
            min-height: 56px;
            width: 100%;
            text-align: center;
            font-size: clamp(34px, 5.4vw, 56px);
            line-height: 1;
            letter-spacing: 3px;
            color: #f5e27f;
            text-shadow: 0 0 6px rgba(245,226,127,0.4);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            opacity: 0.95;
            font-variant-numeric: tabular-nums;
        }
        .xp-c4game__ime-catcher {
            position: absolute;
            left: -9999px;
            top: 0;
            width: 1px;
            height: 1px;
            opacity: 0;
            pointer-events: none;
        }
        .xp-c4game__console {
            border: 2px solid #34598f;
            background:
                repeating-linear-gradient(0deg, rgba(35,66,120,0.3) 0 4px, rgba(14,31,62,0.3) 4px 8px),
                linear-gradient(180deg, #0b1e3e, #071226);
            box-shadow: 0 0 0 2px #081a36 inset;
            padding: 10px;
            display: flex;
            flex-direction: column;
            min-height: 0;
            gap: 8px;
        }
        .xp-c4game__screen {
            position: relative;
            z-index: 2;
            width: min(780px, 100%);
            margin: 0 auto;
            border: 2px solid #3b4f68;
            background:
                repeating-linear-gradient(0deg, rgba(46,84,143,0.3) 0 4px, rgba(12,27,55,0.3) 4px 8px),
                linear-gradient(180deg, #0b1c38, #071124);
            box-shadow: 0 0 0 2px #091a34 inset;
            padding: 12px;
            display: flex;
            flex-direction: column;
            min-height: 0;
            gap: 8px;
        }
        .xp-c4game__setup {
            align-items: center;
            justify-content: center;
            text-align: center;
        }
        .xp-c4game__setup p { margin: 0; max-width: 760px; font-size: 18px; line-height: 1.4; color: #dbe8ff; }
        .xp-c4game__setup .muted { font-size: 13px; color: #86a6d6; }
        .xp-c4game__mode-row {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-size: 15px;
            color: #cfe3ff;
        }
        .xp-c4game__mode-row .ribbon-select {
            min-width: 170px;
            border: 2px solid #4b86d4;
            background: #071734;
            color: #dbe8ff;
            font-family: inherit;
            font-size: 14px;
            height: 34px;
        }
        .xp-c4game__btn {
            min-width: 140px; padding: 10px 18px; border: 2px solid #a6e2ff; color: #071225; background: #51c5ff; cursor: pointer;
            font-family: inherit; font-size: 18px; box-shadow: 2px 2px 0 rgba(0,0,0,0.4);
        }
        .xp-c4game__btn:active { transform: translate(1px,1px); box-shadow: 1px 1px 0 rgba(0,0,0,0.4); }
        .xp-c4game__clock {
            text-align: center;
            font-size: clamp(36px, 5vw, 58px);
            line-height: 1;
            color: #ffe068;
            letter-spacing: 2px;
            text-shadow: 0 0 8px rgba(255,224,104,0.65);
            margin: 0;
        }
        .xp-c4game__progress-wrap {
            position: relative;
            z-index: 2;
            border: 2px solid #3c4a5c;
            background: #0d1d37;
            height: 20px;
        }
        .xp-c4game__progress {
            height: 100%;
            width: 0%;
            background: repeating-linear-gradient(90deg, #45f08d 0 12px, #22bf62 12px 24px);
            transition: width 120ms linear;
        }
        .xp-c4game__word {
            text-align: center;
            font-size: clamp(30px, 4.2vw, 44px);
            line-height: 1.2;
            margin-top: 2px;
            min-height: 62px;
            color: #8ea4be;
        }
        .xp-c4game__word .typed { color: #89ff98; text-shadow: 0 0 8px rgba(137,255,152,0.45); }
        .xp-c4game__word .rest { color: #7f8ea0; }
        .xp-c4game__queue {
            margin: 2px auto 0;
            width: 100%;
            font-size: 15px;
            color: rgba(200,220,255,0.66);
            text-align: center;
            min-height: 24px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .xp-c4game__input {
            margin: 8px auto 0;
            width: min(640px, 96%);
            border: 2px solid #739ee0;
            background: #071225;
            color: #d5e7ff;
            padding: 10px 12px;
            font-size: 24px;
            font-family: inherit;
            text-align: center;
            outline: none;
        }
        .xp-c4game__hint { text-align: center; font-size: 13px; color: #91a8c4; min-height: 18px; }
        .xp-c4game__status {
            text-align: center;
            font-size: 36px;
            letter-spacing: 1px;
            margin-top: 8px;
            min-height: 44px;
            color: #ffd56f;
            text-shadow: 0 0 10px rgba(255,213,111,0.45);
        }
        @media (max-width: 860px) {
            .xp-c4game__battle { grid-template-columns: 1fr; }
            .xp-c4game__device { min-height: 220px; }
        }
        .xp-c4game.flash { animation: xpC4Flash 120ms steps(2, end); }
        @keyframes xpC4Flash {
            0% { filter: brightness(1); }
            50% { filter: brightness(1.45) saturate(1.5); }
            100% { filter: brightness(1); }
        }
        .xp-c4game.panic::after {
            content: '';
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: radial-gradient(circle at center, rgba(120,0,0,0) 30%, rgba(120,0,0,0.42) 100%);
            animation: xpC4Panic 400ms ease-in-out infinite alternate;
            z-index: 2;
        }
        @keyframes xpC4Panic {
            from { opacity: 0.35; }
            to { opacity: 0.72; }
        }
        .xp-c4game.detonate { animation: xpC4Shake 420ms steps(8, end); }
        @keyframes xpC4Shake {
            0% { transform: translate(0,0); }
            20% { transform: translate(-8px,4px); }
            40% { transform: translate(8px,-4px); }
            60% { transform: translate(-6px,-3px); }
            80% { transform: translate(6px,3px); }
            100% { transform: translate(0,0); }
        }
        .xp-c4game__static {
            position: absolute;
            inset: 0;
            pointer-events: none;
            background: repeating-linear-gradient(0deg, rgba(255,255,255,0.09) 0 2px, rgba(0,0,0,0.08) 2px 4px);
            opacity: 0;
            z-index: 3;
        }
        .xp-c4game.detonate .xp-c4game__static { opacity: 0.95; animation: xpC4Static 240ms steps(6, end) infinite; }
        @keyframes xpC4Static {
            from { transform: translateY(0); }
            to { transform: translateY(4px); }
        }
