﻿/* © 2026 PassQuest Team (https://passquest.jp). All rights reserved. 無断複製・転載・改変を禁じます。 */
:root {
    --primary-color: #4A90E2;
    /* Trustworthy Blue */
    --accent-color: #F5A623;
    /* Warning/Highlight Orange */
    --success-color: #2ECC71;
    --error-color: #E74C3C;
    --bg-color: #F4F7F6;
    --text-color: #333333;
    --card-bg: url('images/ui/parchment.png') center/cover no-repeat #fffdf5;

    /* 笨ｨ New Feminine Accent Colors & Tokens */
    --care-pink: #ff85a2;
    --care-pink-light: #ffb4c5;
    --care-purple: #9c27b0;
    --care-lavender: #e1bee7;
    --care-soft-bg: #fff5f8;
    --border-radius-soft: 25px;
    --shadow-feminine: 0 10px 25px rgba(255, 133, 162, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-bottom: 50px;
    transition: background-color 0.5s ease;
}

/* Super Fever Mode! */
.fever-mode {
    background: linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
    background-size: 400% 400%;
    animation: rainbowBG 3s ease infinite;
}

@keyframes rainbowBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Sakura Blizzard Effect */
.sakura {
    position: fixed;
    top: -20px;
    font-size: 1.5rem;
    z-index: 9999;
    pointer-events: none;
    user-select: none;
    animation: fall linear forwards;
}

/* Force hide sakura when not in fever mode - REMOVED */

@keyframes fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Fireworks Effect */
.firework {
    position: fixed;
    width: 250px;
    height: 250px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'%3E%3Cdefs%3E%3Cfilter id='glow' x='-50%25' y='-50%25' width='200%25' height='200%25'%3E%3CfeGaussianBlur stdDeviation='2' result='coloredBlur'/%3E%3CfeMerge%3E%3CfeMergeNode in='coloredBlur'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Cg filter='url(%23glow)'%3E%3C!-- Core --%3E%3Ccircle cx='100' cy='100' r='5' fill='white'/%3E%3C!-- Inner Ring --%3E%3Cg fill='%23FFD700'%3E%3Ccircle cx='100' cy='70' r='3'/%3E%3Ccircle cx='126' cy='85' r='3'/%3E%3Ccircle cx='126' cy='115' r='3'/%3E%3Ccircle cx='100' cy='130' r='3'/%3E%3Ccircle cx='74' cy='115' r='3'/%3E%3Ccircle cx='74' cy='85' r='3'/%3E%3C/g%3E%3C!-- Outer Ring (Colorful) --%3E%3Cg%3E%3Ccircle cx='100' cy='30' r='4' fill='%23FF4500'/%3E%3Ccircle cx='145' cy='45' r='4' fill='%23FF6347'/%3E%3Ccircle cx='170' cy='100' r='4' fill='%23FFD700'/%3E%3Ccircle cx='145' cy='155' r='4' fill='%2332CD32'/%3E%3Ccircle cx='100' cy='170' r='4' fill='%231E90FF'/%3E%3Ccircle cx='55' cy='155' r='4' fill='%239370DB'/%3E%3Ccircle cx='30' cy='100' r='4' fill='%23FF1493'/%3E%3Ccircle cx='55' cy='45' r='4' fill='%23FF69B4'/%3E%3C/g%3E%3C!-- Spikes --%3E%3Cpath d='M100 100 L100 20' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L180 100' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L100 180' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L20 100' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L156 44' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L156 156' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L44 156' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3Cpath d='M100 100 L44 44' stroke='%23FFF' stroke-width='1' opacity='0.5'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 10000;
    pointer-events: none;
    user-select: none;
    animation: explode 4s ease-out forwards;
    transform: translate(-50%, -50%);
}

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

    30% {
        opacity: 1;
    }

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

/* ============================================================
   APP HEADER — RPG Fantasy Redesign
   ============================================================ */
.app-header {
    /* quiz_header_bg.png をベース画像として使用 */
    background:
        linear-gradient(180deg, rgba(10,18,35,0.72) 0%, rgba(6,22,48,0.85) 100%),
        url('images/quiz_header_bg.png') center/cover no-repeat !important;
    color: white;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20000;
    box-shadow:
        0 4px 20px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255, 215, 0, 0.25);
    border-bottom: 2px solid rgba(255, 215, 0, 0.8);
    gap: 10px;
    min-height: 60px;
}

.logo {
    display: none;
}

/* CareVenture X Logo - Dragon Quest Style */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-crown {
    font-size: 2rem;
    animation: float-crown 3s ease-in-out infinite;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.8));
}

@keyframes float-crown {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-5px);
    }
}

.logo-text {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    position: relative;
    display: inline-block;
    line-height: 1.2;
    filter: drop-shadow(3px 3px 0 #000) drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.logo-x {
    font-size: 2rem;
    background: linear-gradient(180deg, #4FC3F7 0%, #2196F3 50%, #1976D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: glow-x 2s ease-in-out infinite;
    filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.8)) drop-shadow(3px 3px 0 #000);
}

@keyframes glow-x {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(33, 150, 243, 0.6)) drop-shadow(3px 3px 0 #000);
    }

    50% {
        filter: drop-shadow(0 0 20px rgba(33, 150, 243, 1)) drop-shadow(3px 3px 0 #000);
        transform: scale(1.05);
    }
}


.beta-tag {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    /* Larger and elegant */
    background: transparent;
    color: #FFD700;
    /* Gold */
    padding: 0;
    margin-left: 15px;
    vertical-align: middle;
    box-shadow: none;
    font-weight: 700;
    border: none;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    transform: rotate(-3deg);
    display: inline-block;
}

/* ────────── Header Layout ────────── */
/* 左：言語セレクター（左端配置） */
.header-lang-center {
    display: flex;
    align-items: center;
    justify-content: flex-start;   /* 左寄せ */
    flex: 1;
}

/* 右：ボタン群 */
.header-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;             /* 右端に押し出す */
}

/* ボタンをまとめるグループ */
.header-btn-group {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 30px;
    padding: 5px 10px;
    backdrop-filter: blur(6px);
}

/* ══════════════════════════════════════════════════
   ヘッダーボタン — 立体3Dスタイル（テキストのみ）
   ══════════════════════════════════════════════════ */
