@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-primary: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-secondary: 0 4px 16px rgba(31, 38, 135, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-dark: #2c3e50;
    --accent-color: #4facfe;
    --success-color: #00f2fe;
    --warning-color: #ff6b6b;
    --danger-color: #ff4757;
    
    /* マテリアルデザインカラー */
    --surface-color: rgba(255, 255, 255, 0.05);
    --surface-variant: rgba(255, 255, 255, 0.08);
    --outline-color: rgba(255, 255, 255, 0.12);
    
    /* エレベーション */
    --elevation-1: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --elevation-2: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
    --elevation-3: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23);
    --elevation-4: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
    z-index: -1;
    will-change: transform;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 32px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--elevation-2);
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ステップナビゲーション */
.step-navigation {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.step-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 16px;
    background: var(--surface-color);
    backdrop-filter: blur(20px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    border: 1px solid var(--outline-color);
    position: relative;
    overflow: hidden;
    will-change: transform, background-color;
}

.step-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.step-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.step-btn:hover::before {
    left: 100%;
}

.step-btn:hover:not(.disabled) {
    background: var(--surface-variant);
    transform: translateY(-2px) scale(1.02);
    box-shadow: var(--elevation-2);
    border-color: var(--glass-border);
}

.step-btn.active {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--success-color) 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--elevation-3);
    border-color: transparent;
}

.step-btn.completed {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    color: white;
    border-color: transparent;
}

.step-btn.disabled {
    background: rgba(108, 117, 125, 0.3) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    cursor: not-allowed !important;
    transform: none !important;
    opacity: 0.5 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.step-btn.disabled:hover {
    background: rgba(108, 117, 125, 0.3) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ランタンコンテナ */
.lantern-container {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    padding: 20px;
    perspective: 1000px;
}

.lantern {
    position: relative;
    width: 260px;
    height: 380px;
    transform-style: preserve-3d;
    animation: gentle-sway 6s ease-in-out infinite;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4));
    will-change: transform;
}

@keyframes gentle-sway {
    0%, 100% { transform: rotateY(0deg) rotateX(0deg); }
    25% { transform: rotateY(1deg) rotateX(0.5deg); }
    50% { transform: rotateY(0deg) rotateX(-0.5deg); }
    75% { transform: rotateY(-1deg) rotateX(0.5deg); }
}

.lantern-top {
    width: 80px;
    height: 28px;
    background: linear-gradient(145deg, #8B4513, #654321, #4A2C17);
    border-radius: 14px 14px 8px 8px;
    margin: 0 auto;
    border: 3px solid rgba(101, 67, 33, 0.9);
    box-shadow: 
        var(--elevation-2),
        inset 0 2px 4px rgba(139, 69, 19, 0.8),
        inset 0 -2px 4px rgba(74, 44, 23, 0.6);
    position: relative;
}

.lantern-top::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 16px;
    background: linear-gradient(145deg, #CD853F, #8B4513);
    border-radius: 6px 6px 0 0;
    box-shadow: var(--elevation-1);
}

.lantern-body {
    width: 200px;
    height: 280px;
    background: linear-gradient(145deg, #FFD700 0%, #FF8C00 40%, #FFA500 70%, #FF6347 100%);
    border-radius: 30px;
    margin: 10px auto;
    border: 4px solid rgba(139, 69, 19, 0.7);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 
        inset 0 4px 15px rgba(255, 255, 255, 0.4),
        inset 0 -4px 15px rgba(255, 140, 0, 0.6),
        0 15px 40px rgba(255, 215, 0, 0.5),
        var(--elevation-4);
}

.lantern-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 140, 0, 0.4) 0%, transparent 50%);
    border-radius: inherit;
    pointer-events: none;
}

.lantern-body::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    pointer-events: none;
}

.lantern-light {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background: radial-gradient(
        circle at 30% 30%, 
        rgba(255, 255, 200, 1) 0%,
        rgba(255, 255, 153, 0.9) 30%, 
        rgba(255, 215, 0, 0.7) 60%,
        transparent 100%
    );
    border-radius: 50%;
    opacity: 0.9;
    animation: divine-flicker 4s ease-in-out infinite alternate;
    filter: blur(1.5px);
}

