        :root {
            --primary: #07A2B8;
            --primary-light: #58d0e0;
            --primary-dark: #057a8c;
            --secondary: #F8B400;
            --accent: #FF6B6B;
            --dark: #2D3748;
            --light: #F7FAFC;
            --gray: #E2E8F0;
            --success: #48BB78;
            --card-radius: 16px;
            --transition-normal: 0.3s ease;
            --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
            --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.08);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            font-family: "Noto Sans JP", sans-serif;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            color: var(--dark);
            line-height: 1.5;
        }

        .app-container {
            width: 100%;
            max-width: 400px;
            min-height: 640px;
            background: linear-gradient(180deg, var(--light) 0%, #EDF2F7 100%);
            border-radius: 24px;
            box-shadow: var(--shadow-lg);
            padding: 24px;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
            margin: 20px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(0,0,0,0.05);
        }

        .chapter-title {
            color: var(--primary);
            font-size: 24px;
            font-weight: 700;
            letter-spacing: -0.5px;
            margin: 0;
        }

        .menu-button {
            background: var(--light);
            border-radius: 50%;
            width: 44px;
            height: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition-normal);
            box-shadow: var(--shadow-sm);
            border: none;
        }

        .menu-button:hover {
            background: var(--primary-light);
            transform: scale(1.05);
        }

        .menu-button svg {
            width: 24px;
            height: 24px;
            color: var(--primary);
        }

        .card {
            background-color: white;
            border-radius: var(--card-radius);
            padding: 24px;
            height: 240px;
            margin-bottom: 24px;
            position: relative;
            box-shadow: var(--shadow-md);
            display: flex;
            flex-direction: column;
            transition: all 0.3s ease;
            cursor: pointer;
            transform-origin: center;
        }

        .card:hover {
            box-shadow: var(--shadow-lg);
            transform: translateY(-2px);
        }

        .card-counter {
            color: var(--primary);
            font-weight: 700;
            font-size: 18px;
            margin-bottom: 16px;
        }

        .card-content {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        .japanese-text {
            font-size: 22px;
            font-weight: 700;
            color: var(--dark);
        }

        .english-text {
            font-size: 22px;
            font-weight: 500;
            color: var(--dark);
            line-height: 1.4;
        }

        .note-container {
            background-color: rgba(7, 162, 184, 0.1);
            border-radius: 8px;
            padding: 12px;
            margin-top: 16px;
            border-left: 3px solid var(--primary);
        }

        .note-text {
            font-size: 14px;
            color: var(--primary-dark);
            text-align: center;
        }

        .success-container {
            display: none;
            height: auto;
            margin-bottom: 24px;
            position: relative;
        }

        .success-card {
            background-color: white;
            border-radius: var(--card-radius);
            padding: 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow-md);
            position: relative;
            overflow: hidden;
        }

        .success-image {
            width: 200px;
            height: auto;
            margin-bottom: 20px;
        }

        .navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 20px;
        }

        .arrow-button {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border: none;
            border-radius: 50%;
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition-normal);
            box-shadow: var(--shadow-sm);
        }

        .arrow-button:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-md);
        }

        .arrow-button svg {
            width: 24px;
            height: 24px;
            color: white;
        }

        .left-arrow {
            background: linear-gradient(135deg, #e0a700 0%, var(--secondary) 100%);
        }

        .restart-button {
            background: linear-gradient(135deg, var(--accent) 0%, #e54b4b 100%);
            border: none;
            border-radius: 20px;
            padding: 0 16px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition-normal);
            box-shadow: var(--shadow-sm);
        }

        .restart-button:hover {
            transform: scale(1.05);
            box-shadow: var(--shadow-md);
        }

        .restart-button svg {
            width: 24px;
            height: 24px;
            color: white;
            margin-right: 8px;
        }

        .restart-button span {
            color: white;
            font-weight: 600;
            font-size: 14px;
        }

        .finish-button {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 12px 20px;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-normal);
            box-shadow: var(--shadow-sm);
        }
        
        .restart-chapter-button {
            background: linear-gradient(135deg, #9B59B6 0%, #8E44AD 100%);
        }

        .restart-chapter-button:hover {
            background: linear-gradient(135deg, #8E44AD 0%, #7D3C98 100%);
        }        

        .finish-button:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .custom-audio-player {
            width: 100%;
            height: 40px;
            position: absolute;
            bottom: 10px;
            left: 0;
            padding: 0 20px;
            display: flex;
            align-items: center;
            z-index: 100;
            pointer-events: auto;
        }

        .audio-progress {
            flex: 1;
            height: 6px;
            background-color: var(--gray);
            border-radius: 3px;
            position: relative;
            cursor: pointer;
            overflow: hidden;
        }

        .audio-progress-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 100%);
            width: 0%;
            border-radius: 3px;
            transition: width 0.1s linear;
        }

        .audio-button {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
            cursor: pointer;
            box-shadow: var(--shadow-sm);
            transition: var(--transition-normal);
            border: none;
        }

        .audio-button:hover {
            transform: scale(1.1);
            background: var(--primary-dark);
        }

        .audio-button svg {
            width: 18px;
            height: 18px;
            color: white;
        }
        
        .speed-select {
            margin-left: 10px;
            border: none;
            background: var(--light);
            padding: 5px;
            border-radius: 4px;
            color: var(--primary);
            font-weight: 600;
            font-size: 12px;
            cursor: pointer;
            transition: var(--transition-normal);
        }

        .speed-select:hover {
            background: var(--gray);
        }

        .speed-select:focus {
            outline: none;
            box-shadow: 0 0 0 2px rgba(7, 162, 184, 0.3);
        }

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

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(20px); }
            to { opacity: 1; transform: translateX(0); }
        }

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

        .fade-in {
            animation: fadeIn 0.3s ease forwards;
        }

        .slide-right {
            animation: slideInRight 0.3s ease forwards;
        }

        .slide-left {
            animation: slideInLeft 0.3s ease forwards;
        }

        .hidden-audio {
            display: none;
        }

        /* モバイル対応 */
        @media (max-width: 480px) {
            .app-container {
                margin: 0;
                border-radius: 0;
                min-height: 100vh;
                max-width: 100%;
            }
            
            .chapter-title {
                font-size: 20px;
            }
            
            .card {
                height: 220px;
            }
            
            .japanese-text, .english-text {
                font-size: 20px;
            }
        }

        .review-container {
            padding: 20px;
            height: 100%;
            overflow-y: hidden;
            background-color: white;
            border-radius: var(--card-radius);
            box-shadow: var(--shadow-md);
        }
        .review-title {
            text-align: center;
            color: var(--primary);
            font-weight: 700;
            margin-bottom: 16px;
        }
        .review-title + p {
            text-align: center;
            color: var(--dark);
            margin-bottom: 40px;
        }
        .review-pair {
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid var(--gray);
        }
        .review-pair:last-child {
            border-bottom: none;
        }
        .review-japanese {
            font-size: 14px;
            font-weight: 500;
            color: var(--dark);
            margin-bottom: 4px;
        }
        .review-english {
            font-size: 14px;
            font-weight: 400;
            color: var(--primary-dark);
        }
