body {
    text-align: center;
    font-family: sans-serif;
    background: #fff7ff;
    margin: 0;
    padding: 5px 20px 20px 20px;
}

h1 {
    font-size: 52px;
    margin-top: 5px;
    margin-bottom: 10px;
}

h2 {
    font-size: 42px;
    margin-top: 10px;
    margin-bottom: 20px;
}

.images {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

img {
    width: 520px;
    border: 3px solid #999;
    border-radius: 10px;
}

button {
    margin: 15px;
    width: 280px;
    height: 80px;
    font-size: 30px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
}

    button:hover {
        background-color: #e6e6e6;
    }

.scene-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

    .scene-buttons button {
        width: 320px;
        height: 80px;
        font-size: 32px;
        font-weight: bold;
    }

#resultArea button {
    margin: 12px;
    width: 260px;
    height: 65px;
    font-size: 24px;
}

#score {
    font-size: 38px;
    font-weight: bold;
}
.result-columns {
    display: flex;
    justify-content: center;
    gap: 80px;
    font-size: 32px;
    text-align: left;
}
.login-box {
    width: 450px;
    margin: 80px auto;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 0 15px #ccc;
}

    .login-box input {
        width: 320px;
        height: 50px;
        font-size: 24px;
        padding-left: 15px;
    }

    .login-box button {
        width: 250px;
        height: 70px;
        font-size: 28px;
        background: #6c4bb6;
        color: white;
        border: none;
        border-radius: 12px;
        cursor: pointer;
    }

        .login-box button:hover {
            background: #56379b;
        }
.input-note {
    font-size: 18px;
    color: #555;
    margin: 0 auto 25px;
    line-height: 1.6;
}
.description-box {
    width: 70%;
    max-width: 900px;
    margin: 30px auto;
    padding: 30px;
    border: 4px solid #333;
    border-radius: 16px;
    background: white;
    text-align: left;
    font-size: 24px;
    line-height: 1.8;
}

    .description-box h2 {
        text-align: center;
        font-size: 34px;
        margin-top: 0;
        margin-bottom: 20px;
    }

.start-area {
    margin-top: 25px;
    font-size: 22px;
}

    .start-area select {
        width: 180px;
        height: 60px;
        margin: 15px;
        font-size: 24px;
        text-align: center;
    }
.image-box {
    position: relative;
}

.image-label {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 55px;
    height: 55px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    border: 3px solid black;
    border-radius: 50%;
    font-size: 32px;
    font-weight: bold;
    z-index: 10;
}

.click-image-box {
    position: relative;
    display: inline-block;
    max-width: 100%;
}


    /* 問題画像 */

    .click-image-box img {
        width: 720px;
        max-width: 100%;
        height: auto;
        display: block;
        border: 3px solid #999;
        border-radius: 10px;
        cursor: crosshair;
    }


/* クリックした位置の×印 */

#clickMark {
    display: none;
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    z-index: 20;
}


/* クリック位置 */

#clickPosition {
    font-size: 28px;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 20px;
}


/* 回答ボタン */

#confirmClick {
    width: 320px;
    max-width: 90%;
    height: 80px;
    font-size: 28px;
    font-weight: bold;
    margin: 20px;
    border-radius: 12px;
    cursor: pointer;
}


    /* まだ画像をクリックしていない */

    #confirmClick:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }


/* ========================================
   クリック問題 結果
======================================== */

#clickResultArea {
    max-width: 700px;
    margin: 30px auto;
    padding: 25px;
}


#clickScore {
    font-size: 34px;
    font-weight: bold;
}


#clickResultList {
    font-size: 24px;
    margin-top: 25px;
}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 600px) {

    .click-image-box img {
        width: 100%;
    }

    #clickMark {
        font-size: 45px;
    }

    #clickPosition {
        font-size: 20px;
    }

    #confirmClick {
        height: 65px;
        font-size: 22px;
    }

    #clickScore {
        font-size: 28px;
    }

    #clickResultList {
        font-size: 20px;
    }
}

@media screen and (orientation: landscape) and (max-width: 950px) {

    .images {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: center;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 15px;
    }

    .image-box {
        width: 46%;
        max-width: 46%;
    }

        .image-box img {
            width: 100%;
            height: auto;
        }

    h1 {
        font-size: 30px;
        margin: 5px;
    }

    h2 {
        font-size: 26px;
        margin: 5px 0 10px;
    }

    button {
        width: 180px;
        height: 55px;
        font-size: 20px;
        margin: 5px;
    }
}

