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

        body {
            font-family: 'Inter', 'Noto Sans SC', 'Noto Sans JP', system-ui, sans-serif;
            background: #0a0b14;
            color: #e2e8f0;
            min-height: 100vh
        }

        .tr-header {
            background: linear-gradient(135deg, #1a1b2e, #0d0e1a);
            border-bottom: 1px solid rgba(102, 126, 234, .2);
            padding: 20px 24px;
            display: flex;
            align-items: center;
            gap: 16px;
            position: sticky;
            top: 0;
            z-index: 100;
            backdrop-filter: blur(12px)
        }

        .tr-header .logo {
            font-family: inherit;
            font-size: 18px;
            font-weight: 700;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent
        }

        .tr-header .subtitle {
            color: #a0aec0;
            font-size: 13px;
            font-weight: 500
        }

        .tr-header .back-btn {
            margin-left: auto;
            background: rgba(102, 126, 234, .12);
            border: 1px solid rgba(102, 126, 234, .3);
            color: #a0aec0;
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            text-decoration: none;
            transition: .2s
        }

        .tr-header .back-btn:hover {
            background: rgba(102, 126, 234, .25);
            color: #fff
        }

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

        /* ── Module list ── */
        .mod-card {
            background: #1a1b2e;
            border: 1px solid rgba(255, 255, 255, .06);
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 12px;
            transition: .2s
        }

        .mod-card:hover {
            border-color: rgba(102, 126, 234, .3);
            transform: translateY(-1px);
            box-shadow: 0 8px 24px rgba(0, 0, 0, .3)
        }

        .mod-top {
            display: flex;
            align-items: flex-start;
            gap: 14px
        }

        .mod-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            background: linear-gradient(135deg, rgba(102, 126, 234, .15), rgba(167, 139, 250, .15));
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            flex-shrink: 0
        }

        .mod-info {
            flex: 1;
            min-width: 0
        }

        .mod-title {
            font-size: 16px;
            font-weight: 700;
            color: #e2e8f0
        }

        .mod-desc {
            font-size: 13px;
            color: #64748b;
            margin-top: 4px;
            line-height: 1.5
        }

        .mod-meta {
            display: flex;
            gap: 12px;
            margin-top: 10px;
            flex-wrap: wrap
        }

        .mod-badge {
            font-size: 11px;
            padding: 3px 10px;
            border-radius: 12px;
            font-weight: 600
        }

        .mod-badge.qs {
            background: rgba(59, 130, 246, .12);
            color: #60a5fa
        }

        .mod-badge.pass {
            background: rgba(34, 197, 94, .12);
            color: #4ade80
        }

        .mod-badge.fail {
            background: rgba(239, 68, 68, .12);
            color: #f87171
        }

        .mod-badge.score {
            background: rgba(251, 191, 36, .12);
            color: #fbbf24
        }

        .mod-actions {
            display: flex;
            gap: 8px;
            margin-top: 14px
        }

        .mod-btn {
            padding: 8px 16px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 13px;
            font-weight: 600;
            font-family: inherit;
            transition: .2s;
            border: none
        }

        .mod-btn.learn {
            background: rgba(59, 130, 246, .12);
            border: 1px solid rgba(59, 130, 246, .3);
            color: #60a5fa
        }

        .mod-btn.learn:hover {
            background: rgba(59, 130, 246, .25)
        }

        .mod-btn.quiz {
            background: linear-gradient(135deg, #667eea, #764ba2);
            color: #fff
        }

        .mod-btn.quiz:hover {
            opacity: .9
        }

        /* ── Quiz view ── */
        #quizView {
            display: none
        }

        .quiz-header {
            background: #1a1b2e;
            border-radius: 14px;
            padding: 20px;
            margin-bottom: 16px;
            border: 1px solid rgba(102, 126, 234, .2)
        }

        .quiz-title {
            font-size: 18px;
            font-weight: 700;
            color: #a78bfa
        }

        .quiz-progress {
            margin-top: 10px;
            display: flex;
            align-items: center;
            gap: 10px
        }

        .quiz-pbar {
            flex: 1;
            height: 6px;
            background: rgba(255, 255, 255, .06);
            border-radius: 3px;
            overflow: hidden
        }

        .quiz-pfill {
            height: 100%;
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 3px;
            transition: width .3s
        }

        .quiz-ptext {
            font-size: 12px;
            color: #94a3b8;
            font-weight: 600;
            white-space: nowrap
        }

        .q-card {
            background: #1a1b2e;
            border: 1px solid rgba(255, 255, 255, .06);
            border-radius: 14px;
            padding: 24px;
            margin-bottom: 12px
        }

        .q-num {
            font-size: 11px;
            color: #667eea;
            font-weight: 700;
            margin-bottom: 8px
        }

        .q-text {
            font-size: 15px;
            font-weight: 600;
            color: #e2e8f0;
            line-height: 1.6;
            margin-bottom: 16px
        }

        .q-opts {
            display: flex;
            flex-direction: column;
            gap: 8px
        }

        .q-opt {
            padding: 12px 16px;
            background: rgba(255, 255, 255, .03);
            border: 1px solid rgba(255, 255, 255, .08);
            border-radius: 10px;
            cursor: pointer;
            font-size: 13px;
            transition: .2s;
            display: flex;
            align-items: center;
            gap: 10px
        }

        .q-opt:hover {
            border-color: rgba(102, 126, 234, .3);
            background: rgba(102, 126, 234, .06)
        }

        .q-opt.selected {
            border-color: #667eea;
            background: rgba(102, 126, 234, .12);
            color: #fff
        }

        .q-opt .radio {
            width: 18px;
            height: 18px;
            border: 2px solid rgba(255, 255, 255, .2);
            border-radius: 50%;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center
        }

        .q-opt.selected .radio {
            border-color: #667eea;
            background: #667eea
        }

        .q-opt.selected .radio::after {
            content: '';
            width: 6px;
            height: 6px;
            background: #fff;
            border-radius: 50%
        }

        /* Result states */
        .q-opt.correct {
            border-color: #22c55e;
            background: rgba(34, 197, 94, .1)
        }

        .q-opt.wrong {
            border-color: #ef4444;
            background: rgba(239, 68, 68, .08)
        }

        .q-explain {
            font-size: 12px;
            color: #94a3b8;
            margin-top: 8px;
            padding: 8px 12px;
            background: rgba(255, 255, 255, .03);
            border-radius: 8px;
            line-height: 1.5;
            display: none
        }

        .quiz-actions {
            display: flex;
            gap: 12px;
            justify-content: center;
            margin-top: 20px
        }

        .quiz-btn {
            padding: 10px 24px;
            border-radius: 10px;
            cursor: pointer;
            font-size: 14px;
            font-weight: 700;
            font-family: inherit;
            transition: .2s;
            border: none
        }

        .quiz-btn.submit {
            background: linear-gradient(135deg, #22c55e, #16a34a);
            color: #fff
        }

        .quiz-btn.submit:hover {
            opacity: .9
        }

        .quiz-btn.back {
            background: rgba(255, 255, 255, .06);
            border: 1px solid rgba(255, 255, 255, .1);
            color: #94a3b8
        }

        /* ── Result modal ── */
        .result-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .7);
            z-index: 200;
            display: none;
            align-items: center;
            justify-content: center
        }

        .result-overlay.show {
            display: flex
        }

        .result-card {
            background: #1a1b2e;
            border: 1px solid rgba(102, 126, 234, .3);
            border-radius: 20px;
            padding: 32px;
            text-align: center;
            width: 90%;
            max-width: 380px;
            animation: slideUp .3s ease
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px)
            }

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

        .result-icon {
            font-size: 56px;
            margin-bottom: 12px
        }

        .result-score {
            font-size: 48px;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea, #764ba2);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent
        }

        .result-label {
            font-size: 14px;
            color: #94a3b8;
            margin-top: 4px
        }

        .result-detail {
            font-size: 13px;
            color: #64748b;
            margin-top: 12px;
            line-height: 1.6
        }

        .result-status {
            font-size: 18px;
            font-weight: 700;
            margin-top: 12px;
            padding: 6px 20px;
            border-radius: 20px;
            display: inline-block
        }

        .result-status.passed {
            background: rgba(34, 197, 94, .12);
            color: #4ade80
        }

        .result-status.failed {
            background: rgba(239, 68, 68, .12);
            color: #f87171
        }

        .result-actions {
            margin-top: 20px;
            display: flex;
            gap: 8px;
            justify-content: center
        }

        .toast {
            position: fixed;
            bottom: 24px;
            left: 50%;
            transform: translateX(-50%);
            background: #22c55e;
            color: #fff;
            padding: 8px 20px;
            border-radius: 20px;
            font-size: 13px;
            z-index: 300;
            animation: fadeOut 2s forwards;
            pointer-events: none
        }

        @keyframes fadeOut {
            0% {
                opacity: 1
            }

            70% {
                opacity: 1
            }

            100% {
                opacity: 0
            }
        }

        @media(max-width:600px) {
            .container {
                padding: 0 16px
            }

            .q-card {
                padding: 16px
            }

            .mod-card {
                padding: 16px
            }
        }