.hdr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px 9px;        /* 下に余白 → 3Dの底面を見せる */
    border-radius: 7px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.28); /* 上面ハイライト */
    cursor: pointer;
    font-family: 'DotGothic16', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    white-space: nowrap;
    position: relative;
    text-shadow:
        0 1px 0 rgba(0,0,0,0.55),
        0 -1px 0 rgba(255,255,255,0.1);
    /* ── 3D 立体効果の核心 ─────────────────
       box-shadow の下2レイヤーが「側面と影」を作る */
    box-shadow:
        0 5px 0 rgba(0,0,0,0.45),          /* 真下の厚み（3D側面） */
        0 7px 12px rgba(0,0,0,0.35),        /* 浮き上がり影 */
        inset 0 1px 0 rgba(255,255,255,0.22), /* 表面上部光沢 */
        inset 0 -1px 0 rgba(0,0,0,0.15);    /* 表面下部暗み */
    transition:
        transform 0.08s ease,
        box-shadow 0.08s ease;
}

.hdr-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 7px 0 rgba(0,0,0,0.45),
        0 10px 16px rgba(0,0,0,0.4),
        inset 0 1px 0 rgba(255,255,255,0.3),
        inset 0 -1px 0 rgba(0,0,0,0.15);
    filter: brightness(1.1);
}

/* ボタンを押したとき：沈み込む3Dアニメーション */
.hdr-btn:active {
    transform: translateY(4px) !important;
    box-shadow:
        0 1px 0 rgba(0,0,0,0.5) !important,    /* 沈んで側面が薄くなる */
        0 2px 4px rgba(0,0,0,0.3) !important,
        inset 0 2px 6px rgba(0,0,0,0.25) !important, /* 押し込まれた凹み */
        inset 0 -1px 0 rgba(0,0,0,0.1) !important;
    filter: brightness(0.9) !important;
}

/* ─── BGM ボタン — エレクトリック・バイオレット ─── */
.hdr-btn--music {
    background: linear-gradient(180deg, #a855f7 0%, #7c3aed 50%, #5b21b6 100%);
    box-shadow:
        0 5px 0 #3b0764,
        0 7px 16px rgba(139,50,255,0.6),
        inset 0 1px 0 rgba(230,200,255,0.45),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}
.hdr-btn--music:hover {
    background: linear-gradient(180deg, #c084fc 0%, #9333ea 50%, #6d28d9 100%);
    box-shadow:
        0 7px 0 #3b0764,
        0 10px 22px rgba(168,85,247,0.7),
        inset 0 1px 0 rgba(240,220,255,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.15);
}

/* ─── Mode ボタン — ライム・グリーン ─── */
.hdr-btn--mode {
    background: linear-gradient(180deg, #4ade80 0%, #16a34a 50%, #15803d 100%);
    box-shadow:
        0 5px 0 #052e16,
        0 7px 16px rgba(22,163,74,0.6),
        inset 0 1px 0 rgba(200,255,210,0.45),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}
.hdr-btn--mode:hover {
    background: linear-gradient(180deg, #6ee7a0 0%, #22c55e 50%, #16a34a 100%);
    box-shadow:
        0 7px 0 #052e16,
        0 10px 22px rgba(74,222,128,0.65),
        inset 0 1px 0 rgba(220,255,230,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.15);
}

/* ─── Timer ボタン — スカーレット・レッド ─── */
.hdr-btn--timer {
    background: linear-gradient(180deg, #f87171 0%, #dc2626 50%, #b91c1c 100%);
    box-shadow:
        0 5px 0 #7f1d1d,
        0 7px 16px rgba(220,38,38,0.6),
        inset 0 1px 0 rgba(255,200,200,0.45),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}
.hdr-btn--timer:hover {
    background: linear-gradient(180deg, #fca5a5 0%, #ef4444 50%, #dc2626 100%);
    box-shadow:
        0 7px 0 #7f1d1d,
        0 10px 22px rgba(248,113,113,0.65),
        inset 0 1px 0 rgba(255,220,220,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.15);
}

/* ─── ITEM ボタン — サンシャイン・ゴールド ─── */
.hdr-btn--item {
    background: linear-gradient(180deg, #fbbf24 0%, #d97706 50%, #b45309 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(100,50,0,0.7);
    box-shadow:
        0 5px 0 #78350f,
        0 7px 16px rgba(217,119,6,0.65),
        inset 0 1px 0 rgba(255,245,180,0.5),
        inset 0 -1px 0 rgba(0,0,0,0.2);
}
.hdr-btn--item:hover {
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
    color: #fff;
    box-shadow:
        0 7px 0 #78350f,
        0 10px 22px rgba(251,191,36,0.7),
        inset 0 1px 0 rgba(255,250,200,0.55),
        inset 0 -1px 0 rgba(0,0,0,0.15);
}

/* ON状態（アクティブ時）のグロー */
.hdr-btn.bgm-active,
.hdr-btn.timer-active-btn {
    filter: brightness(1.15) saturate(1.3);
    animation: btn-glow 1.8s ease-in-out infinite;
}

/* スピードモード：明るさを抑えめに */
.hdr-btn.speed-active {
    filter: brightness(0.92) saturate(1.15);
    animation: btn-glow-speed 1.8s ease-in-out infinite;
}

@keyframes btn-glow {
    0%, 100% { filter: brightness(1.1) saturate(1.2); }
    50%       { filter: brightness(1.25) saturate(1.45); }
}

@keyframes btn-glow-speed {
    0%, 100% { filter: brightness(0.88) saturate(1.1); }
    50%       { filter: brightness(1.0) saturate(1.25); }
}

/* Header Buttons - High Contrast Capsule Style */
/* Header Buttons - High Contrast Capsule Style */
/* Header Buttons - Vibrant Capsule Style */
.mode-toggle {
    font-family: 'DotGothic16', sans-serif;
    padding: 8px 18px;
    border-radius: var(--border-radius-soft);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mode-toggle:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

.mode-toggle:active {
    transform: translateY(2px);
    box-shadow: none;
}

/* Individual button specific styles removed - Standardized via .mode-toggle class */

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 65, 108, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 65, 108, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 65, 108, 0);
    }
}

/* Mascot Styles (Individual Images) */
.mascot-container {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    z-index: 10;
    /* Ensure container is above other elements */
}

/* Aura Effect (Behind specific mascots) */
.mascot-container.aura-gold::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 115%;
    height: 115%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 215, 0, 0.4) 0%, transparent 60%);
    z-index: -1;
    /* Behind mascot */
    animation: spin-aura 4s linear infinite;
    filter: blur(8px);
    /* Make it fuzzy/soft */
    pointer-events: none;
}

@keyframes spin-aura {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) rotate(180deg) scale(1.1);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg) scale(1);
    }
}

