* { margin:0; padding:0; box-sizing:border-box; }
        body {
            background: linear-gradient(135deg, #e8f4f8 0%, #d1e9f0 100%);
            font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
            padding: 20px;
        }
        .double-border {
            max-width: 1400px;
            margin: 0 auto;
            background: #ffffff;
            border: 2px solid #f1c40f;
            border-radius: 24px;
            box-shadow: 0 20px 30px -15px rgba(0,0,0,0.2), inset 0 1px 0 0 #fff8e0;
            overflow: hidden;
        }
        .container {
            display: grid;
            grid-template-columns: 260px 1fr;
            gap: 0;
        }
        .sidebar {
            background: #fefcf5;
            border-right: 2px solid #fdebb3;
            padding: 24px 16px;
        }
        .sidebar h3 {
            font-size: 1.4rem;
            color: #b45f06;
            border-left: 5px solid #f39c12;
            padding-left: 15px;
            margin-bottom: 25px;
        }
        .mobile-chapter-nav {
            display: none;
        }
        .chapter-list {
            list-style: none;
        }
        .chapter-list li {
            margin-bottom: 6px;
        }
        .chapter-list a {
            display: block;
            padding: 8px 12px;
            text-decoration: none;
            color: #2c3e50;
            border-radius: 12px;
            transition: all 0.2s;
            font-weight: 500;
            position: relative;
            z-index: 5;
            pointer-events: auto;
            touch-action: manipulation;
            -webkit-tap-highlight-color: rgba(59, 130, 246, 0.22);
        }
        .chapter-list a:hover {
            background: #fdebd0;
            transform: translateX(3px);
        }
        .chapter-list .active {
            background: #3b82f6;
            color: white;
            box-shadow: 0 2px 5px rgba(59,130,246,0.3);
        }
        .main-content {
            padding: 30px 35px;
            background: white;
            min-width: 0;
        }
        .course-title-top {
            text-align: center;
            color: #1e3a8a;
            font-size: 1.9rem;
            font-weight: 800;
            line-height: 1.35;
            margin: 4px 0 24px;
            overflow-wrap: anywhere;
        }
        .footer-nav {
            margin-top: 45px;
            padding-top: 20px;
            border-top: 2px solid #f0e6d2;
            display: flex;
            justify-content: space-between;
            gap: 12px;
        }
        .footer-nav a {
            padding: 8px 24px;
            background: #f1f5f9;
            text-decoration: none;
            color: #1e40af;
            border-radius: 40px;
            font-weight: 500;
            transition: 0.2s;
            position: relative;
            z-index: 5;
            pointer-events: auto;
            touch-action: manipulation;
            -webkit-tap-highlight-color: rgba(59, 130, 246, 0.22);
        }
        .footer-nav a:hover {
            background: #e2e8f0;
            transform: translateY(-2px);
        }
        footer {
            text-align: center;
            margin-top: 30px;
            padding: 15px;
            color: #64748b;
            border-top: 1px dashed #e2e8f0;
            font-size: 0.9rem;
        }
        footer a {
            color: #92400e;
            font-weight: 700;
            text-decoration: none;
        }
        footer a:hover { text-decoration: underline; }
        h2 { color: #1e3a8a; border-left: 6px solid #f59e0b; padding-left: 15px; margin: 20px 0 15px; }
        h3 { color: #2c3e50; margin: 20px 0 10px; }
        p, li { line-height: 1.8; }
        ul, ol { padding-left: 1.5rem; margin: 12px 0; }
        pre {
            background: #2d2f36; color: #f8f8f2; padding: 15px; border-radius: 12px;
            overflow-x: auto; font-family: 'JetBrains Mono', monospace; margin: 15px 0;
        }
        code { overflow-wrap: anywhere; }
        .main-content table {
            width: 100%;
            border-collapse: collapse;
            margin: 15px 0;
            background: #fefce8 !important;
            color: #1f2937 !important;
        }
        .main-content table tr {
            background: transparent !important;
            color: #1f2937 !important;
        }
        .main-content table th,
        .main-content table td {
            border: 1px solid #fcd34d;
            padding: 10px;
            text-align: left;
            vertical-align: top;
            background: #fffdf0 !important;
            color: #1f2937 !important;
            overflow-wrap: anywhere;
        }
        .main-content table th {
            background: #fffbeb !important;
            color: #111827 !important;
            font-weight: 700;
        }
        .main-content table th *,
        .main-content table td * {
            color: inherit !important;
            background: transparent !important;
        }
        .main-content table code {
            color: #111827 !important;
            background: rgba(15, 23, 42, 0.08) !important;
            padding: 0.08rem 0.28rem;
            border-radius: 0.28rem;
        }
        svg, img, video, canvas {
            max-width: 100%;
            height: auto;
        }
        .tip, .warning, .highlight {
            padding: 12px 18px; border-radius: 16px; margin: 15px 0;
        }
        .tip { background: #e0f2fe; border-left: 6px solid #0ea5e9; }
        .warning { background: #fee2e2; border-left: 6px solid #ef4444; }
        .highlight { background: #fef9c3; border: 1px solid #facc15; }
        @media (max-width: 860px) {
            html, body { overflow-x: hidden; }
            body { padding: 12px; }
            .container { display: block; }
            .sidebar { display: none; }
            .mobile-chapter-nav {
                display: block;
                position: fixed;
                top: 14px;
                left: 14px;
                z-index: 1000;
                width: auto;
                padding: 0;
                background: transparent;
                border: 0;
                pointer-events: none;
            }
            .mobile-chapter-nav summary {
                min-height: 46px;
                max-width: calc(100vw - 28px);
                padding: 8px 13px;
                border-radius: 12px;
                background: #fff7df;
                border: 1px solid #f7d682;
                box-shadow: 0 8px 20px rgba(146, 64, 14, 0.18);
                color: #92400e;
                font-weight: 700;
                cursor: pointer;
                display: flex;
                align-items: center;
                justify-content: space-between;
                gap: 10px;
                list-style: none;
                user-select: none;
                pointer-events: auto;
                touch-action: manipulation;
                -webkit-tap-highlight-color: rgba(245, 158, 11, 0.22);
                position: relative;
                z-index: 1002;
            }
            .mobile-chapter-nav summary::-webkit-details-marker { display: none; }
            .mobile-nav-current {
                color: #1e40af;
                font-size: 0.92rem;
                font-weight: 600;
                overflow-wrap: anywhere;
                text-align: right;
            }
            .mobile-chapter-nav .chapter-list {
                display: none;
                margin: 0;
                padding: 70px 14px 18px;
                width: min(84vw, 340px);
                max-height: none;
                position: fixed;
                top: 0;
                bottom: 0;
                left: 0;
                overflow-y: auto;
                -webkit-overflow-scrolling: touch;
                background: #fefcf5;
                border-right: 2px solid #fdebb3;
                box-shadow: 14px 0 30px rgba(15, 23, 42, 0.18);
                z-index: 1001;
                pointer-events: auto;
            }
            .mobile-chapter-nav[open] .chapter-list { display: block; }
            .mobile-chapter-nav .chapter-list a {
                min-height: 44px;
                display: flex;
                align-items: center;
                position: relative;
                z-index: 1002;
                pointer-events: auto;
            }
            .main-content {
                padding: 24px 18px;
                position: relative;
                z-index: 1;
            }
            .main-content a {
                position: relative;
                z-index: 2;
                pointer-events: auto;
            }
            .footer-nav {
                flex-wrap: wrap;
                position: relative;
                z-index: 30;
                pointer-events: auto;
            }
            .footer-nav a { flex: 1 1 120px; min-height: 44px; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; z-index: 31; pointer-events: auto; }
        }

        body.sketch-mode .main-content.sketch-page {
            position: relative;
            padding: 34px 38px;
            color: #27323a;
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            background-color: #fffaf0;
            background-image:
                linear-gradient(90deg, rgba(70, 116, 168, 0.08) 1px, transparent 1px),
                linear-gradient(0deg, rgba(70, 116, 168, 0.08) 1px, transparent 1px),
                radial-gradient(circle at 18% 16%, rgba(255, 215, 99, 0.22), transparent 28%),
                radial-gradient(circle at 84% 10%, rgba(120, 196, 214, 0.18), transparent 24%),
                radial-gradient(circle at 82% 82%, rgba(239, 112, 96, 0.12), transparent 28%);
            background-size: 32px 32px, 32px 32px, 520px 360px, 460px 330px, 500px 360px;
            border: 2px solid #315b9b;
            border-radius: 18px 15px 20px 14px;
            box-shadow:
                inset 0 0 0 3px rgba(255,255,255,0.6),
                0 10px 22px rgba(49, 91, 155, 0.12);
            overflow-x: hidden;
        }
        body.sketch-mode .main-content.sketch-page::before {
            content: "";
            position: absolute;
            inset: 18px;
            border: 2px dashed rgba(49, 91, 155, 0.22);
            border-radius: 16px 20px 14px 18px;
            transform: rotate(-0.12deg);
            pointer-events: none;
        }
        body.sketch-mode .sketch-page > * {
            position: relative;
            z-index: 1;
        }
        body.sketch-mode .sketch-page .course-title-top {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            color: #1755a6;
            text-shadow: 1px 1px 0 rgba(255,255,255,0.9);
            background: linear-gradient(transparent 64%, rgba(255, 222, 84, 0.48) 64%);
            border-bottom: 3px solid rgba(38, 103, 181, 0.28);
            padding-bottom: 10px;
        }
        body.sketch-mode .sketch-page h2 {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            color: #1755a6;
            border-left: 0;
            border-bottom: 4px solid rgba(255, 203, 77, 0.72);
            padding: 0 0 7px 0;
            margin: 28px 0 16px;
            line-height: 1.45;
            overflow-wrap: anywhere;
            text-decoration: underline wavy rgba(23, 85, 166, 0.28);
            text-underline-offset: 8px;
        }
        body.sketch-mode .sketch-page h3 {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            color: #1f6f86;
            margin: 24px 0 12px;
            padding: 7px 13px;
            line-height: 1.45;
            background: rgba(227, 247, 252, 0.72);
            border: 2px solid rgba(31, 111, 134, 0.35);
            border-radius: 13px 9px 14px 10px;
            overflow-wrap: anywhere;
        }
        body.sketch-mode .sketch-page p,
        body.sketch-mode .sketch-page li {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            color: #27323a;
            line-height: 1.92;
            letter-spacing: 0;
            overflow-wrap: anywhere;
        }
        body.sketch-mode .sketch-page em,
        body.sketch-mode .sketch-page i {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            font-style: normal;
            font-weight: 700;
            color: #0f4f7a;
        }
        body.sketch-mode .sketch-page strong {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            font-weight: 800;
            color: #27323a;
        }
        body.sketch-mode .sketch-page p {
            margin: 12px 0;
        }
        body.sketch-mode .sketch-page ul,
        body.sketch-mode .sketch-page ol {
            padding-left: 1.6rem;
            margin: 14px 0 18px;
        }
        body.sketch-mode .sketch-page li::marker {
            color: #d74943;
            font-weight: 700;
        }
        body.sketch-mode .sketch-page table {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            border-collapse: separate;
            border-spacing: 0;
            margin: 18px 0 22px;
            background: #fffdf6;
            color: #263238;
            border: 2px solid #3f6ba9;
            border-radius: 14px 10px 16px 12px;
            overflow: hidden;
            box-shadow: 4px 5px 0 rgba(255, 203, 77, 0.24);
        }
        body.sketch-mode .sketch-page th,
        body.sketch-mode .sketch-page td {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            border: 1px dashed rgba(63, 107, 169, 0.45);
            padding: 11px 12px;
            color: #263238;
            vertical-align: top;
            background: rgba(255, 253, 246, 0.88);
            overflow-wrap: anywhere;
        }
        body.sketch-mode .sketch-page th {
            color: #174276;
            background: rgba(221, 239, 255, 0.92);
            font-weight: 800;
        }
        body.sketch-mode .sketch-page svg,
        body.sketch-mode .sketch-page img,
        body.sketch-mode .sketch-page video,
        body.sketch-mode .sketch-page canvas {
            width: 100%;
            max-width: 100%;
            box-sizing: border-box;
            height: auto;
            background: rgba(255, 254, 246, 0.82);
            border: 2px dashed rgba(49, 91, 155, 0.34);
            border-radius: 16px 11px 15px 12px;
            padding: 8px;
            margin: 14px auto;
            display: block;
        }
        body.sketch-mode .sketch-page svg text,
        body.sketch-mode .sketch-page svg tspan {
            font-family: 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Noto Sans SC', system-ui, sans-serif;
            font-style: normal;
        }
        body.sketch-mode .sketch-page pre {
            font-family: 'Consolas', 'JetBrains Mono', 'SFMono-Regular', monospace;
            background: #243241;
            color: #f8fafc;
            border: 2px solid #152333;
            border-radius: 14px 10px 16px 11px;
            box-shadow: 4px 4px 0 rgba(31, 111, 134, 0.18);
            white-space: pre-wrap;
            overflow-x: auto;
        }
        body.sketch-mode .sketch-page code {
            font-family: 'Consolas', 'JetBrains Mono', 'SFMono-Regular', monospace;
            color: inherit;
            overflow-wrap: anywhere;
        }
        body.sketch-mode .sketch-page :not(pre) > code {
            color: #b02d28;
            background: rgba(255, 230, 143, 0.5);
            border: 1px dashed rgba(176, 45, 40, 0.28);
            border-radius: 7px;
            padding: 1px 5px;
        }
        body.sketch-mode .sketch-page .tip,
        body.sketch-mode .sketch-page .warning,
        body.sketch-mode .sketch-page .highlight {
            margin: 18px 0;
            padding: 14px 18px;
            border-radius: 16px 12px 18px 13px;
            box-shadow: 4px 5px 0 rgba(39, 50, 58, 0.08);
            color: #263238;
        }
        body.sketch-mode .sketch-page .tip {
            background: #e7f7ff;
            border: 2px solid #4ca7c7;
            border-left: 9px solid #2f92b4;
        }
        body.sketch-mode .sketch-page .warning {
            background: #fff0ec;
            border: 2px solid #dd6155;
            border-left: 9px solid #d74943;
        }
        body.sketch-mode .sketch-page .highlight {
            background: #fff5bf;
            border: 2px solid #d8a722;
            border-left: 9px solid #f0b429;
        }
        body.sketch-mode .sketch-page blockquote,
        body.sketch-mode .sketch-page section,
        body.sketch-mode .sketch-page article {
            border-radius: 16px 12px 18px 13px;
        }
        body.sketch-mode .sketch-page .footer-nav {
            border-top: 2px dashed rgba(49, 91, 155, 0.28);
        }
        body.sketch-mode .sketch-page footer {
            color: #55606b;
            border-top: 1px dashed rgba(49, 91, 155, 0.28);
        }
        @media (max-width: 860px) {
            body.sketch-mode .main-content.sketch-page {
                padding: 24px 16px;
                border-radius: 0 0 18px 18px;
                background-size: 28px 28px, 28px 28px, 360px 280px, 320px 260px, 340px 260px;
            }
            body.sketch-mode .main-content.sketch-page::before {
                inset: 10px;
            }
            body.sketch-mode .sketch-page .course-title-top {
                font-size: 1.45rem;
            }
            body.sketch-mode .sketch-page h2 {
                font-size: 1.32rem;
            }
            body.sketch-mode .sketch-page h3 {
                font-size: 1.08rem;
                padding: 7px 10px;
            }
            body.sketch-mode .sketch-page table {
                display: block;
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }
            body.sketch-mode .sketch-page th,
            body.sketch-mode .sketch-page td {
                min-width: 0;
                word-break: break-word;
            }
        }
