    body { background-color: #0a0a0a; color: #d1d1d1; font-family: 'Consolas', 'Monaco', 'Courier New', monospace; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; margin: 0; user-select: none; touch-action: manipulation; }
    #game-container { position: relative; text-align: center; border: 2px solid #444; padding: 10px; background-color: #000; width: 95%; max-width: 450px; }
    #top-bar { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 10px; }
    #lang-selector { display: flex; gap: 5px; }
    .lang-btn { background: #222; border: 1px solid #444; color: #888; padding: 4px 10px; font-size: 12px; cursor: pointer; border-radius: 4px; }
    .lang-btn.active { border-color: #3f3; color: #3f3; background: #1a1a1a; }
    .help-circle { width: 26px; height: 26px; border-radius: 50%; border: 1px solid #55a; background: #224; color: #88f; font-size: 16px; display: flex; justify-content: center; align-items: center; cursor: pointer; font-weight: bold; }

    #guide-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.95); display: none; flex-direction: column; justify-content: center; align-items: center; z-index: 10; color: #fff; padding: 20px; box-sizing: border-box; border: 2px solid #3f3; }
    .guide-title { font-size: 20px; color: #3f3; margin-bottom: 15px; font-weight: bold; }
    .guide-text { font-size: 13px; line-height: 1.5; margin-bottom: 25px; text-align: left; }

    #screen { font-size: 14px; line-height: 1.1; letter-spacing: 1px; white-space: pre; margin-bottom: 10px; color: #3f3; min-height: 250px; font-weight: bold; }
    #log { height: 85px; overflow-y: hidden; font-size: 12px; color: #888; text-align: left; border-top: 1px solid #222; padding-top: 5px; }
    
    #controls { display: grid; grid-template-columns: repeat(3, 75px); grid-template-rows: repeat(3, 75px); gap: 10px; margin-top: 15px; justify-content: center; }
    .btn { width: 75px; height: 75px; background-color: #222; border: 1px solid #555; color: white; display: flex; justify-content: center; align-items: center; border-radius: 8px; cursor: pointer; font-size: 18px; }
    .btn:active { background-color: #444; }
    
    #warp-btn { grid-column: 1; grid-row: 1; background-color: #422; border-color: #a55; color: #f88; font-size: 10px; }
    #up { grid-column: 2; grid-row: 1; }
    #shock-btn { grid-column: 3; grid-row: 1; background-color: #422; border-color: #a55; color: #f88; font-size: 10px; }
    #left { grid-column: 1; grid-row: 2; }
    #wait { grid-column: 2; grid-row: 2; background-color: #333; font-size: 12px; word-break: break-all; padding: 2px; }
    #right { grid-column: 3; grid-row: 2; }
    #down { grid-column: 2; grid-row: 3; }

    .log-player { color: #fff; } 
    .log-enemy { color: #ff5555; } 
    .log-system { color: #55aaff; } 
    .log-boss { color: #ff55ff; font-weight: bold; }

    .log-system { color: #aaa; } /* 通常のログ */
    /* 実績解除だけ金色にする */
    div:contains("🏆") { 
        color: #ffd700; 
        font-weight: bold;
        animation: flash 1s infinite alternate;
    }

    @keyframes flash {
        from { opacity: 1; }
        to { opacity: 0.7; }
    }

/* 親要素を横並びの土台にする */
#top-bar {
    display: flex;
    justify-content: space-between; /* 言語ボタンとアイコンを左右に分ける */
    align-items: center;
    padding: 5px 10px;
}

/* アイコンふたつを横に並べる */
.top-icons {
    display: flex;
    gap: 8px; /* アイコン同士の隙間 */
    align-items: center;
}

/* 🏆と？のスタイルを統一する */
.ach-circle, .help-circle {
    /* 絶対配置の指定（position: absolute）がもし残っていたら削除してください */
    position: static !important; 
    
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    border: 1px solid #555;
    background: #222;
    transition: 0.2s;
}

.ach-circle:hover, .help-circle:hover {
    background: #333;
}

/* 🏆専用（金枠） */
.ach-circle {
    border-color: #ffd700;
}

/* 実績モーダルのスタイル */
#ach-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ach-modal {
    background: #1a1a1a;
    border: 2px solid #ffd700;
    padding: 20px;
    width: 85%;
    max-width: 320px;
    max-height: 70vh;
    overflow-y: auto;
    text-align: left;
}

.ach-item {
    padding: 8px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ach-item.locked { opacity: 0.4; }
.ach-item.unlocked { color: #fff; }
/* 解除済みの中でも、特定の高難易度実績に特別な色を付ける例 */
.ach-item[data-id="boss_lv3"].unlocked {
    border: 1px solid #00ffff;
    box-shadow: 0 0 10px #00ffff;
    background: rgba(0, 255, 255, 0.1);
}

/* ショックウェーブのエフェクト（アニメーション） */
.shockwave-effect {
    position: absolute; /* マスの上に重ねる */
    width: 2.8ch;  /* 1マスのサイズ（フォントに合わせて調整してください） */
    height: 2.8ch; 
    border-radius: 50%; /* 円形にする */
    background: rgba(255, 215, 0, 0); /* 初期状態：透明な金色 */
    box-shadow: 0 0 10px 5px rgba(255, 215, 0, 0);
    z-index: 10; /* 他のタイルより上に表示 */
    pointer-events: none; /* クリックを邪魔しない */
    
    /* アニメーションの設定 */
    animation: wave-expand 0.4s ease-out; 
}

/* アニメーションの動き（キーフレーム） */
@keyframes wave-expand {
    0% {
        transform: scale(0.1); /* 中心から */
        background: rgba(255, 215, 0, 0.8); /* パッと光る */
        box-shadow: 0 0 15px 8px rgba(255, 215, 0, 0.7);
    }
    100% {
        transform: scale(1.0); /* 周囲1マスへ広がる */
        background: rgba(255, 215, 0, 0); /* 徐々に透明に */
        box-shadow: 0 0 5px 2px rgba(255, 215, 0, 0);
    }
}

/* 文字を光らせるクラス */
.glow-effect {
    animation: text-glow 0.5s ease-out;
}

@keyframes text-glow {
    0% {
        background-color: rgba(255, 215, 0, 0.8); /* 背景を金に */
        color: #fff; /* 文字を白に */
        text-shadow: 0 0 10px #fff;
    }
    100% {
        background-color: transparent;
        color: inherit;
        text-shadow: none;
    }
}

.mode-btn {
    display: block; width: 80%; margin: 10px auto; padding: 15px;
    background: #444; color: #fff; border: 2px solid #888; cursor: pointer;
}
#study-screen {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: #000; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
#card-display {
    width: 80%; height: 200px; border: 1px solid #444; padding: 20px; text-align: center;
    display: flex; flex-direction: column; justify-content: center; font-size: 18px;
}
.hidden { visibility: hidden; }