.click-result-item {
    margin: 15px 0;
    padding: 10px;
}


/* スマートフォン */

@media screen and (max-width: 600px) {

    #reasonArea h2 {
        font-size: 26px;
    }

    #reasonButtons button {
        width: 90%;
        min-height: 60px;
        font-size: 20px;
    }
}

/* ========================================
   理由選択画面
======================================== */

#reasonArea {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    text-align: center;
}

    #reasonArea h2 {
        font-size: 36px;
        margin-bottom: 25px;
    }

#reasonButtons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

    #reasonButtons button {
        display: block;
        width: 600px;
        max-width: 90%;
        min-height: 70px;
        height: auto;
        margin: 0;
        padding: 15px 20px;
        font-size: 26px;
        font-weight: bold;
        white-space: normal;
    }


/* スマートフォン */

@media screen and (max-width: 600px) {

    #reasonArea {
        width: 100%;
        margin: 15px auto;
    }

        #reasonArea h2 {
            font-size: 25px;
        }

    #reasonButtons {
        gap: 10px;
    }

        #reasonButtons button {
            width: 90%;
            min-height: 60px;
            font-size: 19px;
            padding: 10px;
        }
}

#backToClickButton {
    width: 260px;
    height: 60px;
    font-size: 22px;
    font-weight: bold;
    margin-top: 20px;
    padding: 5px 10px;
}

/* ========================================
   複数危険箇所クリックテスト
======================================== */


/* タイマー・発見数 */

#clickStatusArea {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin: 10px auto 20px;
}


#timerText,
#foundText {
    font-size: 28px;
    font-weight: bold;
    margin: 5px;
}


/* ========================================
   回答済みの×印
======================================== */

.answered-mark {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    z-index: 15;
}


/* 今クリックしている×を一番上にする */

#clickMark {
    z-index: 20;
}


/* ========================================
   回答終了ボタン
======================================== */

#finishButton {
    width: 220px;
    height: 60px;
    font-size: 20px;
    margin: 10px;
}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 600px) {

    #clickStatusArea {
        gap: 15px;
        flex-wrap: wrap;
    }


    #timerText,
    #foundText {
        font-size: 20px;
    }


    .answered-mark {
        font-size: 45px;
    }


    #finishButton {
        width: 190px;
        height: 55px;
        font-size: 18px;
    }
}

/* ========================================
   複数危険箇所クリックテスト
======================================== */


/* ========================================
   タイマー・発見数・回答回数
======================================== */

#clickStatusArea {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 35px;
    flex-wrap: wrap;
    margin: 10px auto 20px;
}


#timerText,
#foundText,
#attemptText {
    font-size: 27px;
    font-weight: bold;
    margin: 5px 10px;
}


/* ========================================
   回答済みの×印
======================================== */

.answered-mark {
    position: absolute;
    transform: translate(-50%, -50%);
    font-size: 60px;
    font-weight: bold;
    line-height: 1;
    pointer-events: none;
    z-index: 15;
}


/* ========================================
   現在クリックしている×
======================================== */

#clickMark {
    z-index: 20;
}


/* ========================================
   回答終了ボタン
======================================== */

#finishButton {
    width: 220px;
    height: 60px;
    font-size: 20px;
    margin: 10px;
}


/* ========================================
   スマートフォン
======================================== */

@media screen and (max-width: 600px) {

    #clickStatusArea {
        gap: 8px;
        margin-bottom: 10px;
    }


    #timerText,
    #foundText,
    #attemptText {
        font-size: 18px;
        margin: 3px 8px;
    }


    .answered-mark {
        font-size: 45px;
    }


 
}

#clickMark,
.answered-mark {
    color: red;
}

#confirmClick,
#finishButton {
    width: 280px;
    height: 65px;
    font-size: 24px;
    font-weight: bold;
    margin: 15px;
    border-radius: 12px;
    cursor: pointer;
}

/* ========================================
   危険箇所クリックテスト
   画像＋理由選択 横並びレイアウト
======================================== */

/* 画像と理由を横並びにする */
.click-layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    width: 100%;
    max-width: 1500px;
    margin: 25px auto;
    box-sizing: border-box;
}

/* 左側：画像エリア */
.click-main {
    flex: 1 1 0;
    min-width: 0;
    max-width: 820px;
}

