html,body{margin:0;height:100%}
body{background:#0F1C1C;overflow:hidden;font-family:'Tajawal',Tahoma,sans-serif}
.fx-bar{position:fixed;top:0;left:0;right:0;height:56px;background:#1E4D4A;color:#F8F4EA;display:flex;align-items:center;gap:10px;padding:0 12px;direction:rtl;z-index:30;font-size:16px}
.fx-bar a,.fx-bar button,.fx-bar select{font:inherit;color:#F8F4EA;background:transparent;border:1px solid rgba(248,244,234,.35);border-radius:10px;min-height:38px;padding:0 12px;text-decoration:none;display:inline-flex;align-items:center;cursor:pointer}
.fx-bar select{background:#1E4D4A;max-width:260px}
.fx-bar button:hover,.fx-bar a:hover{background:rgba(255,255,255,.12)}
.fx-bar .fx-title{flex:1;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:'Noto Naskh Arabic',serif;font-size:19px}
.fx-bar .fx-count{font-family:'Readex Pro',sans-serif;min-width:70px;text-align:center}
.fx-bar .fx-gold{background:#B07A2A;border-color:#B07A2A}
#fx-wrap{position:fixed;top:56px;left:0;right:0;bottom:72px;display:flex;align-items:center;justify-content:center;overflow:hidden}
body.fx-notes-open #fx-wrap{bottom:calc(28vh + 72px)}
body.fx-cover #fx-wrap{bottom:0}
body.fx-cover .fx-bot{display:none}
#fx-stage{width:1920px;height:1080px;position:relative;flex:none;transform-origin:center center}
#fx-stage>section{position:absolute;top:0;left:0;width:1920px;height:1080px;box-sizing:border-box;overflow:hidden;display:none!important}
#fx-stage>section.cur{display:flex!important}
#fx-stage aside{display:none}
.fx-notes{position:fixed;left:0;right:0;bottom:72px;height:28vh;background:#F8F4EA;color:#1F2A2B;direction:rtl;padding:14px 20px;overflow:auto;display:none;font-family:'Noto Naskh Arabic',serif;font-size:19px;line-height:1.9;border-top:4px solid #B07A2A;z-index:25}
body.fx-notes-open .fx-notes{display:block}
.fx-notes b{font-family:'Tajawal',sans-serif;color:#1E4D4A}
.mtag.fx-play{cursor:pointer;outline:3px solid #B07A2A;outline-offset:4px;border-radius:8px}
.mtag.fx-play::before{content:'▶ ';}
.fx-img{display:block;width:100%;object-fit:cover;border-radius:16px}
body.fx-nocodes p.ph{color:transparent!important}
body.fx-nocodes .mtag:not(.fx-play){display:none!important}
body.fx-nocodes .mtag.fx-play bdi{display:none}
@media (max-width:700px){.fx-bar .fx-hide-sm{display:none}}

.fx-bot{position:fixed;left:0;right:0;bottom:0;height:72px;background:#16302F;display:flex;align-items:center;gap:14px;padding:0 18px;direction:rtl;z-index:30}
.fx-bot button{font-family:'Tajawal',sans-serif;font-size:20px;font-weight:800;color:#F8F4EA;background:transparent;border:2px solid rgba(248,244,234,.35);border-radius:999px;min-height:48px;padding:0 22px;cursor:pointer}
.fx-bot button:hover{background:rgba(255,255,255,.1)}
.fx-bot #fx-next{background:#B07A2A;border-color:#B07A2A;min-width:150px}
.fx-bot .fx-mid{flex:1;display:flex;flex-direction:column;gap:6px;align-items:center}
.fx-bot .fx-count{color:#F8F4EA;font-family:'Readex Pro',sans-serif;font-size:16px}
.fx-prog{display:flex;gap:2px;width:100%;max-width:900px;height:10px;direction:rtl}
.fx-prog i{flex:1;opacity:.25;border-radius:3px}
.fx-prog i.on{opacity:1}
@media (max-width:700px){.fx-bot button{padding:0 12px;font-size:16px}.fx-bot #fx-next{min-width:90px}}

/* الجولة الخامسة: الخط الزمني للخطوات تحت الشريط العلوي */
.fx-tl{position:fixed;top:56px;left:0;right:0;height:86px;background:#F3EEE3;border-bottom:1px solid #E2D8C4;z-index:29;display:flex;align-items:flex-start;justify-content:space-between;direction:rtl;padding:10px 3vw 0;box-sizing:border-box}
.fx-tl .tl-line{position:absolute;top:30px;right:calc(3vw + 4.5%);left:calc(3vw + 4.5%);height:4px;background:#DDD3BF;border-radius:4px;overflow:hidden}
.fx-tl .tl-line i{position:absolute;right:0;top:0;bottom:0;width:0;background:#2E8B57;border-radius:4px;transition:width .6s ease}
.tl-st{position:relative;z-index:1;flex:1;display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;cursor:pointer;padding:0;font:inherit;min-width:0}
.tl-dot{width:40px;height:40px;border-radius:50%;background:#FFF;border:3px solid #CFC4AE;display:flex;align-items:center;justify-content:center;transition:all .35s ease;box-sizing:border-box}
.tl-dot svg{width:20px;height:20px;fill:none;stroke:#B9AE98;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tl-dot b{display:none;color:#FFF;font-size:20px;font-family:'Readex Pro',sans-serif}
.tl-nm{font-family:'Scheherazade New','Noto Naskh Arabic',serif;font-size:15px;line-height:1.2;color:#9A917F;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tl-st.done .tl-dot{background:#2E8B57;border-color:#2E8B57}.tl-st.done .tl-dot svg{display:none}.tl-st.done .tl-dot b{display:block}
.tl-st.done .tl-nm{color:#6F8F7D}
.tl-st.cur .tl-dot{width:52px;height:52px;margin-top:-6px;background:var(--c);border-color:var(--c);box-shadow:0 0 0 5px color-mix(in srgb,var(--c) 22%,transparent)}
.tl-st.cur .tl-dot svg{stroke:#FFF;width:26px;height:26px}
.tl-st.cur .tl-nm{color:#1F2A2B;font-weight:700;font-size:17px}
.tl-st:hover .tl-dot{transform:scale(1.08)}
#fx-wrap{top:142px}
body.fx-cover .fx-tl{display:none}
body.fx-cover #fx-wrap{top:56px}
@media (max-width:800px){.tl-nm{font-size:11px}.fx-tl{height:70px}.tl-dot{width:30px;height:30px}.tl-st.cur .tl-dot{width:38px;height:38px}#fx-wrap{top:126px}.fx-tl .tl-line{top:24px}}
/* شريط مراجعة التدريب (للمدير فقط) */
.fx-rv{position:relative;display:flex;align-items:center;gap:6px;margin-inline-start:auto;}
.fx-rv[hidden]{display:none}
.fx-rv .rv-st{font-size:14px;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding:4px 10px;border-radius:999px;background:rgba(255,255,255,.12)}
.fx-rv[data-st=approved] .rv-st{background:#2E7D5B}.fx-rv[data-st=change] .rv-st{background:#B0473A}
.fx-rv>button{min-height:32px!important;padding:0 10px!important;font-size:14px}
.fx-rv .rv-pop{position:absolute;top:46px;left:0;width:360px;background:#FFF;color:#1F2A2A;border-radius:14px;padding:10px;box-shadow:0 12px 30px rgba(0,0,0,.25);display:flex;flex-wrap:wrap;gap:8px;z-index:40}
.fx-rv .rv-pop[hidden]{display:none}
.fx-rv .rv-pop textarea{width:100%;min-height:90px;font:inherit;border:1px solid #D9CDB6;border-radius:10px;padding:8px}
.fx-rv .rv-pop button{color:#FFF!important;background:#1E4D4A!important;border:none!important}
.fx-rv .rv-pop .rv-x{background:#8A8A8A!important}
.fx-cvbtn{position:absolute;top:30px;left:40px;z-index:5;font:inherit;font-size:26px;background:rgba(255,255,255,.92);color:#1E4D4A;border:none;border-radius:999px;padding:8px 22px;cursor:pointer}
.fx-cvdlg{border:none;border-radius:18px;padding:18px;max-width:900px;width:92vw;direction:rtl}
.fx-cvdlg::backdrop{background:rgba(0,0,0,.45)}
.fx-cvdlg .cvg{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:10px;margin:10px 0}
.fx-cvdlg .cvg button{border:3px solid transparent;border-radius:12px;padding:0;background:#F6F1E6;cursor:pointer;overflow:hidden}
.fx-cvdlg .cvg img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}.fx-cvdlg small{display:block;font-size:12px;direction:ltr}
.fx-cvdlg .cvb{display:flex;gap:8px;justify-content:flex-end}.fx-cvdlg .cvb button{font:inherit;border-radius:999px;border:1px solid #1E4D4A;background:#fff;padding:6px 16px;cursor:pointer}
/* v36 (٧٨) الوضع العريض — تجربة الدرس الأول: المسرح يتسع، والخلفية تمتد، والمحتوى بمقاسه، والعمود الجانبي يملأ الباقي */
#fx-stage>section{width:var(--SW,1920px)}
body.fxwide #fx-stage>section{padding-left:calc(64px + var(--pw) + var(--gx))!important;padding-right:calc(64px + var(--gx))!important}
body.fxwide #fx-stage>section[data-kind="cover"]{padding-left:0!important}
#fx-side{position:absolute;left:var(--gx,0px);top:0;height:1080px;width:var(--pw,0px);box-sizing:border-box;padding:76px 10px 44px 40px;z-index:6;display:flex;flex-direction:column;gap:22px;direction:rtl;font-family:'Scheherazade New','Noto Naskh Arabic',serif;pointer-events:auto}
#fx-side[hidden],body:not(.fxwide) #fx-side{display:none}
#fx-side .sd-b{background:rgba(255,255,255,.94);border:2px solid #E6DECF;border-radius:24px;padding:16px 20px;color:#1E2B2A}
#fx-side .sd-h{margin:0 0 10px;font-size:26px;color:#7A6E58;line-height:1.5}
#fx-side .sd-img{aspect-ratio:4/3;border-radius:16px;overflow:hidden;background:#EEE7D9}
#fx-side .sd-img img{width:100%;height:100%;object-fit:cover;display:block}
#fx-side .sd-bar{height:14px;border-radius:8px;background:#EEE7D9;overflow:hidden}
#fx-side .sd-bar i{display:block;height:100%;background:#C9971C;border-radius:8px;transition:width .3s}
#fx-side .sd-ch{display:flex;flex-wrap:wrap;gap:10px}
#fx-side .sd-ch .say.sdw{font:inherit;font-size:30px;line-height:1.5;width:auto!important;height:auto!important;min-width:0;background:#EEF4F2;color:#16403D;border:0;border-radius:999px;padding:2px 18px;cursor:pointer;box-shadow:none}
#fx-side .sd-ch .say.sdw svg{display:none}
#fx-side .sd-e{margin:0;font-size:24px;color:#8A7E6A;line-height:1.7}
#fx-present.on{background:#C9971C;color:#fff}
/* نمط B: ثماني خطوات، فيبدأ الخط من مركز الخطوة الأولى وينتهي بمركز الأخيرة */
.fx-tl.tl-b .tl-line{right:calc(3vw + 5.6%);left:calc(3vw + 5.6%)}
/* ===== التعلّم أفقي فقط: رسالة «أدِر جوالك» عند الإمساك الطولي ===== */
#fx-rot{display:none}
body.fx-portrait #fx-rot{position:fixed;inset:0;z-index:9999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:30px;text-align:center;background:#16302F;color:#F8F4EA;direction:rtl;font-family:'Tajawal',sans-serif}
#fx-rot .rot-ic{color:#E7C27A;animation:fxrot 2.4s ease-in-out infinite}
#fx-rot b{font-family:'Amiri','Tajawal',serif;font-size:34px;line-height:1.6}
#fx-rot span{font-size:19px;opacity:.9}
#fx-rot small{font-size:15px;opacity:.65;max-width:300px;line-height:1.7}
#fx-rot button{margin-top:10px;font-family:'Tajawal',sans-serif;font-size:18px;font-weight:800;color:#16302F;background:#E7C27A;border:0;border-radius:999px;padding:12px 26px}
@keyframes fxrot{0%,20%{transform:rotate(0)}50%,70%{transform:rotate(-90deg)}100%{transform:rotate(0)}}
/* الجوال أفقيًّا (شاشة قصيرة): شريطان أنحف وإخفاء الخط الزمني لتكبر الشريحة */
@media (max-height:520px) and (orientation:landscape){
  .fx-bar{height:40px;padding:0 8px;gap:6px;font-size:14px}
  .fx-bar a,.fx-bar button,.fx-bar select{min-height:30px;padding:0 8px;border-radius:8px}
  .fx-bar .fx-title{font-size:15px}
  .fx-tl{display:none!important}
  #fx-wrap,body.fx-cover #fx-wrap{top:40px!important;bottom:48px}
  body.fx-cover #fx-wrap{bottom:0}
  .fx-bot{height:48px;gap:8px;padding:0 10px}
  .fx-bot button{min-height:36px;font-size:15px;padding:0 12px}
  .fx-bot #fx-next{min-width:90px}
  .fx-bot .fx-mid{gap:3px}.fx-bot .fx-count{font-size:12px}.fx-prog{height:6px}
  .fx-notes{bottom:48px}
}