.lantern-light::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 200, 0.6) 40%,
        transparent 70%
    );
    border-radius: 50%;
    filter: blur(2px);
}

@keyframes divine-flicker {
    0% { 
        opacity: 0.7; 
        transform: translateX(-50%) scale(0.95);
        filter: blur(1.5px) brightness(0.9);
    }
    25% {
        opacity: 0.95;
        transform: translateX(-50%) scale(1.02);
        filter: blur(1px) brightness(1.1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.05);
        filter: blur(0.8px) brightness(1.2);
    }
    75% {
        opacity: 0.9;
        transform: translateX(-50%) scale(1.03);
        filter: blur(1.2px) brightness(1.15);
    }
    100% { 
        opacity: 0.85; 
        transform: translateX(-50%) scale(0.98);
        filter: blur(1.8px) brightness(1.05);
    }
}

.lantern-text {
    padding: 18px 15px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: rgba(139, 69, 19, 1);
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    white-space: pre-line;
    margin-top: 80px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-height: 150px;
    overflow-y: auto;
    line-height: 1.4;
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 
        0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 4px rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    /* Firefox互換性のための追加スタイル */
    -moz-user-select: text;
    -webkit-user-select: text;
    user-select: text;
    font-display: block;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

.lantern-text::-webkit-scrollbar {
    width: 4px;
}

.lantern-text::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.lantern-text::-webkit-scrollbar-thumb {
    background: rgba(139, 69, 19, 0.5);
    border-radius: 2px;
}

.lantern-text::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 69, 19, 0.7);
}

.lantern-bottom {
    width: 100px;
    height: 40px;
    background: linear-gradient(145deg, #8B4513, #654321, #4A2C17);
    border-radius: 0 0 20px 20px;
    margin: 10px auto;
    border: 3px solid rgba(101, 67, 33, 0.9);
    box-shadow: 
        var(--elevation-2),
        inset 0 2px 4px rgba(139, 69, 19, 0.8),
        inset 0 -2px 4px rgba(74, 44, 23, 0.6);
    position: relative;
}

.lantern-bottom::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 20px;
    background: linear-gradient(145deg, #CD853F, #8B4513);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--elevation-1);
}

/* 質問エリア */
.question-area {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 24px;
    box-shadow: var(--elevation-2);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.question-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.step-content {
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-content.hidden {
    display: none;
}

.step-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: -0.01em;
}

.instruction {
    background: var(--surface-variant);
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 32px;
    border-left: 4px solid var(--accent-color);
    border: 1px solid var(--outline-color);
    box-shadow: var(--elevation-1);
}

.instruction p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

.question h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

/* テキストエリアコンテナ */
.textarea-container {
    position: relative;
    margin-bottom: 20px;
}

.question textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px 20px;
    background: var(--surface-color);
    backdrop-filter: blur(10px);
    border: 2px solid var(--outline-color);
    border-radius: 16px;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-primary);
    resize: vertical;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
}

.question textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.question textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    border-color: var(--accent-color);
    background: var(--surface-variant);
    box-shadow: 
        0 0 0 3px rgba(79, 172, 254, 0.2),
        var(--elevation-1);
    transform: translateY(-1px);
}

.question textarea.over-limit {
    border-color: var(--danger-color);
    background: rgba(255, 71, 87, 0.1);
}

.question textarea.near-limit {
    border-color: var(--warning-color);
}

/* 文字数カウンター */
.char-counter {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.char-counter.near-limit {
    color: var(--warning-color);
    background: rgba(255, 107, 107, 0.2);
}

.char-counter.over-limit {
    color: var(--danger-color);
    background: rgba(255, 71, 87, 0.3);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 動的回答 */
.dynamic-answers {
    margin-bottom: 16px;
}

.add-answer-btn, .remove-answer-btn {
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: var(--elevation-1);
}

.add-answer-btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.remove-answer-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
}

.add-answer-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--elevation-2);
}

.remove-answer-btn:hover {
    transform: scale(1.15) rotate(90deg);
    background: linear-gradient(135deg, #ff4757, #ff3742);
}

.hint {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--surface-variant);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
    border: 1px solid var(--outline-color);
    line-height: 1.6;
}

