        * { margin:0; padding:0; box-sizing:border-box; }
        body { font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif; background:#f0f0f0; overflow:hidden; color:#333; height:100vh; }

        /* ══ LOADING SCREEN ══ */
        /* Loading screen styles */
        #loading-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #66C18E, #45825D);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease;
        }
        #loading-screen.fade-out { opacity:0; pointer-events:none; }
        .loading-logo {
            height: 80px;
            width: auto;
            margin-bottom: 20px;
            animation: pulse 2s infinite;
        }
        .loading-progress-track {
            width: 280px;
            height: 6px;
            background: rgba(255, 255, 255, 0.3);
            border-radius: 999px;
            margin-top: 16px;
            overflow: hidden;
            position: relative;
        }
        .loading-progress-bar {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 38%;
            background: #ffffff;
            border-radius: 999px;
            animation: loadingBarSlide 1.4s ease-in-out infinite;
        }
        @keyframes loadingBarSlide {
            0%   { left: -40%; }
            50%  { left: 55%; }
            100% { left: 100%; }
        }
        @keyframes pulse { 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.06); } }

        /* ══ HEADER ══ */
        .header { background:#45825D; padding:0 24px; display:flex; align-items:center; box-shadow:0 2px 10px rgba(0,0,0,0.15); height:64px; position:relative; }
        .logo-wrap { display:flex; align-items:center; gap:10px; }
        .logo-img { height:54px; width:auto; }
        .header-title { position:absolute; left:50%; transform:translateX(-50%); font-size:26px; font-weight:700; color:white; }
        .header-right { margin-left:auto; display:flex; align-items:center; gap:10px; z-index:1; }
        .view-curriculum-btn {
            background:rgba(255,255,255,0.14); color:#fff; border:1.5px solid rgba(255,255,255,0.5);
            border-radius:20px; padding:9px 18px; font-size:13.5px; font-weight:700; cursor:pointer;
            display:flex; align-items:center; gap:7px; transition:all 0.2s ease; white-space:nowrap;
            font-family:inherit;
        }
        .view-curriculum-btn:hover { background:rgba(255,255,255,0.28); border-color:#fff; transform:translateY(-1px); }

        /* ══ CURRICULUM OVERLAY ══ */
        #curriculum-overlay {
            position:fixed; top:0; left:0; width:100%; height:100%; background:#202124;
            z-index:10000; display:none; flex-direction:column;
        }
        #curriculum-overlay.active { display:flex; }
        .curriculum-header {
            background:#45825D; height:64px; min-height:64px; padding:0 24px; display:flex;
            align-items:center; box-shadow:0 2px 10px rgba(0,0,0,0.2); position:relative;
        }
        .curriculum-header .logo-wrap { display:flex; align-items:center; gap:10px; }
        .curriculum-title { position:absolute; left:50%; transform:translateX(-50%); font-size:20px; font-weight:700; color:white; }
        .curriculum-header-right { margin-left:auto; display:flex; align-items:center; gap:10px; z-index:1; }
        .curriculum-close-btn {
            background:transparent; color:#fff; border:1.5px solid rgba(255,255,255,0.5); border-radius:20px;
            padding:9px 16px; font-size:13.5px; font-weight:700; cursor:pointer; transition:all 0.2s ease;
            font-family:inherit;
        }
        .curriculum-close-btn:hover { background:rgba(255,255,255,0.15); border-color:#fff; }
        .curriculum-download-btn {
            background:#fff; color:#2e7d4f; border:none; border-radius:20px; padding:9px 18px;
            font-size:13.5px; font-weight:700; cursor:pointer; display:flex; align-items:center; gap:7px;
            transition:all 0.2s ease; font-family:inherit;
        }
        .curriculum-download-btn:hover { background:#eafaf0; transform:translateY(-1px); }
        .curriculum-body { flex:1; background:#525659; }
        .curriculum-body iframe { width:100%; height:100%; border:none; display:block; }

        /* ══ MAIN ══ */
        .main-container { display:flex; height:calc(100vh - 64px); }

        /* ══ LEFT PANEL ══ */
        .left-panel { width:270px; background:rgba(255,255,255,0.97); padding:18px 16px; box-shadow:2px 0 10px rgba(0,0,0,0.08); display:flex; flex-direction:column; overflow:hidden; }
        .panel-title { font-size:16px; font-weight:700; color:#222; margin-bottom:14px; padding-bottom:10px; border-bottom:2.5px solid #45825D; }
        .module-button { width:100%; background:white; border:2px solid #e0e0e0; border-radius:10px; padding:13px 14px; margin-bottom:9px; cursor:pointer; transition:all 0.25s ease; text-align:left; display:flex; align-items:center; }
        .module-button:hover { transform:translateX(4px); border-color:#45825D; box-shadow:0 3px 10px rgba(69,130,93,0.2); }
        .module-button.active { background:linear-gradient(135deg,#45825D 0%,#66C18E 100%); border-color:#45825D; color:white; }
        .module-icon { font-size:22px; margin-right:11px; }
        .module-name { font-weight:700; font-size:13px; margin-bottom:2px; }
        .module-desc { font-size:11px; opacity:0.75; }

        /* ══ CENTER PANEL ══ */
        .center-panel { flex:1; background:#e8e8e8; position:relative; overflow:hidden; display:flex; flex-direction:column; }
        #main-canvas { background:transparent; display:block; }
        .canvas-topbar { position:absolute; top:14px; left:14px; display:flex; align-items:center; gap:10px; z-index:20; }
        .btn-stop { background:#e74c3c; color:white; border:none; border-radius:6px; padding:7px 18px; font-size:13px; font-weight:600; cursor:pointer; transition:opacity 0.2s; }
        .btn-stop:hover { opacity:0.85; }
        .btn-reset { background:#e67e22; color:white; border:none; border-radius:6px; padding:7px 18px; font-size:13px; font-weight:600; cursor:pointer; transition:opacity 0.2s; }
        .btn-reset:hover { opacity:0.85; }
        .info-banner { background:white; border:2px solid #45825D; border-radius:8px; padding:6px 18px; font-size:14px; font-weight:600; color:#45825D; max-width:500px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

        /* Stats & legend */
        .stats-box { position:absolute; left:14px; bottom:14px; background:rgba(255,255,255,0.95); border:2px solid #45825D; border-radius:10px; padding:10px 16px; font-size:12px; z-index:20; min-width:190px; }
        .stats-title { font-weight:700; font-size:13px; color:#45825D; margin-bottom:6px; }
        .stats-row { margin:3px 0; color:#444; }
        .stats-val { font-weight:600; color:#333; }
        .legend-box { position:absolute; right:14px; bottom:14px; background:rgba(255,255,255,0.95); border:1.5px solid #ccc; border-radius:10px; padding:10px 14px; font-size:12px; z-index:20; min-width:160px; }
        .legend-title { font-weight:700; font-size:13px; margin-bottom:6px; color:#333; }
        .legend-item { display:flex; align-items:center; gap:8px; margin:4px 0; }
        .legend-dot { width:14px; height:14px; border-radius:50%; flex-shrink:0; border:1.5px solid rgba(0,0,0,0.15); }

        /* ══ RIGHT PANEL ══ */
        .right-panel { width:290px; background:rgba(255,255,255,0.97); padding:8px 12px; box-shadow:-2px 0 10px rgba(0,0,0,0.08); overflow:hidden; display:flex; flex-direction:column; }
        .rp-section { margin-bottom:3px; }
        .rp-label { font-weight:700; font-size:10px; color:#333; margin-bottom:3px; display:block; text-transform:uppercase; letter-spacing:0.04em; }
        .rp-divider { height:1px; background:#eee; margin:1px 0 4px; }

        /* Specimen cards — visual grid */
        .specimen-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
        .spec-card {
            background:#f8f8f8; border:2px solid #ddd; border-radius:9px;
            padding:4px 4px; cursor:pointer; transition:all 0.2s; text-align:center;
        }
        .spec-card:hover { border-color:#45825D; background:#edf7f0; }
        .spec-card.active { border-color:#45825D; background:linear-gradient(135deg,#edf7f0,#d4f0e2); }
        .spec-card-img { font-size:16px; display:block; margin-bottom:1px; }
        .spec-card-name { font-size:10px; font-weight:700; color:#333; display:block; line-height:1.2; }
        .spec-card-sub { font-size:9px; color:#777; display:block; margin-top:0px; }
        .spec-card.active .spec-card-name { color:#45825D; }

        /* Lens buttons */
        .lens-row { display:flex; gap:5px; }
        .lens-btn {
            flex:1; background:#f0f0f0; border:1.5px solid #ccc; border-radius:8px;
            padding:5px 4px; font-size:12px; font-weight:700; cursor:pointer;
            transition:all 0.2s; text-align:center; color:#444;
        }
        .lens-btn:hover { border-color:#45825D; background:#edf7f0; }
        .lens-btn.active { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:white; }

        /* EYEPIECE visual */
        .eyepiece-visual {
            display:flex; align-items:center; gap:9px;
            background:#f8f8f8; border:1.5px solid #ddd; border-radius:10px;
            padding:6px 9px;
        }
        .eyepiece-lens-icon { flex-shrink:0; }
        .eyepiece-lens-icon canvas { display:block; }
        .eyepiece-info { flex:1; }
        .eyepiece-mag-display {
            font-size:17px; font-weight:800; color:#45825D;
            line-height:1; margin-bottom:2px;
        }
        .eyepiece-label { font-size:10px; color:#777; margin-bottom:5px; }
        .rp-slider {
            -webkit-appearance:none; width:100%; height:5px;
            background:#ddd; border-radius:4px; outline:none; cursor:pointer;
            accent-color:#45825D;
        }
        .rp-slider::-webkit-slider-thumb { -webkit-appearance:none; width:16px; height:16px; border-radius:50%; background:#45825D; cursor:pointer; box-shadow:0 1px 4px rgba(0,0,0,0.25); }
        .slider-hint { display:flex; justify-content:space-between; font-size:10px; color:#999; margin-top:2px; }

        /* FOCUS knob visual */
        .focus-visual {
            display:flex; align-items:center; gap:9px;
            background:#f8f8f8; border:1.5px solid #ddd; border-radius:10px;
            padding:6px 9px;
        }
        .focus-knob-wrap { flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap:2px; }
        .focus-knob-label { font-size:9px; color:#777; }
        .focus-info { flex:1; }
        .focus-state-display {
            font-size:13px; font-weight:700; color:#45825D;
            margin-bottom:4px;
        }

        /* LIGHT visual */
        .light-visual {
            display:flex; align-items:center; gap:9px;
            background:#f8f8f8; border:1.5px solid #ddd; border-radius:10px;
            padding:6px 9px; margin-bottom:3px;
        }
        .light-bulb-wrap { flex-shrink:0; display:flex; flex-direction:column; align-items:center; gap:2px; }
        .light-intensity-label { font-size:9px; color:#777; }
        .light-info { flex:1; }
        .light-level-display { font-size:13px; font-weight:700; color:#e67e22; margin-bottom:4px; }

        /* STAIN bottles grid */
        .stain-grid { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
        .stain-card {
            background:#f8f8f8; border:2px solid #ddd; border-radius:10px;
            padding:5px 4px 4px; cursor:pointer; transition:all 0.2s; text-align:center;
            display:flex; flex-direction:column; align-items:center; gap:2px;
        }
        .stain-card:hover { border-color:#45825D; transform:translateY(-1px); box-shadow:0 3px 8px rgba(0,0,0,0.12); }
        .stain-card.active { border-color:#45825D; background:#edf7f0; box-shadow:0 0 0 2px #45825D44; }
        .stain-bottle-svg { display:block; }
        .stain-name { font-size:10px; font-weight:700; color:#333; display:block; line-height:1.2; text-align:center; }
        .stain-color-tag {
            display:inline-block; width:28px; height:5px; border-radius:3px;
            margin:1px auto 0; border:1px solid rgba(0,0,0,0.1);
        }

        /* Toggle graticule */
        .btn-action { width:100%; background:#f0f0f0; border:1.5px solid #ccc; border-radius:8px; padding:6px 12px; font-size:12px; font-weight:600; cursor:pointer; transition:all 0.2s; color:#333; margin-top:2px; }
        .btn-action:hover { background:#e4e4e4; }
        .btn-action.active-toggle { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:white; }
        .active-note { font-size:10px; color:#45825D; font-weight:600; margin-top:3px; display:none; }
        .active-note.visible { display:block; }

        /* LM vs EM right panel */
        .seg-group { display:flex; flex-wrap:wrap; gap:5px; }
        .seg-btn { flex:1 1 auto; background:#f0f0f0; border:1.5px solid #ccc; border-radius:7px; padding:7px 10px; font-size:12px; font-weight:600; cursor:pointer; transition:all 0.2s; text-align:center; min-width:60px; color:#444; }
        .seg-btn:hover { border-color:#45825D; background:#edf7f0; }
        .seg-btn.active { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:white; }

        /* ══ QUIZ OVERLAY ══ */
        #quiz-overlay { display:none; position:absolute; inset:0; background:#f5f5f5; padding:16px 24px; overflow:hidden; z-index:15; }
        .quiz-header-row { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
        .quiz-heading { font-size:16px; font-weight:700; color:#222; }
        .quiz-score-box { background:#edf7f0; border:2px solid #45825D; border-radius:8px; padding:4px 12px; font-weight:700; color:#45825D; font-size:13px; }
        .question-card { background:white; border:1.5px solid #ddd; border-radius:12px; padding:14px 16px; margin-bottom:10px; }
        .question-text { font-size:13px; font-weight:600; margin-bottom:10px; }
        .options-list { display:flex; flex-direction:column; gap:6px; }
        .option-btn { background:#f8f8f8; border:1.5px solid #ddd; border-radius:8px; padding:7px 12px; font-size:12px; text-align:left; cursor:pointer; transition:all 0.2s; color:#333; }
        .option-btn:hover:not(:disabled) { border-color:#45825D; background:#edf7f0; }
        .option-btn.correct { background:#edf7f0; border-color:#45825D; color:#2e7d4f; font-weight:600; }
        .option-btn.wrong { background:#fdecea; border-color:#e74c3c; color:#c0392b; }
        .feedback-box { margin-top:10px; padding:10px 14px; border-radius:8px; font-size:12px; line-height:1.5; }
        .feedback-box.correct { background:#edf7f0; border-left:4px solid #45825D; color:#2e7d4f; }
        .feedback-box.wrong { background:#fdecea; border-left:4px solid #e74c3c; color:#922b21; }
        .quiz-nav-row { display:flex; align-items:center; justify-content:space-between; margin-top:10px; }
        .quiz-nav-btn { background:#f0f0f0; border:1.5px solid #ccc; border-radius:8px; padding:9px 20px; font-size:13px; font-weight:600; cursor:pointer; transition:all 0.2s; }
        .quiz-nav-btn:hover:not(:disabled) { border-color:#45825D; color:#45825D; }
        .quiz-nav-btn:disabled { opacity:0.35; cursor:default; }
        .quiz-prog { font-size:12px; color:#777; }
        .quiz-restart-btn { display:block; margin:16px auto 0; background:linear-gradient(135deg,#45825D,#66C18E); border:none; border-radius:20px; color:white; font-size:14px; font-weight:700; padding:11px 30px; cursor:pointer; }
        .hidden { display:none !important; }

        /* ══ CALC OVERLAY ══ */
        #calc-overlay { display:none; position:absolute; inset:0; background:#f5f5f5; padding:14px 20px; overflow:hidden; z-index:15; }
        .calc-layout { display:flex; gap:20px; height:100%; }
        .calc-left { flex:1; display:flex; flex-direction:column; gap:12px; }
        .calc-right { width:300px; flex-shrink:0; display:flex; flex-direction:column; gap:12px; }
        .calc-tab-row { display:flex; gap:6px; margin-bottom:4px; }
        .calc-tab { flex:1; padding:9px; text-align:center; background:#e0e0e0; border:none; cursor:pointer; font-weight:700; font-size:12px; transition:all 0.2s; border-radius:7px; }
        .calc-tab.active { background:linear-gradient(135deg,#45825D,#66C18E); color:white; }
        .calc-panel { display:none; }
        .calc-panel.active { display:block; }
        .calc-card { background:white; border:1.5px solid #ddd; border-radius:12px; padding:18px 20px; }
        .calc-card-title { font-size:14px; font-weight:700; margin-bottom:8px; color:#222; }
        .calc-desc { font-size:12px; color:#555; margin-bottom:10px; line-height:1.5; }
        .calc-hint { font-size:11px; color:#b7810a; background:#fff8e6; border-radius:6px; padding:6px 10px; margin-bottom:10px; }
        .calc-input-row { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
        .calc-input-row label { font-size:12px; color:#555; min-width:110px; }
        .calc-input { flex:1; padding:7px 10px; border:1.5px solid #ccc; border-radius:6px; font-size:13px; outline:none; transition:border-color 0.2s; }
        .calc-input:focus { border-color:#45825D; }
        .calc-btn-row { display:flex; gap:8px; margin-top:10px; }
        .calc-go-btn { flex:1; background:linear-gradient(135deg,#45825D,#66C18E); border:none; border-radius:8px; color:white; font-size:13px; font-weight:700; padding:9px; cursor:pointer; }
        .calc-new-btn { flex:1; background:#f0f0f0; border:1.5px solid #ccc; border-radius:8px; font-size:12px; font-weight:600; cursor:pointer; padding:9px; }
        .calc-new-btn:hover { border-color:#45825D; }
        .calc-result { margin-top:10px; padding:10px 14px; border-radius:8px; font-size:12px; line-height:1.7; white-space:pre-line; }
        .calc-result.correct { background:#edf7f0; border-left:4px solid #45825D; color:#2e7d4f; }
        .calc-result.wrong { background:#fdecea; border-left:4px solid #e74c3c; color:#922b21; }
        .calc-result.info { background:#e3f2fd; border-left:4px solid #2196f3; color:#1565c0; }
        .diagram-canvas { background:white; border:1.5px solid #ddd; border-radius:12px; display:block; width:100%; }
        .formula-ref-box { background:white; border:1.5px solid #ddd; border-radius:12px; padding:14px 16px; }
        .formula-ref-title { font-weight:700; font-size:13px; margin-bottom:8px; color:#222; }
        .f-line { background:#edf7f0; border-radius:6px; padding:7px 12px; font-size:13px; font-weight:600; color:#2e7d4f; margin:5px 0; font-family:monospace; }

        /* ══ CALIBRATION MODULE ══ */
        .calib-step-badge { display:inline-block; background:#45825D; color:white; font-size:10px; font-weight:700; padding:3px 9px; border-radius:10px; letter-spacing:0.03em; }
        .calib-obj-row { display:flex; gap:5px; margin:8px 0 2px; }
        .calib-obj-chip { flex:1; text-align:center; padding:6px 2px; border-radius:7px; font-size:11px; font-weight:700; border:1.5px solid #ddd; background:#f4f4f4; color:#888; transition:all 0.2s; }
        .calib-obj-chip.done { background:#edf7f0; border-color:#45825D; color:#2e7d4f; }
        .calib-obj-chip.current { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:#fff; }
        .align-readout { font-size:13px; font-weight:700; text-align:center; margin:8px 0 2px; padding:6px; border-radius:6px; background:#f5f5f5; }
        .calib-table { width:100%; border-collapse:collapse; font-size:11px; margin-top:8px; }
        .calib-table th, .calib-table td { border:1px solid #ddd; padding:6px 5px; text-align:center; }
        .calib-table th { background:#edf7f0; color:#2e7d4f; font-weight:700; }

        /* Scrollbars */
        .left-panel::-webkit-scrollbar,.right-panel::-webkit-scrollbar { width:6px; }
        .left-panel::-webkit-scrollbar-track,.right-panel::-webkit-scrollbar-track { background:#f1f1f1; }
        .left-panel::-webkit-scrollbar-thumb,.right-panel::-webkit-scrollbar-thumb { background:#45825D; border-radius:4px; }

        /* ══ 3D MICROSCOPE MODULE ══ */
        #threed-overlay { display:none; position:absolute; inset:0; }
        #threed-canvas-wrap { position:absolute; inset:0; cursor:grab; }
        #threed-canvas-wrap:active { cursor:grabbing; }
        #threed-canvas-wrap canvas { display:block; width:100%; height:100%; }
        .td-hint-banner {
            position:absolute; top:14px; left:14px; z-index:25;
            background:rgba(255,255,255,0.95); border-radius:10px; padding:9px 16px;
            font-size:12.5px; color:#45825D; font-weight:700; box-shadow:0 2px 8px rgba(0,0,0,0.12);
            display:flex; align-items:center; gap:8px;
        }
        .td-reset-btn {
            position:absolute; top:14px; right:14px; z-index:25;
            background:white; border:1.5px solid #ddd; border-radius:8px; padding:8px 14px;
            font-size:12px; font-weight:700; color:#45825D; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,0.1);
        }
        .td-reset-btn:hover { border-color:#45825D; background:#edf7f0; }
        .td-crosssection-btn {
            position:absolute; top:58px; right:14px; z-index:25;
            background:white; border:1.5px solid #ddd; border-radius:8px; padding:8px 14px;
            font-size:12px; font-weight:700; color:#45825D; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,0.1);
        }
        .td-crosssection-btn:hover { border-color:#45825D; background:#edf7f0; }
        .td-crosssection-btn.active { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:#fff; }

        /* ══ PRINCIPLES CROSS-SECTION MODULE ══ */
        #principles-crosssection { display:none; position:absolute; inset:0; background:#fafbfa; }
        .cs-toolbar { position:absolute; top:14px; left:14px; right:14px; z-index:25; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
        .cs-btn {
            background:white; border:1.5px solid #ddd; border-radius:8px; padding:9px 16px;
            font-size:13px; font-weight:700; color:#45825D; cursor:pointer; box-shadow:0 2px 8px rgba(0,0,0,0.1);
            display:flex; align-items:center; gap:6px; transition:all 0.15s;
        }
        .cs-btn:hover { border-color:#45825D; background:#edf7f0; }
        .cs-btn.primary { background:linear-gradient(135deg,#45825D,#66C18E); border-color:#45825D; color:white; }
        .cs-step-pill {
            margin-left:auto; background:rgba(255,255,255,0.95); border-radius:20px; padding:9px 18px;
            font-size:12.5px; font-weight:700; color:#45825D; box-shadow:0 2px 8px rgba(0,0,0,0.1);
        }
        .cs-svg-wrap { position:absolute; inset:64px 16px 16px 16px; display:flex; align-items:center; justify-content:center; }
        .cs-svg-wrap svg { max-width:100%; max-height:100%; }
        .cs-label { font-size:16px; fill:#333; font-weight:700; font-family:Arial,Helvetica,sans-serif; }
        .cs-ray { stroke-linecap:round; opacity:0; transition:opacity 0.45s ease; }
        .cs-glow { transition:opacity 0.45s ease; }
        .cs-body-shadow { filter:drop-shadow(0 6px 10px rgba(0,0,0,0.22)); }
        .cs-beam-pulse { opacity:0; }
        .cs-beam-pulse.active { opacity:1; animation:csPulseMove 1.7s linear infinite; }
        @keyframes csPulseMove { 0%{ offset-distance:0%; opacity:0; } 8%{ opacity:1; } 92%{ opacity:1; } 100%{ offset-distance:100%; opacity:0; } }

        /* Step progress dots */
        .cs-progress { position:absolute; bottom:14px; left:50%; transform:translateX(-50%); z-index:25;
            display:flex; align-items:center; gap:8px; background:rgba(255,255,255,0.95); border-radius:20px;
            padding:8px 16px; box-shadow:0 2px 8px rgba(0,0,0,0.1); }
        .cs-progress-dot { width:9px; height:9px; border-radius:50%; background:#ddd; transition:all 0.25s ease; }
        .cs-progress-dot.done { background:#66C18E; }
        .cs-progress-dot.current { background:#45825D; transform:scale(1.35); box-shadow:0 0 0 3px rgba(69,130,93,0.25); }

        /* ══ HOVER TOOLTIP FOR CROSS-SECTION PARTS ══ */
        .cs-hoverable { cursor:help; transition:filter 0.15s ease; }
        .cs-hoverable:hover { filter:brightness(1.22) saturate(1.15); }
        .cs-hitbox { fill:transparent; stroke:none; cursor:help; }
        #csTooltip {
            position:fixed; z-index:60; max-width:290px; background:#1f2b24; color:#fff;
            border-radius:10px; padding:12px 14px; font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
            box-shadow:0 8px 24px rgba(0,0,0,0.35); pointer-events:none; opacity:0; transform:translateY(4px);
            transition:opacity 0.15s ease, transform 0.15s ease; border:1.5px solid #66C18E;
        }
        #csTooltip.show { opacity:1; transform:translateY(0); }
        #csTooltip .cs-tt-title {
            font-size:13.5px; font-weight:700; color:#8ee6b6; margin-bottom:4px;
            display:flex; align-items:center; gap:6px; text-transform:uppercase; letter-spacing:0.03em;
        }
        #csTooltip .cs-tt-badge {
            background:#45825D; color:#fff; font-size:9.5px; font-weight:700; border-radius:5px;
            padding:1px 6px; letter-spacing:0.03em;
        }
        #csTooltip .cs-tt-desc { font-size:12.5px; line-height:1.45; color:#e8f3ec; font-weight:400; }
        #csTooltip::after {
            content:''; position:absolute; left:18px; bottom:-7px; width:14px; height:14px;
            background:#1f2b24; border:1.5px solid #66C18E; border-top:none; border-right:none;
            transform:rotate(-45deg); border-radius:0 0 0 3px;
        }
        @keyframes csLampPulse { 0%{opacity:.35} 50%{opacity:.85} 100%{opacity:.35} }
        .cs-lamp-glow-on { animation:csLampPulse 1.1s infinite; }
        .td-label-tag {
            position:absolute; z-index:30; pointer-events:none;
            background:#2c2c2c; color:white; font-size:11.5px; font-weight:600;
            padding:5px 10px; border-radius:6px; white-space:nowrap;
            transform:translate(-50%,-130%); opacity:0; transition:opacity 0.15s;
            box-shadow:0 3px 10px rgba(0,0,0,0.3);
        }
        .td-label-tag.visible { opacity:1; }
        .td-label-tag::after {
            content:''; position:absolute; top:100%; left:50%; transform:translateX(-50%);
            border:5px solid transparent; border-top-color:#2c2c2c;
        }
        .td-info-panel {
            position:absolute; bottom:14px; left:14px; right:14px; z-index:25;
            background:rgba(255,255,255,0.97); border-radius:12px; padding:12px 18px;
            box-shadow:0 -2px 12px rgba(0,0,0,0.1); display:none;
        }
        .td-info-panel.visible { display:block; }
        .td-info-title { font-size:14px; font-weight:800; color:#45825D; margin-bottom:3px; padding-right:22px; }
        .td-info-desc { font-size:12px; color:#555; line-height:1.5; padding-right:22px; }
        .principles-info-close {
            position:absolute; top:8px; right:10px; width:20px; height:20px; border:none;
            background:transparent; color:#888; font-size:18px; line-height:1; cursor:pointer;
            padding:0;
        }
        .principles-info-close:hover { color:#45825D; }

        /* GLB part labels: fixed-size, screen-space pins that stay upright
           and readable no matter how the model is rotated/zoomed. Their
           screen position is recalculated every frame from the 3D anchor. */
        #glb-leader-svg {
            position:absolute; inset:0; z-index:20; pointer-events:none; width:100%; height:100%;
        }
        #glb-label-layer {
            position:absolute; inset:0; z-index:21; pointer-events:none;
        }
        .glb-pin-label {
            position:absolute; transform:translate(-50%,-50%);
            background:rgba(255,255,255,0.96); border:1.5px solid #45825D; border-radius:7px;
            padding:4px 9px; font-size:11.5px; font-weight:700; color:#2c4a38;
            white-space:nowrap; pointer-events:auto; cursor:pointer;
            box-shadow:0 2px 6px rgba(0,0,0,0.18); transition:background 0.15s, transform 0.15s;
        }
        .glb-pin-label:hover, .glb-pin-label.active { background:#45825D; color:#fff; transform:translate(-50%,-50%) scale(1.06); }
        .glb-pin-dot {
            position:absolute; width:8px; height:8px; border-radius:50%;
            background:#45825D; border:2px solid #fff; box-shadow:0 0 0 2px rgba(69,130,93,0.35);
            transform:translate(-50%,-50%); pointer-events:none;
        }
        .glb-leader-line { stroke:#45825D; stroke-width:1.5; stroke-dasharray:3,3; opacity:0.85; }

        .glb-comment-box {
            position:absolute; top:64px; right:14px; z-index:26; max-width:260px;
            background:rgba(255,255,255,0.97); border-left:4px solid #45825D; border-radius:10px;
            padding:12px 16px; box-shadow:0 4px 14px rgba(0,0,0,0.16); display:none;
        }
        .glb-comment-box.visible { display:block; }
        .glb-comment-title { font-size:13.5px; font-weight:800; color:#45825D; margin-bottom:4px; }
        .glb-comment-desc { font-size:12px; color:#444; line-height:1.5; }

        .rp-td-section { margin-bottom:10px; }
        .td-part-btn {
            width:100%; background:#f8f8f8; border:1.5px solid #ddd; border-radius:8px;
            padding:8px 10px; margin-bottom:6px; cursor:pointer; text-align:left;
            font-size:11.5px; font-weight:600; color:#333; transition:all 0.15s;
            display:flex; align-items:center; gap:8px;
        }
        .td-part-btn:hover { border-color:#45825D; background:#edf7f0; }
        .td-part-btn.active { border-color:#45825D; background:linear-gradient(135deg,#edf7f0,#d4f0e2); color:#2e7d4f; }
        .td-part-dot { width:8px; height:8px; border-radius:50%; background:#45825D; flex-shrink:0; }
    

    #edutec-ai-container {
        position: fixed;
        bottom: 30px;
        right: 30px;
        z-index: 100000;
        font-family: 'Segoe UI', sans-serif;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    #edutec-ai-fab {
        width: 68px;
        height: 68px;
        border-radius: 50%;
        border: 3px solid rgba(255, 255, 255, 0.9);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        transition: all 0.3s ease;
        padding: 0;
        background: #12331f;
        position: relative;
        animation: eaiBreathe 3s ease-in-out infinite;
        flex-shrink: 0;
    }
    #edutec-ai-fab img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display:block; }
    @keyframes eaiBreathe {
        0%,100% { transform: scale(1); box-shadow: 0 8px 32px rgba(69,130,93,0.35); }
        50% { transform: scale(1.05); box-shadow: 0 8px 48px rgba(69,130,93,0.65); }
    }
    #edutec-ai-fab:hover { transform: scale(1.08); animation: none; }
    #edutec-ai-fab.eai-has-tip::before {
        content:''; position:absolute; top:-2px; right:-2px; width:14px; height:14px;
        border-radius:50%; background:#ff5252; border:2px solid #fff; z-index:2;
    }
    #edutec-ai-fab::after {
        content: ''; position: absolute; bottom: 3px; right: 3px; width: 14px; height: 14px;
        border-radius: 50%; background: #5be89a; border: 2px solid white;
        animation: eaiPulse 2s ease-in-out infinite;
    }
    @keyframes eaiPulse {
        0%,100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(91,232,154,0.4); }
        50% { transform: scale(1.1); box-shadow: 0 0 0 7px rgba(91,232,154,0); }
    }
    #edutec-ai-label {
        text-align: center; margin-top: 6px; font-size: 10px; font-weight: 700; color: #2e6347;
        background: rgba(255,255,255,0.92); padding: 2px 10px; border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12); letter-spacing: 0.3px;
    }

    #edutec-ai-panel {
        position: absolute; bottom: 86px; right: 0; width: 360px; max-height: 520px;
        background: #ffffff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
        display: none; flex-direction: column; overflow: hidden; border: 1px solid rgba(69,130,93,0.15);
        animation: eaiSlideUp 0.3s ease;
    }
    #edutec-ai-panel.open { display: flex; }
    @keyframes eaiSlideUp { from{opacity:0; transform:translateY(20px) scale(0.96);} to{opacity:1; transform:translateY(0) scale(1);} }

    #edutec-ai-header {
        background: linear-gradient(135deg,#45825D,#2e6347); color:#fff; padding: 13px 16px;
        display:flex; align-items:center; justify-content:space-between; flex-shrink:0;
    }
    .eai-header-left { display:flex; align-items:center; gap:10px; }
    .eai-header-avatar { width:34px; height:34px; border-radius:50%; overflow:hidden; border:2px solid rgba(255,255,255,0.3); flex-shrink:0; }
    .eai-header-avatar img { width:100%; height:100%; object-fit:cover; }
    .eai-header-info h3 { font-size:14px; font-weight:700; margin:0; }
    .eai-header-info span { font-size:10.5px; opacity:0.85; display:flex; align-items:center; gap:4px; }
    .eai-header-info .dot { width:6px; height:6px; border-radius:50%; background:#5be89a; display:inline-block; }
    #edutec-ai-close-btn { background:none; border:none; color:#fff; font-size:16px; cursor:pointer; opacity:0.85; padding:2px 6px; }
    #edutec-ai-close-btn:hover { opacity:1; }

    #edutec-ai-messages { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:9px; background:#f6f9f7; max-height: 300px; }
    .eai-msg { max-width:85%; padding:9px 12px; border-radius:14px; font-size:12.5px; line-height:1.45; }
    .eai-msg.bot { background:#eef4f0; color:#213b2c; align-self:flex-start; border-bottom-left-radius:4px; }
    .eai-msg.user { background:#45825D; color:#fff; align-self:flex-end; border-bottom-right-radius:4px; }

    #edutec-ai-quick-actions { display:flex; flex-wrap:wrap; gap:6px; padding:8px 12px; background:#fff; border-top:1px solid #eee; }
    .eai-quick-btn {
        background:#eef4f0; border:1px solid #d7e6dc; color:#2e6347; font-size:10.5px; font-weight:600;
        padding:6px 9px; border-radius:20px; cursor:pointer; transition:all .2s ease;
    }
    .eai-quick-btn:hover { background:#45825D; color:#fff; border-color:#45825D; }

    #edutec-ai-input-row { display:flex; gap:8px; padding:10px 12px; background:#fff; border-top:1px solid #eee; }
    #edutec-ai-input {
        flex:1; resize:none; border:1px solid #dfe8e2; border-radius:12px; padding:8px 10px;
        font-size:12.5px; font-family:inherit; outline:none; max-height:60px;
    }
    #edutec-ai-input:focus { border-color:#45825D; }
    #edutec-ai-send-btn {
        background:#45825D; color:#fff; border:none; border-radius:10px; padding:0 14px;
        font-size:12px; font-weight:700; cursor:pointer;
    }
    #edutec-ai-send-btn:hover { background:#2e6347; }
    #edutec-ai-send-btn:disabled { background:#a9c4b4; cursor:not-allowed; }

    #edutec-ai-disclaimer { font-size:9.5px; color:#8a9a91; text-align:center; padding:4px 10px 8px; background:#fff; }

    #edutec-ai-popup {
        position: fixed; bottom: 110px; right: 30px; max-width: 230px; background:#fff;
        border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); padding: 10px 14px 10px 12px;
        z-index: 99999; display:none; animation: eaiSlideUp 0.3s ease;
    }
    #edutec-ai-popup.show { display:block; }
    #edutec-ai-popup .popup-close { position:absolute; top:4px; right:8px; background:none; border:none; color:#aab9b2; font-size:13px; cursor:pointer; }
    #edutec-ai-popup .popup-text { font-size:11.5px; color:#3a4a42; line-height:1.4; }

    @media (max-width:600px){
        #edutec-ai-panel{ width:90vw; bottom:80px; }
        #edutec-ai-fab{ width:56px; height:56px; }
        #edutec-ai-popup{ right:10px; max-width:200px; }
    }
