:root{--page:#f5f7f4;--surface:#fff;--border:#dfe7e3;--ink:#172746;--muted:#697181;--primary:#31599f;--purple:#75a93c;--radius:14px}
*{box-sizing:border-box}body{margin:0;background:var(--page);color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px}.login-card{width:min(920px,100%);display:grid;grid-template-columns:42% 58%;background:#fff;border:1px solid var(--border);border-radius:18px;overflow:hidden;box-shadow:0 18px 60px rgba(20,25,45,.08)}.login-art{background:#171923;color:#fff;padding:42px 36px;display:flex;flex-direction:column;justify-content:space-between;min-height:560px}.brand-mark{width:46px;height:46px;display:grid;place-items:center;background:#fff1d6;color:#b45309;border-radius:12px;font-size:22px}.brand-mark.small{width:32px;height:32px;font-size:15px}.login-art h1{font-size:26px;margin:18px 0 6px}.login-art p,.login-art small{color:#b9bec9}.subject-cloud{display:flex;flex-wrap:wrap;gap:8px}.subject-cloud span{padding:8px 11px;border:1px solid #3b3f4b;border-radius:10px;color:#e6e8ed;font-size:13px}.login-form-wrap{padding:58px 50px;display:flex;flex-direction:column;justify-content:center}.login-form-wrap h2{font-weight:700}.demo-box{background:var(--page);border:1px solid var(--border);border-radius:10px;padding:12px 14px;color:var(--muted);font-size:13px}.topbar{height:62px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 22px;position:sticky;top:0;z-index:100}.top-brand{display:flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;font-weight:700}.user-pill{display:flex;align-items:center;gap:8px;background:var(--page);padding:4px 12px 4px 4px;border-radius:22px;font-size:13px}.user-pill span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#e8f0fe;color:var(--primary);font-weight:700}.app-layout{display:flex;min-height:calc(100vh - 62px)}.sidebar{width:238px;background:#fff;border-right:1px solid var(--border);padding:18px 12px;position:sticky;top:62px;height:calc(100vh - 62px)}.nav-section{font-size:11px;text-transform:uppercase;letter-spacing:.8px;color:#a0a6b2;font-weight:700;padding:14px 10px 6px}.side-link{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:9px;color:#5d6472;text-decoration:none;margin:2px 0;font-size:14px}.side-link:hover,.side-link.active{background:#e8f0fe;color:var(--primary)}.page-content{width:100%;max-width:1240px;padding:28px 32px}.page-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}.page-heading h2{font-size:23px;font-weight:700;margin:0}.page-heading p{color:var(--muted);margin:4px 0 0}.panel{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:20px;margin-bottom:20px}.stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:22px}.stat{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;display:flex;gap:12px;align-items:center}.stat i{width:42px;height:42px;border-radius:11px;display:grid;place-items:center;background:#e8f0fe;color:var(--primary);font-size:19px}.stat b{display:block;font-size:23px}.stat small{color:var(--muted)}.table>:not(caption)>*>*{padding:.8rem .7rem}.badge-soft{background:#e8f0fe;color:var(--primary)}.chapter-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.chapter-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:16px;cursor:pointer;transition:.18s}.chapter-card:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(20,25,45,.08)}.chapter-card small{color:var(--muted)}
.flipbook-overlay{position:fixed;inset:0;background:var(--page);z-index:2000;display:flex;flex-direction:column}.flipbook-header{height:66px;background:#fff;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;align-items:center;padding:0 18px}.flipbook-header small{display:block;color:#8b93a3}.round-action{width:38px;height:38px;border:0;border-radius:10px;color:#fff}.round-action.video{background:#ee4d37}.round-action.exercise{background:var(--primary)}.round-action.ar{background:var(--purple)}.round-action.neutral{background:#eef0f5;color:#4e5665}.round-action:disabled{opacity:.3}.flipbook-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:16px;padding:22px}.canvas-shell{position:relative;max-height:calc(100vh - 120px);box-shadow:0 10px 32px rgba(20,25,45,.14);background:#fff}.canvas-shell canvas{display:block;max-width:78vw;max-height:calc(100vh - 145px)}#hotspotLayer,#editorLayer{position:absolute;inset:0}.page-hotspot,.editor-hotspot{position:absolute;transform:translate(-50%,-50%);border:0;border-radius:22px;color:#fff;font-weight:700;padding:9px 14px;box-shadow:0 5px 16px rgba(20,25,45,.25);white-space:nowrap}.page-hotspot.AR,.editor-hotspot.AR{background:var(--purple)}.page-hotspot.EXERCISE,.editor-hotspot.EXERCISE{background:var(--primary)}.page-hotspot.VIDEO,.editor-hotspot.VIDEO{background:#ee4d37}.editor-hotspot.pending{background:#b45309}#pageStatus{position:absolute;bottom:-25px;width:100%;text-align:center;color:#8b93a3;font-size:12px}.page-arrow{width:38px;height:38px;border-radius:50%;background:#fff;border:1px solid var(--border)}.editor-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,.7fr);gap:20px}#editorCanvasWrap{position:relative;width:max-content;max-width:100%;margin:auto;background:#f4f5f8;cursor:crosshair}#editorCanvas{display:block;max-width:100%;max-height:68vh}.editor-panel{border:1px solid var(--border);border-radius:12px;padding:16px}.editor-list-row{display:flex;justify-content:space-between;gap:8px;align-items:center;border-bottom:1px solid var(--border);padding:8px 0;font-size:12px}.question-builder{border:1px solid var(--border);border-radius:10px;padding:14px;margin-bottom:12px}.content-actions{display:flex;gap:6px;flex-wrap:wrap}
.flipbook-zoom-controls{align-items:center;gap:6px}.flipbook-zoom-controls span{min-width:46px;text-align:center;font-size:12px;font-weight:700;color:#526078}.flipbook-overlay:fullscreen .flipbook-zoom-controls{display:flex!important}.flipbook-overlay:fullscreen .flipbook-stage{overflow:auto;align-items:flex-start;padding:28px}.flipbook-overlay:fullscreen .page-arrow{align-self:center;position:sticky;top:calc(50% - 19px);z-index:3}.flipbook-overlay:fullscreen .canvas-shell{max-height:none;margin:auto}.flipbook-overlay:fullscreen .canvas-shell canvas{max-width:none;max-height:none}
.flipbook-foreground{position:absolute;inset:0;z-index:50;background:rgba(17,24,39,.82);display:flex;align-items:center;justify-content:center;padding:24px}.foreground-dialog{width:min(920px,96vw);max-height:92vh;background:#fff;border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.32);display:flex;flex-direction:column;overflow:hidden}.foreground-dialog>header{display:flex;justify-content:space-between;align-items:center;padding:15px 20px;border-bottom:1px solid var(--border)}.foreground-dialog>header small{display:block;color:var(--muted);margin-top:2px}.foreground-body{padding:20px;overflow:auto;min-height:180px}.foreground-dialog>footer{padding:13px 20px;border-top:1px solid var(--border);display:flex;justify-content:flex-end;gap:8px}.media-stage{background:#090b10;border-radius:12px;overflow:hidden;display:grid;place-items:center;min-height:420px}.media-stage video,.media-stage iframe{width:100%;height:min(64vh,560px);border:0}.media-stage model-viewer{width:100%;height:min(68vh,600px);background:linear-gradient(135deg,#eaf3ff,#e5faf4)}.ar-placeholder{text-align:center;padding:55px 20px;color:#fff}.foreground-question{padding:0 0 16px;margin-bottom:16px;border-bottom:1px solid var(--border)}.foreground-question label{display:flex;gap:9px;padding:7px 5px;cursor:pointer}.editor-list-actions{display:flex;gap:5px}.edit-mode-note{background:#fff4dd;color:#9a5b00;border-radius:8px;padding:8px 10px;font-size:12px;margin-bottom:12px}
@media(max-width:900px){.login-card{grid-template-columns:1fr}.login-art{display:none}.sidebar{width:76px}.sidebar .link-text,.nav-section{display:none}.side-link{justify-content:center;font-size:18px}.page-content{padding:22px 16px}.stat-grid{grid-template-columns:1fr 1fr}.chapter-grid{grid-template-columns:1fr 1fr}.editor-layout{grid-template-columns:1fr}}
@media(max-width:560px){.login-form-wrap{padding:36px 24px}.stat-grid,.chapter-grid{grid-template-columns:1fr}.topbar .badge,.user-pill b{display:none}.page-heading{align-items:flex-start;gap:12px}.flipbook-stage{padding:10px;gap:4px}.page-arrow{width:32px;height:32px}.page-hotspot{font-size:11px;padding:7px 10px}}
.page-hotspot.size-small,.editor-hotspot.size-small{font-size:11px;padding:6px 10px;border-radius:16px}.page-hotspot.size-medium,.editor-hotspot.size-medium{font-size:13px;padding:9px 14px}.page-hotspot.size-large,.editor-hotspot.size-large{font-size:16px;padding:13px 20px;border-radius:28px}
.curriculum-filters{display:flex;gap:12px;align-items:end;margin-bottom:16px;padding:14px;border:1px solid #e4e9f0;border-radius:10px;background:#f8fafc}.curriculum-filters>div{width:min(260px,100%)}.curriculum-filters .form-label{font-size:.85rem;color:#65758b;margin-bottom:5px}.searchable-picker{position:relative}.searchable-picker-menu{display:none;position:absolute;z-index:1080;top:calc(100% + 4px);left:0;right:0;max-height:210px;overflow-y:auto;border-radius:8px;box-shadow:0 10px 24px rgba(15,23,42,.14)}.searchable-picker-menu.show{display:block}.searchable-picker-menu .list-group-item{font-size:.95rem}.searchable-picker-menu .list-group-item-action:active{background:#0d6efd;color:#fff}@media(max-width:575.98px){.curriculum-filters{align-items:stretch;flex-direction:column}.curriculum-filters>div{width:100%}}
.dashboard-stats .stat{box-shadow:0 2px 8px rgba(15,23,42,.03)}.learning-library-callout{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#172554,#1e3a8a);color:#fff;border-radius:16px;padding:18px 20px;margin-bottom:20px}.callout-icon{width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.13);display:grid;place-items:center;font-size:20px}.learning-library-callout h4{font-size:16px;margin:0 0 3px}.learning-library-callout p{font-size:13px;color:#dbeafe;margin:0}.learning-library-callout .btn{background:#fff;color:#1e3a8a;border-color:#fff;font-weight:700}.learning-library-callout button:focus-visible{outline:3px solid #f59e0b;outline-offset:2px}@media(max-width:760px){.learning-library-callout{align-items:flex-start;flex-wrap:wrap}.learning-library-callout .btn{width:100%;margin-left:0!important}}@media(max-width:700px){.flipbook-header .d-flex{gap:4px!important}.round-action{width:34px;height:34px}}
.uploaded-exercise-frame{display:block;width:100%;height:min(72vh,680px);min-height:480px;border:0;border-radius:10px;background:#fff;pointer-events:auto;touch-action:manipulation}
.flipbook-foreground.exercise-active .foreground-dialog{width:min(1180px,98vw);height:min(94vh,1040px);max-height:94vh}.flipbook-foreground.exercise-active .foreground-body.exercise-body{display:flex;flex:1;min-height:0;padding:0;overflow:hidden}.flipbook-foreground.exercise-active .uploaded-exercise-frame{height:100%;min-height:0;border-radius:0}
.flipbook-foreground.exercise-active .foreground-dialog>header{position:relative;z-index:2;flex:0 0 auto}.flipbook-foreground.exercise-active #closeForeground{position:fixed;top:16px;right:16px;z-index:2202;width:42px;height:42px;border:1px solid #cbd5e1;border-radius:50%;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.2);opacity:1}
.exercise-floating-close{position:fixed;top:18px;right:18px;z-index:2305;display:grid;place-items:center;width:44px;height:44px;border:1px solid #cbd5e1;border-radius:50%;background:#fff;color:#334155;box-shadow:0 10px 28px rgba(15,23,42,.28);font-size:18px;cursor:pointer}.exercise-floating-close:hover{background:#fef2f2;color:#dc2626;border-color:#fecaca}
.exercise-save-notice{display:flex;align-items:center;justify-content:center;gap:9px;margin:0;padding:13px 18px;border-top:1px solid #bbf7d0;background:#ecfdf5;color:#047857;font-size:14px;font-weight:700}.exercise-save-notice .bi{font-size:18px}.exercise-save-notice.is-error{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.toast-container{z-index:2205}
.flipbook-foreground{position:fixed;z-index:2100}
.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded{padding:0}.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .foreground-dialog{width:100vw;height:100vh;max-height:100vh;border-radius:0}.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .foreground-body{display:flex;flex:1;min-height:0;padding:0;overflow:hidden}.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .media-stage{width:100%;height:100%;min-height:0;border-radius:0}.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .media-stage video,.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .media-stage iframe,.flipbook-overlay:fullscreen .flipbook-foreground.is-media-expanded .media-stage model-viewer{width:100%;height:100%;max-height:none;object-fit:contain}
.ar-loading-message{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:100%;color:#475569;font-weight:700}.ar-loading-message .bi{color:#dc2626;font-size:20px}.ar-view-button{position:absolute;right:16px;bottom:16px}

.global-content-loader{position:fixed;inset:0;z-index:5000;display:grid;place-items:center;background:rgba(15,23,42,.55);backdrop-filter:blur(7px)}.content-loader{min-width:min(330px,88vw);border:1px solid rgba(147,197,253,.55);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(239,246,255,.96));box-shadow:0 24px 70px rgba(15,23,42,.28);padding:28px;text-align:center;color:#0f172a}.content-loader-orbit{width:54px;height:54px;margin:0 auto 16px;border-radius:50%;background:conic-gradient(from 120deg,#0d6efd,#7c3aed,#06b6d4,#0d6efd);display:grid;place-items:center;animation:loaderSpin 1s linear infinite}.content-loader-orbit span{width:38px;height:38px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 7px #eff6ff}.content-loader strong{display:block;font-size:16px;line-height:1.2}.content-loader p{margin:7px 0 0;color:#64748b;font-size:13px}.media-stage{position:relative}.media-load-cover,.flipbook-page-loader{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:linear-gradient(135deg,rgba(239,246,255,.9),rgba(255,255,255,.76));backdrop-filter:blur(4px)}.media-load-cover .content-loader,.flipbook-page-loader .content-loader{min-width:min(300px,80%);padding:22px;box-shadow:0 14px 36px rgba(15,23,42,.16)}@keyframes loaderSpin{to{transform:rotate(360deg)}}
.round-action{display:grid;place-items:center;padding:4px}.round-action.video{background:#fff0ed}.round-action.exercise{background:#ecf8ff}.round-action.ar{background:#edfaf5}.round-action img{display:block;max-width:100%;max-height:100%;object-fit:contain}.round-action.video img{width:28px;height:22px}.round-action.exercise img{width:28px;height:31px}.round-action.ar img{width:29px;height:29px}.page-hotspot img{width:22px;height:22px;object-fit:contain;vertical-align:middle;margin:-4px 2px -4px -7px}
.page-hotspot.icon-hotspot{display:grid;place-items:center;width:44px;height:44px;min-width:0;padding:5px;border:1px solid #d7e3ee;border-radius:50%;background:#fff;box-shadow:0 5px 15px rgba(15,23,42,.24)}.page-hotspot.icon-hotspot:hover{transform:translate(-50%,-50%) scale(1.08)}.page-hotspot.icon-hotspot img{width:30px;height:30px;margin:0;object-fit:contain}.page-hotspot.icon-hotspot.VIDEO{background:#fff7f5;border-color:#fecaca}.page-hotspot.icon-hotspot.AR{background:#f0fdf7;border-color:#a7f3d0}.page-hotspot.icon-hotspot.EXERCISE{background:#f0f9ff;border-color:#bae6fd}.page-hotspot.icon-hotspot.size-small{width:32px;height:32px;padding:3px}.page-hotspot.icon-hotspot.size-small img{width:22px;height:22px}.page-hotspot.icon-hotspot.size-medium{width:44px;height:44px;padding:5px}.page-hotspot.icon-hotspot.size-medium img{width:30px;height:30px}.page-hotspot.icon-hotspot.size-large{width:58px;height:58px;padding:7px}.page-hotspot.icon-hotspot.size-large img{width:42px;height:42px}
.editor-hotspot.icon-hotspot{display:grid;place-items:center;width:44px;height:44px;min-width:0;padding:5px;border:2px dashed #0d6efd;border-radius:50%;background:#fff;box-shadow:0 5px 15px rgba(15,23,42,.24)}.editor-hotspot.icon-hotspot img{width:30px;height:30px;margin:0;object-fit:contain}.editor-hotspot.icon-hotspot.VIDEO{background:#fff7f5;border-color:#fb6a58}.editor-hotspot.icon-hotspot.AR{background:#f0fdf7;border-color:#39a869}.editor-hotspot.icon-hotspot.EXERCISE{background:#f0f9ff;border-color:#2586d8}.editor-hotspot.icon-hotspot.pending{outline:3px solid rgba(245,158,11,.4);border-color:#d97706}.editor-hotspot.icon-hotspot.size-small{width:32px;height:32px;padding:3px}.editor-hotspot.icon-hotspot.size-small img{width:22px;height:22px}.editor-hotspot.icon-hotspot.size-medium{width:44px;height:44px;padding:5px}.editor-hotspot.icon-hotspot.size-medium img{width:30px;height:30px}.editor-hotspot.icon-hotspot.size-large{width:58px;height:58px;padding:7px}.editor-hotspot.icon-hotspot.size-large img{width:42px;height:42px}
.media-stage model-viewer{background:radial-gradient(circle at 50% 40%,#f8fbfc,#dcecf3 70%)}
.app-confirm-modal .modal-content{border:0;border-radius:22px;box-shadow:0 26px 80px rgba(15,23,42,.28);overflow:hidden}.app-confirm-modal .modal-header{border-bottom:1px solid #e5e7eb;padding:20px 22px}.confirm-heading{display:flex;align-items:center;gap:14px}.confirm-heading h5{font-weight:800;margin:0}.confirm-heading small{display:block;color:#64748b;margin-top:3px}.confirm-icon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#fee2e2;color:#dc2626;font-size:20px}.confirm-icon.primary{background:#dbeafe;color:#0d6efd}.confirm-icon.danger{background:#fee2e2;color:#dc2626}.app-confirm-modal .modal-body{padding:22px}.app-confirm-modal .modal-body p{margin:0 0 10px;color:#334155;font-size:15px}.confirm-points{display:grid;gap:8px;margin:0;padding:0;list-style:none}.confirm-points li{position:relative;padding-left:18px;color:#475569;font-size:14px;line-height:1.35}.confirm-points li::before{content:"";position:absolute;left:0;top:.48em;width:7px;height:7px;border-radius:50%;background:#ef4444}.confirm-extra-top{width:100%;margin-bottom:16px;min-height:44px}.app-confirm-modal .modal-footer{border-top:1px solid #e5e7eb;padding:16px 22px}.app-confirm-modal .btn{border-radius:11px;font-weight:800;padding:9px 16px}

.video-player-controls{position:absolute;z-index:8;right:16px;bottom:16px;left:16px;display:flex;align-items:center;gap:8px;padding:9px 11px;border:1px solid rgba(255,255,255,.24);border-radius:15px;background:linear-gradient(90deg,rgba(5,10,24,.92),rgba(15,23,42,.76));box-shadow:0 10px 26px rgba(0,0,0,.28);color:#fff;backdrop-filter:blur(12px);opacity:0;visibility:hidden;pointer-events:none;transform:translateY(10px);transition:opacity .2s ease,transform .2s ease,visibility .2s}.video-player-controls.is-ready{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}.video-control-button{display:inline-flex;align-items:center;justify-content:center;gap:3px;flex:0 0 auto;width:36px;height:36px;padding:0;border:1px solid transparent;border-radius:10px;background:transparent;color:#fff;font-size:16px;transition:background .16s ease,transform .16s ease}.video-control-button:hover,.video-control-button:focus-visible{background:rgba(255,255,255,.18);transform:translateY(-1px);outline:2px solid #93c5fd;outline-offset:2px}.video-control-button.primary{background:#0d6efd}.video-control-button.primary:hover,.video-control-button.primary:focus-visible{background:#2563eb}.video-control-button.video-skip-button{width:auto;min-width:44px;padding:0 8px;font-size:11px;font-weight:800}.video-control-button.video-skip-button span{line-height:1}.video-seek-wrap{display:flex;align-items:center;flex:1;min-width:70px}.video-seek-input{width:100%;height:5px;cursor:pointer;accent-color:#3b82f6}.video-time-label{flex:0 0 auto;min-width:84px;color:#e2e8f0;font-size:11px;font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap}.video-stage:fullscreen,.video-stage:fullscreen video{width:100vw;height:100vh;border-radius:0}.video-stage:fullscreen .video-player-controls{right:24px;bottom:24px;left:24px}@media(max-width:560px){.video-player-controls{right:8px;bottom:8px;left:8px;gap:5px;padding:6px 7px;border-radius:12px}.video-control-button{width:32px;height:32px;font-size:14px}.video-control-button.video-skip-button{min-width:38px;padding:0 5px;font-size:10px}.video-time-label{display:none}}
.flipbook-overlay:fullscreen:not(.is-zoomed) .canvas-shell canvas{max-width:92vw;max-height:calc(100vh - 140px)}.flipbook-overlay:fullscreen.is-zoomed .canvas-shell{max-height:none}.flipbook-overlay:fullscreen.is-zoomed .canvas-shell canvas{max-width:none;max-height:none}