/* ナビゲーション */
.navigation {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    position: relative;
}

.nav-btn {
    padding: 16px 32px;
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--elevation-1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    flex: 1;
    min-width: 120px;
}

/* 次へボタン（右側・青系） */
#next-btn, #export-btn {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    z-index: 2;
}

#next-btn:hover, #export-btn:hover {
    background: linear-gradient(135deg, #369eed 0%, #00d9ed 100%);
    transform: translateY(-2px) scale(1.02);
}

/* 前へボタン（左側・グレー系） */
#prev-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 1;
}

#prev-btn:hover {
    background: linear-gradient(135deg, #556dd9 0%, #653a91 100%);
    transform: translateY(-2px) scale(1.02);
}

/* リセットボタン（赤系） */
#reset-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ff8e8e 100%);
    z-index: 2;
}

#reset-btn:hover {
    background: linear-gradient(135deg, #ff5a5a 0%, #ff7d7d 100%);
    transform: translateY(-2px) scale(1.02);
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav-btn:hover:not(:disabled)::before {
    left: 100%;
}

.nav-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--elevation-3);
}

.nav-btn:disabled {
    background: rgba(108, 117, 125, 0.3);
    cursor: not-allowed;
    transform: none;
    opacity: 0.6;
}

.export-btn {
    background: linear-gradient(135deg, #00f2fe, #4facfe) !important;
}

.export-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #00d4ff, #4399e5) !important;
}

.reset-btn {
    background: linear-gradient(135deg, #ff4757, #ff6b6b) !important;
    margin-left: 12px;
}

.reset-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ff3742, #ff5252) !important;
}

/* 完成サマリー */
.completion-summary {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(139, 195, 74, 0.1));
    backdrop-filter: blur(10px);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: var(--elevation-1);
}

.completion-summary ul {
    margin-left: 24px;
    margin-top: 16px;
}

.completion-summary li {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.final-summary {
    background: var(--surface-variant);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: 20px;
    border: 1px solid var(--outline-color);
    box-shadow: var(--elevation-2);
}

.final-summary h4 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.5rem;
    font-weight: 700;
}

.final-summary p {
    margin-bottom: 12px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.final-summary strong {
    color: var(--text-primary);
}

/* スクリーンショットモード */
.screenshot-mode {
    overflow: visible !important;
}

.screenshot-mode .navigation {
    display: none !important;
}

.screenshot-mode .step-navigation {
    margin-bottom: 24px !important;
}

.screenshot-mode .container {
    padding: 48px 24px !important;
    max-width: 1000px !important;
}

.screenshot-mode .question-area {
    margin-bottom: 0 !important;
}

.screenshot-mode header h1 {
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: #ffffff !important;
    background-clip: initial !important;
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5) !important;
}

.screenshot-mode .lantern {
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.4)) !important;
    animation: none !important;
}

.screenshot-mode .lantern-top {
    border: none !important;
    box-shadow: none !important;
}

.screenshot-mode .lantern-body {
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: 
        inset 0 4px 15px rgba(255, 255, 255, 0.4),
        inset 0 -4px 15px rgba(255, 140, 0, 0.6),
        0 15px 40px rgba(255, 215, 0, 0.5) !important;
}

.screenshot-mode .lantern-body::after {
    border: none !important;
}

.screenshot-mode .lantern-bottom {
    border: none !important;
    box-shadow: none !important;
}

.screenshot-mode .lantern-light {
    animation: none !important;
    opacity: 0.9 !important;
    filter: blur(1.5px) !important;
}

.screenshot-mode .lantern-text {
    backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border: none !important;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.4) !important;
}

/* エラーメッセージ */
.error-message {
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
    color: white;
    padding: 16px 20px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(244, 67, 54, 0.3);
    animation: slideInFromTop 0.3s ease-out;
}