.mascot-icon {
    width: 130px;
    height: 130px;
    border-radius: 10px;
    /* Square shape */
    border: none;
    transition: all 0.3s ease;
    background-color: transparent;
    background-size: cover;
    /* coverに変更して余白を減らす */
    background-repeat: no-repeat;
    background-position: center bottom;
    /* 中央配置 */
    display: inline-block;
    margin: 0;
    mix-blend-mode: normal;
    /* multiplyを解除 */
    position: relative;
    z-index: 5;
    /* Ensure above border */
    animation: breathe 3s ease-in-out infinite;
    /* Default Idle */
    transform-origin: bottom center;
}

/* --- NEW ANIMATIONS (Phase 3) --- */

/* 1. Idle Breathing (Simplified) */
@keyframes breathe {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* 2. Jelly Bounce (Tighter to avoid border overlap) */
@keyframes jelly-bounce {
    0% {
        transform: scale(1, 1) translateY(0);
    }

    30% {
        transform: scale(1.2, 0.8) translateY(2px);
    }

    50% {
        transform: scale(0.9, 1.1) translateY(-8px);
    }

    /* Max height -8px */
    70% {
        transform: scale(1.05, 0.95) translateY(2px);
    }

    100% {
        transform: scale(1, 1) translateY(0);
    }
}

/* 3. Dizzy Shake (More noticeable) */
@keyframes dizzy-shake {

    0%,
    100% {
        transform: rotate(0deg);
    }

    20% {
        transform: rotate(-15deg);
    }

    40% {
        transform: rotate(15deg);
    }

    60% {
        transform: rotate(-10deg);
    }

    80% {
        transform: rotate(10deg);
    }
}

/* 4. Aura Class (Now handled by container::before) */
.aura-gold-icon {
    /* Legacy/Direct icon styling if needed, otherwise handled by container */
    filter: brightness(1.1);
}



/* Emotion Overlays (Stickers) */
.emotion-sticker {
    position: absolute;
    bottom: -5px;
    right: -5px;
    font-size: 1.5rem;
    z-index: 10;
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

.option-header .mascot-icon {
    width: 130px;
    height: 130px;
    margin-left: 0;
    margin-right: 5px;
    margin-top: -10px;
}




/* Specific Role Adjustments (option-header内はindex.htmlの#quiz-screenルールで上書き済み) */
.mascot-icon[data-role="priest"],
.mascot-icon[data-role="monk"],
.mascot-icon[data-role="warrior"] {
    width: 120px !important;
    height: 120px !important;
    margin-top: -10px !important;
    margin-left: -10px !important;
}

/* Animations */
@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

.anim-bounce {
    animation: jelly-bounce 0.8s ease !important;
    border-color: var(--success-color);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.anim-shake {
    animation: dizzy-shake 0.6s ease !important;
    border-color: var(--error-color);
    filter: grayscale(0.5);
}

.beta-tag {
    font-size: 0.7rem;
    background: var(--accent-color);
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 5px;
}

.lang-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.lang-btn {
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 4px 6px;
    opacity: 0.9;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-weight: bold;
    color: #333;
    min-width: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-btn img {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.lang-btn.active {
    opacity: 1;
    transform: scale(1.1);
    border-color: var(--primary-color);
    background: rgba(52, 152, 219, 0.1);
    color: var(--primary-color);
}

.quiz-container {
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.progress-bar {
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-color);
    width: 0%;
    transition: width 0.3s ease;
}

/* Timer Styles 2.0 */
.timer-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    margin: 15px auto;
    width: fit-content;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    border: 3px solid #555;
    transition: all 0.3s;
    z-index: 10;
}

/* Color States */
.timer-green {
    background-color: #2ecc71;
    color: #fff;
    border-color: #27ae60;
}

.timer-yellow {
    background-color: #f1c40f;
    color: #333;
    border-color: #f39c12;
}

.timer-red {
    background-color: #e74c3c;
    color: #fff;
    border-color: #c0392b;
}

.timer-blink {
    background-color: #e74c3c;
    color: white;
    animation: blink-animation 0.5s infinite alternate;
}

@keyframes blink-animation {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.timer-bar {
    display: none;
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius-soft);
    padding: 24px;
    box-shadow: var(--shadow-feminine);
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease;
    border: 1px solid rgba(255, 133, 162, 0.1);
}

.question-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
}

.subject-tag {
    background: var(--care-lavender);
    padding: 4px 12px;
    border-radius: 15px;
    color: var(--care-purple);
    font-weight: bold;
}

.difficulty-level {
    color: var(--care-pink);
    font-weight: bold;
}

.audio-btn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    min-width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;
}

.audio-btn:active {
    transform: scale(0.9);
    background: #eef;
}

.question-text,
.q-content {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 2.2;
}

.question-text ruby,
.q-content ruby,
.feedback-text ruby {
    white-space: nowrap;
}

/* Choice Logic Styles */
.option-card {
    border-left: 5px solid #ddd;
    transition: all 0.3s ease;
}

.option-card.active {
    border-left-color: var(--primary-color);
    transform: scale(1.02);
}

.option-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #555;
}

.option-text {
    font-size: 1.05rem;
    margin-bottom: 10px;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 2.2;
}

.option-text ruby {
    white-space: nowrap;
}

.decision-buttons {
    display: flex;
    gap: 8px;
}

.btn-choice {
    flex: 1;
    padding: 10px;
    border: 2px solid #eee;
    border-radius: 20px;
    background: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.btn-o {
    color: #4CAF50;
    border-color: #4CAF50;
}

.btn-x {
    color: #F44336;
    border-color: #F44336;
}

.btn-o:active,
.btn-o.selected {
    background: var(--success-color);
    color: white;
}

.btn-x:active,
.btn-x.selected {
    background: var(--error-color);
    color: white;
}

.feedback-area {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ccc;
    font-size: 0.95rem;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 2.2;
}

.feedback-area.correct {
    background: #e8f8f5;
    border-left-color: var(--success-color);
}

.feedback-area.incorrect {
    background: #fdedec;
    border-left-color: var(--error-color);
}

.explanation-label {
    font-weight: bold;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    display: block;
}

.textbook-ref {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #888;
    text-align: right;
    font-style: italic;
}

/* Highlightable Terms */
.term {
    border-bottom: 2px dotted var(--primary-color);
    cursor: pointer;
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
}

.term:hover {
    background-color: rgba(74, 144, 226, 0.15);
    opacity: 0.85;
}

/* Furigana Support */
ruby {
    ruby-position: over;
}

rt {
    font-size: 0.6em;
    color: #555;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.hidden {
    display: none !important;
}

.modal-content {
    background: white;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.action-btn {
    display: block;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--care-purple) 0%, var(--primary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-soft);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
    transition: all 0.3s;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(156, 39, 176, 0.4);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result styles */
.result-card {
    text-align: center;
}

/* New Layout for Result Header */
.result-header-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.score-display-wrapper {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Speed Mode Styles */
.mode-toggle {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    margin-right: 10px;
}

.mode-toggle.speed-active {
    background: #FFD700;
    font-weight: bold;
    border-color: #DAA520;
    color: #333;
}

.next-btn-speed {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    font-size: 1.2rem;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.next-btn-speed:hover {
    background: #2980b9;
}

/* Help Block */
.help-block {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 5px auto 15px;
    max-width: 600px;
    font-size: 0.85rem;
    color: #666;
    text-align: left;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.help-block p {
    margin: 0 0 5px;
    font-weight: bold;
}

.help-block ul {
    margin: 0;
    padding-left: 20px;
}

.help-block li {
    margin-bottom: 3px;
}

/* Animated Mascots (Specific V5 Sprite Logic - Mochi Mochi) */
.anim-mascot {
    width: 180px;
    height: 180px;
    /* ★2026-08-29 削除：images/mascot_celebration_final.png は «存在しない»。
       この要素（#anim-sora / #anim-emma）は結果画面で表示されるため、
       公開すると毎回404になっていた。中身を出している箇所
       （js/ichimoni_mode.js）は inline で background-image を指定しているので、
       ここの既定値は無くても表示は変わらない。 */
    /* Removed mix-blend-mode to ensure visibility if transparent PNG */
    /* TRICK: Makes white transparent */
    background-size: 500% 200%;
    /* 5 Cols, 2 Rows */
    background-repeat: no-repeat;
    /* Initially hidden via .hidden class, not display:none here */
}

/* Sora (Left) */
.anim-sora {
    animation: sora-anim 0.8s steps(1) infinite;
    transform: translateY(-30px);
    /* Manual fix for vertical alignment */
}

/* Emma (Right) */
.anim-emma {
    animation: emma-anim 0.8s steps(1) infinite;
    transform: translateY(30px);
    /* Manual fix for vertical alignment */
}

/* Sora Animation (Top Row: 0% -> 100% x-axis) */
@keyframes sora-anim {
    0% {
        background-position: 0% 0%;
    }

    25% {
        background-position: 25% 0%;
    }

    50% {
        background-position: 50% 0%;
    }

    75% {
        background-position: 75% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

/* Emma Animation (Bottom Row: 0% -> 100% x-axis) */
@keyframes emma-anim {
    0% {
        background-position: 0% 100%;
    }

    25% {
        background-position: 25% 100%;
    }

    50% {
        background-position: 50% 100%;
    }

    75% {
        background-position: 75% 100%;
    }

    100% {
        background-position: 100% 100%;
    }
}

/* Social Share Buttons */
.share-container {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.share-container p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    font-weight: bold;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 15px;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-line {
    background: #06C755;
}

.share-fb {
    background: #1877F2;
}

.share-x {
    background: #000000;
}


/* =========================================
   NEW MASCOT STYLES (Individual Images)
   ========================================= */



/* =========================================
   NEW MASCOT VARIATIONS (Recreated High-Res)
   ========================================= */

/* SORA (Masters) */
.mascot-sora-thinking,
.mascot-sora-glasses {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/sora_master_thinking.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
}

.mascot-sora-happy,
.mascot-sora-correct,
.mascot-sora-cheer,
.mascot-sora-pass,
.mascot-sora-idea {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/sora_master_happy.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--success-color) !important;
}

.mascot-sora-sad,
.mascot-sora-incorrect,
.mascot-sora-fail,
.mascot-sora-shocked {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/sora_master_sad.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--error-color) !important;
}

/* EMMA (Masters) */
.mascot-emma-thinking,
.mascot-emma-glasses {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_master_thinking.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
}

.mascot-emma-happy,
.mascot-emma-correct,
.mascot-emma-cheer,
.mascot-emma-pass,
.mascot-emma-idea {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_master_happy.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--success-color) !important;
}

.mascot-emma-sad,
.mascot-emma-incorrect,
.mascot-emma-fail,
.mascot-emma-shocked {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_master_sad.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--error-color) !important;
}

.mascot-emma-happy,
.mascot-emma-correct,
.mascot-emma-cheer,
.mascot-emma-pass,
.mascot-emma-idea {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_dog_happy.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--success-color) !important;
}

.mascot-emma-sad,
.mascot-emma-incorrect,
.mascot-emma-fail,
.mascot-emma-shocked {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_dog_sad.png') !important;
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    border-color: var(--error-color) !important;
}

/* Ensure consistent shape and sizing */
.mascot-icon {
    border-radius: 10px !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center bottom !important;
    background-color: transparent !important;
}



/* =========================================
   RESULT SCREEN ANIMATION (5/5 Perfect)
   ========================================= */

.anim-mascot {
    width: 180px;
    height: 180px;
    /* Reset background for individual images */
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

/* Sora Cheer */
.anim-sora-cheer {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/sora_cheer.png');
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    animation: cheer-jump 1.2s ease-in-out infinite;
}

/* Emma Cheer */
.anim-emma-cheer {
    /* ★2026-08-29 削除：参照先の画像が存在せず、このクラスも使われていない（死んだ指定）。
       元： background-image: url('images/emma_cheer.png');
       公開したときの404を無くすため、行だけ消す。クラスの他の指定はそのまま。 */
    animation: cheer-jump 1.2s ease-in-out infinite 0.1s;
    /* Slight delay */
}

@keyframes cheer-jump {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    20% {
        transform: translateY(-20px) rotate(-5deg);
    }

    40% {
        transform: translateY(0) rotate(0deg);
    }

    60% {
        transform: translateY(-10px) rotate(5deg);
    }

    80% {
        transform: translateY(0) rotate(0deg);
    }
}

/* Override for static result images */
.mascot-static {
    background-size: contain !important;
    background-position: center bottom !important;
    animation: none !important;
    background-repeat: no-repeat !important;
}

/* =========================================
   UI Borders (User Request)
   ========================================= */

/* Settings / Help Block */
.help-block {
    border: 3px solid #00bcd4;
    /* Cyan/Blue */
    border-radius: 8px;
    padding: 15px;
    /* Ensure padding inside border */
}

/* Question Section */
.question-card,
.question-box {
    border: 3px solid #2196f3;
    /* Blue */
    /* Ensure radius matches */
    border-radius: 8px;
}

/* Option Cards (Override existing border) */
.option-card {
    border: 3px solid #ff9800;
    /* Orange */
}

/* =========================================
   RPG MODE STYLES
   ========================================= */

/* Overlays (Title & Map) */
.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f0f2f5;
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    transition: opacity 0.3s ease;
}

.app-overlay.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

/* Title Screen */
#title-screen {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    color: white;
    text-align: center;
}

.title-logo {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 4rem;
    text-shadow: 4px 4px 0 #000;
    margin-bottom: 0;
    animation: title-float 3s ease-in-out infinite;
}

.title-sub {
    font-family: 'DotGothic16', sans-serif;
    font-size: 1.2rem;
    color: #FFD700;
    margin-top: 10px;
    letter-spacing: 2px;
}

.mode-select {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 50px;
}

.title-btn {
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s;
}

.title-btn:hover {
    transform: scale(1.05);
}

#btn-mode-normal {
    background: #fff;
    color: #333;
    border: 3px solid #ccc;
}

#btn-mode-rpg {
    background: #ff9800;
    color: white;
    border: 3px solid #fff;
    font-size: 1.4rem;
    /* Prominent */
}

/* World Map — RPG 冒険ワールドマップ背景 */
#world-map-screen {
    background-color: #0e1430 !important;
    background-image:
        linear-gradient(180deg, rgba(15, 18, 45, 0.18) 0%, rgba(12, 14, 35, 0.32) 55%, rgba(8, 10, 25, 0.52) 100%),
        url('images/world_map_bg.png?v=73775eeb') !important;
    background-size: cover !important;
    background-position: center center !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    justify-content: flex-start;
    padding-top: 90px;
    overflow-y: auto;
}