/* 問題エリア */
.click-layout #clickQuestionArea {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 画像の枠 */
.click-layout .click-image-box {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 問題画像 */
.click-layout #clickImage {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    cursor: crosshair;
}

/* クリック位置の×印 */
.click-layout #clickMark {
    position: absolute;
    display: none;
    color: red;
    font-size: 38px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10;
}

/* 回答済みの×印を置く範囲 */
.click-layout #answeredMarks {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 回答済みの×印 */
.click-layout .answered-mark {
    position: absolute;
    color: red;
    font-size: 38px;
    font-weight: bold;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9;
}

/* クリック後のメッセージ */
.click-layout #clickPosition {
    margin: 18px auto;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

/* 画像下のボタン */
.click-action-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* 2つのボタンの大きさを統一 */
.click-layout #confirmClick,
.click-layout #finishButton {
    width: 230px;
    max-width: 100%;
    height: 65px;
    margin: 0;
    padding: 10px;
    font-size: 21px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    box-sizing: border-box;
}

    /* 無効になっているボタン */
    .click-layout #confirmClick:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* ========================================
   右側：理由選択
======================================== */

.click-layout #reasonArea {
    flex: 0 0 360px;
    width: 360px;
    max-width: 360px;
    margin: 0;
    padding: 20px;
    background: #ffffff;
    border: 2px solid #dddddd;
    border-radius: 15px;
    box-sizing: border-box;
}

    /* 理由選択の見出し */
    .click-layout #reasonArea h2 {
        margin: 0 0 20px;
        font-size: 22px;
        line-height: 1.5;
        text-align: center;
    }

/* 理由ボタンを縦に並べる */
.click-layout #reasonButtons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

    /* 理由の選択肢 */
    .click-layout #reasonButtons button {
        display: block;
        width: 100%;
        height: auto;
        min-height: 65px;
        margin: 0;
        padding: 14px;
        font-size: 17px;
        line-height: 1.5;
        text-align: left;
        background: #f8f8ff;
        color: #222222;
        border: 2px solid #cccccc;
        border-radius: 10px;
        white-space: normal;
        overflow-wrap: anywhere;
        cursor: pointer;
        box-sizing: border-box;
    }

        /* 選択肢にマウスを乗せたとき */
        .click-layout #reasonButtons button:hover {
            background: #e8e8ff;
            border-color: #7777cc;
        }

/* 位置を選び直すボタン */
.click-layout #backToClickButton {
    display: block;
    width: 100%;
    height: 55px;
    margin: 20px 0 0;
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    box-sizing: border-box;
}

/* ========================================
   スマートフォン対応
======================================== */

@media (max-width: 950px) {

    /* 狭い画面では縦並び */
    .click-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        padding: 0 12px;
    }

    .click-main {
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    /* 選択肢を画像の下へ */
    .click-layout #reasonArea {
        width: 100%;
        max-width: 100%;
        flex: none;
    }

    .click-layout #clickPosition {
        font-size: 20px;
    }

    .click-layout #confirmClick,
    .click-layout #finishButton {
        width: 190px;
        height: 60px;
        font-size: 18px;
    }

    .click-layout #reasonArea h2 {
        font-size: 20px;
    }

    .click-layout #reasonButtons button {
        font-size: 17px;
    }
}

@media (max-width: 480px) {

    .click-action-buttons {
        gap: 8px;
    }

    .click-layout #confirmClick,
    .click-layout #finishButton {
        width: calc(50% - 4px);
        min-width: 0;
        height: 56px;
        font-size: 15px;
    }

    .click-layout #clickMark,
    .click-layout .answered-mark {
        font-size: 30px;
    }

    .click-layout #reasonArea {
        padding: 15px;
    }
}

/* クリックした位置の×印 */
.click-layout #clickMark {
    font-size: 50px;
}

/* 回答済みの×印 */
.click-layout .answered-mark {
    font-size: 50px;
}

/* スマホでも大きく表示 */
@media (max-width: 480px) {
    .click-layout #clickMark,
    .click-layout .answered-mark {
        font-size: 40px;
    }
}
/* ========================================
   正解・不正解の視覚的フィードバック
======================================== */

/* ----------------------------------------
   正解：緑の○
---------------------------------------- */

.click-layout .answered-mark {
    position: absolute;
    color: #00b050;
    font-size: 60px;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    text-shadow: 0 0 3px white, 0 0 6px white;
}