/* ローディング状態 */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* アクセシビリティ改善 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ハイコントラストモード対応 */
@media (prefers-contrast: high) {
    :root {
        --text-color: #000000;
        --surface-color: #ffffff;
        --outline-color: #000000;
    }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    header {
        padding: 24px 20px;
        margin-bottom: 32px;
    }
    
    header h1 {
        font-size: 2.5rem;
    }
    
    .lantern {
        transform: scale(0.75);
    }
    
    .question-area {
        padding: 24px;
        border-radius: 20px;
    }
    
    .step-content h2 {
        font-size: 1.75rem;
    }
    
    .step-navigation {
        gap: 12px;
    }
    
    .step-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .nav-btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .navigation {
        flex-direction: row;
        gap: 12px;
        position: relative;
    }
    
    .navigation .nav-btn {
        flex: 1;
        min-width: 0;
        padding: 16px 12px;
        font-size: 0.9rem;
    }
    
    /* モバイルでのボタン配置最適化 */
    #next-btn, #export-btn {
        order: 2;
    }
    
    #prev-btn {
        order: 1;
    }
    
    #reset-btn {
        order: 3;
        flex: 0.7;
        font-size: 0.85rem;
    }
}

/* ランディングページスタイル */
.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    position: relative;
}

.landing-container {
    max-width: 800px;
    width: 100%;
}

.landing-hero {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--elevation-3);
    padding: 60px 40px;
    margin-bottom: 60px;
}

.landing-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.landing-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
    line-height: 1.4;
}

.landing-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.start-btn {
    background: var(--secondary-gradient);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--elevation-2);
    letter-spacing: 0.02em;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-3);
    filter: brightness(1.1);
}

.start-btn:active {
    transform: translateY(0);
    box-shadow: var(--elevation-1);
}

.scroll-indicator {
    margin-top: 40px;
    animation: fadeInUp 0.8s ease-out 1s both;
}

.scroll-indicator p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    opacity: 0.7;
}

.scroll-arrow {
    font-size: 1.5rem;
    color: var(--accent-color);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 詳細説明セクション */
.about-section {
    min-height: 100vh;
    padding: 80px 24px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.about-container {
    max-width: 1000px;
    margin: 0 auto;
}

.about-section h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.about-content {
    display: grid;
    gap: 40px;
    margin-bottom: 60px;
}

.about-item {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--elevation-2);
    padding: 40px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--elevation-3);
}

.about-item h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.about-item p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.start-from-about {
    text-align: center;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .landing-title {
        font-size: 3rem;
    }
    
    .landing-subtitle {
        font-size: 1.2rem;
    }
    
    .landing-description {
        font-size: 1rem;
    }
    
    .landing-hero {
        padding: 40px 30px;
    }
    
    .about-section h2 {
        font-size: 2rem;
    }
    
    .about-item {
        padding: 30px;
    }
    
    .about-item h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .landing-title {
        font-size: 2.5rem;
    }
    
    .landing-hero {
        padding: 30px 20px;
    }
    
    .about-item {
        padding: 24px;
    }
    
    .start-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }
}