.map-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364) !important;
    /* Deep Blue Metal */
    border-bottom: 2px solid #ffd700;
    z-index: 20001;
    /* Ensure it's over app-header if both exist */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.rpg-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

#rpg-level {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 1.5rem;
    color: #FFD700;
}

.exp-bar {
    width: 150px;
    height: 10px;
    background: #444;
    border-radius: 5px;
    overflow: hidden;
}

#rpg-exp-fill {
    height: 100%;
    background: #00E676;
    transition: width 0.5s ease;
}

.map-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* 繧ｹ繝槭・縺ｧ隕九ｄ縺吶＞繧医≧縺ｫ1蛻・*/
    gap: 25px;
    padding: 20px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    overflow-y: visible;
    /* 隕ｪ縺ｧ繧ｹ繧ｯ繝ｭ繝ｼ繝ｫ縺輔○繧九◆繧・*/
}

@media (min-width: 500px) {
    .map-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.map-area {
    /* 透過＋金縁の冒険カード（バッジ見切れ防止のため overflow:hidden 解除） */
    background:
        linear-gradient(145deg, rgba(50, 32, 90, 0.62), rgba(22, 14, 48, 0.78));
    backdrop-filter: blur(10px) saturate(1.15);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    border-radius: 22px;
    padding: 28px 16px 22px;
    text-align: center;
    cursor: pointer;
    border: 2px solid rgba(212, 175, 55, 0.55);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.55),
        0 0 10px rgba(212, 175, 55, 0.12),
        inset 0 1px 0 rgba(255, 232, 122, 0.08);
    animation: floatingIsland 4s ease-in-out infinite;
    color: #fff8d0;
}

