        body {
            margin: 0;
            padding: 20px 10px;
            background: #111;
            font-family: 'Segoe UI', sans-serif;
            color: #fff;
            animation: fadeIn 1s ease-in;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes cardZoomHighlight {
            0% {
                transform: rotateY(180deg) scale(1);
            }

            30% {
                transform: rotateY(180deg) scale(1.15);
            }

            60% {
                transform: rotateY(180deg) scale(1);
            }

            100% {
                transform: rotateY(180deg) scale(1);
            }
        }

        .card-front.zoom-highlight {
            will-change: transform;
            animation: cardZoomHighlight 0.4s ease-in-out;
            z-index: 2;
        }

        *,
        *::before,
        *::after {
            box-sizing: border-box;
        }

        header {
            text-align: center;
            margin-top: 10px;
        }

        header a img {
            max-width: 200px;
            height: auto;
        }

        .game-thumb {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        .thumb-left img {
            max-width: 700px;
            width: 100%;
            height: auto;
            border-radius: 10px;
        }

        .game-title-area {
            text-align: center;
            color: #ff00cc;
            font-size: 22px;
            text-shadow: 0 0 8px #ff00cc;
            margin: 10px 0 20px;
        }

        .game-title {
            margin-bottom: -25px;
            margin-top: -10px;
        }

        .image-title {
            text-align: center;
            margin: 0;
            font-size: 20px;
            color: #fff;
            text-shadow: 0 0 6px #ffa500;
        }

        .x-link, .sub-title1, .sub-title2 {
            text-align: center;
            margin: 0;
            color: #ffa500;
            text-shadow: 0 0 6px #ffa500;
        }

        .x-link, .sub-title1, .sub-title2 {
            font-size: 13px;
        }

        .sub-title1, .sub-title2 {
            color: rgb(255, 142, 233);
            text-shadow: 0 0 8px #ff00cc;
        }

        @media (min-width: 768px) {
            .sub-title1, .sub-title2 {
                font-size: 19px;
            }
        }

        .x-link a {
            color: #00ffe7;
            text-decoration: underline;
        }

        #gameContainer {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 5px;
            max-width: 600px;
            margin: 20px auto;
            padding: 10px;
            border: 2px solid #00ffe7;
            box-shadow: 0 0 18px #00ffe7;
            background-color: #000;
            border-radius: 10px;
        }

        .card {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            perspective: 1000px;
            cursor: pointer;
            border-radius: 10px;
        }

        .card-inner {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            transform-style: preserve-3d;
            transition: transform 0.6s;
            border-radius: 10px;
        }

        .card.flipped .card-inner {
            transform: rotateY(180deg);
        }

        .card-front,
        .card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 5px;
            backface-visibility: hidden;
            border: 1px solid #fff;
        }

        .card-front {
            transform: rotateY(180deg);
            background-size: cover;
            background-position: center;
        }

        .card-back {
            background: #111;
        }

        #scoreBoard {
            text-align: center;
            font-size: 16px;
            margin-bottom: 20px;
            color: #00ffe7;
            text-shadow: 0 0 6px #00ffe7;
        }

        #resultScreen,
        #matchModal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 100;
            text-align: center;
        }

        #resultScreen.show,
        #matchModal.show {
            display: flex;
            animation: fadeIn 0.4s ease;
        }

        #resultScreen h2,
        #matchModal p {
            color: #fff;
            text-shadow: 0 0 6px #ffa500;
        }

        /* ── matchModal: オーバーレイ背景だけ管理 ── */
        #matchModal {
            background: rgba(0, 0, 0, 0);
            transition: background 0.25s ease;
        }

        #matchModal.show {
            display: flex;
            background: rgba(0, 0, 0, 0.82);
        }

        #matchModal.fade-out {
            background: rgba(0, 0, 0, 0);
        }

        /* ── modal-inner: コンテンツボックス ── */
        .modal-inner {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            padding: 22px 20px 18px;
            border: 2px solid #00ffe7;
            border-radius: 14px;
            background: rgba(0, 5, 20, 0.75);
            box-shadow: 0 0 24px #00ffe7, 0 0 48px rgba(0, 255, 231, 0.25), inset 0 0 20px rgba(0, 255, 231, 0.05);
            max-width: 88%;
            text-align: center;
            opacity: 0; /* アニメーション開始前は非表示 */
        }

        #matchModal.show .modal-inner {
            animation: modalBounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }

        @keyframes modalBounceIn {
            0%   { transform: scale(0.45) translateY(50px); opacity: 0; }
            65%  { transform: scale(1.04) translateY(-4px); opacity: 1; }
            100% { transform: scale(1)    translateY(0);    opacity: 1; }
        }

        #matchModal.fade-out .modal-inner {
            animation: modalBounceOut 0.38s cubic-bezier(0.55, 0, 1, 0.45) both;
        }

        @keyframes modalBounceOut {
            0%   { transform: scale(1)    translateY(0);    opacity: 1; }
            30%  { transform: scale(1.04) translateY(-4px); }
            100% { transform: scale(0.5)  translateY(30px); opacity: 0; }
        }

        /* ── 画像: ホログラム風リビール ── */
        #matchModal.show #matchImage {
            animation: imageHologram 0.5s ease 0.18s both;
        }

        @keyframes imageHologram {
            from { transform: scale(0.82); opacity: 0; }
            to   { transform: scale(1);    opacity: 1; }
        }

        /* ── 説明テキスト: 遅延フェードアップ ── */
        #matchText .asahi-product-name {
            font-weight: bold;
            font-size: calc(1em + 1px);
        }

        #matchText .asahi-product-subtitle {
            color: #ff80c0;
            text-shadow: 0 0 6px #ff1493, 0 0 12px #ff1493;
        }

        #matchModal.show #matchText {
            animation: textSlideUp 0.4s ease 0.42s both;
        }

        @keyframes textSlideUp {
            from { transform: translateY(14px); opacity: 0; }
            to   { transform: translateY(0);    opacity: 1; }
        }

        /* ── OKボタン: バウンスイン ── */
        #matchModal.show button {
            animation: btnBounceIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) 0.62s both;
        }

        @keyframes btnBounceIn {
            from { transform: scale(0.4); opacity: 0; }
            to   { transform: scale(1);   opacity: 1; }
        }

        #restartButton,
        #matchModal button {
            font-size: 16px;
            padding: 12px 24px;
            background-color: #00ffe7;
            border: none;
            color: #fff;
            font-weight: bold;
            border-radius: 10px;
            box-shadow: 0 0 12px #00ffe7, 0 0 24px #00ffe7;
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.2s;
        }

        #restartButton:hover,
        #matchModal button:hover {
            transform: scale(1.05);
            box-shadow: 0 0 16px #00ffe7, 0 0 32px #00ffe7;
        }

        #matchModal img {
            max-width: 80%;
            max-height: 40vh;
            border: 2px solid #00ffe7;
            border-radius: 6px;
        }

        .logo-footer {
            text-align: center;
            margin-top: 30px;
        }

        .logo-footer a {
            display: inline-block;
        }

        .logo-footer img {
            max-width: 75px;
            width: 100%;
            height: auto;
            opacity: 0.6;
            transition: opacity 0.3s;
        }

        .logo-footer img:hover {
            opacity: 1;
        }

        /* ── スパークルパーティクル ── */
        .sparkle {
            position: fixed;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            pointer-events: none;
            z-index: 9999;
            animation: sparkleFly 0.75s ease-out forwards;
        }

        @keyframes sparkleFly {
            0%   { transform: translate(0, 0) scale(1.2); opacity: 1; }
            100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
        }

        /* ── マッチカードのネオングロー ── */
        .card.matched .card-front {
            animation: matchedGlow 1.6s ease-in-out infinite alternate;
        }

        @keyframes matchedGlow {
            0%   { box-shadow: 0 0 8px #00ffe7,  0 0 18px #00ffe7; }
            50%  { box-shadow: 0 0 16px #ff00cc, 0 0 32px #ff00cc; }
            100% { box-shadow: 0 0 10px #ffa500, 0 0 22px #ffa500; }
        }

        /* ── ゲームクリア：confettiキャンバス ── */
        #confettiCanvas {
            position: fixed;
            top: 0; left: 0;
            width: 100%; height: 100%;
            pointer-events: none;
            z-index: 98;
        }

        /* ── ゲームクリア：テキストポップイン ── */
        #resultScreen h2 {
            animation: resultPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
            font-size: 1.8em;
            line-height: 1.5;
        }

        @keyframes resultPop {
            0%   { transform: scale(0.3); opacity: 0; }
            70%  { transform: scale(1.08); opacity: 1; }
            100% { transform: scale(1); }
        }

        #resultScreen #restartButton {
            animation: buttonSlideUp 0.5s ease 0.5s both;
        }

        @keyframes buttonSlideUp {
            0%   { transform: translateY(30px); opacity: 0; }
            100% { transform: translateY(0);    opacity: 1; }
        }

        /* ── リスタート: ネオンバースト ── */
        #restartBurst {
            position: fixed;
            top: 50%; left: 50%;
            width: 12px; height: 12px;
            margin: -6px 0 0 -6px;
            border-radius: 50%;
            background: #00ffe7;
            box-shadow: 0 0 30px #00ffe7, 0 0 60px #00ffe7, 0 0 100px rgba(0,255,231,0.5);
            z-index: 9999;
            pointer-events: none;
            animation: burstExpand 0.55s ease-out forwards;
        }

        @keyframes burstExpand {
            0%   { transform: scale(0);   opacity: 1;   background: #00ffe7; }
            45%  { transform: scale(250); opacity: 1;   background: #00ffe7; }
            75%  { transform: scale(250); opacity: 0.7; background: #001a18; }
            100% { transform: scale(250); opacity: 0; }
        }

        /* ── リスタート: カードディールイン ── */
        .card.dealing-in {
            animation: cardDealIn 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
        }

        @keyframes cardDealIn {
            from { transform: scale(0.25); opacity: 0; }
            to   { transform: scale(1);    opacity: 1; }
        }
    