/* フッタークレジット */
.app-footer {
    margin-top: 60px;
    padding: 20px 0 30px;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-credit {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-link:hover {
    color: var(--accent-color);
    background: rgba(255, 111, 97, 0.1);
    transform: translateY(-1px);
}

.footer-link:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.footer-icon {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-divider {
    margin: 0 12px;
    opacity: 0.4;
}

/* スクリーンショット時はフッターを非表示 */
.screenshot-mode .app-footer {
    display: none;
}

/* モバイルスクリーンショット専用画面 */
.mobile-screenshot-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    z-index: 9999;
    overflow: hidden;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.mobile-screenshot-container {
    width: 100%;
    height: calc(100vh - 16px);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px 10px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.mobile-screenshot-header {
    text-align: center;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.mobile-screenshot-header h1 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.mobile-screenshot-header p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 300;
    margin: 0;
}

.mobile-screenshot-lantern {
    display: flex;
    justify-content: center;
    margin: 8px 0;
    flex-shrink: 0;
}

.mobile-screenshot-lantern .lantern {
    transform: scale(0.35);
}

.mobile-screenshot-summary {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    margin: 6px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mobile-screenshot-summary h4 {
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    flex-shrink: 0;
}

.mobile-screenshot-summary strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
    font-size: 0.75rem;
    line-height: 1.1;
}

.mobile-screenshot-summary p {
    color: var(--text-secondary);
    margin: 1px 0;
    line-height: 1.2;
    font-size: 0.7rem;
}

.mobile-screenshot-instructions {
    background: rgba(76, 175, 80, 0.15);
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    border: 1px solid rgba(76, 175, 80, 0.3);
    text-align: center;
    flex-shrink: 0;
}

.mobile-screenshot-instructions p {
    color: var(--text-primary);
    margin: 2px 0;
    line-height: 1.2;
    font-size: 0.7rem;
}

.mobile-back-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-back-btn:hover {
    background: linear-gradient(135deg, #556dd9 0%, #653a91 100%);
    transform: translateY(-1px);
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .app-footer {
        margin-top: 40px;
        padding: 16px 0 24px;
    }
    
    .footer-credit {
        font-size: 0.8rem;
    }
    
    .footer-divider {
        margin: 0 8px;
    }
}

@media (max-width: 480px) {
    .footer-credit {
        font-size: 0.75rem;
    }
    
    .footer-link {
        padding: 3px 6px;
        gap: 3px;
    }
    
    .footer-divider {
        margin: 0 6px;
    }
}

/* 🎉 祝福アニメーション */
.celebration-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: celebrationFadeIn 0.5s ease-out;
}

.celebration-content {
    background: linear-gradient(135deg, var(--surface-color), var(--surface-variant));
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    max-width: 500px;
    margin: 20px;
    box-shadow: var(--elevation-3);
    animation: celebrationBounce 0.6s ease-out 0.2s both;
}

.celebration-content h2 {
    font-size: 2rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--accent-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: celebrationPulse 2s ease-in-out infinite;
}

.celebration-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 12px;
    color: var(--text-color);
}

/* 紙吹雪アニメーション */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti {
    position: absolute;
    top: -10px;
    width: 10px;
    height: 10px;
    opacity: 0.8;
    animation: confettiFall linear forwards;
}

.confetti-circle {
    border-radius: 50%;
}

.confetti-square {
    /* 正方形（デフォルト） */
}

.confetti-triangle {
    width: 0;
    height: 0;
    background: transparent !important;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 10px solid;
    /* border-bottom-color は JavaScript で設定される */
}

/* ランタン祝福演出 */
.lantern.celebration-glow {
    animation: celebrationGlow 2s ease-in-out infinite;
    filter: drop-shadow(0 0 30px var(--accent-color));
}

.lantern-light.celebration-pulse {
    animation: celebrationLightPulse 1.5s ease-in-out infinite;
}

/* フェードアウト */
.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* キーフレームアニメーション */
@keyframes celebrationFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

@keyframes celebrationBounce {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-50px);
    }
    50% {
        transform: scale(1.05) translateY(0);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes celebrationPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

@keyframes celebrationGlow {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px var(--accent-color));
    }
    50% {
        transform: scale(1.02);
        filter: drop-shadow(0 0 40px var(--accent-color)) drop-shadow(0 0 60px var(--success-color));
    }
}

@keyframes celebrationLightPulse {
    0%, 100% {
        opacity: 0.8;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
        box-shadow: 0 0 50px var(--accent-color);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .celebration-content {
        padding: 30px 24px;
        margin: 16px;
    }
    
    .celebration-content h2 {
        font-size: 1.6rem;
    }
    
    .celebration-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .celebration-content {
        padding: 24px 20px;
        margin: 12px;
    }
    
    .celebration-content h2 {
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    
    .celebration-content p {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }
    
    .confetti {
        width: 8px;
        height: 8px;
    }
}

/* アクセシビリティ: モーション軽減設定時の配慮 */
@media (prefers-reduced-motion: reduce) {
    .celebration-message,
    .celebration-content,
    .confetti,
    .lantern.celebration-glow,
    .lantern-light.celebration-pulse {
        animation: none !important;
    }
    
    .celebration-content {
        transform: none !important;
    }
    
    .confetti-container {
        display: none;
    }
}

/* 480px以下のスタイルは上記で既に定義済みのため削除 */