/* 上部の金色ライン装飾（角丸に追従） */
.map-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(255, 232, 122, 0.85), transparent);
    opacity: 0.7;
    transition: opacity 0.35s;
    pointer-events: none;
    border-radius: 22px 22px 0 0;
}

/* 内側の柔らかい光彩（手前に浮き上がるような立体感） */
.map-area::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 22px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 232, 122, 0.18), transparent 65%);
    pointer-events: none;
    opacity: 0.85;
}

@keyframes floatingIsland {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* 蜍牙ｼｷ鬆・・逡ｪ蜿ｷ */
.area-num {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 40px;
    height: 40px;
    background:
        radial-gradient(circle at 30% 30%, #fff8c8 0%, #ffd700 45%, #ff8c00 100%);
    color: #4a2e0c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-family: 'Cinzel', serif;
    font-size: 1.15rem;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.55),
        0 0 14px rgba(255, 215, 0, 0.7),
        inset 0 2px 4px rgba(255, 255, 255, 0.55),
        inset 0 -2px 4px rgba(160, 90, 0, 0.4);
    border: 2.5px solid #fff;
    z-index: 5;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: 0;
}

.map-area:hover:not(.locked) {
    transform: translateY(-8px);
    border-color: #ffe87a;
    box-shadow:
        0 12px 30px rgba(212, 175, 55, 0.3),
        0 0 18px rgba(212, 175, 55, 0.2),
        0 6px 18px rgba(0, 0, 0, 0.55);
}

.map-area:hover:not(.locked)::before {
    opacity: 1;
}

/* ロック中：暗いグレーに金縁を弱めて表現 */
.map-area.locked {
    background:
        linear-gradient(145deg, rgba(30, 25, 35, 0.55), rgba(15, 12, 20, 0.65));
    filter: grayscale(70%);
    cursor: not-allowed;
    opacity: 0.55;
    border-color: rgba(120, 120, 140, 0.35);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.map-area.locked::before {
    opacity: 0.15;
}

/* 合格済み（passed）：強い金光で達成感を演出 */
.map-area.passed {
    border-color: #ffe87a;
    border-width: 2px;
    background:
        linear-gradient(145deg, rgba(80, 55, 25, 0.65), rgba(50, 35, 18, 0.75));
    box-shadow:
        0 0 25px rgba(212, 175, 55, 0.4),
        0 0 12px rgba(212, 175, 55, 0.3),
        0 8px 22px rgba(0, 0, 0, 0.55);
}

.map-area.passed::before {
    opacity: 1;
    height: 3px;
    background: linear-gradient(90deg, transparent, #ffe87a, #d4af37, #ffe87a, transparent);
}

.area-icon {
    font-size: 3.6rem;
    margin-bottom: 12px;
    filter:
        drop-shadow(0 4px 8px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 14px rgba(255, 215, 0, 0.45));
    animation: floatingIcon 3.6s ease-in-out infinite;
    display: inline-block;
}

/* エリアアイコンを絵文字から浮遊島の画像へ（2026-07-26） */
.area-icon img {
    width: 4.6rem;
    height: 4.6rem;
    object-fit: contain;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

@keyframes floatingIcon {
    0%, 100% { transform: translateY(0) rotate(-1.5deg); }
    50% { transform: translateY(-7px) rotate(1.5deg); }
}

.map-area:hover:not(.locked) .area-icon {
    filter:
        drop-shadow(0 6px 12px rgba(0, 0, 0, 0.7))
        drop-shadow(0 0 20px rgba(255, 215, 0, 0.7));
}

.area-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #fff8d0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.85), 0 0 6px rgba(212, 175, 55, 0.25);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.area-name ruby rt {
    color: #ffe87a !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
    font-size: 0.55em !important;
    font-weight: 700 !important;
}

.area-lock {
    color: #ffb380;
    font-weight: 700;
    margin-top: 5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.area-grade {
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    color: #FFD700;
    text-shadow: 1px 1px 0 #000;
}

@keyframes title-float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* RPG Result Screen */
.rpg-result-box {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 12px;
    margin: 15px 0;
    color: white;
    border: 2px solid #fff;
}

.exp-summary {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: #00E676;
}

.level-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

#rpg-result-level {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 1.5rem;
    color: #FFD700;
}

.exp-bar-large {
    flex-grow: 1;
    height: 20px;
    background: #444;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid white;
}

#rpg-result-bar {
    height: 100%;
    background: #00E676;
    transition: width 1.5s ease-out;
    /* Slow fill */
    width: 0%;
}

#level-up-text {
    font-family: 'Dela Gothic One', sans-serif;
    font-size: 2.5rem;
    color: #FFD700;
    text-shadow: 0 0 10px #ff9800;
    margin-top: 10px;
    animation: level-up-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes level-up-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    80% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* =========================================
   MAP HEADER & CLOSE BUTTON (Fix)
   ========================================= */
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    background: var(--care-lavender);
    border-radius: var(--border-radius-soft);
    box-shadow: 0 4px 15px rgba(156, 39, 176, 0.1);
    margin-bottom: 25px;
    z-index: 10001;
    position: relative;
    border: 2px solid white;
}

#map-close-btn {
    background: #ff5252;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
    font-size: 0.9rem;
}