/* ----------------------------------------
   不正解：赤い×
---------------------------------------- */

.click-layout .wrong-answered-mark {
    position: absolute;
    color: #ff0000;
    font-size: 60px;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 16;
    text-shadow: 0 0 3px white, 0 0 6px white;
    animation: wrongPop 0.4s ease;
}


/* ----------------------------------------
   回答前の一時的な×印
---------------------------------------- */

.click-layout #clickMark {
    color: #ff9900;
    font-size: 55px;
    font-weight: 900;
    z-index: 20;
}


/* ----------------------------------------
   不正解時に画像の枠を赤く点滅
---------------------------------------- */

.click-layout .click-image-box.wrong-flash {
    animation: wrongFlash 0.8s ease;
}


/* ----------------------------------------
   不正解の×が大きく現れる
---------------------------------------- */

@keyframes wrongPop {

    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}


/* ----------------------------------------
   画像の枠を赤く点滅させる
---------------------------------------- */

@keyframes wrongFlash {

    0% {
        outline: 5px solid transparent;
    }

    25% {
        outline: 5px solid #ff0000;
    }

    50% {
        outline: 5px solid transparent;
    }

    75% {
        outline: 5px solid #ff0000;
    }

    100% {
        outline: 5px solid transparent;
    }
}


/* ----------------------------------------
   スマホ表示
---------------------------------------- */

@media (max-width: 480px) {

    .click-layout .answered-mark {
        font-size: 45px;
    }

    .click-layout .wrong-answered-mark {
        font-size: 45px;
    }

    .click-layout #clickMark {
        font-size: 40px;
    }
}


/* ========================================
   危険箇所テスト：正誤表示
======================================== */

/* 場所も理由も正解：緑の○ */
.click-layout .answered-mark {
    position: absolute;
    color: #00b050;
    font-size: 55px;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 15;
    text-shadow: 0 0 3px white, 0 0 6px white;
}

/* 場所が不正解：赤い× */
.click-layout .wrong-answered-mark {
    position: absolute;
    color: #ff0000;
    font-size: 55px;
    font-weight: 900;
    line-height: 1;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 16;
    text-shadow: 0 0 3px white, 0 0 6px white;
    animation: wrongPop 0.4s ease;
}

/* ========================================
   場所正解・理由不正解：○ × の組み合わせ
======================================== */

.click-layout .answer-combination {
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 2px;
    /* ○×全体をクリック位置の中心に配置 */
    transform: translate(-50%, -50%);
    white-space: nowrap;
    line-height: 1;
    pointer-events: none;
    z-index: 17;
    /* 背景画像の上でも見やすく */
    filter: drop-shadow(0 0 3px white);
}

/* 組み合わせの緑の○ */
.click-layout .combination-circle {
    color: #00b050;
    font-size: 52px;
    font-weight: 900;
}

/* 組み合わせの赤い× */
.click-layout .combination-cross {
    color: #ff0000;
    font-size: 46px;
    font-weight: 900;
}

/* 回答前の一時的な× */
.click-layout #clickMark {
    color: #ff9900;
    font-size: 50px;
    font-weight: 900;
    z-index: 20;
}

/* ========================================
   メッセージの正誤表示
======================================== */

.click-layout #clickPosition.feedback-correct {
    color: #008a35;
    font-weight: 900;
}

.click-layout #clickPosition.feedback-wrong {
    color: #d60000;
    font-weight: 900;
}

/* ========================================
   不正解時の赤い点滅
======================================== */

.click-layout .click-image-box.wrong-flash {
    animation: wrongFlash 0.8s ease;
}

@keyframes wrongPop {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }

    60% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes wrongFlash {
    0% {
        outline: 5px solid transparent;
    }

    25% {
        outline: 5px solid #ff0000;
    }

    50% {
        outline: 5px solid transparent;
    }

    75% {
        outline: 5px solid #ff0000;
    }

    100% {
        outline: 5px solid transparent;
    }
}

/* ========================================
   スマートフォン対応
======================================== */

@media (max-width: 480px) {
    .click-layout .answered-mark,
    .click-layout .wrong-answered-mark {
        font-size: 40px;
    }

    .click-layout .combination-circle {
        font-size: 36px;
    }

    .click-layout .combination-cross {
        font-size: 33px;
    }

    .click-layout .answer-combination {
        gap: 1px;
    }

    .click-layout #clickMark {
        font-size: 40px;
    }
}
