/* Immersive lecture file/video workspace inspired by the mobile viewer structure. */
.dafatii-immersive-viewer{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;background:rgba(4,7,12,.82);backdrop-filter:blur(22px);-webkit-backdrop-filter:blur(22px);color-scheme:dark}
.immersive-viewer-shell{position:relative;width:min(1180px,100%);height:min(96dvh,940px);overflow:hidden;border:1px solid rgba(255,255,255,.12);border-radius:30px;background:#0d1015;color:#f8fafc;box-shadow:0 34px 120px rgba(0,0,0,.5)}
.immersive-close{position:absolute;top:18px;left:18px;z-index:8;width:48px;height:48px;display:grid;place-items:center;border:1px solid rgba(255,255,255,.14);border-radius:50%;background:rgba(17,20,27,.9);color:#fff;font:400 30px/1 system-ui;cursor:pointer;backdrop-filter:blur(16px)}
.immersive-title{position:absolute;top:20px;right:22px;z-index:7;max-width:min(62%,620px);display:grid;gap:2px;text-align:end;pointer-events:none}.immersive-title span{color:#9aa3b2;font-size:.72rem;font-weight:750;text-transform:uppercase;letter-spacing:.1em}.immersive-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:1rem}
.viewer-bottom-dock{position:absolute;left:50%;bottom:max(18px,env(safe-area-inset-bottom));z-index:9;translate:-50% 0;display:flex;align-items:center;gap:10px;padding:8px;border:1px solid rgba(255,255,255,.13);border-radius:999px;background:rgba(13,16,21,.86);box-shadow:0 18px 50px rgba(0,0,0,.38);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
.viewer-bottom-dock button{width:50px;height:50px;display:grid;place-items:center;border:0;border-radius:50%;background:#1a202a;color:#fff;font:600 22px/1 system-ui;cursor:pointer}.viewer-bottom-dock button:hover{background:#222b38}.viewer-bottom-dock button:active{transform:scale(.96)}.viewer-bottom-dock button:last-child{background:#2f8cff;color:#04111f}
.viewer-note-toggle{font-size:19px!important}
.viewer-sheet-backdrop{position:absolute;inset:0;z-index:20;display:grid;align-items:end;background:rgba(3,5,9,.44);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.viewer-bottom-sheet{width:min(760px,calc(100% - 24px));max-height:min(78dvh,760px);margin:0 auto max(12px,env(safe-area-inset-bottom));overflow:auto;border:1px solid rgba(255,255,255,.13);border-radius:28px;background:#151922;color:#f8fafc;box-shadow:0 30px 100px rgba(0,0,0,.54)}
.viewer-sheet-handle{width:42px;height:5px;margin:10px auto 4px;border-radius:99px;background:#4a5361}.viewer-sheet-head{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid rgba(255,255,255,.09);background:rgba(21,25,34,.96);backdrop-filter:blur(14px)}.viewer-sheet-head h2{margin:0;font-size:1.05rem}.viewer-sheet-head button{width:38px;height:38px;border:1px solid rgba(255,255,255,.13);border-radius:50%;background:#202631;color:#fff;font-size:23px}.viewer-sheet-body{padding:16px 16px 22px}
.viewer-setting-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.viewer-setting-grid button{min-height:96px;display:grid;place-items:center;align-content:center;gap:8px;padding:12px;border:1px solid rgba(255,255,255,.1);border-radius:18px;background:#1c222d;color:#fff;cursor:pointer}.viewer-setting-grid button span{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#263247;color:#58a8ff;font-size:22px}.viewer-setting-grid button strong{font-size:.8rem;line-height:1.3;text-align:center}.viewer-setting-grid button:hover{border-color:rgba(88,168,255,.45);background:#202938}
.viewer-note-form{display:grid;gap:10px}.viewer-note-form textarea{min-height:120px;resize:vertical;padding:14px;border:1px solid rgba(255,255,255,.12);border-radius:16px;background:#0f131a;color:#fff;font:inherit;outline:none}.viewer-note-form textarea:focus{border-color:#2f8cff;box-shadow:0 0 0 3px rgba(47,140,255,.16)}.viewer-note-form>div{display:flex;align-items:center;justify-content:space-between;gap:12px}.viewer-note-form>div span{color:#98a2b3;font-size:.78rem}.viewer-note-form button,.viewer-search-form button{border:0;border-radius:12px;background:#2f8cff;color:#061220;padding:10px 16px;font-weight:800}.viewer-lecture-notes{margin-bottom:14px;padding:14px;border:1px solid rgba(255,255,255,.09);border-radius:16px;background:#101722}.viewer-lecture-notes span,.viewer-note-list h3{color:#8fa0b7;font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.viewer-lecture-notes p{margin:7px 0 0;white-space:pre-wrap;line-height:1.7}.viewer-note-list{display:grid;gap:10px;margin-top:18px}.viewer-note-list h3{margin:0}.viewer-note-list article{position:relative;padding:13px 44px 13px 13px;border:1px solid rgba(255,255,255,.09);border-radius:15px;background:#10151d}.viewer-note-list article>div{display:flex;gap:8px;color:#8d98a8;font-size:.7rem}.viewer-note-list article p{margin:7px 0 0;white-space:pre-wrap;line-height:1.55}.viewer-note-list article button{position:absolute;top:10px;right:10px;border:0;background:transparent;color:#ff8b8b;font-size:.72rem}.viewer-empty-note{color:#8d98a8}.viewer-search-form{display:flex;gap:9px}.viewer-search-form input{flex:1;min-width:0;padding:11px 13px;border:1px solid rgba(255,255,255,.12);border-radius:12px;background:#0f131a;color:#fff;font:inherit;outline:none}.viewer-search-status{min-height:1.2em;color:#9aa3b2;font-size:.8rem}
.video-workspace{
  --video-bg:#f5f7fb;
  --video-surface:#fff;
  --video-surface-2:#f7f8fb;
  --video-text:#10204d;
  --video-muted:#6e7895;
  --video-line:#e3e8f1;
  --video-accent:#0a8f94;
  --video-blue:#3c7df0;
  --video-purple:#9a63ef;
  color-scheme:light;
  background:rgba(231,237,247,.82);
}
.video-workspace .video-reader-shell{
  --video-player-height:min(50dvh,56.25vw,520px);
  width:min(900px,100%);
  height:min(96dvh,960px);
  overflow:hidden;
  display:grid;
  grid-template-rows:72px var(--video-player-height) max-content minmax(0,1fr);
  align-content:stretch;
  border:1px solid rgba(31,55,100,.08);
  border-radius:34px;
  background:var(--video-surface);
  color:var(--video-text);
  box-shadow:0 34px 110px rgba(34,53,88,.22);
}
.video-reader-topbar{
  position:relative;z-index:20;height:72px;min-height:0;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:10px 16px;border-bottom:1px solid var(--video-line);background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);transition:opacity .18s ease,transform .18s ease;
}
.video-reader-exit,.video-reader-examine{
  border:0;background:transparent;color:var(--video-text);cursor:pointer;
}
.video-reader-exit{width:46px;height:46px;display:grid;place-items:center;border-radius:50%;font:400 30px/1 system-ui}
.video-reader-exit:hover{background:var(--video-surface-2)}
.video-reader-examine{display:flex;align-items:center;gap:8px;padding:7px 11px;border-radius:14px;font:750 .78rem/1 Manrope,system-ui,sans-serif}
.video-reader-examine:hover{background:#f5f0ff}
.video-reader-examine-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:13px;background:#efe3ff;color:#713ecb}
.video-reader-examine-icon svg{width:20px;height:20px}
.video-workspace-stage{
  position:relative;width:100%;height:100%;min-height:0;display:grid;place-items:center;overflow:hidden;background:#05070a;flex:none;
}
.video-workspace-stage iframe,.video-workspace-stage video{display:block;width:100%;height:100%;border:0;background:#000;object-fit:contain}
.video-reader-heading{min-width:0;padding:14px 22px 13px;border-bottom:1px solid var(--video-line);background:var(--video-surface)}
.video-reader-heading h1{margin:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font:780 clamp(1.1rem,2.1vw,1.38rem)/1.22 Manrope,system-ui,sans-serif;letter-spacing:-.035em;color:var(--video-text)}
.video-reader-notes{min-height:0;overflow:hidden;background:var(--video-surface)}
.video-notes-scroll{height:100%;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;display:grid;align-content:start;gap:16px;padding:16px 18px calc(22px + env(safe-area-inset-bottom));scrollbar-gutter:stable}
.video-notes-source-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.video-notes-source-row>div{display:grid;gap:3px}.video-notes-source-row>div>span{color:var(--video-muted);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.video-notes-source-row>div>strong{font-size:.96rem}
.video-notes-source-row>button{
  display:flex;align-items:center;gap:6px;min-height:38px;padding:0 10px;border:1px solid var(--video-line);border-radius:12px;background:var(--video-surface-2);color:var(--video-text);font-weight:700;
}
.video-notes-source-row>button svg{width:15px;height:15px}
[dir=rtl] .video-notes-source-row>button svg{transform:rotate(180deg)}
.video-notes-region{min-height:104px}
.video-notes-card{display:grid;grid-template-columns:auto minmax(0,1fr);gap:12px;padding:14px;border:1px solid var(--video-line);border-radius:17px;background:var(--video-surface-2)}
.video-notes-card-badge{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#fff1d9;color:#e48b0a;border:1px solid #f5dfba}
.video-notes-card-badge svg{width:20px;height:20px}
.video-notes-card strong{font-size:.83rem}.video-notes-card p{margin:7px 0 0;white-space:pre-wrap;color:#4f5f80;line-height:1.65;font-size:.88rem}
.video-notes-empty{padding:24px 16px;border:1px dashed var(--video-line);border-radius:16px;background:var(--video-surface-2);color:var(--video-muted);text-align:center;font-size:.84rem}
.video-personal-note-list{display:grid;gap:9px}.video-personal-note-list article{padding:13px;border:1px solid var(--video-line);border-radius:15px;background:var(--video-surface-2)}.video-personal-note-list article p{margin:0;color:#3f4f70;line-height:1.55}.video-personal-note-list article>div{display:flex;align-items:center;gap:8px;margin-top:9px;color:var(--video-muted);font-size:.68rem}.video-personal-note-list article button{margin-inline-start:auto;border:0;background:transparent;color:#d24b58;font-size:.7rem}
.video-note-composer{display:grid;gap:10px;padding:12px;border:1px solid var(--video-line);border-radius:19px;background:#fbfcfe;box-shadow:0 8px 28px rgba(35,58,96,.06)}
.video-note-field{position:relative;display:grid;gap:7px}.video-note-field>span{font-size:.76rem;font-weight:760;color:var(--video-text)}.video-note-field textarea{min-height:92px;resize:vertical;padding:12px 12px 24px;border:1px solid var(--video-line);border-radius:14px;background:#fff;color:var(--video-text);font:inherit;outline:none}.video-note-field textarea:focus{border-color:#78a7f9;box-shadow:0 0 0 3px rgba(60,125,240,.12)}.video-note-field>small{position:absolute;inset-inline-end:10px;bottom:8px;color:var(--video-muted);font-size:.66rem}
.video-note-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(250px,1.1fr);gap:9px}
.video-note-source-control{
  min-width:0;display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:center;gap:8px;padding:8px;border:1px solid var(--video-line);border-radius:14px;background:#fff;color:var(--video-text);text-align:start;
}
.video-note-source-control>svg:first-child{width:19px;height:19px;color:var(--video-accent)}.video-note-source-control>span{display:grid;gap:2px;min-width:0}.video-note-source-control small{color:var(--video-muted);font-size:.62rem}.video-note-source-control strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.76rem}.video-note-source-control>svg:last-child{width:14px;height:14px;color:var(--video-muted)}
[dir=rtl] .video-note-source-control>svg:last-child{transform:rotate(180deg)}
.video-note-visibility{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.video-note-visibility button{min-width:0;display:grid;grid-template-columns:31px minmax(0,1fr);align-items:center;gap:7px;padding:7px;border:1px solid var(--video-line);border-radius:14px;background:#fff;color:var(--video-text);text-align:start}.video-note-visibility button.active{border-color:#78a7f9;background:#eef5ff;box-shadow:inset 0 0 0 1px rgba(60,125,240,.08)}.video-visibility-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:10px;background:#edf3ff;color:var(--video-blue)}.video-visibility-icon svg{width:16px;height:16px}.video-note-visibility strong{display:block;font-size:.72rem}.video-note-visibility small{display:block;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--video-muted);font-size:.58rem}
.video-note-publish{height:46px;border:0;border-radius:14px;background:var(--video-accent);color:#fff;font:780 .86rem/1 Manrope,system-ui,sans-serif;cursor:pointer;box-shadow:0 8px 20px rgba(10,143,148,.18)}.video-note-publish:hover{filter:brightness(.97)}
.video-source-list{display:grid;gap:9px}.video-source-list>button{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:11px;border:1px solid var(--video-line);border-radius:16px;background:var(--video-surface-2);color:var(--video-text);text-align:start}.video-source-list>button.active{border-color:#7da8f3;background:#eef5ff}.video-source-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:13px;background:#eaf3ff;color:var(--video-blue)}.video-source-icon svg{width:20px;height:20px}.video-source-list strong{display:block;font-size:.83rem}.video-source-list small{display:block;margin-top:3px;color:var(--video-muted);font-size:.7rem}.video-source-radio{width:20px;height:20px;border:2px solid #9eabc2;border-radius:50%}.video-source-list>button.active .video-source-radio{border:6px solid var(--video-blue)}
.video-workspace .viewer-sheet-backdrop{position:absolute;inset:0;z-index:90;display:grid;align-items:end;padding:12px;background:rgba(29,45,72,.18);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}.video-workspace .viewer-bottom-sheet{width:min(520px,100%);max-height:80dvh;margin:0 auto 12px;overflow:auto;border:1px solid var(--video-line);border-radius:28px;background:#fff;color:var(--video-text);box-shadow:0 28px 80px rgba(30,49,82,.22)}.video-workspace .viewer-sheet-handle{width:40px;height:4px;margin:10px auto 2px;border-radius:99px;background:#c3cad7}.video-workspace .viewer-sheet-head{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border:0;background:rgba(255,255,255,.95);backdrop-filter:blur(14px)}.video-workspace .viewer-sheet-head h2{margin:0;font:780 1.04rem/1.2 Manrope,system-ui,sans-serif}.video-workspace .viewer-sheet-head button{width:34px;height:34px;border:1px solid var(--video-line);border-radius:50%;background:#f5f7fb;color:var(--video-text);font-size:21px}.video-workspace .viewer-sheet-body{padding:4px 14px 18px}
.video-workspace .viewer-examine-list>button{border-color:var(--video-line);background:var(--video-surface-2);color:var(--video-text)}.video-workspace .viewer-examine-icon{background:#f1e8ff;border-color:#eadcfe;color:#8b4bdc}
@media(max-width:760px){
  .video-workspace{place-items:stretch;background:#fff}
  .video-workspace .video-reader-shell{--video-player-height:min(42dvh,56.25vw);width:100%;height:100dvh;max-height:none;border:0;border-radius:0;box-shadow:none;grid-template-rows:calc(60px + env(safe-area-inset-top)) var(--video-player-height) max-content minmax(0,1fr)}
  .video-reader-topbar{height:calc(60px + env(safe-area-inset-top));min-height:0;padding:env(safe-area-inset-top) 10px 0}
  .video-reader-exit{width:42px;height:42px}.video-reader-examine{padding:5px}.video-reader-examine>span:last-child{display:none}.video-reader-examine-icon{width:40px;height:40px}
  .video-workspace-stage{height:100%;min-height:0}
  .video-reader-heading{padding:12px 16px 11px}.video-notes-scroll{padding:13px 12px calc(18px + env(safe-area-inset-bottom))}
  .video-note-toolbar{grid-template-columns:1fr}.video-note-visibility{grid-template-columns:1fr 1fr}
  .video-workspace .viewer-sheet-backdrop{padding:0}.video-workspace .viewer-bottom-sheet{width:100%;max-height:84dvh;margin:0;border-left:0;border-right:0;border-bottom:0;border-radius:28px 28px 0 0;padding-bottom:env(safe-area-inset-bottom)}
}
@media(max-width:390px){.video-note-visibility small{display:none}.video-note-source-control small{display:none}}

.immersive-file-shell{display:grid;grid-template-rows:1fr}.immersive-file-stage{position:absolute;inset:0;overflow:auto;padding:84px 22px 100px;background:#dfe4eb;overscroll-behavior:contain;scroll-behavior:smooth}.immersive-file-stage[data-axis=vertical]{overflow-x:hidden;overflow-y:auto}.immersive-file-stage[data-axis=horizontal]{overflow-x:auto;overflow-y:hidden}.immersive-page-track{min-width:100%;min-height:100%;display:flex;gap:24px;align-items:flex-start;justify-content:flex-start}.immersive-file-stage[data-axis=vertical] .immersive-page-track{flex-direction:column;align-items:center}.immersive-file-stage[data-axis=horizontal] .immersive-page-track{flex-direction:row;align-items:center;scroll-snap-type:x mandatory}.immersive-page{position:relative;flex:none;display:grid;place-items:center;scroll-snap-align:center}.immersive-page canvas{display:block;background:#fff;box-shadow:0 20px 64px rgba(15,23,42,.24),0 0 0 1px rgba(15,23,42,.06)}.immersive-page-label{position:absolute;left:50%;bottom:-18px;translate:-50% 100%;padding:4px 8px;border-radius:999px;background:rgba(15,23,42,.72);color:#fff;font-size:.68rem;white-space:nowrap}.viewer-file-status{position:absolute;top:20px;left:50%;z-index:6;translate:-50% 0;padding:7px 12px;border-radius:999px;background:rgba(17,24,39,.82);color:#fff;font-size:.76rem;backdrop-filter:blur(10px)}
.office-workspace-stage{position:absolute;inset:0;overflow:auto;padding:84px 24px 100px;background:#dfe4eb;scroll-behavior:smooth}.office-workspace-stage[data-axis=vertical] .office-page-track{display:flex;flex-direction:column;align-items:center;gap:28px}.office-workspace-stage[data-axis=horizontal]{overflow-y:hidden}.office-workspace-stage[data-axis=horizontal] .office-page-track{min-width:max-content;height:100%;display:flex;align-items:center;gap:28px}.office-workspace-stage .word-reader,.office-workspace-stage .slide-reader{flex:none;scroll-snap-align:center}.office-workspace-stage[data-axis=horizontal]{scroll-snap-type:x mandatory}
@media(max-width:760px){.dafatii-immersive-viewer{place-items:stretch}.immersive-viewer-shell{width:100%;height:100dvh;max-height:none;border:0;border-radius:0}.immersive-close{top:calc(12px + env(safe-area-inset-top));left:12px;width:46px;height:46px}.immersive-title{top:calc(14px + env(safe-area-inset-top));right:14px;max-width:66%}.viewer-bottom-dock{bottom:calc(10px + env(safe-area-inset-bottom));gap:8px}.viewer-bottom-dock button{width:48px;height:48px}.viewer-bottom-sheet{width:calc(100% - 16px);max-height:82dvh;margin-bottom:calc(8px + env(safe-area-inset-bottom));border-radius:24px}.viewer-setting-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.video-notes-pane{padding:24px 18px calc(96px + env(safe-area-inset-bottom))}.immersive-file-stage,.office-workspace-stage{padding:calc(76px + env(safe-area-inset-top)) 10px calc(92px + env(safe-area-inset-bottom))}.immersive-file-stage[data-axis=horizontal] .immersive-page-track{gap:12px}.immersive-page-label{bottom:-12px}.viewer-file-status{top:calc(14px + env(safe-area-inset-top));max-width:55%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

@media(orientation:landscape) and (max-height:600px){
  .video-workspace .video-reader-shell{--video-player-height:min(46dvh,56.25vw);height:100dvh;max-height:none;grid-template-rows:54px var(--video-player-height) max-content minmax(0,1fr)}
  .video-reader-topbar{height:54px;min-height:0;padding:6px 10px}
  .video-workspace-stage{height:100%;min-height:0}
  .video-reader-heading{padding:9px 14px 8px}
  .video-reader-heading h1{font-size:1rem}
  .video-notes-scroll{padding-top:10px}
}
@media(min-width:761px) and (max-height:760px){
  .video-workspace .video-reader-shell{--video-player-height:min(44dvh,48vw,420px);height:min(96dvh,760px)}
  .video-workspace-stage{height:100%;min-height:0}
}