#map-close-btn:hover {
    transform: scale(1.05);
    background: #d32f2f;
}

/* ========================================= */
/*   GRANBLUE FANTASY STYLE TITLE SCREEN     */
/* ========================================= */

#title-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/game_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
    font-family: 'Dela Gothic One', cursive;
}

/* Overlay for Readability (Removed to brighten the screen) */

.title-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

/* Main Logo Styling */
#title-screen h1.title-logo {
    font-family: 'Dela Gothic One', cursive;
    font-size: 3.5rem;
    line-height: 1.2;
    margin: 0;
    text-transform: uppercase;
    background: linear-gradient(180deg, #FFD700 10%, #FDB931 50%, #C6930A 51%, #D59C1E 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 4px 0px #5e3b1f) drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
    animation: floatTitle 3s ease-in-out infinite;
    letter-spacing: 2px;
}

.title-sub {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 1.2rem;
    color: #e0f7fa;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    margin-top: -5px;
    margin-bottom: 30px;
    font-weight: bold;
    letter-spacing: 2px;
}

@keyframes floatTitle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Crystal Button Style */
.title-btn {
    appearance: none;
    border: none;
    outline: none;
    display: block;
    width: 80%;
    max-width: 320px;
    margin: 15px auto;
    padding: 18px 0;

    font-family: 'Dela Gothic One', sans-serif;
    font-size: 1.4rem;
    color: white;
    text-align: center;
    cursor: pointer;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s, box-shadow 0.1s;
}

/* Shine Effect */
.title-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(45deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-150%) rotate(45deg);
    }

    20% {
        transform: translateX(150%) rotate(45deg);
    }

    100% {
        transform: translateX(150%) rotate(45deg);
    }
}

/* Normal Mode Button (Blue Crystal) */
#btn-mode-normal {
    background: linear-gradient(180deg, #4facfe 0%, #00f2fe 100%);
    box-shadow:
        0 4px 0 #005a8d,
        0 8px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

/* RPG Mode Button (Cool Dark Crystal) */
#btn-mode-rpg {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364) !important;
    box-shadow:
        0 4px 0 #000000,
        0 8px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 5px rgba(255, 255, 255, 0.2);
    border: 2px solid #ffd700 !important;
}

