* { box-sizing: border-box; }
body { font-family: sans-serif; margin: 0; background: #333; user-select: none; }

.page { 
    width: 100%; 
    max-width: 480px; 
    margin: 0 auto; 
    min-height: 100vh; 
    background: #fff; 
    display: flex; 
    flex-direction: column;
}

.header { 
    background: #222; 
    color: #fff; 
    padding: 10px 15px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    min-height: 60px;
}

.icon_btn { 
    background: #444; 
    color: #fff; 
    border: none; 
    padding: 8px 12px; 
    border-radius: 5px; 
    font-size: 14px;
}

.back_btn {
    padding: 15px 25px;
    margin: -10px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
}

.dungeon_display { 
    padding: 15px; 
    text-align: center; 
    background: #f9f9f9; 
    border-bottom: 1px solid #ddd;
}
#dungeon_name { font-size: 18px; margin: 0 0 10px 0; }
#dungeon_image_area { width: 100%; margin-bottom: 10px; }
#dungeon_image { max-width: 100%; height: auto; border-radius: 10px; }

.gauge_container { 
    width: 100%; 
    height: 16px; 
    background: #e0e0e0; 
    border-radius: 8px; 
    overflow: hidden; 
    margin: 10px 0; 
}
.gauge_bar { width: 0%; height: 100%; background: linear-gradient(to right, #4caf50, #8bc34a); transition: width 0.3s; }
.hp_bar { background: linear-gradient(to right, #ff4e50, #f9d423) !important; }
#progress_message { margin: 0; font-size: 14px; color: #666; font-weight: bold; }

.subject_grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    padding: 20px; 
}
.subject_btn { 
    padding: 30px 10px; 
    font-size: 20px; 
    font-weight: bold;
    border-radius: 12px; 
    border: 2px solid #333; 
    background: #fff; 
    cursor: pointer;
    box-shadow: 0 4px 0 #333;
}
.subject_btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #333; }

.compact_dungeon_box {
    width: 90%;
    margin: 5px auto;
    padding: 8px 12px;
    background: #f0f0f0;
    border-radius: 8px;
}
.dungeon_info_row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.q_d_name { font-size: 12px; font-weight: bold; color: #333; }
.q_d_msg { font-size: 11px; color: #d32f2f; font-weight: bold; }
.gauge_container_mini { width: 100%; height: 10px; background: #ccc; border-radius: 5px; overflow: hidden; }

.menu_btn_long { display: block; width: 90%; margin: 10px auto; padding: 15px; background: #333; color: #fff; border: none; border-radius: 10px; font-size: 16px; text-align: center; cursor: pointer; }
.question_container { padding: 20px; font-size: 18px; line-height: 1.5; background: #fff; }
.choice_btn { display: block; width: 90%; margin: 8px auto; padding: 15px; font-size: 16px; border: 2px solid #444; border-radius: 10px; background: #fff; cursor: pointer; position: relative; text-align: left; }
.dimmed { opacity: 0.3; }
.correct_mark { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); font-size: 32px; color: #f44336; font-weight: bold; }

.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 2000; }
.modal_content { background: #fff; padding: 25px; border-radius: 15px; text-align: center; width: 85%; }