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

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            color: #333;
            line-height: 1.6;
        }

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

        .header {
            text-align: center;
            margin-bottom: 30px;
            color: white;
        }

        .header h1 {
            font-size: 2.5em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .header p {
            font-size: 1.1em;
            opacity: 0.9;
        }

        .version-badge {
            display: inline-block;
            background: linear-gradient(45deg, #ff6b6b, #ffa500);
            color: white;
            padding: 8px 16px;
            border-radius: 20px;
            font-weight: bold;
            margin: 10px 0;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .tabs {
            display: flex;
            justify-content: center;
            margin-bottom: 30px;
            gap: 10px;
        }

        .tab-button {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            padding: 12px 24px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1.1em;
            transition: all 0.3s ease;
            backdrop-filter: blur(10px);
            position: relative;
        }

        .tab-button:hover {
            background: rgba(255,255,255,0.3);
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        .tab-button.active {
            background: rgba(255,255,255,0.4);
            border: 2px solid white;
            box-shadow: 0 5px 15px rgba(255,255,255,0.4);
            transform: scale(1.05);
        }

        .tab-badge {
            position: absolute;
            top: -8px;
            right: -8px;
            background: #ff4757;
            color: white;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            font-size: 0.8em;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
        }

        .content-panel {
            background: rgba(255,255,255,0.95);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            backdrop-filter: blur(10px);
            min-height: 600px;
        }

        .features-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .feature-card {
            background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
            padding: 20px;
            border-radius: 15px;
            text-align: center;
            color: white;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .feature-card h3 {
            font-size: 1.2em;
            margin-bottom: 10px;
        }

        .feature-card p {
            font-size: 0.9em;
            opacity: 0.9;
        }

        .player-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 20px;
            border-radius: 15px;
            margin-bottom: 30px;
            text-align: center;
        }

        .metrics-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 15px;
            margin-bottom: 30px;
        }

        .metric-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            border-left: 5px solid;
        }

        .metric-card.wtq { border-left-color: #e74c3c; }
        .metric-card.stress { border-left-color: #f39c12; }
        .metric-card.guilt { border-left-color: #3498db; }
        .metric-card.doubt { border-left-color: #9b59b6; }

        .metric-icon {
            font-size: 2em;
            margin-bottom: 10px;
        }

        .metric-value {
            font-size: 2.5em;
            font-weight: bold;
            margin-bottom: 5px;
        }

        .metric-label {
            font-size: 0.9em;
            color: #666;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: #ecf0f1;
            border-radius: 4px;
            margin-top: 10px;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .progress-fill.wtq { background: linear-gradient(90deg, #e74c3c, #c0392b); }
        .progress-fill.stress { background: linear-gradient(90deg, #f39c12, #d68910); }
        .progress-fill.guilt { background: linear-gradient(90deg, #3498db, #2980b9); }
        .progress-fill.doubt { background: linear-gradient(90deg, #9b59b6, #8e44ad); }

        .scenario-buttons {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .scenario-button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            padding: 30px 40px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 1.2em;
            font-weight: 600;
            min-height: 100px;
            transition: all 0.3s ease;
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        .scenario-button:hover {
            transform: translateY(-3px) scale(1.02);
            box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        }

        .event-card {
            background: white;
            border-radius: 15px;
            padding: 25px;
            margin-bottom: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            animation: fadeIn 0.4s ease;
        }
        
        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .event-title {
            font-size: 1.4em;
            font-weight: bold;
            margin-bottom: 15px;
            color: #2c3e50;
        }

        .event-content {
            font-size: 1.1em;
            line-height: 1.6;
            margin-bottom: 20px;
            color: #34495e;
        }

        .choices-container {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .choice-button {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            padding: 20px 24px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 1.05em;
            font-weight: 500;
            text-align: left;
            transition: all 0.3s ease;
            position: relative;
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .choice-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
            background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
        }
        
        .choice-button:active {
            transform: translateY(-1px);
            box-shadow: 0 3px 10px rgba(102, 126, 234, 0.4);
        }

        .strategy-label {
            position: absolute;
            top: 8px;
            right: 12px;
            font-size: 0.8em;
            padding: 4px 8px;
            border-radius: 8px;
            font-weight: bold;
        }

        .strategy-strong { background: #e74c3c; color: white; }
        .strategy-moderate { background: #3498db; color: white; }
        .strategy-careful { background: #f39c12; color: white; }
        .strategy-creative { background: #e67e22; color: white; }
        .strategy-emotional { background: #9b59b6; color: white; }

        .progress-section {
            text-align: center;
            margin-bottom: 20px;
        }

        .progress-text {
            font-size: 1.1em;
            color: #666;
            margin-bottom: 10px;
        }

        .progress-bar-container {
            background: #ecf0f1;
            height: 12px;
            border-radius: 6px;
            overflow: hidden;
            margin: 0 auto;
            width: 300px;
        }

        .progress-bar-fill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 6px;
            transition: width 0.5s ease;
        }

        .achievements-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .achievement-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
            transition: all 0.3s ease;
            cursor: pointer;
            border-left: 5px solid #ecf0f1;
        }

        .achievement-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(0,0,0,0.2);
        }

        .achievement-card.unlocked {
            border-left-color: #27ae60;
            background: linear-gradient(135deg, #f8fff8 0%, #e8f5e8 100%);
        }

        .achievement-card.common { border-left-color: #95a5a6; }
        .achievement-card.rare { border-left-color: #3498db; }
        .achievement-card.epic { border-left-color: #9b59b6; }
        .achievement-card.legendary { border-left-color: #f39c12; }

        .achievement-header {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .achievement-icon {
            font-size: 2em;
            margin-right: 15px;
        }

        .achievement-info h3 {
            font-size: 1.2em;
            margin-bottom: 5px;
        }

        .achievement-rarity {
            font-size: 0.8em;
            padding: 2px 8px;
            border-radius: 10px;
            font-weight: bold;
        }

        .rarity-common { background: #bdc3c7; color: white; }
        .rarity-rare { background: #3498db; color: white; }
        .rarity-epic { background: #9b59b6; color: white; }
        .rarity-legendary { background: #f39c12; color: white; }

        .achievement-description {
            color: #666;
            font-size: 0.9em;
            margin-bottom: 10px;
        }

        .achievement-xp {
            text-align: right;
            font-weight: bold;
            color: #27ae60;
        }

        .filter-buttons {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .filter-button {
            background: rgba(255,255,255,0.2);
            border: none;
            color: #333;
            padding: 8px 16px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .filter-button:hover {
            background: rgba(102, 126, 234, 0.3);
            color: #333;
            transform: translateY(-2px);
        }
        
        .filter-button.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
            transform: scale(1.05);
        }

        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            backdrop-filter: blur(5px);
        }

        .modal-content {
            background: white;
            margin: 10% auto;
            padding: 30px;
            border-radius: 20px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            position: relative;
        }

        .close-button {
            position: absolute;
            right: 15px;
            top: 15px;
            font-size: 1.5em;
            cursor: pointer;
            color: #999;
        }

        .close-button:hover {
            color: #333;
        }

        .ending-card {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px;
            border-radius: 20px;
            text-align: center;
            margin-bottom: 20px;
        }

        .ending-title {
            font-size: 2em;
            margin-bottom: 15px;
        }

        .ending-description {
            font-size: 1.1em;
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .final-metrics {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            gap: 15px;
            margin-bottom: 20px;
        }

        .final-metric {
            background: rgba(255,255,255,0.2);
            padding: 15px;
            border-radius: 10px;
            text-align: center;
        }

        .restart-button {
            background: #27ae60;
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 25px;
            cursor: pointer;
            font-size: 1.1em;
            transition: all 0.3s ease;
        }

        .restart-button:hover {
            background: #229954;
            transform: translateY(-2px);
        }

        @media (max-width: 768px) {
            .container {
                padding: 15px;
            }

            .header h1 {
                font-size: 2em;
            }

            .tabs {
                flex-direction: column;
                align-items: center;
            }

            .metrics-grid {
                grid-template-columns: repeat(2, 1fr);
            }

            .scenario-buttons {
                grid-template-columns: 1fr;
            }

            .achievements-grid {
                grid-template-columns: 1fr;
            }

            .progress-bar-container {
                width: 250px;
            }
        }

        .hidden {
            display: none !important;
        }
        
        /* フェーズ2改善: メトリクス変化アニメーション */
        .metric-increase {
            animation: pulse-green 0.5s ease;
        }
        
        .metric-decrease {
            animation: pulse-red 0.5s ease;
        }
        
        @keyframes pulse-green {
            0%, 100% { background-color: transparent; }
            50% { background-color: rgba(46, 213, 115, 0.3); }
        }
        
        @keyframes pulse-red {
            0%, 100% { background-color: transparent; }
            50% { background-color: rgba(255, 71, 87, 0.3); }
        }
        
        /* フェーズ2改善: トースト通知スタイル */
        .toast-container {
            position: fixed;
            top: 80px;
            right: 20px;
            z-index: 9999;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .toast {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 16px 24px;
            border-radius: 12px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
            min-width: 300px;
            animation: slideIn 0.3s ease, slideOut 0.3s ease 2.7s;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .toast-icon {
            font-size: 2em;
        }
        
        .toast-content {
            flex: 1;
        }
        
        .toast-title {
            font-weight: bold;
            font-size: 1.1em;
            margin-bottom: 4px;
        }
        
        .toast-description {
            font-size: 0.9em;
            opacity: 0.9;
        }
        
        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }
        
        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(400px);
                opacity: 0;
            }
        }
        
        @media (max-width: 768px) {
            .toast-container {
                top: 60px;
                right: 10px;
                left: 10px;
            }
            
            .toast {
                min-width: auto;
            }
        }