.title-btn:active {
    transform: translateY(4px);
    box-shadow:
        0 0 0 transparent,
        inset 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Copyright & Login */
.copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.login-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.login-link:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================================
   QUIZ PROGRESS BAR — 問題番号を問題カード直上に表示
   ============================================================ */
.quiz-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, rgba(10,30,60,0.85), rgba(20,50,90,0.7));
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 20px;
    padding: 6px 14px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.quiz-progress-bar-wrap .question-counter {
    font-family: 'DotGothic16', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 900 !important;
    color: #ffd700 !important;
    text-shadow: 0 0 8px rgba(255,215,0,0.6) !important;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.05em;
}

.quiz-progress-inline {
    flex: 1;
    height: 8px !important;
    background: rgba(255,255,255,0.15) !important;
    border-radius: 4px !important;
    overflow: hidden;
}

.quiz-progress-inline .progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}
/* ==============================
   HEADER CENTER: Lv & EXP Bar
   ============================== */
/* ================================
   HEADER: LV & EXP バー リデザイン
   ================================ */
.header-lvl-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    pointer-events: none;
}

/* 外枠ボックス */
.hdr-lvl-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(8,4,28,0.95) 0%, rgba(18,8,48,0.9) 100%);
    border-radius: 28px;
    padding: 5px 16px 5px 5px;
    box-shadow:
        0 0 0 1px rgba(180,120,255,0.55),
        0 0 0 2px rgba(255,215,0,0.2),
        0 0 18px rgba(110,50,230,0.4),
        0 4px 12px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,255,255,0.07);
    backdrop-filter: blur(10px);
    position: relative;
}

/* LVバッジ（左側）― 横1列 */
.hdr-lv-badge {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    background: linear-gradient(160deg, #3b0068 0%, #7c3aed 45%, #a855f7 70%, #6d28d9 100%);
    border-radius: 22px;
    padding: 6px 14px;
    box-shadow:
        0 0 14px rgba(139,92,246,0.8),
        0 0 28px rgba(139,92,246,0.35),
        inset 0 1px 0 rgba(255,255,255,0.25),
        inset 0 -1px 0 rgba(0,0,0,0.4);
    border: 1px solid rgba(196,167,255,0.45);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}
/* バッジ内シマー */
.hdr-lv-badge::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    animation: lv-shimmer 3.5s ease-in-out infinite;
}
@keyframes lv-shimmer {
    0%, 100% { left: -60%; opacity: 0.8; }
    50%       { left: 120%; opacity: 0.4; }
}

/* "LV" ラベル（横並び・数字とベースライン揃え） */
.hdr-lv-prefix {
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(216,180,254,0.9);
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

/* 数字 */
.hdr-lv-num {
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    letter-spacing: -0.02em;
    text-shadow:
        0 0 8px rgba(216,180,254,1),
        0 0 18px rgba(167,139,250,0.9),
        0 0 32px rgba(139,92,246,0.6);
}

/* 区切り線 */
.hdr-lv-divider {
    width: 1px;
    height: 26px;
    background: linear-gradient(to bottom,
        transparent 0%, rgba(180,120,255,0.6) 30%,
        rgba(255,215,0,0.5) 70%, transparent 100%);
    flex-shrink: 0;
}

/* EXPエリア */
.hdr-exp-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 118px;
}

/* EXPラベル行 */
.hdr-exp-label-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}

.hdr-exp-icon {
    font-size: 0.55rem;
    color: #fbbf24;
    text-shadow: 0 0 6px rgba(251,191,36,0.9);
    line-height: 1;
    animation: exp-star-pulse 2s ease-in-out infinite;
}
@keyframes exp-star-pulse {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.25); }
}

.hdr-exp-text {
    font-family: 'Cinzel', serif;
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(253,230,138,0.95);
    letter-spacing: 0.04em;
    line-height: 1;
    text-shadow: 0 0 8px rgba(251,191,36,0.5);
}

/* EXPバー外枠 */
.hdr-exp-bar {
    height: 9px;
    background: rgba(0,0,0,0.55);
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid rgba(180,120,255,0.3);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.6), 0 0 6px rgba(100,50,200,0.2);
}

/* EXPバー塗り */
.hdr-exp-fill {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg,
        #6d28d9 0%, #8b5cf6 30%, #c084fc 60%, #fbbf24 85%, #fde68a 100%);
    box-shadow:
        0 0 8px rgba(139,92,246,0.8),
        0 0 4px rgba(251,191,36,0.5);
    transition: width 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

/* バー内シマー */
.hdr-exp-shine {
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: exp-shine 2.8s ease-in-out infinite;
}
@keyframes exp-shine {
    0%   { left: -80%; }
    100% { left: 160%; }
}

/* ==============================
   QUIZ SCREEN: Status Bar (3-col)
   ============================== */
.quiz-status-bar {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(5,12,28,0.7);
    border-bottom: 1px solid rgba(255,215,0,0.2);
    backdrop-filter: blur(4px);
}

.quiz-status-bar #current-mode-label {
    flex: 1;
    text-align: center;
    font-family: 'DotGothic16', sans-serif;
    font-size: 0.85rem;
    color: #ffd700;
    text-shadow: 0 0 6px rgba(255,215,0,0.5);
    white-space: nowrap;
}

/* Quiz Nav Buttons (Back / Part Change) */
.quiz-nav-btn {
    padding: 5px 12px 8px;
    border-radius: 7px;
    border: none;
    font-family: 'DotGothic16', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
    border-top: 1px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 0 rgba(0,0,0,0.45), 0 6px 10px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.quiz-nav-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.5), inset 0 2px 5px rgba(0,0,0,0.2) !important;
}

