:root {
    --map-brown: #d4a373;
    --parchment: #fefae0;
    --navy: #212529;
    --accent-red: #ae2012;
    --gold: #ffb703;
    --text-color: #333;
    --glass-bg: rgba(254, 250, 224, 0.95);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Zen Maru Gothic', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 世界地図の背景 */
.map-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: var(--parchment);
    background-image:
        radial-gradient(circle at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.05) 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 35c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM54 80c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM66 15c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3z' fill='%23d4a373' fill-opacity='0.1' fill-rule='evenodd'/%3E%3C/svg%3E");
}

.container {
    width: 90%;
    max-width: 700px;
    z-index: 10;
}

.screen {
    display: none;
    background: var(--glass-bg);
    padding: 35px 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    border: 8px double var(--map-brown);
    position: relative;
    overflow: hidden;
}

.screen::before {
    content: '✈️';
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0.1;
    font-size: 3rem;
}

.screen.active {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-icon {
    font-size: 3.5rem;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

h1 {
    font-size: 1.8rem;
    color: var(--navy);
    margin-bottom: 15px;
    letter-spacing: 2px;
    line-height: 1.3;
}

.subtitle {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 40px;
    line-height: 1.6;
}

/* ボタン */
.btn {
    font-family: inherit;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    text-decoration: none;
    text-transform: uppercase;
}

.large {
    padding: 15px 45px;
    font-size: 1.3rem;
    background-color: var(--navy);
    color: var(--parchment);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.large:hover {
    background-color: var(--accent-red);
    transform: translateY(-2px);
}

.main-btn {
    padding: 12px 35px;
    font-size: 1.1rem;
    background-color: var(--map-brown);
    color: white;
}

.secondary-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    background-color: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
    margin: 10px 0;
}

.back-link {
    display: block;
    margin-top: 30px;
    color: var(--map-brown);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px dashed var(--map-brown);
}

/* クイズ部分 */
.quiz-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--map-brown);
    padding-bottom: 10px;
}

.badge {
    padding: 5px 15px;
    font-weight: bold;
    color: var(--navy);
    letter-spacing: 1px;
}

.question-container {
    width: 100%;
    padding: 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.question-text {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.5;
    color: var(--navy);
    word-break: break-all;
}

.choices-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.choice-btn {
    padding: 15px;
    font-size: 1.1rem;
    background: white;
    border: 2px solid var(--map-brown);
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
    color: var(--navy);
}

.choice-btn:hover {
    background: var(--map-brown);
    color: white;
}

.choice-btn.correct {
    background-color: #2b9348 !important;
    border-color: #2b9348 !important;
    color: white !important;
}

.choice-btn.incorrect {
    background-color: #ae2012 !important;
    border-color: #ae2012 !important;
    color: white !important;
}

/* フィードバック */
.feedback-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.feedback-content {
    width: 90%;
    max-width: 500px;
    background: var(--parchment);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    border: 5px solid var(--gold);
}

.feedback-icon {
    font-size: 4rem;
    margin-bottom: 15px;
}

.explanation-box {
    background: rgba(0, 0, 0, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.7;
    border-left: 5px solid var(--gold);
}

.hidden {
    display: none !important;
}

/* 結果 */
.result-card {
    width: 100%;
}

.final-score {
    font-size: 2.5rem;
    color: var(--accent-red);
    margin: 20px 0;
    font-weight: bold;
}

.result-rank {
    font-size: 1.4rem;
    margin-bottom: 40px;
    color: var(--navy);
    font-weight: bold;
}

ruby {
    font-family: inherit;
}

rt {
    font-size: 0.55em;
    color: #666;
}

/* スマホ対応 */
@media (max-width: 600px) {
    .screen {
        padding: 30px 20px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .question-text {
        font-size: 1.3rem;
    }

    .choices-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .choice-btn {
        font-size: 1.1rem;
        padding: 15px;
    }

    .large {
        padding: 15px 30px;
        font-size: 1.2rem;
    }
}