/* ◀ マップ — steel blue */
.quiz-nav-btn--back {
    background: linear-gradient(180deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 4px 0 #1e3a8a, 0 6px 10px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.22);
}

.quiz-nav-btn--back:hover {
    filter: brightness(1.12);
}

/* 📋 パート変更 — teal-green */
.quiz-nav-btn--part {
    background: linear-gradient(180deg, #34d399 0%, #059669 55%, #047857 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 4px 0 #064e3b, 0 6px 10px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.22);
}

.quiz-nav-btn--part:hover {
    filter: brightness(1.12);
}

/* ==============================
   QUIZ GUIDE BUTTON
   ============================== */
.quiz-nav-btn--guide {
    background: linear-gradient(180deg, #818cf8 0%, #4f46e5 55%, #3730a3 100%);
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
    box-shadow: 0 4px 0 #1e1b6e, 0 6px 10px rgba(0,0,0,0.3),
                inset 0 1px 0 rgba(255,255,255,0.22);
}

.quiz-nav-btn--guide:hover {
    filter: brightness(1.12);
}

/* ==============================
   QUIZ GUIDE MODAL
   ============================== */
#quiz-guide-modal {
    position: fixed;
    inset: 0;
    /* background は HTML の inline style で賢者の書斎画像を指定 */
    backdrop-filter: blur(4px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 24px 12px 32px;
    /* display は JS の inline style で制御 — ここには書かない */
    z-index: 9999;
}

.quiz-guide-body {
    position: relative;
    background: linear-gradient(160deg, #0d1a3a 0%, #081228 100%);
    border: 2px solid rgba(255,215,0,0.4);
    border-radius: 18px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;          /* 水平中央寄せ */
    padding: 28px 24px 24px;
    box-shadow: 0 0 0 1px rgba(255,215,0,0.15), 0 20px 50px rgba(0,0,0,0.8);
    color: #e8e0d0;
    font-family: 'Noto Sans JP', sans-serif;
}

.quiz-guide-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: #ccc;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}
.quiz-guide-close:hover { background: rgba(255,80,80,0.4); color: #fff; }

.quiz-guide-title {
    font-family: 'DotGothic16', sans-serif;
    font-size: 1.15rem;
    color: #ffd700;
    text-shadow: 0 0 10px rgba(255,215,0,0.5);
    margin: 0 0 18px;
    text-align: center;
    letter-spacing: 0.05em;
}

.quiz-guide-section {
    margin-bottom: 20px;
    border-left: 3px solid rgba(255,215,0,0.35);
    padding-left: 12px;
}

.quiz-guide-sec-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffd700;
    margin: 0 0 10px;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

.quiz-guide-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #d0c8b8;
}

.quiz-guide-row p {
    margin: 0;
    flex: 1;
}

.quiz-guide-row p b {
    color: #ffd700;
}

/* Tag chips */
.quiz-guide-tag {
    flex-shrink: 0;
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    margin-top: 2px;
}

.tag-purple  { background: #7c3aed; color: #fff; }
.tag-green   { background: #16a34a; color: #fff; }
.tag-red     { background: #dc2626; color: #fff; }
.tag-gold    { background: #d97706; color: #fff; }
.tag-lvl     { background: linear-gradient(90deg,#d97706,#fbbf24); color: #000; }
.tag-blue    { background: #2563eb; color: #fff; }
.tag-teal    { background: #059669; color: #fff; }
.tag-num     { background: rgba(255,215,0,0.2); color: #ffd700; border: 1px solid rgba(255,215,0,0.5); }
.tag-sub     { background: rgba(139,69,19,0.4); color: #f4a460; border: 1px solid rgba(244,164,96,0.4); }
.tag-mark    { background: rgba(255,165,0,0.2); color: #ffa500; border: 1px solid rgba(255,165,0,0.4); }
.tag-sound   { background: rgba(100,200,255,0.15); color: #7dd3fc; border: 1px solid rgba(125,211,252,0.4); }
.tag-blue-word { background: rgba(59,130,246,0.2); color: #60a5fa; border: 1px solid rgba(96,165,250,0.4); }
.tag-hint    { background: #166534; color: #bbf7d0; }
.tag-o       { background: #1d4ed8; color: #bfdbfe; }
.tag-x       { background: #991b1b; color: #fecaca; }
.tag-next    { background: rgba(255,255,255,0.1); color: #d0c8b8; border: 1px solid rgba(255,255,255,0.2); }

/* Close button at bottom */
.quiz-guide-close-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 11px 20px;
    background: linear-gradient(180deg, #818cf8 0%, #4f46e5 55%, #3730a3 100%);
    border: none;
    border-radius: 30px;
    color: #fff;
    font-family: 'DotGothic16', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    box-shadow: 0 4px 0 #1e1b6e, 0 6px 14px rgba(0,0,0,0.4);
    transition: transform 0.1s, box-shadow 0.1s;
}
.quiz-guide-close-btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #1e1b6e;
}


/* ══════════════════════════════════════════════════════════════════
   特訓パート選択モーダル（2026-07-29）
   白い箱＋素のボタンだったものを、アプリ全体の「夜＋金」の雰囲気に
   合わせて整えました。HTMLには手を入れず、見た目だけを上書きしています。
   ふりがな(rt)も、ボタンの色の上で読めるように明るくしています。
   ══════════════════════════════════════════════════════════════════ */
#part-selection-modal .guide-modal-content {
    background: linear-gradient(180deg, rgba(32,22,62,0.985), rgba(14,9,30,0.99)) !important;
    border: 2px solid rgba(212,175,55,0.85) !important;
    border-radius: 22px !important;
    padding: 24px 18px 20px !important;
    box-shadow: 0 18px 48px rgba(0,0,0,0.62), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}
#part-selection-modal h2 {
    color: #ffe6a0 !important;
    border-bottom: 1px solid rgba(212,175,55,0.45) !important;
    padding-bottom: 12px !important;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 6px rgba(0,0,0,0.75);
}
#part-selection-modal p {
    color: #cfc6e8 !important;
    margin: 16px 0 6px !important;
}
#part-selection-modal .close-modal {
    color: #ffe6a0 !important;
    opacity: 0.85;
}
#part-selection-modal .action-btn {
    border-radius: 14px !important;
    padding: 15px 14px !important;
    font-weight: 800 !important;
    border: 1.5px solid rgba(255,255,255,0.22) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.22) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.55) !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease !important;
}
#part-selection-modal .action-btn:active {
    transform: translateY(1px) scale(0.995) !important;
    box-shadow: 0 3px 9px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.18) !important;
}
/* ふりがな：ボタンの上でも本文の上でも読めるように */
#part-selection-modal .action-btn ruby rt {
    color: rgba(255,255,255,0.9) !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7) !important;
    font-size: 0.5em !important;
    font-weight: 700 !important;
}
#part-selection-modal h2 ruby rt,
#part-selection-modal p ruby rt {
    color: rgba(255,230,160,0.85) !important;
    font-size: 0.5em !important;
    font-weight: 700 !important;
}
