/* app.css — تنسيق الواجهة (كان site-style-ui + site-style-20 + site-style-21) */

/* ===== من assets/site-style-ui.css ===== */
/* دمج ملفات التنسيق ٣ إلى ١٩ بنفس ترتيبها الأصلي (نفس النتيجة، طلب واحد بدل ١٧). الأصل في assets/site-style-N.css */
/* ---- site-style-3 ---- */
#hx,
#hxBar {
  display: none;
}
html[data-theme="dark"] {
  --hxB: #0e1714;
  --hxS: #16221d;
  --hxT: #e6eeea;
  --hxM: #9db0a7;
  --hxA: #7fd1ae;
  --hxR: #26352f;
}
.login {
  background: var(--hxB) !important;
  background-image: none !important;
}
.login .lbox {
  color: var(--hxT);
  background: var(--hxS);
  border: 1px solid var(--hxR);
  border-radius: 24px;
  padding: 28px 22px;
}
.login .lbox h2 {
  color: var(--hxT);
}
.login .lbox .lk,
.login .lbox label,
.login .lbox .ls {
  color: var(--hxM);
  opacity: 1;
}
.login .lbox input {
  background: var(--hxB) !important;
  border: 1px solid var(--hxR) !important;
  color: var(--hxT) !important;
  font-size: 1.4rem;
}
.login .lbox input:focus-visible {
  outline: 2px solid var(--hxA);
}
.login .lbox button {
  background: var(--hxA) !important;
  border-color: var(--hxA) !important;
  color: var(--hxB) !important;
}
.login .lbox a {
  color: var(--hxA) !important;
}
@media (max-width: 1099px) {
  body:not(.stuHd) aside.brand {
    background: var(--hxB) !important;
    background-image: none !important;
    color: var(--hxT) !important;
    border-bottom: 1px solid var(--hxR);
    box-shadow: none;
  }
  body:not(.stuHd) aside.brand h1,
  body:not(.stuHd) aside.brand h1 * {
    color: var(--hxT) !important;
  }
  body:not(.stuHd) aside.brand .bs,
  body:not(.stuHd) aside.brand .bk {
    color: var(--hxM);
    opacity: 1;
  }
  body:not(.stuHd) aside.brand .themeBtn,
  body:not(.stuHd) aside.brand .bIco {
    color: var(--hxT) !important;
    background: transparent !important;
    border-color: var(--hxR);
  }
}
@media (min-width: 1100px) {
  aside.brand {
    background: var(--hxS) !important;
    background-image: none !important;
    color: var(--hxT) !important;
    border-inline-start: 1px solid var(--hxR);
  }
  aside.brand h1,
  aside.brand h1 * {
    color: var(--hxT) !important;
  }
  aside.brand .bs,
  aside.brand .bk,
  aside.brand .bmeta span {
    color: var(--hxM) !important;
  }
  aside.brand a,
  aside.brand button:not(.dqC) {
    color: var(--hxT);
  }
  .dNav a {
    color: var(--hxT) !important;
    opacity: 0.8;
  }
  .dNav a:hover {
    background: var(--hxB) !important;
    opacity: 1;
  }
  .dNav a.on {
    background: var(--hxB) !important;
    color: var(--hxA) !important;
    opacity: 1;
    box-shadow: inset 0 0 0 1px var(--hxR);
  }
  aside.brand .bottom-menu-card {
    background: var(--hxB) !important;
    border: 1px solid var(--hxR);
  }
  aside.brand #bMe,
  aside.brand #bMe b,
  aside.brand #bMe span,
  aside.brand #bMe em {
    color: var(--hxT);
  }
  aside.brand #bMe .bottom-menu-row,
  aside.brand #bMe .bottom-menu-pane {
    color: var(--hxM);
  }
  aside.brand #bBell,
  aside.brand .themeBtn,
  aside.brand #bMenu {
    color: var(--hxT) !important;
    background: transparent !important;
    border-color: var(--hxR);
  }
}
.blogo {
  border-radius: 22%;
  aspect-ratio: 1;
  object-fit: cover;
}
body .h2W .wl {
  border: 0 !important;
  border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0;
}
body .h2W .wl:last-child {
  border-bottom: 0 !important;
}
body .t3Ch {
  display: block !important;
  width: 100%;
}
body #tWeak {
  display: flex !important;
  width: 100%;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  min-height: 52px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--card) !important;
  color: var(--fg);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
body #tWeak:active {
  transform: scale(0.98);
}
html[data-theme="dark"] body .contCard#contGo,
html[data-theme="dark"] body .ql > a[href="#ask"],
html[data-theme="dark"] body.stuHd main .ql a:nth-child(2)[href],
html[data-theme="dark"] body.stuHd .ql a:nth-child(2)[href]:not(#z),
html[data-theme="dark"] .t3Cta.g,
html[data-theme="dark"] body .dqC,
html[data-theme="dark"] body .gG a.g2.dly {
  background: #1f6b4c !important;
  color: #fff !important;
}
html {
  --hxB: #f6f4ee;
  --hxS: #ece8de;
  --hxT: #17201b;
  --hxM: #5e6862;
  --hxM2: #7a827d;
  --hxA: var(--c-green-3);
  --hxR: #e6e1d5;
  --hxD: #b5402f;
  --hxF: #e8590c;
  --hxSt: #d4a21e;
  --hxBr: rgba(246, 244, 238, 0.92);
  --hxCh: #fbefd0;
  --hxChT: #7a5300;
}
html.dark,
html[data-theme="dark"] {
  --hxB: #0e1714;
  --hxS: #16221d;
  --hxT: #e6eeea;
  --hxM: #9db0a7;
  --hxM2: #7e918a;
  --hxA: #7fd1ae;
  --hxR: #26352f;
  --hxD: #e26d5a;
  --hxF: #f08a4b;
  --hxSt: #e8bc52;
  --hxBr: rgba(14, 23, 20, 0.92);
}
#hx .home-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
}
#hx .home-logo {
  flex: none;
  width: 38px;
  height: 38px;
  display: block;
  border-radius: 11px;
  margin-inline-end: 2px;
}
#hx .home-logo img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: block;
  box-shadow: 0 4px 10px rgba(13, 79, 60, 0.18);
}
#hx .home-logo:focus-visible {
  outline: 2px solid var(--hxA);
  outline-offset: 2px;
}
#hx .home-date {
  flex: 1 1 auto !important;
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.45;
}
#hx .home-date span {
  font-size: 0.82rem;
  color: var(--hxM);
  font-weight: 500;
}
#hx .home-date small {
  font-size: 0.75rem;
  color: var(--hxM2);
}
#hx .home-bell-btn {
  margin-inline-start: auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--hxT);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
}
#hx .home-bell-btn i {
  position: absolute;
  top: 10px;
  inset-inline-end: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hxD);
  box-shadow: 0 0 0 2px var(--hxB);
}
#hx .home-rank-ring,
#hxBar .home-rank-ring {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  text-decoration: none;
}
#hx .home-rank-ring > span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--hxB);
  box-sizing: border-box;
  display: grid;
  place-items: center;
  background: var(--hxS);
}
#hx .home-rank-ring .av,
#hxBar .home-rank-ring .av {
  font-size: 22px !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
}
#hxBar .home-rank-ring .av {
  font-size: 18px !important;
}
#hx .home-rank-ring .av i,
#hxBar .av i {
  display: none;
}
#hx h2 {
  margin: 0.35rem 0 0;
  font-size: 2rem;
  line-height: 1.3;
  font-weight: 700;
  color: var(--hxT);
}
#hx .home-streak {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  font-size: 0.88rem;
  color: var(--hxM);
}
#hx .home-streak > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
#hx .home-streak b {
  color: var(--hxT);
}
#hx .home-streak .home-rank-title {
  color: var(--hxA);
  font-weight: 700;
}
#hx .home-message {
  font-size: 0.88rem;
  color: var(--hxM);
  line-height: 1.7;
}
#hxBar b {
  flex: 1;
  font-size: 1rem;
}
#hxBar small {
  font-size: 0.8rem;
  color: var(--hxM);
}
#hxBar .home-rank-ring {
  width: 34px;
  height: 34px;
  overflow: hidden;
  background: var(--hxS);
}
#ih .page-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 48px;
}
.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  min-height: 44px;
  padding: 0 0.4rem;
  border: 0;
  background: transparent;
  color: var(--hxA);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--r-md);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.page-back-btn:active {
  transform: scale(0.96);
}
.page-back-btn:focus-visible,
.home-bell-btn:focus-visible {
  outline: 2px solid var(--hxA);
  outline-offset: 2px;
}
#ih .page-back-btn {
  margin-inline-end: auto;
}
#ih .home-bell-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--hxT);
  display: grid;
  place-items: center;
  position: relative;
  cursor: pointer;
}
#ih .home-bell-btn i {
  position: absolute;
  top: 10px;
  inset-inline-end: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hxD);
  box-shadow: 0 0 0 2px var(--hxB);
}
.page-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--hxS);
  display: grid;
  place-items: center;
  text-decoration: none;
  overflow: hidden;
}
.page-avatar-btn .av {
  font-size: 19px !important;
  width: auto !important;
  height: auto !important;
  background: none !important;
  border: 0;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
}
.page-avatar-btn .av i {
  display: none;
}
#ih .page-title {
  text-align: start !important;
  align-self: stretch;
  width: auto;
  max-width: none;
  margin: 0.1rem 0 0;
  padding-inline-start: 0.5rem;
  font-size: 1.75rem;
  line-height: 1.35;
  font-weight: 700;
  color: var(--hxT);
}
#ih .page-subtitle {
  padding-inline-start: 0.5rem;
  font-size: 0.85rem;
  color: var(--hxM);
  line-height: 1.6;
}
#hxBar .page-back-btn {
  width: 44px;
  justify-content: center;
  padding: 0;
}
#hx .home-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 32px;
  padding: 0 0.75rem;
  border-radius: var(--r-pill);
  background: var(--hxCh);
  color: var(--hxChT);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}
#hx .home-chip-class {
  background: var(--hxS);
  color: var(--hxM);
  font-weight: 500;
}
html[data-theme="dark"] {
  --hxCh: #2a2614;
  --hxChT: #e8bc52;
}
#hx .home-tasks-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 36px;
  padding: 0 0.75rem;
  border-radius: var(--r-pill);
  background: var(--hxCh);
  color: var(--hxChT);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
#hx .home-tasks-link:active {
  transform: scale(0.97);
}
#hx .home-task-dots {
  display: inline-flex;
  gap: 4px;
}
#hx .home-task-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  box-sizing: border-box;
}
#hx .home-task-dots i.ok {
  background: var(--hxA);
  border-color: var(--hxA);
}
#hx .home-search-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--hxT);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
}
#hx button.home-rank-ring,
.page-avatar-btn {
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
@keyframes hxIn {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: none;
  }
}
@media (max-width: 1099px) {
  body.stuHd:not(.inner) #hx {
    width: 100%;
    box-sizing: border-box;
    grid-column: 1/-1;
    flex: 1 1 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.25rem 0;
    color: var(--hxT);
    background: var(--hxB);
  }
  body.stuHd:not(.inner) aside.brand {
    background: var(--hxB) !important;
    padding: 0 !important;
    min-height: 0;
    box-shadow: none !important;
    border: 0 !important;
  }
  body.stuHd:not(.inner) aside.brand > *:not(#hx) {
    display: none !important;
  }
  body.stuHd:not(.inner) #hxBar.on {
    display: flex;
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 60;
    height: 56px;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.9rem;
    background: var(--hxBr);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hxR);
    color: var(--hxT);
    animation: hxIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  body.stuHd.inner aside.brand {
    background: var(--hxB) !important;
    padding: 0 !important;
    min-height: 0;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--hxR);
  }
  body.stuHd.inner aside.brand > *:not(#ih) {
    display: none !important;
  }
  body.stuHd.inner #ih {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    grid-column: 1/-1;
    flex: 1 1 100%;
    padding: 0.25rem 0.75rem 0.9rem 1.25rem;
    color: var(--hxT);
    background: var(--hxB);
  }
  body.stuHd.inner #student > #back {
    display: none !important;
  }
  body.stuHd.inner #hxBar.on {
    display: flex;
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 60;
    height: 56px;
    align-items: center;
    gap: 0.25rem;
    padding: 0 0.9rem 0 0.4rem;
    background: var(--hxBr);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hxR);
    color: var(--hxT);
  }
  body.stuHd:not(.inner) #h2A > .h2T,
  body.stuHd:not(.inner) a.rank-link[href="#me"] {
    display: none !important;
  }
  body.stuHd:not(.inner):not(.srOpen) #srchBox {
    display: none !important;
  }
  body.srOpen #srchBox {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: var(--hxB);
    padding: 12px 16px;
    margin: 0;
    align-content: flex-start;
    overflow: auto;
  }
  body.srOpen #srchBox #srchIn {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    height: 46px;
    border-radius: var(--r-lg);
    background: var(--hxS);
    border: 1px solid var(--hxR);
    color: var(--hxT);
  }
  body.srOpen #srchBox #srchRes {
    flex-basis: 100%;
    position: static !important;
    box-shadow: none;
    max-height: none;
    background: var(--hxB) !important;
    border: 0;
  }
  .srX {
    display: none;
  }
  body.srOpen .srX {
    display: block;
    border: 0;
    background: transparent;
    color: var(--hxA);
    font: inherit;
    font-weight: 500;
    min-height: 44px;
    padding: 0 6px;
    cursor: pointer;
  }
}
/* ---- site-style-4 ---- */
@media (max-width: 1099px) {  body.hm2:not(.inner) #h2B .cdots + .sh2,
  body.hm2:not(.inner) #h2B > .lesson-list {
    display: none !important;
  }
  .pgIn {
    animation: pgIn 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes pgIn {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .pgIn {
      animation: none;
    }
  }
  html[data-theme="dark"] body #h2car .cv.sel {
    background: var(--g) !important;
  }
}
/* ٦ نوفمبر: البطاقات السفلية (csOpen) كان تنسيقها للجوال بس — على الكمبيوتر تنفتح تحت الصفحة وتبان كأنها علّقت («بطاقتي»، ⚙️). صارت للكل، وعلى الكمبيوتر نافذة بالنص */
  .chapter-sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 20, 16, 0.42);
    opacity: 0;
    transition: opacity 0.25s;
  }
  .chapter-sheet-overlay.on {
    opacity: 1;
  }
  .chapter-sheet-panel {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 1001;
    background-color: var(--hxB);
    max-height: 88dvh;
    display: flex;
    flex-direction: column;
    background: var(--hxB);
    color: var(--hxT);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 20px max(20px, env(safe-area-inset-bottom));
  }
  .chapter-sheet-panel.on {
    transform: none;
  }
  .chapter-sheet-panel .chapter-sheet-head {
    padding: 10px 0 4px;
    cursor: grab;
    touch-action: none;
  }
  .chapter-sheet-panel .chapter-sheet-head i {
    display: block;
    width: 44px;
    height: 5px;
    border-radius: 4px;
    background: var(--hxR);
    margin: 0 auto 12px;
  }
  .chapter-sheet-panel .chapter-sheet-title {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .chapter-sheet-panel .chapter-sheet-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--r-xl);
    flex: none;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 1.5rem;
  }
  .chapter-sheet-panel .chapter-sheet-name {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.45;
  }
  .chapter-sheet-panel .chapter-sheet-name small {
    font-size: 0.78rem;
    color: var(--hxM);
  }
  .chapter-sheet-panel .chapter-sheet-name b {
    font-size: 1.2rem;
  }
  .chapter-sheet-panel .chapter-sheet-ring {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: none;
  }
  .chapter-sheet-panel .chapter-sheet-ring span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hxB);
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 700;
  }
  .chapter-sheet-panel .chapter-sheet-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    background: var(--hxS);
    color: var(--hxT);
    font-size: 1.1rem;
    cursor: pointer;
    flex: none;
  }
  .chapter-sheet-panel .chapter-sheet-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
  }
  .chapter-sheet-panel .chapter-sheet-actions button {
    flex: 1;
    min-height: 68px;
    border: 0;
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    font: inherit;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .chapter-sheet-panel .chapter-sheet-actions button:active,
  .chapter-sheet-panel .chapter-sheet-go:active {
    transform: scale(0.97);
  }
  .chapter-sheet-panel .chapter-sheet-actions .ri {
    width: 32px;
    height: 32px;
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, 0.55);
    display: grid;
    place-items: center;
  }
  .chapter-sheet-panel .chapter-sheet-actions b {
    font-size: 0.82rem;
  }
  .chapter-sheet-panel .chapter-sheet-actions small {
    font-size: 0.7rem;
    opacity: 0.85;
  }
  .chapter-sheet-panel .r1 {
    background: #e3f0e8;
    color: var(--c-green-3);
  }
  .chapter-sheet-panel .r2 {
    background: #fbe4df;
    color: #9a3a2a;
  }
  .chapter-sheet-panel .r3 {
    background: #fbefd0;
    color: #7a5300;
  }
  html[data-theme="dark"] .chapter-sheet-panel .r1 {
    background: #173326;
    color: #9fe0c2;
  }
  html[data-theme="dark"] .chapter-sheet-panel .r2 {
    background: #3a211c;
    color: #f2a796;
  }
  html[data-theme="dark"] .chapter-sheet-panel .r3 {
    background: #2e2814;
    color: #e8bc52;
  }
  html[data-theme="dark"] .chapter-sheet-panel .chapter-sheet-actions .ri {
    background: rgba(255, 255, 255, 0.08);
  }
  .chapter-sheet-panel .chapter-sheet-body {
    overflow: auto;
    margin-top: 10px;
    overscroll-behavior: contain;
    flex: 1;
    min-height: 0;
  }
  .chapter-sheet-panel .chapter-sheet-body .lesson-list {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
  }
  .chapter-sheet-panel .chapter-sheet-body .lc.exm {
    display: none !important;
  }
  .chapter-sheet-panel .chapter-sheet-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: start;
    font: inherit;
    color: var(--hxT);
    background: var(--card, #fff);
    border: 1px solid var(--hxR);
    border-radius: var(--r-xl);
    padding: 12px 14px;
    margin: 0 0 8px;
    cursor: pointer;
    min-height: 60px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html[data-theme="dark"] .chapter-sheet-panel .chapter-sheet-row {
    background: var(--hxS);
  }
  .chapter-sheet-panel .chapter-sheet-row:active {
    transform: scale(0.98);
  }
  .chapter-sheet-panel .task-check {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--hxCh, #fbefd0);
    display: grid;
    place-items: center;
    flex: none;
    font-size: 1.1rem;
  }
  .chapter-sheet-panel .chapter-sheet-task.ok .task-check {
    background: var(--hxA);
  }
  .chapter-sheet-panel .chapter-sheet-task.ok b {
    color: var(--hxM);
    text-decoration: line-through;
  }
  .chapter-sheet-panel .task-title {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
  }
  .chapter-sheet-panel .task-title b {
    font-size: 0.95rem;
  }
  .chapter-sheet-panel .task-title small {
    font-size: 0.78rem;
    color: var(--hxM);
  }
  .chapter-sheet-panel .task-arrow {
    color: var(--hxM);
    display: grid;
    place-items: center;
  }
  .chapter-sheet-panel .chapter-sheet-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    cursor: default;
    padding: 12px 8px;
  }
  .chapter-sheet-panel .chapter-sheet-info div {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2px;
  }
  .chapter-sheet-panel .chapter-sheet-info b {
    font-size: 1.3rem;
    color: var(--hxA);
  }
  .chapter-sheet-panel .chapter-sheet-info small {
    font-size: 0.72rem;
    color: var(--hxM);
    line-height: 1.4;
  }
  .chapter-sheet-panel.mo {
    transition:
      clip-path 0.48s cubic-bezier(0.16, 1, 0.3, 1),
      transform 0.48s cubic-bezier(0.16, 1, 0.3, 1),
      background-color 0.4s ease;
  }
  .chapter-sheet-panel.rm {
    transform: none;
    opacity: 0;
    transition: opacity 0.2s;
  }
  .chapter-sheet-panel.rm.on {
    opacity: 1;
  }
  .chapter-sheet-panel .chapter-sheet-stat {
    animation: csIn 0.38s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes csIn {
    from {
      opacity: 0;
      transform: translateY(14px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
  #h2car .cv.chapter-sheet-press {
    transform: scale(0.95) !important;
    transition: transform 0.18s;
  }
  @media (prefers-reduced-motion: reduce) {
    .chapter-sheet-panel .chapter-sheet-stat {
      animation: none;
    }
  }
  .chapter-sheet-panel .chapter-sheet-body .lc.chapter-sheet-stat {
    animation-name: csIn !important;
    animation-duration: 0.38s !important;
    animation-fill-mode: both !important;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important;
    animation-iteration-count: 1 !important;
    animation-timeline: auto !important;
    scale: none;
  }
  .chapter-sheet-panel .chapter-sheet-body .lc:not(.chapter-sheet-stat) {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .chapter-sheet-panel .chapter-sheet-body .lesson-list,
  .chapter-sheet-panel .chapter-sheet-body .lc {
    scale: none;
    filter: none;
    mask: none;
    -webkit-mask: none;
    clip-path: none !important;
  }
  .chapter-sheet-panel .chapter-sheet-body .lesson-list {
    background: none !important;
    border-radius: 0;
    padding: 0 !important;
    margin: 0;
    box-shadow: none;
    width: auto !important;
  }
  .chapter-sheet-panel .chapter-sheet-go {
    margin-top: 12px;
    min-height: 52px;
    border: 0;
    border-radius: var(--r-xl);
    background: var(--hxA);
    color: var(--hxB);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    flex: none;
  }
  html[data-theme="dark"] .chapter-sheet-panel .chapter-sheet-go {
    background: #1f6b4c;
    color: #fff;
  }
  .chapter-sheet-panel button:focus-visible {
    outline: 2px solid var(--hxA);
    outline-offset: 2px;
  }

@media (min-width: 1100px) {
  .chapter-sheet-panel {
    inset: auto;
    left: 50%;
    top: 50%;
    bottom: auto;
    width: min(560px, 92vw);
    max-height: 86vh;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -46%) scale(0.97);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s;
    padding: 0 24px 24px;
  }
  .chapter-sheet-panel.on {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
  .chapter-sheet-panel .chapter-sheet-head {
    cursor: default;
  }
  .chapter-sheet-panel .chapter-sheet-head i {
    visibility: hidden;
  }
}
/* ---- site-style-5 ---- */
.lab-tag {
  white-space: nowrap;
  display: inline-block;
  background: #efe7ff;
  color: #5b3fb5;
  border-radius: var(--r-xs);
  padding: 1px 7px;
  font-size: 0.7rem;
  font-weight: 700;
  vertical-align: middle;
  margin-inline-start: 6px;
}
html[data-theme="dark"] .lab-tag {
  background: #2b2346;
  color: #c9b8ff;
}
#labBox .lab-phase {
  margin: 18px 0 6px;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}
#labBox .lab-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
#labBox .lab-row .t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
#labBox .lab-row .t small {
  color: var(--muted);
  font-size: 0.78rem;
}
#labBox .lab-row.soon {
  opacity: 0.5;
}
.lab-seg {
  display: inline-flex;
  background: var(--accent-2);
  border-radius: var(--r-sm);
  padding: 3px;
  flex: none;
}
.lab-seg button {
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 0.78rem !important;
  padding: 6px 9px !important;
  border-radius: var(--r-xs) !important;
  min-height: 34px;
  box-shadow: none;
}
.lab-seg button.on {
  background: var(--card) !important;
  color: var(--accent) !important;
  font-weight: 700;
}
.lab-seg button.on[data-v="1"] {
  color: #5b3fb5 !important;
}
/* 6 font size */
html.fs1 #home,
html.fs1 #xv,
html.fs1 #student,
html.fs1 #hx,
html.fs1 #ih,
html.fs1 .chapter-sheet-panel .chapter-sheet-body {
  zoom: 1.1;
}
html.fs2 #home,
html.fs2 #xv,
html.fs2 #student,
html.fs2 #hx,
html.fs2 #ih,
html.fs2 .chapter-sheet-panel .chapter-sheet-body {
  zoom: 1.22;
}
/* 8 focus */
body.focusM .x2Bar,
body.focusM .bNav,
body.focusM .t2nav,
body.focusM #ih .home-bell-btn,
body.focusM #hxBar,
body.focusM .lvT,
body.focusM .toast:not(.keep) {
  display: none !important;
}
.focusChip {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  inset-inline-start: 50%;
  transform: translateX(50%);
  z-index: 70;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  color: var(--muted);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}
.focusChip { transition: opacity 0.4s ease; }
.focusChip.gone { opacity: 0; }
#duSyncBar { transition: opacity 0.4s ease, transform 0.4s ease; }
#duSyncBar.quiet { opacity: 0; transform: translateY(8px); pointer-events: none; }
/* 11 zoom */
.zmO {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: #0b0f0d;
  display: flex;
  flex-direction: column;
  touch-action: none;
  animation: zmIn 0.22s ease;
}
@keyframes zmIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.zmO .zoom-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  color: #fff;
  font-size: 0.8rem;
}
.zmO .zoom-title button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.1rem;
}
.zmO .zoom-sheet {
  flex: 1;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.zmO img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #fff;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
}
img.zmAble {
  cursor: zoom-in;
}
/* 21 offline */
.offS {
  position: fixed;
  inset-inline: 12px;
  bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  z-index: 1500;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.2);
  animation: offIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes offIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.offS b {
  font-size: 1.05rem;
}
.offS p {
  margin: 6px 0 10px;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.7;
}
.offS .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.offS .row a {
  flex: 1;
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--accent-2);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
}
.offS .pend {
  display: inline-block;
  margin-top: 2px;
  background: #fbefd0;
  color: #7a5300;
  border-radius: var(--r-xs);
  padding: 2px 8px;
  font-size: 0.78rem;
}
.offS .x {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
}
/* 33 creature */
.crtHop .av,
.crtSad .av,
.crtSleep .av {
  display: inline-block !important;
}
.crtHop .av {
  animation: crtHop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1) !important;
}
@keyframes crtHop {
  0% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px) scale(1.3) rotate(-8deg);
  }
  60% {
    transform: scale(1.15) rotate(6deg);
  }
  100% {
    transform: none;
  }
}
.crtSad .av {
  animation: crtSad 0.5s ease !important;
}
@keyframes crtSad {
  25% {
    transform: rotate(-8deg);
  }
  75% {
    transform: rotate(8deg);
  }
}
.crtSleep {
  position: relative;
}
.crtSleep .av {
  filter: saturate(0.4) brightness(0.95);
}
.crtSleep::after {
  content: "💤";
  position: absolute;
  top: -6px;
  inset-inline-start: -6px;
  font-size: 14px;
  animation: zz 2.4s ease-in-out infinite;
}
@keyframes zz {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-4px);
    opacity: 1;
  }
}
/* 5 swipe back */
.swpEdge {
  position: fixed;
  top: 50%;
  inset-inline-start: 0;
  z-index: 80;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.3rem;
  opacity: 0;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .crtHop .av,
  .crtSad .av,
  .crtSleep::after {
    animation: none;
  }
}
/* ---- site-style-6 ---- */
.labCard h2 {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.week-report-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.week-report-card .week-report-head {
  font-size: 1.2rem;
}
.week-report-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.week-report-grid div {
  background: var(--accent-2);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.week-report-grid b {
  font-size: 1.4rem;
  color: var(--accent);
}
.week-report-grid span {
  font-size: 0.75rem;
  color: var(--muted);
}
.week-report-best {
  font-size: 0.9rem;
}
.x2Bar {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 58;
  background: linear-gradient(90deg, #f2c14e, #e89b2e);
  color: #3a2600;
  font-weight: 700;
  font-size: 0.85rem;
  text-align: center;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 12px 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}
.x2Bar span {
  font-weight: 500;
  margin-inline-start: 8px;
  opacity: 0.8;
}
body:has(.x2Bar) #hx {
  padding-top: calc(1rem + 30px) !important;
}
.achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.achievements-grid div {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
}
.achievements-grid i {
  font-style: normal;
  font-size: 1.6rem;
}
.achievements-grid div:not(.on) i {
  filter: grayscale(1);
  opacity: 0.4;
}
.achievements-grid b {
  font-size: 0.75rem;
}
.achievements-grid small {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.4;
}
.achievements-grid .on {
  border-color: var(--gold, #f2c14e);
  background: linear-gradient(180deg, #fff8e6, var(--card));
}
html[data-theme="dark"] .achievements-grid .on {
  background: linear-gradient(180deg, #2e2814, var(--card));
}
@media (max-width: 420px) {
  .achievements-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .week-report-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.prd {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.prd b {
  font-size: 2.6rem;
  color: var(--accent);
}
.prd span {
  color: var(--muted);
}
.predict-bar {
  height: 10px;
  border-radius: 6px;
  background: var(--accent-2);
  overflow: hidden;
}
.predict-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
}
.predict-up {
  background: #fbefd0;
  color: #5a3d00;
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 0.9rem;
}
html[data-theme="dark"] .predict-up {
  background: #2e2814;
  color: #e8bc52;
}
.bdy {
  display: flex;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  margin: 8px 0;
}
.bdy div {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.bdy i {
  font-style: normal;
  font-size: 2rem;
}
.bdy span {
  color: var(--muted);
}
.heatmap-question td.heatmap-cell {
  text-align: center;
  font-weight: 700;
}
.heatmap-question .h1 {
  background: #e26d5a;
  color: #fff;
}
.heatmap-question .h2 {
  background: #f4a79a;
}
.heatmap-question .h3 {
  background: #fbefd0;
}
.heatmap-question .h4 {
  background: #e3f0e8;
}
html[data-theme="dark"] .heatmap-question .h2 {
  background: #7a3a2f;
  color: #fff;
}
html[data-theme="dark"] .heatmap-question .h3 {
  background: #4a3f1c;
  color: #fff;
}
html[data-theme="dark"] .heatmap-question .h4 {
  background: #1d3a2b;
  color: #fff;
}
.prepO {
  position: fixed;
  inset: 0;
  z-index: 4000;
  background: #0e1714;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 24px;
  font-family: inherit;
}
.prepT {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  opacity: 0.8;
}
.prepT button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.2rem;
}
.prepQ {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.prepQ h2 {
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  line-height: 1.5;
  margin: 0;
  color: #fff;
}
.prepQ small {
  color: #e8bc52;
  font-size: 1.1rem;
}
.prepA {
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  border-radius: var(--r-xl);
  padding: 14px 20px;
}
.prepA.ok {
  background: #1f6b4c;
}
.prepA.no {
  background: #5a2a22;
}
.prepR {
  align-self: flex-start;
  font-size: 1.2rem;
  padding: 14px 28px;
  border-radius: var(--r-lg);
  background: #f2c14e;
  color: var(--c-green-deep);
  border: 0;
  font-weight: 700;
}
.prepN {
  display: flex;
  justify-content: space-between;
}
.prepN button {
  font-size: 1.1rem;
  padding: 12px 26px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0;
}
.prepN button:disabled {
  opacity: 0.3;
}
.attn {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.attn > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 12px;
}
.attn b {
  flex: 1;
  min-width: 120px;
}
.attn small {
  color: var(--muted);
  flex-basis: 100%;
  order: 2;
}
.parB {
  margin-inline-start: 6px;
}
.lxBox {
  margin-top: 10px;
  border-radius: var(--r-lg);
  padding: 12px;
  font-size: 0.9rem;
  line-height: 1.8;
  background: var(--accent-2);
}
.lxBox.no {
  background: #fbe4df;
  color: #5a1f15;
}
html[data-theme="dark"] .lxBox.no {
  background: #3a211c;
  color: #f2c5bb;
}
.explain-again-btn {
  margin-top: 8px;
  background: transparent !important;
  border: 1px dashed currentColor;
  color: inherit;
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 0.85rem;
  min-height: 40px;
}
.explain-again-text {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
html[data-theme="dark"] .explain-again-text {
  background: rgba(0, 0, 0, 0.2);
}
.games-term {
  border-bottom: 2px dotted var(--accent);
  cursor: help;
}
.games-tip {
  position: fixed;
  z-index: 3500;
  background: #17201b;
  color: #fff;
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  font-size: 0.9rem;
  line-height: 1.7;
  animation: offIn 0.2s ease;
}
.games-tip p {
  margin: 4px 0;
}
.games-tip small {
  opacity: 0.6;
  font-size: 0.72rem;
}
.labX {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-top: 10px;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.labX::-webkit-scrollbar {
  display: none;
}
.labX button {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hxR, var(--line)) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  font-size: 0.8rem;
  padding: 6px 12px;
  font-weight: 700;
}
.games-glossary .chapter-sheet-row {
  cursor: default;
}
.map-label .map-node rect {
  fill: var(--card);
  stroke: var(--hxA, var(--c-green-3));
  stroke-width: 1.5;
  cursor: pointer;
}
.map-label .map-node.ok rect {
  fill: #e3f0e8;
}
.map-label .map-node.now rect {
  fill: #fbefd0;
}
.map-label .map-line {
  fill: var(--accent-2);
}
.map-label text {
  fill: var(--fg);
}
.compare-wrap {
  overflow-x: auto;
}
.compare-title {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  font-size: 0.78rem;
}
.compare-title th {
  font-weight: 700;
  text-align: center;
}
.compare-title tbody th {
  text-align: start;
}
.compare-title button {
  width: 100%;
  min-height: 44px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  font-size: 1.1rem;
}
.compare-title button.good {
  background: #e3f0e8 !important;
  border-color: var(--c-green-3) !important;
}
.compare-title button.bad {
  background: #fbe4df !important;
  border-color: #b5402f !important;
}
.dgW {
  background: #fff;
  border-radius: var(--r-xl);
  padding: 8px;
}
.digest-progress {
  cursor: pointer;
}
.digest-progress.on {
  filter: drop-shadow(0 0 6px #f2c14e);
}
.digest-progress.bad {
  filter: drop-shadow(0 0 6px #e26d5a);
}
.digest-item {
  text-align: center;
  margin: 8px 0;
  min-height: 64px;
}
.digest-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.vital-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.vital-tabs button {
  flex: none;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  padding: 6px 12px;
  min-height: 40px;
  background: var(--accent-2) !important;
  color: var(--fg) !important;
  border: 0 !important;
}
.vital-tabs button.on {
  background: var(--accent) !important;
  color: #fff !important;
}
.vital-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}
.vital-box input[type="range"] {
  width: 100%;
}
.vital-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.vital-bars div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
}
.vital-bars i {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, #3b82f6, #93c5fd);
  transition: width 0.3s;
}
.vital-bars small {
  color: var(--muted);
}
.vital-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.vital-steps button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  font-size: 0.78rem;
  background: var(--card) !important;
  color: var(--fg) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-md);
}
.vital-steps i {
  font-style: normal;
  font-size: 1.4rem;
}
.vital-rank {
  background: #e3f0e8;
  color: var(--c-green-3);
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 1rem;
}
html[data-theme="dark"] .vital-rank {
  background: #173326;
  color: #9fe0c2;
}
.smart-card {
  min-height: 200px;
  border-radius: 20px;
  background: linear-gradient(135deg, #15803d, var(--c-green-deep));
  color: #fff;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  touch-action: pan-y;
  user-select: none;
}
.smart-card small {
  opacity: 0.8;
}
.smart-card b {
  font-size: 1.15rem;
  line-height: 1.8;
  flex: 1;
}
.smart-dots {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}
.smart-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}
.smart-dots i.on {
  background: #f2c14e;
  width: 16px;
  border-radius: 4px;
}
.x2Set {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 12px;
  margin: 6px 0 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.x2Set .row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: end;
}
/* ---- site-style-7 ---- */
.wheel span {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
  pointer-events: none;
}
.wheel span b {
  position: absolute !important;
  top: 24%;
  left: 50%;
  width: 44%;
  margin: 0 !important;
  transform: translate(-50%, -50%) rotate(90deg);
  writing-mode: horizontal-tb;
  text-align: center;
  color: #fff !important;
  font-size: clamp(0.8rem, 3.4vw, 0.95rem) !important;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: 0 !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
/* ---- site-style-8 ---- */
html:has(#maintO),
body:has(#maintO) {
  overflow: hidden !important;
  overscroll-behavior: none;
  touch-action: none;
}
body:has(#maintO) .bNav,
body:has(#maintO) .tahsili-nav,
body:has(#maintO) .t2nav,
body:has(#maintO) #hx,
body:has(#maintO) #ih {
  display: none !important;
}
#maintO {
  inset-block-end: auto !important;
  height: 100lvh !important;
  min-height: 100%;
  padding-block-end: calc(24px + env(safe-area-inset-bottom));
}
/* ---- site-style-9 ---- */
@media (max-width: 1099px) {
  body:has(#teacher:not([hidden])) .brand {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 0;
    height: auto !important;
    padding: 10px 16px !important;
    padding-block-start: max(10px, env(safe-area-inset-top)) !important;
    background: var(--hxB, var(--bg)) !important;
    color: var(--fg) !important;
    border-bottom: 1px solid var(--line);
    position: sticky !important;
    top: 0;
    z-index: 840;
  }
  body:has(#teacher:not([hidden])) .brand .bk,
  body:has(#teacher:not([hidden])) .brand .bs,
  body:has(#teacher:not([hidden])) .brand .bmeta,
  body:has(#teacher:not([hidden])) .brand .dna,
  body:has(#teacher:not([hidden])) .brand br {
    display: none !important;
  }
  body:has(#teacher:not([hidden])) .brand .blogo {
    width: 36px !important;
    height: 36px !important;
    margin: 0;
    border-radius: var(--r-sm);
  }
  body:has(#teacher:not([hidden])) .brand h1 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin: 0;
    flex: 1;
    color: var(--fg) !important;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  body:has(#teacher:not([hidden])) .brand h1::after {
    content: "· لوحة المعلم";
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
  }
  body:has(#teacher:not([hidden])) .brand h1 .betaTag {
    display: none !important;
  }
}
:is(#aTbl, #rTbl, #anTbl, #lateList) > p.hint {
  margin: 0 !important;
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  padding: 28px 16px !important;
  text-align: center !important;
  color: var(--muted);
  line-height: 1.8;
  white-space: normal;
}
/* ---- site-style-10 ---- */
body.watching.stuHd.inner aside.brand {
  display: flex !important;
}
body.watching.stuHd.inner #ih .page-title {
  font-size: 1.25rem;
}
body.watching.stuHd.inner #ih .page-subtitle {
  display: none;
}
/* ---- site-style-11 ---- */
.mock-exam-result > h2 {
  text-align: center !important;
  justify-content: center;
  width: 100%;
  margin-block: 4px;
}
.mock-exam {
  overflow: clip !important;
}
body:has(#hxBar.on) .mock-exam-head {
  top: calc(56px + env(safe-area-inset-top, 0px)) !important;
}
/* ---- site-style-12 ---- */
.askO {
  position: fixed;
  inset: 0;
  z-index: 10070;
  background: rgba(9, 13, 22, 0.55);
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-block-end: max(16px, env(safe-area-inset-bottom));
  animation: askF 0.18s ease;
}
@media (min-width: 600px) {
  .askO {
    place-items: center;
  }
}
.ask-box {
  width: min(440px, 100%);
  background: var(--card, #fff);
  color: var(--fg);
  border-radius: 22px;
  padding: 22px 18px 16px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  animation: askU 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.ask-box h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  line-height: 1.45;
}
.ask-box p {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.8;
}
.ask-box .row2 {
  display: grid;
  gap: 8px;
}
.ask-box button {
  min-height: 48px;
  border-radius: var(--r-lg);
  font-weight: 700;
  font-size: 1rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ask-box button:active {
  transform: scale(0.98);
}
.ask-box .y {
  background: var(--accent, var(--c-green-3));
  color: #fff;
}
.ask-box .n {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}
@keyframes askF {
  from {
    opacity: 0;
  }
}
@keyframes askU {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
}
/* ---- site-style-13 ---- */
.toast {
  left: 0 !important;
  right: 0;
  margin-inline: auto;
  width: fit-content;
  max-width: min(440px, calc(100vw - 32px));
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  transform: translateY(16px) scale(0.98) !important;
  background: #14211c !important;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 18px !important;
  border-radius: var(--r-xl);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transition:
    opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  z-index: 10080;
}
.toast.on {
  transform: translateY(0) scale(1) !important;
}
body.watching .toast,
body:has(#teacher:not([hidden])) .toast {
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}
body:has(#teacher:not([hidden])) .tahsili-nav ~ .toast {
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}
html[data-theme="dark"] .toast {
  background: #e6eeea !important;
  color: #0e1714;
}
.ask-box .y.del {
  background: #c2412d;
}
/* ---- site-style-14 ---- */
.t3Inv {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.t3InvI {
  width: 52px;
  height: 52px;
  border-radius: var(--r-xl);
  background: rgba(245, 197, 66, 0.18);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  flex: none;
}
.t3Inv > div {
  flex: 1;
  min-width: 150px;
}
.t3InvB {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-lg);
  padding: 0 16px;
  background: var(--c-gold-2);
  color: #2a2100;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.t3InvB:active {
  transform: scale(0.97);
}
.t3Nx {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: start;
  border: 0;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 10px;
  background: var(--side, var(--c-green-3));
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.t3Nx:active {
  transform: scale(0.98);
}
.t3Nx small {
  display: block;
  color: #c9ded3;
  font-size: 0.8rem;
}
.t3Nx b {
  display: block;
  font-size: 1.05rem;
  line-height: 1.5;
}
.t3Nx .t3NxI {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-gold-2);
  color: #2a2100;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex: none;
}
.t3Nx span.tx {
  flex: 1;
  min-width: 0;
}
.games-filter {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.games-filter button {
  flex: none;
  min-height: 40px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.games-filter button.on {
  background: var(--hxA, var(--c-green-3));
  color: #fff;
  border-color: transparent;
}
.t3GlB {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin-top: 10px;
  text-align: start;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--fg);
  border-radius: var(--r-xl);
  padding: 12px 14px;
  cursor: pointer;
  min-height: 64px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.t3GlB:active {
  transform: scale(0.98);
}
.t3GlB .ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--accent-2, #e7f2ec);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}
.t3GlB .tx {
  flex: 1;
}
.t3GlB b {
  display: block;
}
.t3GlB small {
  color: var(--muted);
  font-size: 0.8rem;
}
.games-search {
  width: 100%;
  min-height: 46px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  padding: 0 14px;
  font-size: 1rem;
  margin-bottom: 8px;
  box-sizing: border-box;
}
/* ---- site-style-15 ---- */
#bNav,
.tahsili-nav {
  isolation: isolate;
}
#bNav .nvPill,
.tahsili-nav .nvPill {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--r-pill);
  background: var(--accent-2);
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transition:
    transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1),
    width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.2s;
}
#bNav.hasPill a.on i,
.tahsili-nav.hasPill button.on i {
  background: transparent !important;
}
#bNav a,
.tahsili-nav button {
  transition: color 0.25s;
}
@keyframes ihIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
.ihIn {
  animation: ihIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (prefers-reduced-motion: reduce) {
  #bNav .nvPill,
  .tahsili-nav .nvPill {
    transition: none;
  }
  .ihIn {
    animation: none;
  }
}
/* ---- site-style-16 ---- */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}
:root {
  --sp: cubic-bezier(0.34, 1.56, 0.64, 1);
  --eo: cubic-bezier(0.16, 1, 0.3, 1);
}
/* 1 press */
.chapter-sheet-row,
.cv,
.lc,
.wl,
.t3U > button,
.t3Cta,
.t3Nx,
.t3GlB,
.home-tasks-link,
#contGo,
.contGo,
#xv a.card,
#xv .gc,
#xv a[href^="#"]:not(.btnlink),
.t3Rec button,
.rank-strip,
.lesson-quiz-option,
.labX button {
  transition:
    transform 0.25s var(--eo),
    box-shadow 0.25s var(--eo),
    background-color 0.2s,
    border-color 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.chapter-sheet-row:active,
.cv:active,
.lc:active,
.wl:active,
.t3U > button:active,
.t3Cta:active,
.t3Nx:active,
.t3GlB:active,
.home-tasks-link:active,
#contGo:active,
.contGo:active,
#xv a.card:active,
#xv .gc:active,
#xv a[href^="#"]:not(.btnlink):active,
.t3Rec button:active,
.rank-strip:active,
.labX button:active {
  transform: scale(0.97);
}
.lesson-quiz-option:active {
  transform: scale(0.985);
}
/* 5 rings fill */
.t3Rg,
.lesson-quiz-ring,
.chapter-sheet-ring {
  animation: pFill 1.1s var(--eo) both;
}
@keyframes pFill {
  from {
    --p: 0;
  }
}
/* 6 quiz dots */
.lesson-quiz-dots i {
  transition: all 0.4s var(--eo);
}
.lesson-quiz-dots i.now {
  animation: dotNow 0.45s var(--sp);
}
@keyframes dotNow {
  from {
    transform: scaleX(0.4);
    opacity: 0.4;
  }
}
.lesson-quiz-dots i.pulse {
  animation: dotOk 0.5s var(--sp);
}
@keyframes dotOk {
  50% {
    transform: scale(1.6);
    filter: brightness(1.25);
  }
}
/* 7 stagger */
.stIn {
  animation: stIn 0.45s var(--eo) both;
}
@keyframes stIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
/* 8 large title */
#ih .page-title {
  transform-origin: right center;
  will-change: transform, opacity;
}
[dir="ltr"] #ih .page-title {
  transform-origin: left center;
}
/* 11 check */
.check-done-icon {
  display: inline-block;
  vertical-align: middle;
}
.check-done-icon circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 7;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  animation: check-done-icon 0.5s var(--eo) forwards;
}
.check-done-icon path {
  fill: none;
  stroke: currentColor;
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation: check-done-icon 0.35s 0.35s var(--eo) forwards;
}
@keyframes check-done-icon {
  to {
    stroke-dashoffset: 0;
  }
}
.certCk {
  display: block;
  width: 84px;
  height: 84px;
  margin: 4px auto 8px;
  color: var(--accent, var(--c-green-3));
}
/* 12 badge */
.bdO {
  position: fixed;
  inset: 0;
  z-index: 10075;
  display: grid;
  place-items: center;
  background: rgba(9, 13, 22, 0.45);
  padding: 16px;
  animation: askF 0.2s ease;
}
.badge-card {
  background: var(--card, #fff);
  color: var(--fg);
  border-radius: 24px;
  padding: 24px 22px 18px;
  text-align: center;
  width: min(320px, 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.badge-icon {
  width: 104px;
  height: 104px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe58a, var(--c-gold-dark));
  display: grid;
  place-items: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(224, 161, 0, 0.4);
  animation: bdPop 0.6s var(--sp);
}
.badge-icon::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.75) 50%, transparent 60%);
  transform: translateX(-100%);
  animation: bdShn 0.9s 0.25s var(--eo) forwards;
}
@keyframes bdPop {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  60% {
    transform: scale(1.12);
    opacity: 1;
  }
  100% {
    transform: scale(1);
  }
}
@keyframes bdShn {
  to {
    transform: translateX(100%);
  }
}
.badge-card small {
  color: var(--muted);
}
.badge-card b {
  display: block;
  font-size: 1.15rem;
  margin: 2px 0 12px;
  line-height: 1.5;
}
.badge-card button {
  min-height: 46px;
  width: 100%;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--accent, var(--c-green-3));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
}
@media (prefers-reduced-motion: reduce) {
  .t3Rg,
  .lesson-quiz-ring,
  .chapter-sheet-ring,
  .lesson-quiz-dots i,
  .stIn,
  .check-done-icon *,
  .badge-icon,
  .badge-icon::after {
    animation: none !important;
  }
  .check-done-icon circle,
  .check-done-icon path {
    stroke-dashoffset: 0;
  }
}
/* ---- site-style-17 ---- */
/* 1 skeleton */
.skeleton-wrap {
  display: grid;
  gap: 10px;
  padding: 4px 0;
}
.skeleton-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.skeleton-line {
  border-radius: var(--r-sm);
  background: linear-gradient(
    90deg,
    var(--line) 25%,
    color-mix(in srgb, var(--line) 35%, transparent) 50%,
    var(--line) 75%
  );
  background-size: 300% 100%;
  animation: skS 1.3s linear infinite;
}
@keyframes skS {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -200% 0;
  }
}
/* 2 fly */
.ptFly {
  position: fixed;
  z-index: 10090;
  font-weight: 800;
  color: var(--c-gold-dark);
  font-size: 1.15rem;
  pointer-events: none;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.ptBump {
  animation: ptB 0.45s var(--sp);
}
@keyframes ptB {
  50% {
    transform: scale(1.25);
  }
}
/* 3 flame */
#hx .home-streak span.fire svg {
  transform-origin: 50% 90%;
  animation: flk 1.6s ease-in-out infinite;
}
@keyframes flk {
  0%,
  100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.1, 1.16) rotate(3deg);
  }
}
/* 4 answers */
.lesson-quiz-option.ok,
.challenge-options button.ok {
  animation: okG 0.5s var(--sp);
}
.lesson-quiz-option.no,
.challenge-options button.no {
  animation: noS 0.4s;
}
@keyframes okG {
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 6px rgba(31, 157, 99, 0.22);
  }
}
@keyframes noS {
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(3px);
  }
}
/* 5 loading btn */
button.lesson-detail-btn {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
button.lesson-detail-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spn 0.7s linear infinite;
}
button.ghost.lesson-detail-btn::after,
button.gh.lesson-detail-btn::after {
  border-color: var(--line);
  border-top-color: var(--accent);
}
button.dnB {
  position: relative;
  color: transparent !important;
  background: var(--c-green-mid) !important;
  border-color: var(--c-green-mid);
}
button.dnB::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
  animation: ptB 0.35s var(--sp);
}
@keyframes spn {
  to {
    transform: rotate(360deg);
  }
}
/* 6 flip */
.flashcard .flashcard-inner {
  transition: transform 0.6s var(--eo) !important;
}
/* 7 segmented */
.profile-tabs {
  position: relative;
  isolation: isolate;
}
.profile-tabs::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  inset-inline-start: 4px;
  width: calc((100% - 8px) / 3);
  border-radius: var(--r-sm);
  background: var(--accent);
  z-index: -1;
  transform: translateX(calc(var(--mi, 0) * -100%));
  transition: transform 0.4s var(--sp);
}
[dir="ltr"] .profile-tabs::before {
  transform: translateX(calc(var(--mi, 0) * 100%));
}
.profile-tabs.noT::before {
  transition: none;
}
.profile-tabs button.on {
  background: transparent !important;
}
.profile-tabs button {
  transition: color 0.25s;
}
/* 8 toggle */
.tog input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 52px !important;
  height: 30px;
  flex: none;
  border-radius: 15px;
  background: var(--line);
  position: relative;
  cursor: pointer;
  margin: 0 !important;
  transition: background 0.3s;
  order: 2;
  margin-inline-start: auto !important;
}
.tog input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
  transition:
    inset-inline-start 0.35s var(--sp),
    width 0.2s var(--eo);
}
.tog input[type="checkbox"]:active::after {
  width: 30px;
}
.tog input[type="checkbox"]:checked {
  background: var(--accent);
}
.tog input[type="checkbox"]:checked::after {
  inset-inline-start: 25px;
}
.tog input[type="checkbox"]:checked:active::after {
  inset-inline-start: 19px;
}
.tog input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tog:has(input[type="checkbox"]) {
  align-items: center;
}
/* 9 peek */
.pkO {
  position: fixed;
  inset: 0;
  z-index: 10060;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(9, 13, 22, 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: askF 0.2s;
}
.passkey-card-body {
  width: min(400px, 100%);
  background: var(--card);
  color: var(--fg);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  animation: pkI 0.35s var(--sp);
}
@keyframes pkI {
  from {
    transform: scale(0.86);
    opacity: 0;
  }
}
.passkey-card-body small {
  color: var(--muted);
}
.passkey-card-body h3 {
  margin: 2px 0 6px;
  font-size: 1.15rem;
  line-height: 1.5;
}
.passkey-card-body ul {
  margin: 6px 0 12px;
  padding-inline-start: 18px;
  font-size: 0.9rem;
  line-height: 1.8;
}
.passkey-card-body .row2 {
  display: grid;
  gap: 8px;
}
.passkey-card-body button {
  min-height: 46px;
  border-radius: var(--r-lg);
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
}
.passkey-card-body .y {
  background: var(--accent);
  color: #fff;
}
.passkey-card-body .n {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--fg);
}
.pkHold {
  transform: scale(0.95) !important;
  transition: transform 0.45s var(--eo) !important;
}
/* 10 reveal */
.dq h2:has(.word-reveal) {
  display: block !important;
  white-space: normal;
}
.dq h2 .word-reveal {
  display: inline-block;
  opacity: 0;
  filter: blur(6px);
  animation: word-reveal 0.5s var(--eo) forwards;
}
@keyframes word-reveal {
  to {
    opacity: 1;
    filter: none;
  }
}
/* 11 glass */
#hxBar.on {
  backdrop-filter: blur(16px) saturate(1.5) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.5) !important;
}
/* 12 steps */
#prog.stp2 {
  display: flex !important;
  align-items: center;
  gap: 0;
}
#prog.stp2 .dt {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.35s var(--eo);
}
#prog.stp2 .dt.dn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
#prog.stp2 .dt.cur {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-2);
}
#prog.stp2 .dt.pop {
  animation: ptB 0.4s var(--sp);
}
#prog.stp2 .ln {
  flex: 1;
  height: 4px !important;
  border-radius: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}
#prog.stp2 .ln i {
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--eo);
}
[dir="ltr"] #prog.stp2 .ln i {
  transform-origin: left;
}
#prog.stp2 .ln.dn i {
  transform: scaleX(1);
}
@media (prefers-reduced-motion: reduce) {
  .skeleton-line,
  #hx .home-streak span.fire svg,
  .lesson-quiz-option,
  .challenge-options button,
  .profile-tabs::before,
  .passkey-card-body,
  .dq h2 .word-reveal,
  #prog.stp2 * {
    animation: none !important;
    transition: none !important;
  }
  .dq h2 .word-reveal {
    opacity: 1;
    filter: none;
  }
}
/* ---- site-style-18 ---- */
/* 1 island */
.isl {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  inset-inline: 0;
  margin-inline: auto;
  z-index: 10095;
  width: 120px;
  height: 34px;
  border-radius: 20px;
  background: #0b0f0d;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px) scale(0.9);
  transition:
    width 0.55s var(--sp),
    height 0.55s var(--sp),
    border-radius 0.4s,
    opacity 0.25s,
    transform 0.35s var(--sp);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}
.isl.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
.isl.on {
  width: min(340px, calc(100vw - 32px));
  height: auto;
  min-height: 48px;
  border-radius: 24px;
  padding: 6px 16px;
}
.isl .tx {
  font-size: 0.85rem !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.isl .ic {
  font-size: 1.25rem;
  flex: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.isl .tx {
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 0.92rem;
  line-height: 1.6;
  font-weight: 600;
}
.isl.on .ic,
.isl.on .tx {
  opacity: 1;
  transition-delay: 0.18s;
}
html[data-theme="dark"] .isl {
  background: #e6eeea;
  color: #0e1714;
}
/* 2 celebration */
.celO {
  position: fixed;
  inset: 0;
  z-index: 10085;
  background: linear-gradient(160deg, #16704f, #0b3b2c);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  text-align: center;
  animation: askF 0.3s;
}
.celO .big {
  font-size: 4.2rem;
  transform: scale(0);
  animation: cPop 0.7s 0.1s var(--sp) forwards;
}
.celO .ln {
  opacity: 0;
  transform: translateY(12px);
  animation: cUp 0.5s var(--eo) forwards;
}
.celO h2 {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  line-height: 1.45;
  color: #fff;
}
.celO .sts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}
.celO .sts div {
  background: rgba(255, 255, 255, 0.13);
  border-radius: var(--r-xl);
  padding: 10px 16px;
  min-width: 84px;
}
.celO .sts b {
  display: block;
  font-size: 1.4rem;
}
.celO button {
  min-height: 50px;
  min-width: 200px;
  border: 0;
  border-radius: var(--r-xl);
  background: var(--c-gold-2);
  color: #2a2100;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
}
@keyframes cPop {
  60% {
    transform: scale(1.2);
  }
  to {
    transform: scale(1);
  }
}
@keyframes cUp {
  to {
    opacity: 1;
    transform: none;
  }
}
/* 4 heatmap */
.heatmap-cell .heatmap-days,
.heatmap-cell .hm {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.heatmap-cell .heatmap-days {
  font-size: 0.7rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 4px;
}
.heatmap-cell .hm i {
  aspect-ratio: 1;
  border-radius: 6px;
  background: var(--line);
  transform: scale(0);
  animation: hmP 0.3s var(--sp) forwards;
}
.heatmap-cell .hm i.on {
  background: var(--accent);
}
.heatmap-cell .hm i.td {
  outline: 2px solid var(--c-gold-2);
  outline-offset: 1px;
}
.heatmap-cell .hm i.fu {
  opacity: 0.35;
}
.heatmap-cell .heatmap-legend {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 8px;
}
@keyframes hmP {
  to {
    transform: scale(1);
  }
}
/* 5 swipe */
.flashcard .swipe-yes,
.flashcard .swipe-no {
  position: absolute;
  top: 12px;
  z-index: 3;
  font-weight: 800;
  font-size: 0.9rem;
  border: 2px solid;
  border-radius: var(--r-sm);
  padding: 0 10px;
  opacity: 0;
  pointer-events: none;
}
.flashcard .swipe-yes {
  left: 12px;
  color: var(--c-green-mid);
}
.flashcard .swipe-no {
  right: 12px;
  color: #c2412d;
}
.flashcard {
  touch-action: pan-y;
  position: relative;
}
.flashcard-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 6px;
}
/* 6 search recents */
#srchRes .search-recent {
  padding: 6px 12px;
  color: var(--muted);
  font-size: 0.8rem;
}
#srchRes button.rc {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
#srchRes button {
  animation: cUp 0.25s var(--eo) both;
  opacity: 0;
  transform: translateY(6px);
}
/* 7 coverflow */
#h2car .cv {
  transition:
    transform 0.2s ease-out,
    opacity 0.2s ease-out;
}
/* 8 detents */
.chapter-sheet-panel.full {
  max-height: 94dvh;
  min-height: 94dvh;
  transition:
    min-height 0.4s var(--sp),
    max-height 0.4s var(--sp);
}
/* 9 fab */
.askF {
  position: fixed;
  inset-inline-end: 16px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 845;
  height: 56px;
  width: 56px;
  border-radius: 28px;
  background: var(--accent);
  color: #fff;
  border: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  overflow: hidden;
  cursor: pointer;
  transition:
    width 0.45s var(--sp),
    border-radius 0.3s,
    transform 0.2s var(--eo),
    opacity 0.3s;
  box-shadow: 0 10px 24px rgba(15, 92, 63, 0.35);
}
.askF .i {
  font-size: 1.4rem;
  flex: none;
}
.askF input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  border-radius: var(--r-md);
  height: 38px;
  color: #fff;
  padding: 0 12px;
  font: inherit;
  font-size: 1rem;
  opacity: 0;
  transition: opacity 0.2s;
}
.askF input::placeholder {
  color: #d6eee3;
}
.askF .go {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--c-gold-2);
  color: #2a2100;
  font-weight: 800;
  opacity: 0;
  cursor: pointer;
}
.askF.on {
  width: min(360px, calc(100vw - 32px));
  border-radius: 20px;
  cursor: default;
}
.askF.on input,
.askF.on .go {
  opacity: 1;
  transition-delay: 0.2s;
}
.askF:not(.on):active {
  transform: scale(0.94);
}
.askF.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}
/* 10 level */
.lvUpO {
  position: fixed;
  inset: 0;
  z-index: 10086;
  display: grid;
  place-items: center;
  background: rgba(9, 13, 22, 0.55);
  padding: 16px;
  animation: askF 0.25s;
}
.lvUpO .c {
  background: var(--card);
  color: var(--fg);
  border-radius: 24px;
  padding: 24px;
  text-align: center;
  width: min(320px, 100%);
}
.lvUpO .b {
  width: 96px;
  height: 96px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe58a, var(--c-gold-dark));
  display: grid;
  place-items: center;
  font-size: 2.6rem;
  animation: cPop 0.7s var(--sp);
}
.lvO h3 {
  margin: 0;
  font-size: 1.3rem;
}
.lvO p {
  margin: 4px 0 14px;
  color: var(--muted);
}
.lvUpO button {
  min-height: 46px;
  width: 100%;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}
/* 11 parallax */
.lesson-end-cover .lesson-end-icon {
  will-change: transform;
}
/* 12 theme reveal */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
@media (prefers-reduced-motion: reduce) {
  .isl,
  .celO *,
  .heatmap-cell .hm i,
  #srchRes button,
  .askF,
  .lvUpO .b {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
/* ---- site-style-19 ---- */
.cmbC {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-inline-start: 8px;
  background: linear-gradient(135deg, #f59e0b, #dc2626);
  color: #fff;
  border-radius: var(--r-md);
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.9;
  animation: ptB 0.45s var(--sp);
}
.hlTb {
  position: fixed;
  z-index: 10070;
  display: flex;
  gap: 6px;
  background: #14211c;
  border-radius: var(--r-xl);
  padding: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: cUp 0.2s var(--eo);
}
.hlTb button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  cursor: pointer;
  padding: 0;
}
.hlTb button.x {
  background: #14211c;
  color: #fff;
  font-size: 0.9rem;
  border-color: #5e6e67;
}
mark.uhl {
  color: #14211c;
  border-radius: 4px;
  padding: 0 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.ds2 .rkC .st {
  transform-origin: bottom;
  animation: rkRise 0.6s var(--sp) both;
}
.ds2 .rkC.r1 .st {
  animation-delay: 0.15s;
}
.ds2 .rkC.r3 .st {
  animation-delay: 0.3s;
}
.ds2 .rkC .crown,
.ds2 .rkC > *:not(.st) {
  animation: cUp 0.4s 0.45s var(--eo) both;
}
@keyframes rkRise {
  from {
    transform: scaleY(0);
  }
}
.rxR {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.rxR button {
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--fg);
  border-radius: 20px;
  min-height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s var(--eo);
}
.rxR button.on {
  background: var(--accent-2);
  border-color: var(--accent);
  font-weight: 700;
}
.rxR button.pop {
  animation: ptB 0.4s var(--sp);
}
.rxR button:disabled {
  cursor: default;
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .cmbC,
  .ds2 .rkC .st,
  .ds2 .rkC > *,
  .rxR button {
    animation: none !important;
  }
}

/* ===== من assets/site-style-20.css ===== */

/* ===== DS3: التصميم الجديد للجوال (أكتوبر ٢٠٢٦) =====
   طبقة فوق التصميم الحالي. لإيقافها مؤقتًا من جهاز: localStorage.setItem('ds3off','1') */

/* ---------- الأساس ---------- */
html.ds3 {
  --display: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
  --e3: cubic-bezier(0.2, 0, 0, 1);
}
html.ds3[data-theme="light"] {
  --bg: #f2f6f3;
  --fg: var(--c-ink);
  --muted: var(--c-muted);
  --line: #dce7e1;
  --accent: var(--c-green);
  --accent-2: #e3efe8;
  --gold: var(--c-gold);
}
html.ds3 * {
  -webkit-tap-highlight-color: transparent;
}
html.ds3 #hx h2,
html.ds3 .sh2,
html.ds3 .gSh,
html.ds3 .h2W .h,
html.ds3 #xv .card > h2,
html.ds3 .lesson-end-cover h2,
html.ds3 .profile-info h2,
html.ds3 .dqC h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  letter-spacing: 0;
}

/* ---------- الرأس: الترحيب والسلسلة ---------- */
html.ds3 #hx h2 {
  font-size: 1.75rem !important;
  line-height: 1.35;
}
html.ds3 #hx .home-streak {
  gap: 8px;
  margin-top: 10px;
}
html.ds3 #hx .home-streak > span.ds3c {
  height: 34px;
  padding: 0 12px 0 14px;
  border-radius: 17px;
  font-size: 0.875rem;
  font-weight: 700;
  gap: 6px;
}
html.ds3 #hx .home-streak > span.ds3c b {
  color: inherit !important;
  font-weight: 700;
}
html.ds3 #hx .home-streak > span.ds3c svg {
  width: 20px;
  height: 20px;
  animation: none !important;
}
html.ds3 #hx .ds3Fire {
  background: #ffede0;
  color: #8a3300;
}
html.ds3 #hx .ds3Pts {
  background: #fff6da;
  color: #6b4a00;
}
html.ds3[data-theme="dark"] #hx .ds3Fire {
  background: #3a2116;
  color: #ffb48a;
}
html.ds3[data-theme="dark"] #hx .ds3Pts {
  background: #33290f;
  color: #ffd98a;
}
html.ds3 #hx .home-streak .home-rank-title.ds3h {
  display: none !important;
}
html.ds3 #hx .ds3Lv {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.8125rem;
  font-weight: 700;
}
html.ds3 #hx .ds3Lv > b {
  color: var(--accent);
  flex: none;
}
html.ds3 #hx .ds3Lv > span {
  color: var(--muted);
  flex: none;
}
html.ds3 #hx .ds3Lv > i {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--accent-2);
  display: block;
  overflow: hidden;
}
html.ds3 #hx .ds3Lv > i > i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--c-gold-4), #3faf7f);
  transition: width 0.6s var(--e3);
}
html.ds3 #hx .home-message {
  font-size: 0.8125rem !important;
  margin-top: 4px;
}

/* ---------- بطاقة تابع من حيث توقفت ---------- */
html.ds3 body.hm2 .contCard#contGo {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "t t" "s p";
  align-items: center;
  gap: 14px 12px;
  min-height: 150px;
  border-radius: 22px;
  padding: 20px !important;
  position: relative;
  background: var(--accent) !important;
}
html.ds3 body.hm2 .contCard .course-card-title {
  grid-area: t;
  position: relative;
  z-index: 1;
  padding-inline-end: 64px;
}
html.ds3 body.hm2 .contCard .course-card-title small:first-child {
  font-size: 0.875rem !important;
  color: var(--c-mint) !important;
  font-weight: 500;
}
html.ds3 body.hm2 .contCard .course-card-title b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem !important;
  line-height: 1.4;
}
html.ds3 body.hm2 .contCard .course-card-title small {
  font-size: 0.875rem !important;
  color: #d3ebe1 !important;
}
html.ds3 body.hm2 .contCard .course-card-title .bar {
  display: none;
}
html.ds3 body.hm2 .contCard .course-card-icon {
  grid-area: p;
  width: 56px !important;
  height: 56px !important;
  position: relative;
  z-index: 1;
}
html.ds3 body.hm2 .contCard .ds3Str {
  grid-area: s;
  position: relative;
  z-index: 1;
  height: 40px;
  display: block;
  max-width: 240px;
}
html.ds3 body.hm2 .contCard .ds3Deco {
  position: absolute;
  left: -22px;
  top: -20px;
  width: 104px;
  height: 104px;
  transform: rotate(-14deg);
  pointer-events: none;
}
html.ds3 body.hm2 .contCard .ds3Deco svg {
  width: 100% !important;
  height: 100% !important;
  filter: none;
}

/* ---------- خطة الأسبوع ---------- */
html.ds3 body.hm2 .h2W {
  border-radius: var(--r-2xl);
  padding: 6px 16px !important;
}
html.ds3 body.hm2 .h2W .h {
  font-size: 1.125rem !important;
  padding: 10px 0 6px;
  margin: 0;
}
html.ds3 body.hm2 .h2W .h span {
  font-size: 0.8125rem !important;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400 !important;
}
html.ds3 body.hm2 .h2W .wl {
  min-height: 60px;
  font-size: 1rem !important;
}
html.ds3 body.hm2 .h2W .wl b {
  font-weight: 500 !important;
}
html.ds3 body.hm2 .h2W .wl em {
  font-size: 0.8125rem !important;
}
html.ds3 body.hm2 .h2W .wl .c {
  width: 24px !important;
  height: 24px !important;
}
html.ds3 body.hm2 .h2W .wl.ok .c {
  background: var(--c-green-2) !important;
  border-color: var(--c-green-2);
}
html.ds3 body.hm2 .h2W .wl.ok b {
  opacity: 1 !important;
  color: var(--muted);
}
html.ds3 #home .lcard.exam {
  opacity: 1 !important;
  filter: none;
  color: var(--fg);
}
html.ds3 #home .lcard.exam * {
  color: inherit;
}
html.ds3 #home .lcard.exam small,
html.ds3 #home .lcard.exam .hint {
  color: var(--muted) !important;
}

/* ---------- الترتيب على الجوال (h2A و h2B بلا صندوق، فأبناؤهما يُرتَّبون مباشرة داخل #home) ---------- */
html.ds3 body.hm2:not(.dsk):not(.t3) #home:not([hidden]) {
  display: flex !important;
  flex-direction: column;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #home > *,
html.ds3 body.hm2:not(.dsk):not(.t3) #h2A > *,
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > * {
  order: 7;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #home > #contCard {
  order: 1;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2A > .h2W {
  order: 2;
  margin-top: 16px;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > .final-exam-card {
  order: 3;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > .sh2 {
  order: 4;
  margin-top: 16px;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > .car {
  order: 5;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > .cdots {
  order: 6;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > #rkStrip {
  order: 8;
  margin-top: 12px;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #h2B > .ql {
  order: 9;
}
html.ds3 body.hm2:not(.dsk):not(.t3) #home > #siteFt {
  order: 10;
}
html.ds3 .final-exam-card {
  border-style: solid;
  border-color: var(--line);
  background: var(--card) !important;
  min-height: 64px;
  padding: 12px 16px !important;
}
html.ds3 .final-exam-card.lk {
  opacity: 1 !important;
}
html.ds3 .final-exam-card b {
  font-size: 1rem !important;
  font-weight: 500;
}
html.ds3 .final-exam-card span,
html.ds3 .final-exam-card small {
  font-size: 0.875rem !important;
  color: var(--muted);
}

/* ---------- الفصول ---------- */
html.ds3 .sh2 {
  font-size: 1.125rem !important;
}
html.ds3 .sh2 span {
  font-size: 0.8125rem !important;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400 !important;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv {
  height: 188px !important;
  border-radius: 24px !important;
  padding: 16px 18px 14px !important;
  display: flex !important;
  flex-direction: column;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv small {
  font-size: 0.875rem !important;
  opacity: 1;
  color: #d3ebe1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.15rem !important;
  line-height: 1.35;
  width: 72% !important;
  margin-top: 8px !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv .ds3Wk {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--c-gold);
  color: #3a2a00;
  font-size: 0.75rem;
  font-weight: 700;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv .pg {
  position: relative !important;
  inset: auto !important;
  margin-top: auto;
  align-self: flex-start;
  background: none !important;
  padding: 0 !important;
  font-size: 0.875rem !important;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv .pg .ds3Rg {
  display: flex;
  gap: 4px;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv .pg .ds3Rg i {
  width: 8px;
  height: 22px;
  border-radius: 4px;
  border: 2px solid var(--c-gold);
  box-sizing: border-box;
  display: block;
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv .pg .ds3Rg i.on {
  background: var(--c-gold);
}
html.ds3 body.hm2:not(.dsk) #h2B .car .cv.sel {
  outline: 3px solid var(--c-gold);
  outline-offset: -3px;
}

html.ds3 body.dsk #h2B .cv .ds3Rg {
  display: none;
}
html.ds3 body.dsk #h2B .cv .ds3Wk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
html.ds3 body.hm2 .contCard#contGo {
  overflow: hidden !important;
  clip-path: inset(0 round 22px);
}

/* ---------- لوحة الصدارة ---------- */
html.ds3 #rkStrip.rank-strip {
  background: var(--card) !important;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  min-height: 76px;
  padding: 12px 16px;
  gap: 12px;
}
html.ds3 #rkStrip .rank-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: var(--r-lg);
  font-size: 0 !important;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 3h10v6a5 5 0 0 1-10 0z' fill='%23fff'/%3E%3Cpath d='M7 5H4.5a3 3 0 0 0 3 4.5M17 5h2.5a3 3 0 0 1-3 4.5' stroke='%23fff' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3Cpath d='M10 14h4v3h-4zM8 18h8v3H8z' fill='%23B07A00'/%3E%3Cpath d='m12 5 .9 1.8 2 .3-1.4 1.4.3 2-1.8-.9-1.8.9.3-2-1.4-1.4 2-.3z' fill='%23FFC233'/%3E%3C/svg%3E")
      center/28px no-repeat,
    linear-gradient(160deg, #ffe7a3, var(--c-gold-4)) !important;
}
html.ds3 #rkStrip .rank-title b {
  font-size: 1rem !important;
  color: var(--fg);
}
html.ds3 #rkStrip .rank-title small {
  font-size: 0.875rem !important;
  color: var(--muted) !important;
}
html.ds3 #rkStrip .rank-title em {
  color: var(--accent);
}
html.ds3 #rkStrip .rank-avatars > span:first-child {
  box-shadow: 0 0 0 2px var(--c-gold-4);
}
html.ds3 #rkStrip .rank-chevron {
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
  flex: none;
}
html.ds3 #rkStrip .rank-avatars > span {
  border-color: var(--card) !important;
  width: 30px !important;
  height: 30px !important;
}
html.ds3 #rkStrip .rank-title small.rank-hint {
  color: var(--accent) !important;
  font-weight: 500;
}

/* ---------- راجع وتدرّب ---------- */
html.ds3 body.hm2:not(.dsk) #h2B .ql {
  display: flex !important;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(-n + 2) {
  flex: 1 1 calc(50% - 6px);
  min-height: 132px !important;
  border-radius: var(--r-2xl);
  font-size: 1rem !important;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(n + 3) {
  flex: 1 1 100%;
  flex-direction: row !important;
  justify-content: flex-start;
  gap: 12px;
  min-height: 60px !important;
  padding: 0 14px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  border-radius: 0;
  border: 1px solid var(--line);
  border-top: 0;
  margin-top: -12px;
  background: var(--card) !important;
  color: var(--fg) !important;
  box-shadow: none !important;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(3) {
  border-top: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
  margin-top: 0;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:last-child {
  border-radius: 0 0 14px 14px;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(n + 3) i {
  width: 36px !important;
  height: 36px !important;
  border-radius: var(--r-sm);
  display: grid !important;
  place-items: center;
  font-size: 1.1rem !important;
  margin: 0;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(3) i {
  background: #ece6ff !important;
  color: #5b3fc4;
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(4) i {
  background: #e3efe8 !important;
  color: var(--c-green);
}
html.ds3 body.hm2:not(.dsk) #h2B .ql a:nth-child(5) i {
  background: #ffede0 !important;
  color: #b4501a;
}
html.ds3[data-theme="dark"] body.hm2:not(.dsk) #h2B .ql a:nth-child(n + 3) i {
  background: var(--accent-2) !important;
  color: var(--fg);
}

/* ---------- صفحة الدرس ---------- */
html.ds3 #lpHero .lesson-end-cover {
  background: var(--accent) !important;
  border-radius: 22px;
  padding: 20px !important;
  position: relative;
  overflow: hidden;
  color: #fff;
}
html.ds3 #lpHero .lesson-end-cover > small { /* فحص الشاشات: أبيض بدل النعناعي الباهت */
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  background: rgba(159, 211, 191, 0.18);
  color: #fff !important;
  font-size: 0.8125rem !important;
  font-weight: 600;
}
html.ds3 #lpHero .lesson-end-cover h2 {
  font-size: 1.75rem !important;
  line-height: 1.35 !important;
  margin: 12px 0 0 !important;
  color: #fff;
  position: relative;
  z-index: 1;
}
html.ds3 #lpHero .lesson-end-chapter.ds3h {
  display: none !important;
}
html.ds3 #lpHero .ds3Stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0 0 76px;
  position: relative;
  z-index: 1;
}
html.ds3 #lpHero .ds3Stats b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--c-gold);
  line-height: 1.3;
}
html.ds3 #lpHero .ds3Stats span {
  display: block;
  font-size: 0.8125rem;
  color: #d3ebe1;
}
html.ds3 #lpHero .ds3Pass {
  position: relative;
  z-index: 1;
  margin: 10px 0 0 76px;
  font-size: 0.8125rem;
  color: #d3ebe1;
}
html.ds3 #lpHero .lesson-end-icon {
  left: -26px !important;
  right: auto !important;
  bottom: -30px !important;
  top: auto !important;
  width: 116px !important;
  height: 116px !important;
  transform: rotate(18deg);
  opacity: 1 !important;
  z-index: 0;
}
html.ds3 #lpHero .lesson-end-icon svg {
  width: 100% !important;
  height: 100% !important;
}
html.ds3 #lpHero .lesson-end-box {
  background: none !important;
  border: 0;
  padding: 0 !important;
  margin-top: 24px;
}
html.ds3 #lpHero .lesson-end-box > b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: 10px;
}
html.ds3 #lpHero .lesson-end-box:not(.lesson-end-parts) ul {
  margin: 0;
  padding: 0 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
html.ds3 #lpHero .lesson-end-box:not(.lesson-end-parts) li {
  white-space: normal;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset;
  display: list-item !important;
  color: var(--fg);
  line-height: 1.6;
}
html.ds3 #lpHero .lesson-end-parts.ds3P {
  display: block !important;
}
html.ds3 .ds3Pt {
  list-style: none;
  margin: 0;
  padding: 0;
}
html.ds3 .ds3Pt li {
  display: flex !important;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  padding-bottom: 8px;
}
html.ds3 .ds3Pt li:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 34px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
html.ds3 .ds3Pt li.done:not(:last-child)::after {
  background: var(--c-gold);
}
html.ds3 .ds3Pt .n {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  background: var(--accent-2);
  color: var(--muted);
  position: relative;
  z-index: 1;
}
html.ds3 .ds3Pt li.done .n {
  background: var(--c-gold);
  color: #3a2a00;
}
html.ds3 .ds3Pt li.cur .n {
  background: var(--card);
  border: 2.5px solid var(--accent);
  color: var(--accent);
  box-sizing: border-box;
}
html.ds3 .ds3Pt .t {
  flex: 1;
  padding: 4px 0 12px;
}
html.ds3 .ds3Pt .t b {
  display: block;
  font-weight: 500;
}
html.ds3 .ds3Pt li.cur .t {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 8px;
}
html.ds3 .ds3Pt li.cur .t b {
  font-weight: 700;
}
html.ds3 .ds3Pt .t span {
  display: block;
  font-size: 0.875rem;
  color: var(--muted);
}
html.ds3 .ds3Pt .t .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--accent-2);
  margin-top: 10px;
  display: block;
  overflow: hidden;
}
html.ds3 .ds3Pt .t .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
html.ds3 .ds3PH {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
}
html.ds3 .ds3PH b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
}
html.ds3 .ds3PH span {
  font-size: 0.875rem;
  color: var(--muted);
}
html.ds3 #sStart.lp #sGo {
  width: 100%;
  min-height: 56px;
  border-radius: var(--r-xl);
  font-size: 1.0625rem;
  font-weight: 700;
  background: var(--accent) !important;
  color: #fff;
}
html.ds3 #sStart.lp #dgOffer {
  background: none !important;
  border: 0;
  padding: 0 !important;
  text-align: center;
  margin-top: 4px;
  order: 5;
}
html.ds3 #sStart.lp #dgOffer > div,
html.ds3 #sStart.lp #dgOffer > b {
  display: none !important;
}
html.ds3 #sStart.lp #dgOffer #dgGo {
  background: none !important;
  border: 0;
  color: var(--accent);
  font-weight: 500;
  min-height: 48px;
  box-shadow: none;
  width: auto;
}
html.ds3 #sStart.lp #dgOffer .hint {
  font-size: 0.875rem;
  color: var(--muted) !important;
  margin: 0;
}
html.ds3 #sStart.lp:not([hidden]) {
  display: flex !important;
  flex-direction: column;
}
html.ds3 #sStart.lp > #lpHero {
  order: 1;
}
html.ds3 #sStart.lp > .row {
  order: 3;
  margin-top: 24px;
}
html.ds3 #sStart.lp > #lpSub {
  order: 6;
  text-align: center;
  font-size: 0.875rem;
}

/* ---------- الألعاب ---------- */
html.ds3 .gSh {
  font-size: 1.125rem;
  margin-top: 24px;
}
html.ds3 .gSh span {
  font-size: 0.8125rem !important;
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400 !important;
}
html.ds3 #xv .gG .g2 {
  border-radius: var(--r-2xl);
}
html.ds3 #xv .gG .g2 small {
  font-size: 0.875rem !important;
}
html.ds3 #xv .gG .g2 b {
  font-size: 1rem !important;
}
html.ds3 #xv .gG.ds3-compete .g2 i {
  background: #ece6ff !important;
  color: #5b3fc4;
}
html.ds3 #xv .gG.ds3-reward .g2 {
  background: #fff8e1 !important;
  border-color: #ffe08a;
  color: #3a2a00;
}
html.ds3 #xv .gG.ds3-reward .g2 i {
  background: var(--c-gold-4) !important;
  color: #3a2a00;
}
html.ds3 #xv .gG.ds3-reward .g2 small {
  color: #6b4a00 !important;
}
html.ds3[data-theme="dark"] #xv .gG.ds3-reward .g2 {
  background: #2e2610 !important;
  border-color: #6b5520;
  color: #ffe9b0;
}
html.ds3[data-theme="dark"] #xv .gG.ds3-reward .g2 small {
  color: #e8cf8a !important;
}
html.ds3[data-theme="dark"] #xv .gG.ds3-compete .g2 i {
  background: #2a2346 !important;
  color: #c9b8ff;
}
html.ds3 #xv .dqC .tk em,
html.ds3 #xv .dqC .pts {
  font-size: 0.8125rem;
}

/* ---------- تقدّمي ---------- */
html.ds3 #xv .heatmap-days span {
  font-size: 0.75rem !important;
}
html.ds3 #xv .hm i {
  border-radius: var(--r-xs);
  max-height: 34px;
}

/* ---------- الشريط السفلي ---------- */
html.ds3 #bNav {
  position: fixed;
}
html.ds3 #bNav a > span {
  font-size: 0.75rem !important;
}
html.ds3 #bNav a {
  position: relative;
  z-index: 1;
}
html.ds3 #bNav a i,
html.ds3 #bNav a.on i {
  background: transparent !important;
}
html.ds3 #bNav a.on i {
  color: var(--accent);
}
html.ds3 #bNav .nvPill {
  display: none !important;
}
html.ds3 #bNav .ds3Pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 32px;
  width: 56px;
  border-radius: var(--r-xl);
  background: var(--accent-2);
  z-index: 0;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.3, 1.3, 0.5, 1);
  will-change: transform;
}

/* ---------- الحركة ---------- */
html.ds3 .contCard#contGo,
html.ds3 .ql a,
html.ds3 #rkStrip,
html.ds3 .cv,
html.ds3 #xv .g2,
html.ds3 .h2W .wl,
html.ds3 #sGo {
  transition: transform 0.1s var(--e3) !important;
}
html.ds3 .contCard#contGo:active,
html.ds3 .ql a:active,
html.ds3 #rkStrip:active,
html.ds3 #xv .g2:active,
html.ds3 .h2W .wl:active,
html.ds3 #sGo:active {
  transform: scale(0.97) !important;
}
html.ds3 .ds3In-tab {
  animation: ds3Tab 0.22s var(--e3) both;
}
html.ds3 .ds3In-fwd {
  animation: ds3Fwd 0.28s var(--e3) both;
}
html.ds3 .ds3In-back {
  animation: ds3Back 0.28s var(--e3) both;
}
@keyframes ds3Tab {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ds3Fwd {
  from {
    opacity: 0;
    transform: translateX(-28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ds3Back {
  from {
    opacity: 0;
    transform: translateX(28px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ds3Rung {
  0% {
    transform: scaleY(0.3);
    opacity: 0.3;
  }
  60% {
    transform: scaleY(1.15);
  }
  100% {
    transform: none;
    opacity: 1;
  }
}
html.ds3 .contCard .ds3Str .now {
  transform-box: fill-box;
  transform-origin: center;
  animation: ds3Rung 0.6s 0.25s var(--e3) both;
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 .ds3In-tab,
  html.ds3 .ds3In-fwd,
  html.ds3 .ds3In-back {
    animation: ds3Tab 0.12s linear both;
  }
  html.ds3 #bNav .ds3Pill {
    transition: none;
  }
  html.ds3 .contCard .ds3Str .now {
    animation: none;
  }
}

/* ---------- التحصيلي (طلاب ثالث ثانوي) ---------- */
html.ds3 body.t3 .t3Nx {
  border-radius: 22px;
  padding: 18px 18px !important;
  min-height: 104px;
  gap: 14px;
}
html.ds3 body.t3 .t3Nx .t3NxI {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50%;
  background: var(--c-gold) !important;
  color: #3a2a00;
  display: grid !important;
  place-items: center;
  font-size: 0;
  flex: none;
}
html.ds3 body.t3 .t3Nx .t3NxI svg {
  width: 26px;
  height: 26px;
}
html.ds3 body.t3 .t3Nx .tx small:first-child {
  font-size: 0.875rem !important;
  color: var(--c-mint) !important;
}
html.ds3 body.t3 .t3Nx .tx b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem !important;
  line-height: 1.4;
}
html.ds3 body.t3 .t3Nx .tx small {
  font-size: 0.875rem !important;
  color: #d3ebe1 !important;
}
html.ds3 body.t3 .t3Act {
  gap: 12px;
}
html.ds3 body.t3 .t3Cta {
  border-radius: var(--r-2xl);
  min-height: 96px;
  font-size: 1.0625rem;
  font-weight: 700;
  padding: 16px !important;
}
html.ds3 body.t3 .t3Cta small {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}
html.ds3 body.t3 .t3U {
  gap: 10px;
}
html.ds3 body.t3 .t3U > button {
  border-radius: var(--r-2xl) !important;
  padding: 14px 16px !important;
  min-height: 84px;
  gap: 14px;
}
html.ds3 body.t3 .t3U > button .ic {
  width: 48px !important;
  height: 48px !important;
  border-radius: var(--r-lg);
}
html.ds3 body.t3 .t3U > button:nth-child(4n + 1) .ic {
  background: #e3efe8 !important;
  color: var(--c-green);
}
html.ds3 body.t3 .t3U > button:nth-child(4n + 2) .ic {
  background: #ece6ff !important;
  color: #5b3fc4;
}
html.ds3 body.t3 .t3U > button:nth-child(4n + 3) .ic {
  background: #ffede0 !important;
  color: #b4501a;
}
html.ds3 body.t3 .t3U > button:nth-child(4n + 4) .ic {
  background: #e1f0fa !important;
  color: #1d5f8a;
}
html.ds3[data-theme="dark"] body.t3 .t3U > button .ic {
  background: var(--accent-2) !important;
  color: var(--fg);
}
html.ds3 body.t3 .t3U > button .tx b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.0625rem !important;
}
html.ds3 body.t3 .t3U > button .tx small {
  font-size: 0.875rem !important;
}
html.ds3 body.t3 .t3U > button .pb {
  height: 6px !important;
  border-radius: 3px;
  margin-top: 8px;
}
html.ds3 body.t3 .t3U > button .pb i {
  background: linear-gradient(90deg, var(--c-gold-4), #3faf7f) !important;
  border-radius: 3px;
}
html.ds3 body.t3 .t3U > button em {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  background: var(--accent);
  color: #fff;
  display: inline-flex !important;
  align-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  font-style: normal;
}
html.ds3 body.t3 .t3GlB {
  border-radius: var(--r-2xl);
  min-height: 76px;
  padding: 14px 16px !important;
}
html.ds3 body.t3 .t3GlB .ic {
  width: 48px !important;
  height: 48px !important;
  border-radius: var(--r-lg);
  background: #fff6da !important;
  color: #6b4a00;
  display: grid !important;
  place-items: center;
  font-size: 0;
}
html.ds3 body.t3 .t3GlB .ic svg {
  width: 24px;
  height: 24px;
}
html.ds3 body.t3 .t3GlB .tx b {
  font-size: 1rem !important;
}
html.ds3 body.t3 .t3GlB .tx small {
  font-size: 0.875rem !important;
}
html.ds3 body.t3 .t3Ch a {
  min-height: 48px;
  border-radius: var(--r-lg);
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

/* ---------- لوحة المعلم ---------- */
html.ds3 body:has(#teacher:not([hidden])) .brand h1::after {
  content: "لوحة المعلم";
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-2);
  padding: 3px 10px;
  border-radius: var(--r-xs);
}
html.ds3 #pT2 .t2hd {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
html.ds3 #pT2 .t2hd h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  margin: 0;
}
html.ds3 #pT2 .t2hd small {
  font-size: 0.875rem !important;
  color: var(--muted);
}
html.ds3 #pT2 .t2cmd {
  width: 100% !important;
  max-width: none;
  height: 48px;
  border-radius: var(--r-lg);
  box-sizing: border-box;
}
html.ds3 #pT2 .t2cmd input {
  font-size: 1rem !important;
}
html.ds3 #pT2 .t2chips button {
  min-height: 40px;
  padding: 0 16px !important;
  border-radius: 20px !important;
  font-size: 0.9375rem !important;
}
html.ds3 #pT2 .t2k {
  gap: 10px;
}
html.ds3 #pT2 .t2k > div {
  display: flex !important;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 2px;
  border-radius: var(--r-2xl) !important;
  padding: 14px 16px !important;
  min-height: 96px;
  box-sizing: border-box;
}
html.ds3 #pT2 .t2k > div b {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  font-size: 1.75rem !important;
  line-height: 1.2;
  color: var(--accent) !important;
}
html.ds3 #pT2 .t2k > div small {
  font-size: 0.8125rem !important;
  color: var(--muted) !important;
}
html.ds3 #pT2 .t2k > div:nth-child(1) {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
}
html.ds3 #pT2 .t2k > div:nth-child(1) b {
  color: var(--c-gold) !important;
}
html.ds3 #pT2 .t2k > div:nth-child(1) small {
  color: #cdebdf !important;
}
html.ds3 #pT2 .t2p {
  border-radius: var(--r-2xl);
}
html.ds3 #pT2 .t2p h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
}
html.ds3 #pT2 .t2p h3 .lnk {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-size: 0.875rem;
}
html.ds3 #pT2 .t2qa button {
  min-height: 84px;
  border-radius: var(--r-xl) !important;
  font-size: 0.875rem !important;
  font-weight: 700 !important;
  gap: 6px;
}
html.ds3 #pT2 .t2qa button svg {
  width: 24px !important;
  height: 24px !important;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
@media (max-width: 700px) {
  html.ds3 #pT2 > .t2p .t2tbl table,
  html.ds3 #pT2 > .t2p .t2tbl tbody {
    display: block;
  }
  html.ds3 #pT2 > .t2p .t2tbl tr:has(th) {
    display: none !important;
  }
  html.ds3 #pT2 > .t2p .t2tbl tr {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "n g" "l t";
    gap: 2px 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }
  html.ds3 #pT2 > .t2p .t2tbl tr:last-child {
    border-bottom: 0;
  }
  html.ds3 #pT2 > .t2p .t2tbl td {
    border: 0;
    padding: 0 !important;
  }
  html.ds3 #pT2 > .t2p .t2tbl td:nth-child(1) {
    grid-area: n;
    font-weight: 700;
  }
  html.ds3 #pT2 > .t2p .t2tbl td:nth-child(2) {
    display: none;
  }
  html.ds3 #pT2 > .t2p .t2tbl td:nth-child(3) {
    grid-area: l;
    font-size: 0.875rem;
    color: var(--muted);
  }
  html.ds3 #pT2 > .t2p .t2tbl td:nth-child(4) {
    grid-area: g;
    align-self: center;
  }
  html.ds3 #pT2 > .t2p .t2tbl td:nth-child(5) {
    grid-area: t;
    font-size: 0.8125rem;
    color: var(--muted);
  }
  html.ds3 #pT2 > .t2p .t2tbl td[colspan] {
    grid-column: 1/-1;
  }
  /* جدول الطلاب: بطاقة لكل طالب، وكل رقم معه عنوانه */
  html.ds3 #pT2 > .t2p .t2stbl tr {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
  }
  html.ds3 #pT2 > .t2p .t2stbl td {
    display: block !important;
    font-size: 0.8125rem;
    color: var(--muted);
    font-weight: 400;
  }
  html.ds3 #pT2 > .t2p .t2stbl td[data-l]::before {
    content: attr(data-l) ": ";
  }
  html.ds3 #pT2 > .t2p .t2stbl td:nth-child(1) {
    flex: 1 1 55%;
    order: -2;
    font-size: 1rem;
    color: inherit;
  }
  html.ds3 #pT2 > .t2p .t2stbl td:nth-child(6) {
    order: -1;
  }
  html.ds3 #pT2 > .t2p .t2stbl td:nth-child(4) {
    display: none !important;
  }
}
html.ds3 .t2pill {
  font-size: 0.875rem;
  padding: 3px 10px !important;
  border-radius: var(--r-xs);
  font-weight: 700;
}
html.ds3 .t2nav {
  position: fixed;
}
html.ds3 .t2nav button {
  position: relative;
  z-index: 1;
  font-size: 0.75rem !important;
  min-height: 52px;
}
html.ds3 .t2nav button.on {
  color: var(--accent) !important;
}
html.ds3 .t2nav .ds3Pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 32px;
  width: 56px;
  border-radius: var(--r-xl);
  background: var(--accent-2);
  z-index: 0;
  pointer-events: none;
  transition: transform 0.26s cubic-bezier(0.3, 1.3, 0.5, 1);
}
@media (min-width: 1100px) {
  html.ds3 .t2nav .ds3Pill {
    display: none;
  }
  html.ds3 .t2nav button.on {
    color: #fff !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 .t2nav .ds3Pill {
    transition: none;
  }
}

/* ---------- الصفحات الداخلية: عنوان وبطاقات وأزرار ---------- */
html.ds3 #ih .page-title {
  font-weight: 600 !important;
}
html.ds3 #xv .card {
  border-radius: 20px !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html.ds3 #xv .card h2,
html.ds3 #sCert .card h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  font-size: 1.25rem !important;
  line-height: 1.5 !important;
}
html.ds3 #xv .hint,
html.ds3 #sCert .hint {
  font-size: 0.875rem !important;
  line-height: 1.7;
}
html.ds3 #xv .card > button:not([class]),
html.ds3 #xv .row > button:not([class]),
html.ds3 #xv .row > .btnlink,
html.ds3 #sCert .row > button,
html.ds3 #sCert .certActions > button,
html.ds3 #sCert #wSpin {
  min-height: 52px;
  border-radius: var(--r-lg) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 0 22px !important;
}

/* ---------- الأسئلة: الخيارات والتغذية الراجعة ---------- */
html.ds3 .challenge-options {
  gap: 10px !important;
}
html.ds3 .challenge-options button,
html.ds3 .lesson-quiz-option {
  min-height: 56px !important;
  border-radius: var(--r-lg) !important;
  border: 1.5px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  font-size: 1rem !important;
  text-align: right;
  padding: 12px 16px !important;
  box-shadow: none;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    transform 0.1s var(--e3) !important;
}
html.ds3 .challenge-options button:active,
html.ds3 .lesson-quiz-option:active {
  transform: scale(0.98);
}
html.ds3 .challenge-options button.ok,
html.ds3 .lesson-quiz-option.ok {
  background: #e5f4ec !important;
  border: 2px solid var(--c-green-2) !important;
  color: var(--c-ink) !important;
  font-weight: 700;
  animation: ds3Ok 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}
html.ds3 .challenge-options button.no,
html.ds3 .lesson-quiz-option.no {
  background: #fcedeb !important;
  border: 2px solid var(--c-danger) !important;
  color: var(--c-ink) !important;
  animation: ds3No 0.34s ease;
}
html.ds3[data-theme="dark"] .challenge-options button.ok,
html.ds3[data-theme="dark"] .lesson-quiz-option.ok {
  background: #123f2a !important;
  color: #eafff2 !important;
}
html.ds3[data-theme="dark"] .challenge-options button.no,
html.ds3[data-theme="dark"] .lesson-quiz-option.no {
  background: #3a1c1c !important;
  color: #ffecea !important;
}
html.ds3 .lesson-quiz-option .k {
  width: 30px !important;
  height: 30px !important;
  border-radius: 50%;
  background: var(--accent-2) !important;
  color: var(--accent) !important;
  font-weight: 700;
  display: grid !important;
  place-items: center;
  flex: none;
}
html.ds3 .lesson-quiz-option.ok .k {
  background: var(--c-green-2) !important;
  color: #fff !important;
}
html.ds3 .lesson-quiz-option.no .k {
  background: var(--c-danger) !important;
  color: #fff !important;
}
@keyframes ds3Ok {
  0% {
    transform: scale(0.97);
  }
  60% {
    transform: scale(1.02);
  }
  100% {
    transform: none;
  }
}
@keyframes ds3No {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}
html.ds3 #quiz .lesson-quiz,
html.ds3 #dgOffer .lesson-quiz {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px !important;
}
html.ds3 .lesson-quiz-head b {
  font-size: 0.9375rem !important;
}
html.ds3 .lesson-quiz-dots i {
  height: 6px !important;
  border-radius: 3px;
}
html.ds3 .lesson-quiz-question,
html.ds3 #xv .dq h2,
html.ds3 #xv .challenge-question {
  font-size: 1.1875rem !important;
  font-weight: 700 !important;
  line-height: 1.65 !important;
  font-family: "IBM Plex Sans Arabic", sans-serif !important;
}
html.ds3 .lesson-quiz-feedback {
  border-radius: var(--r-lg);
  padding: 12px 16px !important;
  font-size: 1rem;
}
html.ds3 .lesson-quiz-next,
html.ds3 #lesson-quiz-next {
  min-height: 56px;
  border-radius: var(--r-xl) !important;
  font-size: 1.0625rem;
  font-weight: 700;
}
html.ds3 .lxBox {
  border-radius: var(--r-xl);
  padding: 14px 16px !important;
}
html.ds3 .explain-again-btn {
  border-radius: var(--r-md);
  min-height: 44px;
}

/* ---------- نتيجة الدرس ---------- */
html.ds3 #lpEnd {
  width: 100% !important;
  max-width: none;
  box-sizing: border-box;
}
html.ds3 #lpEnd .lesson-end-inner {
  border-radius: 24px;
  padding: 24px 18px !important;
}
html.ds3 #lpEnd h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  font-size: 1.75rem !important;
}
html.ds3 #lpEnd .lesson-end-stats > div {
  border-radius: var(--r-lg) !important;
  font-size: 0.8125rem !important;
}
html.ds3 #lpEnd .lesson-end-stats b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem !important;
}
html.ds3 #lpEnd .lesson-end-buttons {
  gap: 10px;
}
html.ds3 #lpEnd .lesson-end-buttons > * {
  min-height: 52px !important;
  border-radius: var(--r-lg) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
html.ds3 #lpEnd .lesson-end-buttons svg {
  width: 20px;
  height: 20px;
  flex: none;
}
html.ds3 #sCert .msg {
  border-radius: var(--r-lg);
  padding: 12px 16px !important;
  font-size: 0.9375rem;
}

/* ---------- الألعاب من الداخل ---------- */
html.ds3 #xv .truefalse-buttons {
  gap: 12px;
}
html.ds3 #xv .truefalse-buttons button {
  min-height: 64px !important;
  border-radius: var(--r-xl) !important;
  font-size: 1.125rem !important;
  font-weight: 700 !important;
}
html.ds3 #xv .challenge-top {
  font-size: 0.875rem !important;
}
html.ds3 #xv .wordle-tile {
  border-radius: var(--r-sm);
}
html.ds3 #xv .kb button {
  border-radius: var(--r-sm) !important;
  min-height: 46px;
  font-weight: 700;
}
html.ds3 #xv .match-grid {
  gap: 10px;
}
html.ds3 #xv .match-grid button {
  border-radius: var(--r-lg) !important;
  min-height: 56px;
  border: 1.5px solid var(--line) !important;
  font-size: 0.9375rem !important;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    transform 0.1s var(--e3) !important;
}
html.ds3 #xv .match-grid button:active {
  transform: scale(0.97);
}
html.ds3 #xv .order-list li {
  border-radius: var(--r-lg);
  min-height: 56px;
}
html.ds3 #xv .order-list .order-number {
  width: 28px !important;
  height: 28px !important;
  font-weight: 700;
}
html.ds3 #xv .order-list button {
  width: 40px !important;
  height: 40px !important;
  border-radius: var(--r-md) !important;
}
html.ds3 #xv .k3 > div {
  border-radius: var(--r-xl) !important;
}
html.ds3 #xv .k3 b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem !important;
}
html.ds3 #xv select {
  min-height: 48px;
  border-radius: var(--r-lg);
  font-size: 1rem;
}
html.ds3 #xv .duel-card .duel-big,
html.ds3 #xv .chalIntro .icw {
  color: var(--accent);
}
html.ds3 #xv .shopG {
  gap: 12px;
}
html.ds3 #xv .shopI {
  border-radius: var(--r-2xl);
}
html.ds3 #xv .shopI button.small {
  min-height: 40px;
  border-radius: var(--r-md) !important;
  font-weight: 700;
}
html.ds3 #xv .bal {
  border-radius: var(--r-xl);
}
html.ds3 #xv .bal b {
  font-family: var(--display);
  font-weight: 600;
}
html.ds3 #xv .box-card .row > button {
  min-width: 180px;
}

/* ---------- حسابي ولوحة الصدارة والمجموعة ---------- */
html.ds3 #xv .avatar-picker {
  gap: 10px;
}
html.ds3 #xv .avatar-picker button {
  border-radius: var(--r-xl) !important;
  min-height: 84px;
}
html.ds3 #xv .avatar-picker button.on {
  outline: 2.5px solid var(--accent);
  outline-offset: -2.5px;
}
html.ds3 #xv label.tog {
  min-height: 56px;
  border-radius: var(--r-lg);
  font-size: 1rem;
}
html.ds3 #xv .rank-podium h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
}
html.ds3 #xv .rank-row {
  min-height: 60px;
  border-radius: 0;
}
html.ds3 #xv .rank-row b.pt {
  font-family: var(--display);
  font-weight: 600;
}
html.ds3 #xv .rank-row.isMe {
  background: var(--accent-2) !important;
}
html.ds3 #xv .chatHead {
  border-radius: var(--r-2xl);
}
html.ds3 #xv .chatHead b,
html.ds3 #xv .chatHead h2 {
  font-family: var(--display);
  font-weight: 600;
}
html.ds3 #xv .chat-compose textarea,
html.ds3 #xv .chat-compose input {
  border-radius: var(--r-lg) !important;
  min-height: 48px;
  font-size: 1rem !important;
}
html.ds3 #xv .chat-msg {
  border-radius: var(--r-xl);
}

/* قصاصات الاحتفال كانت تخرج عن عرض الشاشة فتصغّر الصفحة كلها على الجوال */
html.ds3,
html.ds3 body {
  overflow-x: clip;
}
/* احتفال إنهاء الدرس: الشريط الوراثي يمتلئ درجة درجة */
html.ds3 .celO .big.ds3Cel {
  font-size: 0;
  width: 260px;
  height: 56px;
  margin: 0 auto;
}
html.ds3 .celO .big.ds3Cel svg {
  width: 100%;
  height: 100%;
}
html.ds3 .celO .big.ds3Cel rect {
  transform-box: fill-box;
  transform-origin: center;
  animation: ds3Rung 0.5s var(--e3) both;
}
html.ds3 .celO .big.ds3Cel rect:nth-of-type(2) {
  animation-delay: 0.15s;
}
html.ds3 .celO .big.ds3Cel rect:nth-of-type(3) {
  animation-delay: 0.3s;
}
html.ds3 .celO .big.ds3Cel rect:nth-of-type(4) {
  animation-delay: 0.45s;
}
html.ds3 .celO .big.ds3Cel rect:nth-of-type(5) {
  animation-delay: 0.6s;
}
html.ds3 .celO .big.ds3Cel rect:nth-of-type(6) {
  animation-delay: 0.75s;
}
html.ds3 .celO h2 {
  font-family: var(--display) !important;
  font-weight: 600 !important;
  font-size: 1.5rem !important;
}
html.ds3 .celO .sts > div {
  border-radius: var(--r-xl) !important;
}
html.ds3 .celO .sts b {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem !important;
}
html.ds3 .celO > button {
  min-height: 56px;
  border-radius: var(--r-xl) !important;
  min-width: 200px;
  font-size: 1.0625rem !important;
  font-weight: 700 !important;
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 .celO .big.ds3Cel rect {
    animation: none;
  }
}

/* ---------- لوحة المعلم بهوية الطلاب ---------- */
html.ds3 #pT2 .t3hHd h2 {
  font-size: 1.75rem !important;
}
html.ds3 .t3hArt {
  position: absolute;
  left: -22px;
  top: -20px;
  width: 110px;
  height: 110px;
  transform: rotate(-14deg);
  pointer-events: none;
}
html.ds3 .t3hArt svg {
  width: 100% !important;
  height: 100% !important;
}
html.ds3 .t3hRow {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
html.ds3 .t3hBig {
  font-family: var(--display);
  font-weight: 600;
  font-size: 2.125rem;
  line-height: 1.1;
  color: var(--c-gold);
}
html.ds3 .t3hRow em {
  font-style: normal;
  font-family: var(--display);
  font-size: 1.125rem;
  color: #d3ebe1;
}
html.ds3 .t3hRow small {
  display: block;
  font-size: 0.875rem;
  color: #d3ebe1;
}
html.ds3 .t3hCols {
  display: flex;
  gap: 14px;
  align-items: flex-end;
  flex: none;
}
html.ds3 .t3hCols > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
html.ds3 .t3hCols > span > i {
  display: flex;
  align-items: flex-end;
  width: 26px;
  height: 56px;
  border-radius: var(--r-xs);
  background: rgba(159, 211, 191, 0.22);
  overflow: hidden;
}
html.ds3 .t3hCols > span > i > i {
  display: block;
  width: 100%;
  background: var(--c-gold);
  border-radius: var(--r-xs);
  transition: height 0.6s var(--e3);
}
html.ds3 .t3hCols small {
  font-size: 0.75rem !important;
}
html.ds3 .t3hKs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
html.ds3 .t3hK {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 12px;
}
html.ds3 .t3hK .ic {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
}
html.ds3 .t3hK .ic svg {
  width: 18px;
  height: 18px;
}
html.ds3 .t3hK b {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.375rem;
  margin-top: 8px;
  line-height: 1.3;
}
html.ds3 .t3hK small {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
html.ds3 .t3hK.gold .ic {
  background: #fff6da;
}
html.ds3 .t3hK.green .ic {
  background: #e5f4ec;
  color: var(--c-green-2);
}
html.ds3 .t3hK.green b {
  color: var(--c-green-2);
}
html.ds3 .t3hK.orange .ic {
  background: #ffede0;
}
html.ds3 .t3hH {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.125rem;
  margin: 28px 0 12px;
}
html.ds3 .t3hHr {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
html.ds3 .t3hHr .lnk {
  all: unset;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 4px;
}
html.ds3 .t3hHr .lnk:focus-visible {
  outline: 2px solid var(--accent);
}
html.ds3 .t3hArt .chapter-star,
html.ds3 .t3hArt > * {
  width: 100% !important;
  height: 100% !important;
  font-size: 110px;
  line-height: 1;
}
html.ds3 .t3hList {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
html.ds3 .t3hList + .t3hList {
  margin-top: 12px;
}
html.ds3 .t3hR {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  color: var(--fg);
}
html.ds3 .t3hR:last-child {
  border-bottom: 0;
}
html.ds3 button.t3hR:active {
  background: var(--accent-2);
}
html.ds3 button.t3hR:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}
html.ds3 .t3hR .ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex: none;
}
html.ds3 .t3hR .ic svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}
html.ds3 .t3hR .ic.gold {
  background: #fff6da;
  color: #8a5a00;
}
html.ds3 .t3hR .ic.red {
  background: #fcedeb;
  color: var(--c-danger);
}
html.ds3 .t3hR .ic.violet {
  background: #ece6ff;
  color: #5b3fc4;
}
html.ds3 .t3hR .ic.green {
  background: #e3efe8;
  color: var(--c-green);
}
html.ds3 .t3hR .ic.orange {
  background: #ffede0;
  color: #b4501a;
}
html.ds3 .t3hR .tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
html.ds3 .t3hR .tx b {
  font-weight: 700;
  font-size: 1rem;
}
html.ds3 .t3hR .tx small {
  font-size: 0.875rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ds3 .t3hR .ch {
  color: var(--muted);
  display: grid;
}
html.ds3 .t3hR .ch svg {
  width: 20px;
  height: 20px;
}
html.ds3 .t3hR .t3hN {
  min-width: 26px;
  height: 26px;
  border-radius: 13px;
  background: var(--c-gold-4) !important;
  color: #3a2a00;
  font-weight: 700;
  font-size: 0.875rem;
  display: grid;
  place-items: center;
  padding: 0 6px;
  box-sizing: border-box;
}
html.ds3 .t3hRes .t3hR {
  cursor: default;
}
html.ds3 .t3hR .av,
html.ds3 .t3av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-weight: 700;
  color: var(--c-ink);
  flex: none;
}
html.ds3 .a0 {
  background: var(--c-gold);
}
html.ds3 .a1 {
  background: var(--c-mint);
}
html.ds3 .a2 {
  background: #ece6ff;
}
html.ds3 .a3 {
  background: #ffede0;
}
html.ds3 .a4 {
  background: #e1f0fa;
}
html.ds3 .t3hQa {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
html.ds3 .t3hTile {
  all: unset;
  box-sizing: border-box;
  min-height: 112px;
  border-radius: var(--r-2xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.1s var(--e3);
}
html.ds3 .t3hTile:active {
  transform: scale(0.97);
}
html.ds3 .t3hTile:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
html.ds3 .t3hTile svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html.ds3 .t3hTile b {
  margin-top: auto;
  font-size: 1rem;
}
html.ds3 .t3hTile small {
  font-size: 0.875rem;
}
html.ds3 .t3hTile.gold {
  background: var(--c-gold);
  color: #3a2a00;
}
html.ds3 .t3hTile.green {
  background: var(--accent);
  color: #fff;
}
html.ds3 .t3hTile.green svg {
  stroke: var(--c-gold);
}
html.ds3 .t3hTile.green small {
  color: #cdebdf;
}
html.ds3[data-theme="dark"] .t3hR .ic,
html.ds3[data-theme="dark"] .t3hK .ic {
  background: var(--accent-2) !important;
  color: var(--fg);
}
/* قائمة الطلاب */
html.ds3 .t2sc {
  border-radius: var(--r-2xl) !important;
}
html.ds3 .t2sc.on {
  background: var(--accent) !important;
  color: #fff;
  border-color: var(--accent);
}
html.ds3 .t2sc .n {
  font-family: var(--display);
  font-weight: 600;
}
html.ds3 .t2sc.on .n {
  color: var(--c-gold);
}
html.ds3 .t3scBar {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--accent-2);
  margin: 8px 0 4px;
  overflow: hidden;
}
html.ds3 .t2sc.on .t3scBar {
  background: rgba(159, 211, 191, 0.25);
}
html.ds3 .t3scBar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--c-gold-4), #3faf7f);
}
html.ds3 .t2sc.on .t3scBar i {
  background: var(--c-gold);
}
html.ds3 .t2stbl td:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}
html.ds3 .t2stbl .t3av {
  width: 36px;
  height: 36px;
}
html.ds3 .t2fl input,
html.ds3 .t2fl select {
  min-height: 48px;
  border-radius: var(--r-lg) !important;
}
/* التواصل */
html.ds3 .question-item {
  border-radius: 20px;
}
html.ds3 .question-item textarea {
  border-radius: var(--r-lg);
  min-height: 88px;
}
html.ds3 .question-item button {
  min-height: 48px;
  border-radius: var(--r-lg) !important;
  font-weight: 700;
}
html.ds3 .t3q {
  padding: 16px !important;
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}
html.ds3 .t3qH {
  display: flex;
  align-items: center;
  gap: 12px;
}
html.ds3 .t3qH .t3av {
  width: 44px;
  height: 44px;
}
html.ds3 .t3qH .tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
html.ds3 .t3qH .tx b {
  font-weight: 700;
}
html.ds3 .t3qH .tx small {
  font-size: 0.8125rem;
  color: var(--muted);
}
html.ds3 .t3qT {
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-xs);
  background: #fff6da;
  color: #8a5a00;
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  flex: none;
}
html.ds3 .t3qT.ok {
  background: #e5f4ec;
  color: var(--c-green-2);
}
html.ds3 .t3qB {
  background: var(--bg);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 14px;
}
html.ds3 .t3qB small {
  display: block;
  font-size: 0.8125rem;
  color: var(--muted);
}
html.ds3 .t3qB p {
  margin: 2px 0 0;
  font-weight: 500;
  font-size: 1rem;
}
html.ds3 .t3qL {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.ds3 .t3qL > span {
  font-size: 0.875rem;
  font-weight: 500;
}
html.ds3 .t3q textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--line);
  padding: 12px !important;
  font-size: 1rem;
  resize: vertical;
}
html.ds3 .t3q .row {
  display: flex !important;
  gap: 8px;
}
html.ds3 .t3q button[data-r] {
  flex: 1;
  min-height: 52px !important;
  font-size: 1rem !important;
}
html.ds3 .t3q button[data-d] {
  min-width: 72px;
}
/* GSAP يتولى الاحتفال حين يُحمَّل، فنوقف حركات CSS القديمة عليه حتى لا تتعارض */
html.ds3gs .celO .big,
html.ds3gs .celO .ln,
html.ds3gs .celO .big.ds3Cel rect {
  animation: none !important;
  opacity: 1;
  transform: none;
}
html.ds3gs .celO .big.ds3Cel svg {
  overflow: visible;
}

/* ---------- لوحة المعلم: بطاقات كل الدروس ---------- */
html.ds3 .t3lN {
  font-size: 0.875rem;
  color: var(--muted);
}
html.ds3 .t3lcW {
  position: relative;
  margin: 0 -16px;
}
html.ds3 .t3lcs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 4px 16px 8px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
html.ds3 .t3lcs::-webkit-scrollbar {
  display: none;
}
html.ds3 .t3lc {
  all: unset;
  box-sizing: border-box;
  flex: 0 0 calc(100% - 56px);
  scroll-snap-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 22px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transform: scale(0.96);
  transition:
    opacity 0.25s,
    transform 0.25s var(--e3);
}
html.ds3 .t3lc.on {
  opacity: 1;
  transform: none;
}
html.ds3 .t3lc.wk {
  box-shadow: inset 0 0 0 3px var(--c-gold);
}
html.ds3 .t3lc.lk {
  background: #4e7366;
}
html.ds3 .t3lc:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 2px;
}
html.ds3 .t3lc > small {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--c-mint);
  font-weight: 500;
  padding-left: 84px;
}
html.ds3 .t3lc .t3hTi {
  display: block;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.4;
  margin-top: 4px;
  padding-left: 84px;
  min-height: 3.6rem;
}
html.ds3 .t3wk {
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: var(--c-gold);
  color: #3a2a00;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
html.ds3 .t3lkB {
  height: 22px;
  padding: 0 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
html.ds3 .t3lcA {
  all: unset;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(8, 58, 44, 0.18);
  display: none;
  place-items: center;
  cursor: pointer;
}
html.ds3 .t3lcA svg {
  width: 20px;
  height: 20px;
}
html.ds3 .t3lcA.prev {
  right: 4px;
}
html.ds3 .t3lcA.next {
  left: 4px;
}
html.ds3 .t3lcA:disabled {
  opacity: 0.3;
  cursor: default;
}
@media (hover: hover) and (pointer: fine) {
  html.ds3 .t3lcA {
    display: grid;
  }
}
@media (min-width: 700px) {
  html.ds3 .t3lc {
    flex-basis: 420px;
  }
}
html.ds3 .t3ld {
  background: var(--card);
  border: 1px solid var(--line);
  margin-top: 8px;
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 .t3lc {
    transition: none;
  }
}

/* ===== ثالث ثانوي (التحصيلي): نفس هوية ثاني ===== */
html.ds3 .t3dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  vertical-align: middle;
}
html.ds3 .t3dot.k1 {
  background: var(--c-green-2);
}
html.ds3 .t3dot.k2 {
  background: var(--c-gold-dark);
}
html.ds3 .t3dot.k3 {
  background: var(--c-danger);
}
html.ds3 .t3i {
  display: inline-flex;
  vertical-align: -3px;
  margin-inline-end: 6px;
  color: currentColor;
}
html.ds3 .t3i svg {
  width: 1.05em;
  height: 1.05em;
}
/* نوافذ الاختيار: ورقة من الأسفل */
html.ds3 body.t3 .tourO:has(.challenge-options) {
  place-items: end center;
  padding: 0;
  background: rgba(8, 40, 31, 0.55);
}
html.ds3 body.t3 .tourO:has(.challenge-options) .tourB {
  max-width: 520px;
  border-radius: 28px 28px 0 0;
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25);
  animation: ds3Sheet 0.38s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  max-height: 92dvh;
  overflow: auto;
}
@keyframes ds3Sheet {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
html.ds3 body.t3 .tourO:has(.challenge-options) .tourB::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 0 auto 14px;
}
html.ds3 body.t3 .tourO:has(.challenge-options) .tourB h2 {
  font-family: var(--display) !important;
  font-weight: 700 !important;
  font-size: 1.45rem !important;
  color: var(--fg);
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ds3 body.t3 .tourO:has(.challenge-options) .tourB h2 .t3i {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0;
}
html.ds3 body.t3 .tourO:has(.challenge-options) .tourB h2 .t3i svg {
  width: 20px;
  height: 20px;
}
html.ds3 body.t3 .tourO:has(.challenge-options) .hint {
  margin: 4px 0 10px !important;
  color: var(--muted);
}
html.ds3 body.t3 .tourO .tahsili-unit-label {
  display: block;
  margin: 16px 0 8px;
  font-size: 0.95rem;
  color: var(--fg);
}
html.ds3 body.t3 .tourO .challenge-options {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
html.ds3 body.t3 .tourO .challenge-options:not(.tahsili-unit-options):has(button[data-n]) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
html.ds3 body.t3 .tourO .challenge-options button {
  min-height: 54px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center !important;
  font-weight: 600;
  padding: 8px 10px !important;
  margin: 0 !important;
  width: auto !important;
}
html.ds3 body.t3 .tourO .challenge-options button small {
  color: var(--muted);
  font-weight: 500;
}
html.ds3 body.t3 .tourO .challenge-options button.on {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
html.ds3 body.t3 .tourO .challenge-options button.on small {
  color: #cfe8dd;
}
html.ds3 body.t3 .tourO .challenge-options button[disabled] {
  opacity: 0.45;
}
html.ds3 body.t3 .tourO .tahsili-unit-go {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border-radius: 28px;
  background: var(--accent) !important;
  border: 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
}
html.ds3 body.t3 .tourO #tuX,
html.ds3 body.t3 .tourO .ghost:last-child {
  background: transparent !important;
  border: 0;
  color: var(--muted);
  min-height: 44px;
}
html.ds3 body.t3 .tourO #tuSum {
  border-radius: var(--r-xl);
  min-height: 48px;
}
/* سؤال التحصيلي: مثل أسئلة الدروس */
html.ds3 body.tq .test-quiz-feedback {
  border-radius: var(--r-2xl);
  padding: 14px 16px;
  border-width: 1.5px;
}
html.ds3 body.tq .test-quiz-feedback.g {
  background: #e5f4ec;
  border-color: var(--c-green-2);
}
html.ds3 body.tq .test-quiz-feedback.g b {
  color: var(--c-green-2);
}
html.ds3 body.tq .test-quiz-feedback.b {
  background: #fcedeb;
  border-color: var(--c-danger);
}
html.ds3 body.tq .test-quiz-feedback.b b {
  color: var(--c-danger);
}
html.ds3 body.tq .test-quiz-feedback b {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--display);
  font-weight: 700;
}
html.ds3 body.tq .test-quiz-feedback p {
  color: var(--c-ink);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
/* السؤال المشابه داخل مربع التصحيح نص عادي — قاعدة flex اللي فوق كانت تقسّم كلماته أعمدة لما القاموس يلفّ المصطلحات */
html.ds3 body.tq .test-quiz-feedback .tahsili-sim p {
  display: block;
}
html.ds3 body.tq .test-quiz-feedback .t3i {
  color: var(--c-muted);
  margin-top: 4px;
}
html.ds3 body.tq .test-quiz-btn {
  min-height: 56px;
  border-radius: 28px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
html.ds3 body.tq .test-quiz-btn.g {
  background: var(--card);
  color: var(--accent);
  border: 1.5px solid var(--line);
}
:root[data-theme="dark"] html.ds3 body.tq .test-quiz-feedback p,
html.ds3:root[data-theme="dark"] body.tq .test-quiz-feedback p {
  color: var(--fg);
}
html.ds3:root[data-theme="dark"] body.tq .test-quiz-feedback.g {
  background: rgba(30, 122, 85, 0.18);
}
html.ds3:root[data-theme="dark"] body.tq .test-quiz-feedback.b {
  background: rgba(179, 38, 30, 0.16);
}
/* توصيات «نتائجي»: صفوف بلا حدّ جانبي */
html.ds3 body.t3 .t3Rec button {
  border-inline-start: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 12px 14px;
  min-height: 56px;
}
html.ds3 body.t3 .t3Rec i {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
}
html.ds3 body.t3 .t3Rec i .t3i {
  margin: 0;
}
html.ds3 body.t3 .tourO:has(.challenge-options) .hint {
  min-height: 0 !important;
  height: auto !important;
  padding: 0 !important;
}
html.ds3 body.t3 .t3Nx {
  position: relative;
  overflow: hidden;
}
html.ds3 body.t3 .t3Nx::after {
  content: "";
  position: absolute;
  left: -18px;
  top: -10px;
  bottom: -10px;
  width: 90px;
  opacity: 0.28;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 140'%3E%3Cg fill='none' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M25 0c50 35 50 70 0 140' stroke='%23FFD166'/%3E%3Cpath d='M65 0C15 35 15 105 65 140' stroke='%239FD3BF'/%3E%3Cpath d='M30 22h30M24 70h42M30 118h30' stroke='%23fff' stroke-width='2.5' opacity='.6'/%3E%3C/g%3E%3C/svg%3E")
    center/contain no-repeat;
}
html.ds3 body.tq .lesson-quiz-result.tqR h3 {
  font-family: var(--display);
  font-weight: 700;
}
html.ds3 body.tq .lesson-quiz-result .lesson-quiz-next {
  min-height: 56px;
  border-radius: 28px;
}

/* رأس سؤال التحصيلي: بلون البطاقة نفسها */
html.ds3 body.tq .test-quiz-top {
  background: var(--card);
  margin: -4px -2px 0;
  padding: 6px 2px 12px;
}
html.ds3 body.tq .test-quiz-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
}
html.ds3 body.tq .test-quiz-progress {
  height: 8px;
  background: var(--line);
}
html.ds3 body.tq .test-quiz-progress i {
  background: var(--accent);
}
html.ds3 body.tq .test-quiz-meta {
  gap: 8px;
  margin: 2px 0 12px;
}
html.ds3 body.tq .test-quiz-meta span {
  font-size: 0.8rem;
  padding: 4px 12px;
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1.6;
}
html.ds3 body.tq .test-quiz-meta .t3dot {
  width: 9px;
  height: 9px;
  position: static !important;
  margin: 0;
}
html.ds3 body.tq .test-quiz-meta span.dd {
  width: auto;
  height: auto;
  border-radius: 20px;
}
/* النوافذ: الخلفية ثابتة لا تتحرك عند السحب */
html:has(body.t3 .tourO),
body.t3:has(.tourO) {
  overflow: hidden !important;
  overscroll-behavior: none;
}
html.ds3 body.t3 .tourO {
  overscroll-behavior: contain;
  touch-action: pan-y;
}
html.ds3 body.t3 .tourO .tourB {
  overscroll-behavior: contain;
}

/* الصفحة خلف أي نافذة ثابتة لا تتحرك عند السحب (كل الصفحات، والمعلم) */
html:has(
    .askO,
    .bdO,
    .celO,
    .hdO,
    .lvO,
    .lvUpO,
    .pkO,
    .prepO,
    .qrModal,
    .tahsili-sheet:not([hidden]),
    .tourO,
    .zmO,
    .t2sheet,
    .lgBoard,
    body.srOpen,
    body.gated
  ),
html:has(
    .askO,
    .bdO,
    .celO,
    .hdO,
    .lvO,
    .lvUpO,
    .pkO,
    .prepO,
    .qrModal,
    .tahsili-sheet:not([hidden]),
    .tourO,
    .zmO,
    .t2sheet,
    .lgBoard,
    body.srOpen,
    body.gated
  )
  body {
  overflow: hidden !important;
  overscroll-behavior: none;
}
.askO,
.bdO,
.lvO,
.lvUpO,
.pkO,
.qrModal,
.tahsili-sheet,
.tourO,
.t2sheet,
.hdO {
  overscroll-behavior: contain;
}
/* شريط «التالي» في سؤال التحصيلي بلون البطاقة لا لون الصفحة */
html.ds3 body.tq .test-quiz-actions {
  background: var(--card);
}

/* صفوف المفاتيح: النص يمين والمفتاح دائمًا على الحافة اليسرى */
html .tog {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  flex-direction: initial !important;
  text-align: right;
}
html .tog > input[type="checkbox"] {
  grid-column: 2;
  grid-row: 1;
  order: 0;
  margin: 0 !important;
  justify-self: end;
  align-self: center;
}
html .tog > span {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
html .tog > span small {
  display: block;
  margin-top: 2px;
  line-height: 1.6;
}
/* خانات الاختيار والراديو مع نصها: في سطر واحد، الخانة قبل النص */
html label:has(> input[type="checkbox"]):not(.tog):not(:has(> input[type="text"], > select, > textarea)),
html label:has(> input[type="radio"]):not(:has(> input[type="text"], > select, > textarea)) {
  display: flex !important;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  text-align: right;
  justify-content: flex-start;
}
html label:has(> input[type="checkbox"]):not(.tog) > input[type="checkbox"],
html label:has(> input[type="radio"]) > input[type="radio"] {
  flex: none;
  width: 20px !important;
  height: 20px;
  margin: 0 !important;
  order: -1;
  accent-color: var(--accent);
}
html label:has(> input[type="checkbox"]):not(.tog) > :not(input),
html label:has(> input[type="radio"]) > :not(input) {
  min-width: 0;
}
/* أزرار الإجراءات في بطاقات المعلم: صف منظّم يملأ العرض على الجوال */
@media (max-width: 700px) {
  #tBody .card .row:has(> button):not(:has(> :not(button, a.btnlink, .ghost))) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  #tBody .card .row:has(> button):not(:has(> :not(button, a.btnlink, .ghost))) > * {
    flex: 1 1 140px;
    margin: 0 !important;
    justify-content: center;
    text-align: center;
  }
}
/* إعدادات «حسابي»: أزرار بنفس المقاس، وصف حجم الخط مثل صفوف المفاتيح */
html.ds3 #xv .row:is(:has(#acCard), :has(#avCard)) {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px !important;
}
html.ds3 #xv .row:is(:has(#acCard), :has(#avCard)) > * {
  width: 100% !important;
  min-height: 48px;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r-lg) !important;
  font-size: 0.95rem !important;
}
html.ds3 #xv .row:is(:has(#acCard), :has(#avCard)) > :only-child,
html.ds3 #xv .row:is(:has(#acCard), :has(#avCard)) > :last-child:nth-child(odd) {
  grid-column: 1/-1;
}
html.ds3 #labSet .lab-row-alt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  box-sizing: border-box;
}
html.ds3 #labSet .lab-row-alt > span:first-child {
  font-weight: 500;
}

/* الخطة الأسبوعية: خط زمني من البطاقات */
.weeks-hero {
  background: var(--accent);
  color: #fff;
  border-radius: 22px;
  padding: 16px;
  margin: 0 0 12px;
}
.weeks-hero small {
  display: block;
  color: var(--c-mint);
  font-size: 0.82rem;
}
.weeks-hero > b {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.4;
}
.weeks-hero > b span {
  font-size: 0.95rem;
  font-weight: 500;
  color: #cfe8dd;
}
.weeks-bar {
  display: flex;
  gap: 3px;
  margin-top: 12px;
}
.weeks-bar i {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}
.weeks-bar i.d {
  background: var(--c-green-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.weeks-bar i.c {
  background: var(--c-gold-4);
}
.weeks-half {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.78rem;
  color: #cfe8dd;
}
.weeks-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  margin-top: 8px;
  box-sizing: border-box;
  font-weight: 500;
}
.weeks-seg {
  display: inline-flex;
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.weeks-seg button {
  all: unset;
  cursor: pointer;
  height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.82rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
}
.weeks-seg button.on {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
}
#wpList {
  margin-top: 6px;
}
.weeks-past {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  margin: 6px 0 14px;
}
.weeks-past > summary {
  list-style: none;
  cursor: pointer;
  min-height: 52px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.weeks-past > summary::-webkit-details-marker {
  display: none;
}
.weeks-past > summary::after {
  content: "⌄";
  margin-inline-start: auto;
  color: var(--muted);
}
.weeks-past[open] > summary::after {
  content: "⌃";
}
.weeks-past > summary small,
.weeks-past > summary span:last-of-type {
  color: var(--muted);
}
.weeks-past > summary b {
  color: var(--fg);
}
.weeks-past-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #e5f4ec;
  color: var(--c-green-2);
  display: grid;
  place-items: center;
  flex: none;
}
.weeks-past .weeks-timeline {
  padding: 4px 14px 14px 10px;
  margin-inline-start: 14px;
}
.weeks-timeline {
  position: relative;
  margin-inline-start: 14px;
  padding-inline-start: 20px;
  border-inline-start: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.weeks-week {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.weeks-dot {
  position: absolute;
  inset-inline-start: -28px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-green-2);
  border: 3px solid var(--c-green-2);
  box-sizing: border-box;
}
.weeks-week.cur .weeks-dot {
  background: var(--c-gold-4);
  border-color: var(--c-gold-4);
}
.weeks-week.fut .weeks-dot {
  background: var(--card);
  border-color: var(--line);
}
.weeks-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.weeks-head b {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--c-green-2);
}
.weeks-head small {
  color: var(--muted);
  font-size: 0.82rem;
}
.weeks-week.cur .weeks-head b {
  color: #b8891e;
}
.weeks-week.fut .weeks-head b {
  color: var(--muted);
}
.weeks-now {
  margin-inline-start: auto;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-md);
  background: var(--c-gold);
  color: #3a2a00;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
.weeks-when {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.weeks-lessons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.weeks-week.cur .weeks-lessons {
  padding: 8px;
  border-radius: 22px;
  background: #fff8e1;
  border: 1.5px solid var(--c-gold);
}
:root[data-theme="dark"] .weeks-week.cur .weeks-lessons {
  background: rgba(255, 209, 102, 0.08);
}
.weeks-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.weeks-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.weeks-card-title > div {
  flex: 1;
  min-width: 0;
}
.weeks-card-title b {
  display: block;
  font-size: 0.95rem;
}
.weeks-card-title small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
}
.weeks-state {
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  font-size: 0.75rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
}
.weeks-state.op {
  background: #e5f4ec;
  color: var(--c-green-2);
}
.weeks-state.lk {
  background: #f1ede4;
  color: #6b6455;
}
:root[data-theme="dark"] .weeks-state.op {
  background: rgba(30, 122, 85, 0.2);
  color: var(--c-mint);
}
:root[data-theme="dark"] .weeks-state.lk {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.weeks-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.weeks-label {
  font-size: 0.82rem;
  color: var(--muted);
}
.weeks-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  height: 36px;
}
.weeks-stepper button {
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--accent);
  font-size: 1.1rem;
}
.weeks-stepper button:disabled {
  opacity: 0.35;
  cursor: default;
}
.weeks-stepper b {
  min-width: 34px;
  text-align: center;
  font-family: var(--display);
}
html .tog.weeks-open-toggle {
  margin-inline-start: auto;
  border: 0;
  padding: 0 !important;
  min-height: 0;
  background: none !important;
  gap: 8px;
  column-gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  display: inline-grid !important;
  grid-template-columns: auto auto;
  white-space: nowrap;
}
html .tog.weeks-open-toggle input[type="checkbox"] {
  width: 44px !important;
  height: 26px;
}
html .tog.weeks-open-toggle input[type="checkbox"]::after {
  width: 20px;
  height: 20px;
}
html .tog.weeks-open-toggle input[type="checkbox"]:checked::after {
  inset-inline-start: 21px;
}
html .tog.weeks-open-toggle > span {
  white-space: nowrap;
}

/* ===== توحيد الهوية في كل الموقع ===== */
html.ds3 .ds3Dup {
  display: none;
}
html.ds3 .ds3Dup + p.hint,
html.ds3 .ds3Dup + .hint {
  margin-top: 0;
}
html.ds3 summary.ds3Sm {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
html.ds3 summary.ds3Sm::-webkit-details-marker {
  display: none;
}
html.ds3 summary.ds3Sm::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-inline-start: auto;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s;
}
html.ds3 details[open] > summary.ds3Sm::after {
  transform: translateY(2px) rotate(-135deg);
}
/* صح/خطأ وبطاقات الحفظ: ألوان الهوية بدل الأحمر والأخضر الصارخين */
html.ds3 .truefalse-buttons .tfT {
  background: var(--accent) !important;
  color: #fff;
  border: 0;
}
html.ds3 .truefalse-buttons .tfF {
  background: var(--c-red-soft) !important;
  color: #a3321f !important;
  border: 1.5px solid #f1c7be;
}
html.ds3[data-theme="dark"] .truefalse-buttons .tfF {
  background: #3a2220 !important;
  color: #f4b5a8 !important;
  border-color: #5a302a;
}
html.ds3 .truefalse-buttons button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
html.ds3 .truefalse-buttons .t3i {
  margin: 0;
}
/* صندوق المفاجآت بألوان الهوية */
html.ds3 .gate-body {
  background: linear-gradient(90deg, var(--c-green) 42%, #d4af37 42% 58%, var(--c-green) 58%);
}
html.ds3 .gate-lid {
  background: linear-gradient(90deg, #13664f 42%, #e3c35a 42% 58%, #13664f 58%);
}
/* الوضع الليلي: شريط «باقي لك» وبطاقات الخلفيات */
html.ds3[data-theme="dark"] .rank-goal {
  background: var(--c-brown-2) !important;
  color: #f1d27a;
}
html.ds3 .shopI.bg-sunset span {
  color: #5a2a12;
}
html.ds3[data-theme="dark"] .shopI.bg-sunset {
  color: #3a1c0f;
}
html.ds3 .shopI b .t3i,
html.ds3 .shopI p .t3i {
  color: var(--accent);
}
html.ds3 .shopI.bg-ocean b .t3i,
html.ds3 .shopI.bg-galaxy b .t3i,
html.ds3 .shopI.bg-sunset b .t3i {
  color: inherit;
}
html.ds3 .challenge-top:has(> .ds3Dup) {
  justify-content: flex-end;
}

/* ===== تلميعات: رجوع، المتجر، الصندوق، المختبر، الجدولة، بناء الدرس ===== */
html.ds3 .chat-back,
html.ds3 #back {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
}
html.ds3 .chat-back svg,
html.ds3 #back svg {
  flex: none;
}
html.ds3 #xv .g2.wd > b {
  white-space: nowrap;
}
html.ds3 #xv .g2.wd > small {
  flex: 1;
  min-width: 0;
  text-align: end;
}
/* المتجر: أيقونة في مربع فوق الاسم */
html.ds3 .shopI > b {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
html.ds3 .shopI > b .t3i {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
  display: grid;
  place-items: center;
  margin: 0;
}
html.ds3 .shopI > b .t3i svg {
  width: 23px;
  height: 23px;
}
html.ds3 .shopI.bg-ocean > b .t3i,
html.ds3 .shopI.bg-galaxy > b .t3i,
html.ds3 .shopI.bg-sunset > b .t3i {
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}
html.ds3 .shopI p .t3i {
  color: var(--accent);
}
/* الصندوق في الليلي */
html.ds3[data-theme="dark"] .gate-body {
  background: linear-gradient(90deg, #1b7a5c 42%, #d4af37 42% 58%, #1b7a5c 58%);
  box-shadow:
    0 0 0 2px rgba(212, 175, 55, 0.35),
    0 14px 30px rgba(0, 0, 0, 0.45);
}
html.ds3[data-theme="dark"] .gate-lid {
  background: linear-gradient(90deg, #24936f 42%, #e3c35a 42% 58%, #24936f 58%);
  box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.35);
}
/* المختبر: كل ميزة بطاقة، والأزرار الثلاثة بعرض البطاقة */
html.ds3 #labBox .lab-phase {
  margin: 22px 2px 8px;
  font-size: 0.82rem;
  letter-spacing: 0;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ds3 #labBox .lab-phase::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
html.ds3 #labBox .lab-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
}
html.ds3 #labBox .lab-row.soon {
  display: flex;
  opacity: 0.55;
  padding: 10px 14px;
}
html.ds3 #labBox .lab-row .t b {
  font-size: 0.95rem;
}
html.ds3 #labBox .lab-row .lab-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  box-sizing: border-box;
}
html.ds3 #labBox .lab-seg button {
  min-height: 38px;
}
html.ds3 #labBox .lab-seg button.on[data-v="0"] {
  color: var(--fg) !important;
}
html.ds3 #labBox .lab-seg button.on[data-v="2"] {
  background: var(--accent) !important;
  color: #fff !important;
}
html.ds3 #labBox .lab-row:has(.on[data-v="2"]) {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}
html.ds3 #labBox .lab-row:has(.on[data-v="1"]) {
  border-color: #cfc2ee;
}
/* جدولة رسالة المجموعة */
html.ds3 .cTools {
  align-items: stretch;
}
html.ds3 .cTools select {
  min-height: 42px;
  border-radius: var(--r-md);
}
html.ds3 .chat-scheduled {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--fg);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  flex: 1;
  min-width: 150px;
  box-sizing: border-box;
}
html.ds3 .chat-scheduled svg {
  color: var(--accent);
  flex: none;
}
html.ds3 .chat-scheduled.on {
  border-color: var(--accent);
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
}
html.ds3 .chat-scheduled input {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  opacity: 0;
  padding: 0 !important;
  margin: 0;
  border: 0;
  cursor: pointer;
}
html.ds3 .chat-scheduled input::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
/* بناء الدرس: دوائر الإجابة الصحيحة وزر حذف السؤال */
html.ds3 .opt {
  gap: 10px;
}
html.ds3 .opt input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px !important;
  height: 24px;
  min-height: 0;
  flex: none;
  margin: 0;
  padding: 0 !important;
  border: 2px solid #a9c2b8;
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.15s;
}
html.ds3 .opt input[type="radio"]::after {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.15s;
}
html.ds3 .opt input[type="radio"]:checked {
  border-color: var(--accent);
}
html.ds3 .opt input[type="radio"]:checked::after {
  transform: scale(1);
}
html.ds3 .opt:has(input[type="radio"]:checked) input:not([type="radio"]) {
  border-color: var(--accent) !important;
  background: var(--accent-2, var(--c-line));
}
html.ds3 .question-delete {
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center;
  flex: none;
}
html.ds3 .chat-back {
  flex-direction: row;
  width: auto !important;
}
html.ds3 .chat-back svg {
  order: -1;
}

/* ===== تلميعات ٣ ===== */
/* انتظار: هيكل تحميل متحرك */
html.ds3 p.ds3Load {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
html.ds3 p.ds3Load::before {
  content: "";
  display: block;
  height: 74px;
  border-radius: var(--r-md);
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent) -60% 0/45% 100% no-repeat,
    linear-gradient(var(--accent-2, var(--c-line)), var(--accent-2, var(--c-line))) 100% 0/100% 20px no-repeat,
    linear-gradient(var(--accent-2, var(--c-line)), var(--accent-2, var(--c-line))) 100% 30px/72% 14px no-repeat,
    linear-gradient(var(--accent-2, var(--c-line)), var(--accent-2, var(--c-line))) 100% 54px/88% 14px no-repeat;
  animation: ds3Sk 1.3s ease-in-out infinite;
}
html.ds3[data-theme="dark"] p.ds3Load::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent) -60% 0/45% 100% no-repeat,
    linear-gradient(#1f3a34, #1f3a34) 100% 0/100% 20px no-repeat,
    linear-gradient(#1f3a34, #1f3a34) 100% 30px/72% 14px no-repeat,
    linear-gradient(#1f3a34, #1f3a34) 100% 54px/88% 14px no-repeat;
}
@keyframes ds3Sk {
  to {
    background-position:
      170% 0,
      100% 0,
      100% 30px,
      100% 54px;
  }
}
/* تعذّر: بطاقة صغيرة بأيقونة وزر */
html.ds3 p.ds3Err {
  display: block;
  text-align: center;
  padding: 20px 14px !important;
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  color: var(--muted);
  line-height: 1.7;
}
html.ds3 p.ds3Err::before {
  content: "";
  display: block;
  margin: 0 auto 10px;
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  background: var(--c-red-soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A3321F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 8.5a15 15 0 0 1 20 0M5.5 12a10 10 0 0 1 13 0M9 15.5a5 5 0 0 1 6 0M12 19h.01M3 3l18 18'/%3E%3C/svg%3E")
    center/22px no-repeat;
}
html.ds3[data-theme="dark"] p.ds3Err::before {
  background-color: #3a2220;
}
html.ds3 .ds3Retry {
  display: flex !important;
  margin: 12px auto 0;
  min-height: 38px;
  border-radius: var(--r-md) !important;
  font-weight: 700;
}
/* الحالات الفاضية: رسم صغير بأسلوب المختبر */
html.ds3 p.ds3Empty {
  display: block;
  text-align: center !important;
  padding: 18px 12px !important;
  color: var(--muted);
  line-height: 1.7;
}
html.ds3 p.ds3Empty::before {
  content: "";
  display: block;
  margin: 0 auto 10px;
  width: 76px;
  height: 64px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 64'%3E%3Cellipse cx='38' cy='50' rx='30' ry='9' fill='%23DDEDE4'/%3E%3Cpath d='M10 46c0 5 12.5 9 28 9s28-4 28-9' fill='none' stroke='%239FC9B6' stroke-width='2'/%3E%3Cellipse cx='38' cy='46' rx='28' ry='8' fill='%23F4FBF7' stroke='%239FC9B6' stroke-width='2'/%3E%3Cpath d='M38 45c-1-14 6-24 18-28-1 13-7 23-18 28z' fill='%23BFE3D2' stroke='%230D4F3C' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M38 45c2-9 7-16 14-22' fill='none' stroke='%230D4F3C' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='24' cy='40' r='4' fill='%23FFD166' stroke='%23C98F00' stroke-width='1.5'/%3E%3Ccircle cx='20' cy='18' r='2.5' fill='%23D4AF37'/%3E%3Ccircle cx='58' cy='8' r='2' fill='%23D4AF37' opacity='.7'/%3E%3C/svg%3E")
    center/contain no-repeat;
}
html.ds3[data-theme="dark"] p.ds3Empty::before {
  opacity: 0.8;
}
/* رتّب المراحل: أسهم أيقونات */
html.ds3 #xv .order-box button {
  display: grid !important;
  place-items: center;
  padding: 0 !important;
}
html.ds3 #xv .order-box button:disabled {
  opacity: 0.35;
}
/* وردل: ألوان الهوية وحركة القلب */
html.ds3 #xv .wordle-tile {
  transition: transform 0.12s;
}
html.ds3 #xv .wordle-tile.f {
  border-color: var(--accent);
  animation: ds3Pop 0.14s ease-out;
}
html.ds3 #xv .wordle-tile.g,
html.ds3 #xv .kb button.g {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff;
}
html.ds3 #xv .wordle-tile.y,
html.ds3 #xv .kb button.y {
  background: #d4af37 !important;
  border-color: #d4af37 !important;
  color: #2a2205;
}
html.ds3 #xv .wordle-tile.b,
html.ds3 #xv .kb button.b {
  background: #9aa8a3 !important;
  border-color: #9aa8a3 !important;
  color: #fff;
}
html.ds3[data-theme="dark"] #xv .wordle-tile.b,
html.ds3[data-theme="dark"] #xv .kb button.b {
  background: #3b4a46 !important;
  border-color: #3b4a46 !important;
  color: #b9c7c2;
}
html.ds3 #xv .wordle-row .wordle-tile.g,
html.ds3 #xv .wordle-row .wordle-tile.y,
html.ds3 #xv .wordle-row .wordle-tile.b {
  animation: ds3Flip 0.5s ease both;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(2) {
  animation-delay: 0.08s;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(3) {
  animation-delay: 0.16s;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(4) {
  animation-delay: 0.24s;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(5) {
  animation-delay: 0.32s;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(6) {
  animation-delay: 0.4s;
}
html.ds3 #xv .wordle-row .wordle-tile:nth-child(7) {
  animation-delay: 0.48s;
}
html.ds3 #xv .kb button {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  box-shadow: 0 2px 0 var(--line);
  color: var(--fg);
}
html.ds3 #xv .kb button.wide {
  background: var(--accent-2, var(--c-line)) !important;
  color: var(--accent);
  display: inline-grid;
  place-items: center;
}
@keyframes ds3Pop {
  50% {
    transform: scale(1.1);
  }
}
@keyframes ds3Flip {
  0% {
    transform: rotateX(90deg);
  }
  100% {
    transform: none;
  }
}
/* المتجر: زر شراء غير متاح */
html.ds3 #xv .shopI button[data-buy]:disabled {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1.5px dashed var(--line) !important;
  opacity: 1;
  box-shadow: none;
}
html.ds3[data-theme="dark"] #xv .shopI button[data-buy]:disabled {
  color: #8fa39c !important;
  border-color: #3a4d48 !important;
}
html.ds3 #xv .shopI[class*="bg-"] button[data-buy]:disabled {
  color: inherit !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  opacity: 0.85;
}
/* انتقال: البطاقات تدخل تباعًا، ولوحات المعلم تتلاشى */
@media (prefers-reduced-motion: no-preference) {
  html.ds3 body.ds3Go #xv > :is(.card, div):not(.backBar) {
    animation: ds3Rise 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  html.ds3 body.ds3Go #xv > :nth-child(3) {
    animation-delay: 0.05s;
  }
  html.ds3 body.ds3Go #xv > :nth-child(4) {
    animation-delay: 0.1s;
  }
  html.ds3 body.ds3Go #xv > :nth-child(5) {
    animation-delay: 0.15s;
  }
  html.ds3 body.ds3Go #xv > :nth-child(n + 6) {
    animation-delay: 0.2s;
  }
  /* ضغطة محسوسة */
  html.ds3
    :is(
      button,
      .btnlink,
      a.g2,
      a.tk,
      a.tool,
      .h2T,
      .cv,
      .shopI,
      .t2nav button,
      #bNav a,
      .login-next,
      .login-secondary,
      .lab-seg button
    ):active:not(:disabled) {
    scale: 0.96;
  }
  html.ds3
    :is(
      button,
      .btnlink,
      a.g2,
      a.tk,
      a.tool,
      .h2T,
      .cv,
      .shopI,
      .t2nav button,
      #bNav a,
      .login-next,
      .login-secondary,
      .lab-seg button
    ) {
    transition:
      scale 0.12s ease-out,
      background-color 0.2s,
      color 0.2s,
      border-color 0.2s;
  }
  /* فرحة إنهاء مهام اليوم */
  html.ds3 .dqC.gold::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 35%, rgba(255, 240, 190, 0.45) 50%, transparent 65%) -100% 0/60% 100%
      no-repeat;
    animation: ds3Shine 2.8s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
  }
  html.ds3 .h2T:has(.dots):not(:has(.dots i:not(.ok))) {
    border-color: #d4af37;
    background: linear-gradient(135deg, #fff8e1, var(--card));
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
    animation: ds3Glow 2.6s ease-in-out infinite;
  }
  html.ds3[data-theme="dark"] .h2T:has(.dots):not(:has(.dots i:not(.ok))) {
    background: linear-gradient(135deg, var(--c-brown-2), var(--card));
  }
}
@keyframes ds3Rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}
@keyframes ds3Fade {
  from {
    opacity: 0;
  }
}
@keyframes ds3Shine {
  0%,
  40% {
    background-position: -100% 0;
  }
  100% {
    background-position: 250% 0;
  }
}
@keyframes ds3Glow {
  50% {
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.08);
  }
}
/* حسابات الطلاب عند المعلم: بطاقة مرتبة */
@media (max-width: 700px) {
  html.ds3 #aTbl table.rt tr {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 10px;
    padding: 14px !important;
    border-radius: var(--r-2xl);
    align-items: end;
  }
  html.ds3 #aTbl table.rt td:nth-child(1) {
    grid-column: 1/2;
    align-self: center;
  }
  html.ds3 #aTbl table.rt td:nth-child(2) {
    grid-column: 2/-1;
  }
  html.ds3 #aTbl table.rt td:nth-child(2) .ai {
    font-weight: 700;
    font-size: 1rem;
  }
  html.ds3 #aTbl table.rt td:nth-child(3) {
    grid-column: 1/9;
  }
  html.ds3 #aTbl table.rt td:nth-child(4) {
    grid-column: 9/-1;
  }
  html.ds3 #aTbl table.rt td:nth-child(5) {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
  }
  html.ds3 #aTbl table.rt td:nth-child(5)::before {
    display: none;
  }
  html.ds3 #aTbl table.rt td:nth-child(5) .ai.code {
    letter-spacing: 0.12em;
    font-weight: 700;
    text-align: center;
  }
  html.ds3 #aTbl table.rt td:nth-child(5) [data-gen] {
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0 !important;
    flex: none;
  }
  html.ds3 #aTbl table.rt td:is(:nth-child(6), :nth-child(7), :nth-child(8)) {
    background: var(--accent-2, var(--c-line));
    border-radius: var(--r-md);
    padding: 8px 6px !important;
    text-align: center;
    font-weight: 700;
    color: var(--fg);
    align-self: stretch;
  }
  html.ds3 #aTbl table.rt td:nth-child(6) {
    grid-column: 1/5;
  }
  html.ds3 #aTbl table.rt td:nth-child(7) {
    grid-column: 5/9;
  }
  html.ds3 #aTbl table.rt td:nth-child(8) {
    grid-column: 9/-1;
    white-space: normal;
    font-size: 0.78rem !important;
  }
  html.ds3 #aTbl table.rt td:is(:nth-child(6), :nth-child(7), :nth-child(8))::before {
    font-weight: 500;
    font-size: 0.7rem;
    margin-bottom: 4px;
  }
  html.ds3 #aTbl table.rt td.account-actions {
    grid-column: 1/-1;
    display: grid !important;
    grid-template-columns: 44px 1fr 1fr;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
  }
  html.ds3 #aTbl table.rt td.account-actions button {
    min-height: 42px;
    margin: 0 !important;
    border-radius: var(--r-md) !important;
  }
  html.ds3 #aTbl table.rt td.account-actions [data-rw] {
    grid-column: 1;
    padding: 0 !important;
  }
  html.ds3 #aTbl table.rt td.account-actions [data-save] {
    grid-column: 3;
    grid-row: 1;
  }
  html.ds3 #aTbl table.rt td.account-actions [data-adel] {
    grid-column: 2;
    grid-row: 1;
  }
  html.ds3 #aTbl table.rt .ai,
  html.ds3 #aTbl table.rt select.ai {
    min-height: 44px;
    border-radius: var(--r-md);
  }
  html.ds3[data-theme="dark"] #aTbl table.rt td:is(:nth-child(6), :nth-child(7), :nth-child(8)) {
    background: #1a332e;
  }
}

/* ===== المتجر: الإطارات بروح (معاينة على شخصيتك) ===== */
html.ds3 #xv .shopI.shop-frame {
  position: relative;
  overflow: hidden;
  gap: 6px;
  padding-top: 18px !important;
  border-width: 1.5px;
}
html.ds3 #xv .shop-frame .shop-preview {
  position: relative;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
}
html.ds3 #xv .shop-frame .shop-preview > i {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ring);
  box-shadow: 0 6px 16px var(--glow);
}
html.ds3 #xv .shop-frame .shop-preview > i::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 70%, rgba(255, 255, 255, 0.85) 78%, transparent 86%);
  mix-blend-mode: soft-light;
  animation: shSpin 3.6s linear infinite;
}
html.ds3 #xv .shop-frame .shop-preview .av {
  position: relative;
  width: 58px !important;
  height: 58px !important;
  font-size: 1.7rem;
  margin: 0;
  background: var(--in) !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.12);
}
html.ds3 #xv .shop-frame .shop-preview .av i {
  display: none;
}
html.ds3 #xv .shop-frame > b {
  font-size: 1rem;
}
html.ds3 #xv .shop-frame .shop-price {
  color: var(--tx) !important;
  background: var(--chip) !important;
}
html.ds3 #xv .shop-frame::before {
  content: "";
  position: absolute;
  inset: auto -30% 55% -30%;
  height: 120px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  opacity: 0.6;
  pointer-events: none;
}
html.ds3 #xv .shop-frame > * {
  position: relative;
}
html.ds3 #xv .shF-silver {
  --ring: conic-gradient(from 210deg, #8e9ba3, #f4f7f8, #a9b5bb, #e3e9ec, #8e9ba3);
  --glow: rgba(142, 155, 163, 0.35);
  --in: #f1f4f5;
  --tx: #56656c;
  --chip: #e6ecee;
  background: linear-gradient(170deg, #ffffff, #eef2f4) !important;
  border-color: #cfd8dc;
}
html.ds3 #xv .shF-gold {
  --ring: conic-gradient(from 210deg, #a87a12, #ffe7a0, #d4af37, #fff3c4, #b8860b, #a87a12);
  --glow: rgba(212, 175, 55, 0.45);
  --in: #fff8e1;
  --tx: var(--c-gold-text);
  --chip: #fbebc0;
  background: linear-gradient(170deg, #fffdf5, #fff1c9) !important;
  border-color: #e9cf7a;
}
html.ds3 #xv .shF-emerald {
  --ring: conic-gradient(from 210deg, #0b6b48, #7fe0b5, #1e9e6a, #c9f5e1, var(--c-green), #0b6b48);
  --glow: rgba(30, 158, 106, 0.38);
  --in: #eaf8f1;
  --tx: #0f6b49;
  --chip: #d4f2e3;
  background: linear-gradient(170deg, #fbfffd, #e2f6ec) !important;
  border-color: #9edbbe;
}
html.ds3 #xv .shF-fire {
  --ring: conic-gradient(from 210deg, #b8320a, #ffc15a, #ff6a1f, #ffe08a, #d9480f, #b8320a);
  --glow: rgba(255, 106, 31, 0.42);
  --in: #fff3ea;
  --tx: #b13d0a;
  --chip: #ffe1cc;
  background: linear-gradient(170deg, #fffbf8, #ffe6d4) !important;
  border-color: #f5b38a;
}
html.ds3 #xv .shF-fire .shop-preview > i {
  animation: shFlick 1.6s ease-in-out infinite;
}
html.ds3[data-theme="dark"] #xv .shF-silver {
  background: linear-gradient(170deg, #1e2629, #2a3439) !important;
  border-color: #47555b;
  --in: #2e3a3f;
  --tx: #d5dee2;
  --chip: #36444a;
}
html.ds3[data-theme="dark"] #xv .shF-gold {
  background: linear-gradient(170deg, #2a2312, #3a2f12) !important;
  border-color: #6e5a1e;
  --in: var(--c-brown-2);
  --tx: #f1d27a;
  --chip: #4a3c17;
}
html.ds3[data-theme="dark"] #xv .shF-emerald {
  background: linear-gradient(170deg, #11281f, #163628) !important;
  border-color: #24694c;
  --in: #173a2c;
  --tx: #8fe3bc;
  --chip: #1e4a37;
}
html.ds3[data-theme="dark"] #xv .shF-fire {
  background: linear-gradient(170deg, #2c1810, #3b1e10) !important;
  border-color: #7a3a1a;
  --in: #3e2416;
  --tx: #ffb287;
  --chip: #4f2a17;
}
html.ds3[data-theme="dark"] #xv .shop-frame > b {
  color: #fff;
}
@keyframes shSpin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes shFlick {
  50% {
    box-shadow: 0 4px 22px rgba(255, 106, 31, 0.65);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 #xv .shop-frame .shop-preview > i::after,
  html.ds3 #xv .shF-fire .shop-preview > i {
    animation: none;
  }
}

/* ===== المتجر الكامل ===== */
html.ds3 #xv .shop-balance {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--c-green-4), #0b3f30);
  color: #fff;
  border-radius: 22px;
  padding: 16px 18px;
  margin-bottom: 6px;
}
html.ds3 #xv .shop-balance > div:first-child {
  display: flex;
  flex-direction: column;
}
html.ds3 #xv .shop-balance b {
  font-family: "Alexandria", inherit;
  font-size: 2rem;
  color: var(--c-gold);
  line-height: 1.1;
}
html.ds3 #xv .shop-balance span {
  font-size: 0.8rem;
  opacity: 0.85;
}
html.ds3 #xv .shop-owned {
  margin-inline-start: auto;
  display: flex;
  gap: 6px;
}
html.ds3 #xv .shop-owned span {
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.12);
  padding: 6px 11px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 0.85rem;
  opacity: 1;
  color: #fff;
}
html.ds3 #xv .shop-owned svg {
  flex: none;
}
html.ds3 #xv .shop-lead {
  margin: 6px 4px 0;
}
html.ds3 #xv .shop-section {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 22px 4px 10px;
}
html.ds3 #xv .shop-section h3 {
  margin: 0;
  font-size: 1.05rem;
}
html.ds3 #xv .shop-section small {
  color: var(--muted);
  font-size: 0.75rem;
}
html.ds3 #xv .shop-price {
  font-weight: 700;
  font-size: 0.8rem;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
}
html.ds3 #xv .shopI .shop-price {
  color: var(--accent);
}
/* الخلفيات */
html.ds3 #xv .shop-badge-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
html.ds3 #xv .shop-badge {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 12px;
}
html.ds3 #xv .shop-badge-icon {
  position: relative;
  width: 150px;
  height: 94px;
  flex: none;
  border-radius: var(--r-lg);
  overflow: hidden;
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
html.ds3 #xv .shop-badge-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
html.ds3 #xv .shop-badge-icon .av {
  position: absolute !important;
  top: 12px;
  right: 12px;
  width: 30px !important;
  height: 30px !important;
  font-size: 1rem;
  margin: 0;
  background: rgba(255, 255, 255, 0.92) !important;
  box-shadow: none;
}
html.ds3 #xv .shop-badge-icon .av i {
  display: none;
}
html.ds3 #xv .shop-badge-icon b {
  position: absolute;
  top: 13px;
  right: 50px;
  font-size: 0.78rem;
  font-family: "Alexandria", inherit;
}
html.ds3 #xv .shop-badge-icon small {
  position: absolute;
  top: 32px;
  right: 50px;
  font-size: 0.6rem;
  opacity: 0.9;
}
html.ds3 #xv .shop-badge-icon em {
  position: absolute;
  bottom: 9px;
  left: 10px;
  font-style: normal;
  font-size: 0.7rem;
  letter-spacing: 2px;
  background: rgba(0, 0, 0, 0.2);
  padding: 1px 7px;
  border-radius: 6px;
}
html.ds3 #xv .shop-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
html.ds3 #xv .shop-text > b {
  font-size: 1rem;
}
html.ds3 #xv .shop-text p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
}
html.ds3 #xv .shop-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  flex-wrap: wrap;
  margin-top: 2px;
}
html.ds3 #xv .shop-row button {
  min-height: 40px;
  border-radius: var(--r-md) !important;
  font-weight: 700;
  padding-inline: 18px !important;
}
/* المساعدات */
html.ds3 #xv .shopI.shop-hint-item {
  position: relative;
  overflow: hidden;
  padding-top: 16px !important;
}
html.ds3 #xv .shop-icon {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex: none;
}
html.ds3 #xv .shop-hint-item .shop-icon {
  background: radial-gradient(circle at 50% 40%, #fff4c7, #ffe08a);
  box-shadow:
    0 0 0 6px rgba(255, 209, 102, 0.18),
    0 8px 20px rgba(224, 161, 0, 0.25);
}
html.ds3[data-theme="dark"] #xv .shop-hint-item .shop-icon {
  background: radial-gradient(circle at 50% 40%, #5a4a16, var(--c-brown-2));
}
html.ds3 #xv .shop-hint-item .shop-icon > i {
  position: absolute;
  top: -6px;
  left: -8px;
  background: var(--c-green);
  color: var(--c-gold);
  font-style: normal;
  font-family: "Alexandria", inherit;
  font-size: 0.75rem;
  border-radius: 99px;
  padding: 1px 7px;
  border: 2px solid var(--card);
}
html.ds3 #xv .shop-save {
  position: absolute;
  top: 12px;
  right: -30px;
  transform: rotate(35deg);
  background: #d4af37;
  color: #2a2205;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 32px;
  z-index: 1;
}
html.ds3 #xv .shop-demo {
  display: flex;
  gap: 4px;
  justify-content: center;
}
html.ds3 #xv .shop-demo span {
  font-size: 0.68rem !important;
  padding: 2px 8px;
  border-radius: var(--r-xs);
  background: var(--accent-2, var(--c-line));
  color: var(--muted) !important;
}
html.ds3 #xv .shop-demo span.x {
  text-decoration: line-through;
  opacity: 0.55;
  background: transparent;
  border: 1px dashed var(--line);
}
html.ds3 #xv .shopI.shop-streak-item {
  grid-column: 1/-1;
  flex-direction: row;
  text-align: start !important;
  gap: 14px;
  align-items: center;
  background: linear-gradient(170deg, #f5fbff, #dceffb) !important;
  border-color: #b7dcf2;
}
html.ds3[data-theme="dark"] #xv .shopI.shop-streak-item {
  background: linear-gradient(170deg, #13232c, #18323f) !important;
  border-color: #2d5163;
}
html.ds3 #xv .shop-streak-item .shop-icon {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), #bfe3f7);
  border: 1.5px solid #9fd0ee;
  box-shadow:
    inset 0 0 12px rgba(255, 255, 255, 0.9),
    0 8px 18px rgba(80, 160, 210, 0.25);
  border-radius: var(--r-xl);
  transform: rotate(-6deg);
}
html.ds3[data-theme="dark"] #xv .shop-streak-item .shop-icon {
  background: linear-gradient(145deg, #2b5366, #1c3b4a);
  border-color: #3e7a96;
}
html.ds3 #xv .shop-streak-item .shop-icon i {
  position: absolute;
  color: #7fc2e8;
  display: flex;
}
html.ds3 #xv .shop-streak-item .shop-icon i.a {
  top: -7px;
  left: -7px;
}
html.ds3 #xv .shop-streak-item .shop-icon i.b {
  bottom: -6px;
  right: -7px;
}
html.ds3 #xv .shop-streak-item .shop-price {
  background: #d2ecfa;
  color: #1d6a93;
}
html.ds3[data-theme="dark"] #xv .shop-streak-item .shop-price {
  background: #1f4352;
  color: #9fd6f2;
}
html.ds3 #xv .shop-use {
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 12px 14px;
  margin-top: 14px;
}
html.ds3 #xv .shop-use .shop-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: #fff4c7;
}
html.ds3[data-theme="dark"] #xv .shop-use .shop-icon {
  background: var(--c-brown-2);
}
html.ds3 #xv .shop-use p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
}
html.ds3[data-theme="dark"] #xv .shop-price {
  background: #1f3a34;
  color: #8fe3bc;
}
html.ds3 #xv .shop-badge button[data-buy]:disabled {
  background: transparent !important;
  color: var(--muted) !important;
  border: 1.5px dashed var(--line) !important;
  box-shadow: none;
  opacity: 1;
}
html.ds3[data-theme="dark"] #xv .shop-badge button[data-buy]:disabled {
  color: #8fa39c !important;
  border-color: #3a4d48 !important;
}

/* ===== صفحة الألعاب: ردهة لعب ===== */
html.ds3 #xv .games-bar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: -4px 0 10px;
}
html.ds3 #xv .games-streak {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: var(--r-lg);
  padding: 4px 10px 4px 8px;
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--fg);
}
html.ds3 #xv .games-streak i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
}
html.ds3 #xv .games-streak i svg {
  width: 14px;
  height: 14px;
}
html.ds3 #xv .games-streak i.c {
  background: radial-gradient(circle at 35% 30%, #ffe79a, #ffc93c);
  border: 2px solid #c99400;
  color: #7a5a00;
}
html.ds3 #xv .games-streak i.f {
  background: #ffe4d1;
  color: #e2611b;
}
/* البانر */
html.ds3 #xv .games-hero {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 10px;
  scrollbar-width: none;
  border-radius: 26px;
}
html.ds3 #xv .games-hero::-webkit-scrollbar {
  display: none;
}
html.ds3 #xv .games-slide {
  flex: 0 0 100%;
  scroll-snap-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: radial-gradient(circle at 20% 15%, #1b7a5c, #0b3f30 70%);
  color: #fff;
  border-bottom: 6px solid #082e23;
  min-height: 196px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-decoration: none;
}
html.ds3 #xv .games-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
html.ds3 #xv .games-tag {
  position: relative;
  background: #ffc93c;
  color: #5a4300;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: var(--r-xs);
  transform: rotate(-2deg);
}
html.ds3 #xv .games-slide.done .games-tag {
  background: rgba(255, 255, 255, 0.16);
  color: #bfe3d2;
}
html.ds3 #xv .games-slide h2 {
  position: relative;
  margin: 6px 0 0;
  font-size: 1.55rem;
  color: #fff;
  font-weight: 800;
}
html.ds3 #xv .games-slide p {
  position: relative;
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.82;
  max-width: 62%;
}
html.ds3 #xv .games-play {
  position: relative;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffc93c;
  color: #4a3700;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 10px 26px;
  border-radius: var(--r-xl);
  border-bottom: 5px solid #c99400;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}
html.ds3 #xv .games-play small {
  font-size: 0.75rem;
  opacity: 0.75;
}
html.ds3 #xv .games-slide.done .games-play {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-bottom-color: rgba(0, 0, 0, 0.25);
  box-shadow: none;
}
html.ds3 #xv .games-slide:active .games-play {
  transform: translateY(3px);
  border-bottom-width: 2px;
}
html.ds3 #xv .games-art-tiles {
  position: absolute;
  left: 14px;
  top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 26px);
  gap: 5px;
  transform: rotate(-8deg);
}
html.ds3 #xv .games-art-tiles b {
  height: 30px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 3px solid rgba(0, 0, 0, 0.25);
  color: #fff;
}
html.ds3 #xv .games-art-tiles b.g {
  background: #2fa77a;
}
html.ds3 #xv .games-art-tiles b.y {
  background: #ffc93c;
  color: #4a3700;
}
html.ds3 #xv .games-art-tiles b.b {
  background: rgba(255, 255, 255, 0.22);
}
html.ds3 #xv .games-art-quiz {
  position: absolute;
  left: 16px;
  top: 24px;
  width: 116px;
  transform: rotate(-6deg);
}
html.ds3 #xv .games-art-quiz > i {
  display: block;
  height: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
}
html.ds3 #xv .games-art-quiz span {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 8px;
}
html.ds3 #xv .games-art-quiz span i {
  height: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.12);
}
html.ds3 #xv .games-art-quiz span i.on {
  background: #ffc93c;
}
html.ds3 #xv .games-hero-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin: 8px 0 2px;
}
html.ds3 #xv .games-hero-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  transition: width 0.2s;
}
html.ds3 #xv .games-hero-dots i.on {
  width: 18px;
  border-radius: 9px;
  background: var(--accent);
}
/* مسار المهام */
html.ds3 #xv .games-quest {
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: 22px;
  padding: 14px;
  margin-top: 10px;
}
html.ds3 #xv .games-quest.all {
  border-color: #e9cf7a;
  background: linear-gradient(170deg, var(--card), #fff6d6);
}
html.ds3[data-theme="dark"] #xv .games-quest.all {
  background: linear-gradient(170deg, var(--card), var(--c-brown-2));
  border-color: #6e5a1e;
}
html.ds3 #xv .games-quest-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
html.ds3 #xv .games-quest-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}
html.ds3 #xv .games-quest-head small {
  color: var(--muted);
  font-size: 0.72rem;
}
html.ds3 #xv .games-quest-track {
  display: flex;
  align-items: center;
  margin-top: 14px;
}
html.ds3 #xv .games-quest-node {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  font-weight: 800;
  font-size: 0.85rem;
  border-bottom: 4px solid rgba(0, 0, 0, 0.18);
  text-decoration: none;
  background: #e6efea;
  color: #8fa59c;
}
html.ds3[data-theme="dark"] #xv .games-quest-node {
  background: #1f3a34;
  color: #6e8a80;
}
html.ds3 #xv .games-quest-node.ok {
  background: #2fa77a;
  color: #fff;
}
html.ds3 #xv .games-quest-node.cur {
  background: var(--card);
  border: 3px solid #2fa77a;
  border-bottom-width: 5px;
  color: var(--accent);
  box-shadow: 0 0 0 5px rgba(47, 167, 122, 0.15);
  animation: glPulse 2s ease-in-out infinite;
}
html.ds3 #xv .games-quest-line {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: #e6efea;
  margin: 0 -2px;
}
html.ds3[data-theme="dark"] #xv .games-quest-line {
  background: #1f3a34;
}
html.ds3 #xv .games-quest-line.ok {
  background: #2fa77a;
}
html.ds3 #xv .games-challenge-btn {
  flex: none;
  margin-inline-start: 4px;
  display: block;
}
html.ds3 #xv .games-chest {
  width: 54px;
  height: 50px;
  display: block;
  filter: grayscale(0.35) opacity(0.8);
}
html.ds3 #xv .games-chest.ready {
  filter: none;
  animation: glBob 1.4s ease-in-out infinite;
}
html.ds3 #xv .games-chest.got {
  filter: none;
  opacity: 0.55;
}
html.ds3 #xv .games-quest-labels {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 6px;
  font-size: 0.72rem; /* فحص الشاشات: كان ٩٫٩px */
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
html.ds3 #xv .games-quest-labels span:first-child {
  text-align: start;
}
html.ds3 #xv .games-quest-labels span:last-child {
  text-align: end;
}
html.ds3 #xv .games-challenge-info {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 0.78rem;
  color: var(--fg);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: center;
}
html.ds3 #xv .games-challenge-info small {
  color: var(--muted);
}
html.ds3 #xv .games-chest-open {
  margin-inline-start: auto;
  background: #ffc93c !important;
  color: #4a3700;
  border: 0;
  border-bottom: 4px solid #c99400;
  border-radius: var(--r-md);
  font-weight: 800;
  min-height: 38px;
  padding: 0 14px !important;
}
/* الأقسام */
html.ds3 #xv .games-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 2px 10px;
}
html.ds3 #xv .games-section h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}
html.ds3 #xv .games-section > i {
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}
html.ds3 #xv .games-section small {
  color: var(--muted);
  font-size: 0.72rem;
}
/* بطاقات اللعب */
html.ds3 #xv .games-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
html.ds3 #xv .games-card {
  position: relative;
  display: block;
  background: var(--card);
  border-radius: 22px;
  border: 2px solid var(--line);
  border-bottom-width: 6px;
  overflow: hidden;
  text-decoration: none;
  color: var(--fg);
}
html.ds3 #xv .games-card:active {
  transform: translateY(3px);
  border-bottom-width: 3px;
  margin-bottom: 3px;
  scale: 1;
}
html.ds3 #xv .games-card-art {
  height: 90px;
  background: var(--c-green);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
html.ds3 #xv .games-card-art .games-pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
html.ds3 #xv .games-card-art > svg:not(.games-pattern) {
  position: relative;
  width: 110px;
  height: 70px;
}
html.ds3 #xv .games-card-body {
  padding: 10px 12px 12px;
}
html.ds3 #xv .games-card-body b {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
}
html.ds3 #xv .games-card-body small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 1px;
}
html.ds3 #xv .games-card-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  min-height: 20px;
}
html.ds3 #xv .games-day-progress {
  display: flex;
  gap: 1px;
}
html.ds3 #xv .games-day-progress i {
  font-style: normal;
  font-size: 0.85rem;
  color: #dce6e1;
}
html.ds3[data-theme="dark"] #xv .games-day-progress i {
  color: #2a3b36;
}
html.ds3 #xv .games-day-progress i.on {
  color: #ffc93c;
}
html.ds3 #xv .games-card-meta em {
  font-style: normal;
  margin-inline-start: auto;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-2, #e6f2ec);
  padding: 1px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
html.ds3 #xv .games-count {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  background: #e2463a;
  color: #fff;
  font-weight: 800;
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 99px;
  border: 2px solid #fff;
}
/* الساحة */
html.ds3 #xv .games-arena-link {
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 24px;
  padding: 14px;
  background: linear-gradient(160deg, #0f5a44, #08362a);
  color: #fff;
  border-bottom: 6px solid #062419;
  text-decoration: none;
}
html.ds3 #xv .games-arena-link .games-shield {
  width: 66px;
  height: 76px;
  flex: none;
}
html.ds3 #xv .games-arena-link > div {
  flex: 1;
  min-width: 0;
}
html.ds3 #xv .games-arena-link b {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}
html.ds3 #xv .games-arena-link small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.82;
}
html.ds3 #xv .games-progress {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.18);
  margin-top: 8px;
  overflow: hidden;
}
html.ds3 #xv .games-progress i {
  display: block;
  height: 100%;
  background: #ffc93c;
  border-radius: 3px;
}
html.ds3 #xv .games-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
html.ds3 #xv .games-league-link {
  position: relative;
  background: var(--card);
  border: 2px solid var(--line);
  border-bottom-width: 5px;
  border-radius: var(--r-2xl);
  padding: 10px 6px;
  text-align: center;
  text-decoration: none;
  color: var(--fg);
}
html.ds3 #xv .games-league-link > span {
  width: 40px;
  height: 40px;
  margin: 0 auto 6px;
  border-radius: var(--r-md);
  background: var(--accent-2, #e6f2ec);
  color: var(--accent);
  display: grid;
  place-items: center;
}
html.ds3 #xv .games-league-link > span svg {
  width: 22px;
  height: 22px;
}
html.ds3 #xv .games-league-link b {
  display: block;
  font-weight: 800;
  font-size: 0.78rem;
}
html.ds3 #xv .games-league-link small {
  display: block;
  font-size: 0.62rem;
  color: var(--muted);
}
html.ds3 #xv .games-new-badge {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffc93c;
  color: #5a4300;
  font-style: normal;
  font-weight: 800;
  font-size: 0.6rem;
  padding: 1px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
/* المكافآت */
html.ds3 #xv .games-rewards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
html.ds3 #xv .games-box-link {
  position: relative;
  display: block;
  text-align: center;
  text-decoration: none;
  background: linear-gradient(180deg, #fff6d6, #ffe9a8);
  border: 2px solid #f0d27a;
  border-bottom: 5px solid #d9ae3a;
  border-radius: 20px;
  padding: 10px 6px;
}
html.ds3[data-theme="dark"] #xv .games-box-link {
  background: linear-gradient(180deg, var(--c-brown-2), #2a2312);
  border-color: #6e5a1e;
  border-bottom-color: #4a3c17;
}
html.ds3 #xv .games-box-link.wait {
  filter: saturate(0.6);
}
html.ds3 #xv .games-box-link > svg {
  width: 54px;
  height: 46px;
  display: block;
  margin: 0 auto;
}
html.ds3 #xv .games-box-link b {
  display: block;
  font-weight: 800;
  font-size: 0.82rem;
  color: #5a4300;
}
html.ds3 #xv .games-box-link small {
  display: block;
  font-size: 0.65rem;
  color: var(--c-gold-text);
}
html.ds3[data-theme="dark"] #xv .games-box-link b {
  color: #f1d27a;
}
html.ds3[data-theme="dark"] #xv .games-box-link small {
  color: #c9a74f;
}
html.ds3 #xv .games-box-link em {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  background: #e2463a;
  color: #fff;
  font-style: normal;
  font-weight: 800;
  font-size: 0.62rem;
  padding: 2px 9px;
  border-radius: 99px;
  border: 2px solid #fff;
  white-space: nowrap;
}
html.ds3 #xv .games-avatar {
  width: 46px;
  height: 46px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(#a87a12, #ffe7a0, #d4af37, #fff3c4, #a87a12);
  display: grid;
  place-items: center;
}
html.ds3 #xv .games-avatar .av {
  width: 38px !important;
  height: 38px !important;
  margin: 0;
  background: #fff8e1 !important;
  font-size: 1.2rem;
  box-shadow: none;
}
html.ds3 #xv .games-avatar .av i {
  display: none;
}
@keyframes glPulse {
  50% {
    box-shadow: 0 0 0 8px rgba(47, 167, 122, 0.08);
  }
}
@keyframes glBob {
  50% {
    transform: translateY(-4px) rotate(-3deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 #xv .games-quest-node.cur,
  html.ds3 #xv .games-chest.ready {
    animation: none;
  }
}

/* ===== لوحة المعلم: تفاصيل الدرس ===== */
html.ds3 #teacher > #tBody,
html.ds3 #tBody > .tpanel,
html.ds3 #tBody .t2p {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
html.ds3 .t3ld {
  padding: 16px !important;
  border-radius: 22px;
}
html.ds3 .lesson-detail-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
html.ds3 .lesson-detail-ring {
  --p: 0;
  width: 92px;
  height: 92px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--accent-2, var(--c-line)) 0);
  display: grid;
  place-items: center;
}
html.ds3 .lesson-detail-ring > div {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}
html.ds3 .lesson-detail-ring b {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
html.ds3 .lesson-detail-ring small {
  font-size: 0.65rem;
  color: var(--muted);
}
html.ds3 .lesson-detail-stats {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
html.ds3 .lesson-detail-stat {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  text-align: center;
}
html.ds3 .lesson-detail-stat b {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
html.ds3 .lesson-detail-stat small {
  font-size: 0.7rem;
  color: var(--muted);
}
html.ds3 .lesson-detail-stat.ok b {
  color: var(--c-green-2);
}
html.ds3 .lesson-detail-stat.bad b {
  color: var(--c-danger);
}
html.ds3[data-theme="dark"] .lesson-detail-stat.ok b {
  color: #6fd3a6;
}
html.ds3[data-theme="dark"] .lesson-detail-stat.bad b {
  color: #f4a39a;
}
html.ds3 .lesson-detail-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--accent-2, var(--c-line));
  border-radius: var(--r-lg);
  padding: 4px;
  margin-top: 16px;
}
html.ds3 .lesson-detail-tabs button {
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  min-height: 40px;
  border-radius: 11px !important;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
html.ds3 .lesson-detail-tabs button.on {
  background: var(--card) !important;
  color: var(--fg) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
html.ds3 .lesson-detail-tabs button:disabled {
  opacity: 0.45;
}
html.ds3 .lesson-detail-tabs i,
html.ds3 .lesson-detail-sec-tabs i {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0 7px;
  border-radius: 99px;
  background: var(--bg);
  color: var(--muted);
  line-height: 1.6;
}
html.ds3 .lesson-detail-tabs button.on i {
  background: var(--c-red-soft);
  color: var(--c-danger);
}
html.ds3[data-theme="dark"] .lesson-detail-tabs button.on i {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3 .lesson-detail-sec-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 12px -2px 2px;
  padding: 2px;
}
html.ds3 .lesson-detail-sec-tabs::-webkit-scrollbar {
  display: none;
}
html.ds3 .lesson-detail-sec-tabs button {
  flex: none;
  min-height: 34px;
  padding: 0 12px !important;
  border-radius: 99px !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
html.ds3 .lesson-detail-sec-tabs button.on {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}
html.ds3 .lesson-detail-sec-tabs button.on i {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
html.ds3 .ldL {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
html.ds3 .ldL li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 2px;
  border-bottom: 1px solid var(--line);
}
html.ds3 .ldL li:last-child {
  border-bottom: 0;
}
html.ds3 .lesson-detail-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: var(--c-line);
  color: var(--c-green);
}
html.ds3 .lesson-detail-avatar.s1 {
  background: #fff1c9;
  color: var(--c-gold-text);
}
html.ds3 .lesson-detail-avatar.s2 {
  background: #e3f0fa;
  color: #1d5f8a;
}
html.ds3 .lesson-detail-avatar.s3 {
  background: var(--c-red-soft);
  color: #a3321f;
}
html.ds3 .lesson-detail-avatar.s4 {
  background: #ede7fa;
  color: #5b3fb5;
}
html.ds3[data-theme="dark"] .lesson-detail-avatar {
  filter: brightness(0.75) saturate(1.2);
}
html.ds3 .lesson-detail-name {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ds3 .ldL em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--c-danger);
  background: var(--c-red-soft);
  padding: 2px 8px;
  border-radius: 99px;
  flex: none;
}
html.ds3[data-theme="dark"] .ldL em {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3 .ldAct {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}
html.ds3 .ldAct button {
  min-height: 38px;
  border-radius: var(--r-md) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
html.ds3 .lesson-detail-done {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--c-green-2);
  font-weight: 600;
}
/* الأسماء: ملخص مختصر + نافذة */
html.ds3 .lesson-detail-stack {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 12px !important;
  border-radius: var(--r-xl) !important;
  background: var(--bg) !important;
  border: 1px solid var(--line) !important;
  color: var(--fg) !important;
  box-shadow: none;
  min-height: 52px;
}
html.ds3 .lesson-detail-avatars {
  display: flex;
  padding-inline-start: 8px;
}
html.ds3 .lesson-detail-avatars .lesson-detail-avatar {
  margin-inline-start: -8px;
  border: 2px solid var(--card);
  width: 30px;
  height: 30px;
  font-size: 0.8rem;
}
html.ds3 .lesson-detail-avatar.more {
  background: var(--accent) !important;
  color: #fff;
  font-size: 0.68rem;
}
html.ds3 .lesson-detail-stack-label {
  flex: 1;
  text-align: start;
  font-weight: 700;
  font-size: 0.88rem;
}
html.ds3 .lesson-detail-stack > svg,
html.ds3 .lesson-detail-section > svg {
  color: var(--muted);
  flex: none;
}
html.ds3 .lesson-detail-rows {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
html.ds3 .lesson-detail-rows > small {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 2px 6px;
}
html.ds3 .lesson-detail-section {
  display: grid !important;
  grid-template-columns: 42px 1fr auto 16px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 4px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: var(--r-md) !important;
  color: var(--fg) !important;
  box-shadow: none;
  text-align: start;
}
html.ds3 .lesson-detail-section b {
  font-size: 0.85rem;
}
html.ds3 .lesson-detail-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--accent-2, var(--c-line));
  overflow: hidden;
}
html.ds3 .lesson-detail-bar i {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #e8a39a, #c8483a);
}
html.ds3 .lesson-detail-section em {
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}
html.ds3 .sheet-shell-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(6, 30, 23, 0);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: background 0.22s;
}
html.ds3 .sheet-shell-overlay[hidden] {
  display: none;
}
html.ds3 .sheet-shell-overlay.on {
  background: rgba(6, 30, 23, 0.45);
}
html:has(.sheet-shell-overlay.on) {
  overflow: hidden !important;
}
html.ds3 .sheet-shell {
  width: 100%;
  max-width: 560px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 24px 24px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  transform: translateY(100%);
  transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
}
html.ds3 .sheet-shell-overlay.on .sheet-shell {
  transform: none;
}
html.ds3 .sheet-grabber {
  display: block;
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--line);
  margin: 0 auto 10px;
}
html.ds3 .sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
html.ds3 .sheet-head > div {
  flex: 1;
  min-width: 0;
}
html.ds3 .sheet-head h3 {
  margin: 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
html.ds3 .sheet-head h3 span {
  font-size: 0.75rem;
  background: var(--c-red-soft);
  color: var(--c-danger);
  padding: 1px 9px;
  border-radius: 99px;
}
html.ds3 .sheet-head small {
  color: var(--muted);
  font-size: 0.78rem;
}
html.ds3 .sheet-close {
  width: 40px !important;
  height: 40px;
  min-height: 40px;
  padding: 0 !important;
  border-radius: var(--r-md) !important;
  background: var(--bg) !important;
  border: 0 !important;
  color: var(--fg) !important;
  display: grid !important;
  place-items: center;
  box-shadow: none;
}
html.ds3 .sheet-shell .lesson-detail-sec-tabs {
  margin: 12px 0 4px;
}
html.ds3 .lesson-detail-names {
  list-style: none;
  margin: 8px 0 12px;
  padding: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  overscroll-behavior: contain;
}
html.ds3 .lesson-detail-names li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--r-md);
  background: var(--bg);
  min-width: 0;
}
html.ds3 .lesson-detail-names .lesson-detail-avatar {
  width: 28px;
  height: 28px;
  font-size: 0.78rem;
}
html.ds3 .lesson-detail-names .lesson-detail-name {
  font-size: 0.82rem;
}
html.ds3 .lesson-detail-names small {
  font-size: 0.66rem;
  color: var(--muted);
  flex: none;
}
html.ds3 .lesson-detail-names em {
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--c-danger);
  flex: none;
}
html.ds3 .lesson-detail-copy {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: var(--r-lg);
  font-weight: 700;
  flex: none;
}
html.ds3 .lesson-detail-copy.ok {
  background: var(--c-green-2) !important;
}

/* ===== النافذة العامة ===== */
html.ds3 .bottom-sheet {
  gap: 0;
}
html.ds3 .sheet-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
  font-weight: 700;
  font-size: 1.1rem;
}
html.ds3 .sheet-item-icon svg {
  width: 22px;
  height: 22px;
}
html.ds3 .sheet-item-icon.gold {
  background: #fff1c9;
  color: var(--c-gold-text);
}
html.ds3 .sheet-item-icon.red {
  background: var(--c-red-soft);
  color: var(--c-danger);
}
html.ds3 .sheet-item-icon.mute {
  background: var(--bg);
  color: var(--muted);
}
html.ds3[data-theme="dark"] .sheet-item-icon.gold {
  background: var(--c-brown-2);
  color: #f1d27a;
}
html.ds3[data-theme="dark"] .sheet-item-icon.red {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3 .sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-top: 10px;
  flex: 1;
  min-height: 0;
}
html.ds3 .sheet-body p {
  margin: 0 0 10px;
  line-height: 1.8;
  font-size: 0.92rem;
}
html.ds3 .sheet-foot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
  flex: none;
}
html.ds3 .sheet-foot button,
html.ds3 .sheet-foot a {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  border-radius: var(--r-lg) !important;
  font-weight: 700;
  text-decoration: none;
  margin: 0 !important;
}
html.ds3 .sheet-foot button svg,
html.ds3 .sheet-foot a svg {
  width: 18px;
  height: 18px;
  flex: none;
}
html.ds3 .sheet-foot .ok {
  background: var(--c-green-2) !important;
  color: #fff;
}
html.ds3 .sheet-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
html.ds3 .sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: var(--bg);
}
html.ds3 .sheet-item > div {
  flex: 1;
  min-width: 0;
}
html.ds3 .sheet-item b {
  display: block;
  font-size: 0.88rem;
}
html.ds3 .sheet-item small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.6;
}
html.ds3 .sheet-item .sheet-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
}
html.ds3 .sheet-tag {
  flex: none;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
  background: var(--c-red-soft);
  color: var(--c-danger);
  white-space: nowrap;
}
html.ds3 .sheet-tag.g {
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
}
html.ds3[data-theme="dark"] .sheet-tag {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3 .sheet-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
html.ds3 .sheet-stats > div {
  background: var(--bg);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  text-align: center;
}
html.ds3 .sheet-stats b {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
}
html.ds3 .sheet-stats small {
  font-size: 0.7rem;
  color: var(--muted);
}
html.ds3 .sheet-stats .ok b {
  color: var(--c-green-2);
}
html.ds3 .sheet-stats .bad b {
  color: var(--c-danger);
}
html.ds3 .sheet-score-bar {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) 2fr 42px;
  gap: 8px;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 6px;
}
html.ds3 .sheet-score-bar > span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ds3 .sheet-score-bar i {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--accent-2, var(--c-line));
  overflow: hidden;
}
html.ds3 .sheet-score-bar i i {
  height: 100%;
  background: #2fa77a;
  border-radius: 4px;
}
html.ds3 .sheet-score-bar i i.w {
  background: var(--c-gold-dark);
}
html.ds3 .sheet-score-bar i i.b {
  background: #c8483a;
}
html.ds3 .sheet-score-bar b {
  font-size: 0.78rem;
  text-align: end;
}
html.ds3 .sheet-note {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg);
  border-radius: var(--r-md);
  padding: 10px 12px;
  line-height: 1.7;
  margin-bottom: 10px;
}
html.ds3 .sheet-note b {
  color: var(--fg);
}
html.ds3 .sheet-msg {
  font-size: 0.8rem;
  text-align: center;
  color: var(--muted);
  margin: 8px 0 0;
  min-height: 1.2em;
}
html.ds3 .sheet-ring {
  --p: 0;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: conic-gradient(var(--rc, #2fa77a) calc(var(--p) * 1%), var(--accent-2, var(--c-line)) 0);
  display: grid;
  place-items: center;
}
html.ds3 .sheet-ring > b {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.2rem;
}
html.ds3 .sheet-top {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}
html.ds3 .sheet-top > div:not(.sheet-ring) {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
html.ds3 .sheet-part {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--bg);
  border-radius: var(--r-sm);
  font-size: 0.8rem;
}
html.ds3 .sheet-part b.ok {
  color: var(--c-green-2);
}
html.ds3 .sheet-part b.bad {
  color: var(--c-danger);
}
html.ds3 .sheet-part b.w {
  color: var(--c-gold-text);
}
html.ds3 .sheet-code {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-lg);
  background: var(--bg);
  margin-bottom: 4px;
}
html.ds3 .sheet-code > div {
  flex: 1;
}
html.ds3 .sheet-code small {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
}
html.ds3 .sheet-code b {
  letter-spacing: 0.2em;
  font-family: monospace;
  font-size: 1rem;
}
html.ds3 .sheet-code button {
  min-height: 36px;
  padding: 0 12px !important;
  border-radius: var(--r-sm) !important;
  font-size: 0.8rem;
}
html.ds3 .sheet-shell.bottom-sheet {
  max-height: 86vh;
}
html.ds3 #xv button.games-quest-node {
  border: 0 !important;
  border-bottom: 4px solid rgba(0, 0, 0, 0.18);
  padding: 0 !important;
  min-height: 0;
  box-shadow: none !important;
  cursor: pointer;
  font-family: inherit;
}
html.ds3 #xv button.games-quest-node:not(.ok):not(.cur) {
  background: #e6efea !important;
  color: #8fa59c;
}
html.ds3 #xv button.games-quest-node.ok {
  background: #2fa77a !important;
  color: #fff;
}
html.ds3 #xv button.games-quest-node.cur {
  border: 3px solid #2fa77a !important;
  border-bottom-width: 5px;
  background: var(--card) !important;
  color: var(--accent);
}
html.ds3 #xv button.games-challenge-btn {
  background: none !important;
  border: 0;
  padding: 0 !important;
  min-height: 0;
  box-shadow: none;
  cursor: pointer;
}
html.ds3 .assignment-late-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
}
html.ds3 .assignment-late-btn svg {
  width: 16px;
  height: 16px;
}
html.ds3 #heatBox td[data-hk] {
  cursor: pointer;
}
html.ds3 .sheet-foot .games-chest-open {
  min-height: 48px;
}
html.ds3 .sheet-ring {
  flex: 0 0 84px;
}
html.ds3 .sheet-code button {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  flex: none;
}
html.ds3 .sheet-code button svg {
  width: 16px;
  height: 16px;
}
html.ds3 .sheet-close:focus:not(:focus-visible) {
  outline: none !important;
  box-shadow: none;
  border-color: transparent !important;
}
/* رفيق المذاكرة */
html.ds3 .bdy2 {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin: 14px 0 10px;
}
html.ds3 .buddy-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  min-width: 0;
}
html.ds3 .buddy-player .av {
  width: 60px !important;
  height: 60px !important;
  font-size: 1.8rem;
  margin: 0;
  background: var(--accent-2, var(--c-line)) !important;
}
html.ds3 .buddy-player .av i {
  display: none;
}
html.ds3 .buddy-initial {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.5rem;
  background: #fff1c9;
  color: var(--c-gold-text);
}
html.ds3[data-theme="dark"] .buddy-initial {
  background: var(--c-brown-2);
  color: #f1d27a;
}
html.ds3 .buddy-player b {
  font-size: 1rem;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ds3 .buddy-player small {
  color: var(--muted);
  font-size: 0.8rem;
}
html.ds3 .buddy-vs {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  transform: rotate(-6deg);
}
html.ds3 .buddy-bar {
  height: 10px;
  border-radius: 5px;
  background: #ffe7a0;
  overflow: hidden;
  margin: 4px 0 0;
}
html.ds3[data-theme="dark"] .buddy-bar {
  background: #4a3c17;
}
html.ds3 .buddy-bar i {
  display: block;
  height: 100%;
  background: var(--accent);
}
html.ds3 .buddy-msg {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 8px 0 12px;
}
html.ds3 .buddy-msg b {
  color: var(--fg);
}
html.ds3 .buddy-actions {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}
html.ds3 .buddy-actions > * {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0 !important;
  padding: 0 12px !important;
  border-radius: var(--r-lg) !important;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
  text-decoration: none;
}
html.ds3 .buddy-actions svg {
  flex: none;
}
html.ds3 .buddy-player .av {
  border-radius: 50%;
  padding: 0 !important;
  box-shadow:
    0 0 0 3px var(--card),
    0 0 0 5px var(--accent);
}
html.ds3 .buddy-bar {
  display: flex;
  direction: rtl;
}
html.ds3 .buddy-bar i {
  border-radius: 5px;
}

/* ===== لوحة المعلم v2 ===== */
html.ds3 .t2sub {
  flex-wrap: wrap;
  overflow: visible !important;
  white-space: normal;
}
html.ds3 .t2sub button {
  flex: none;
}
html.ds3 .t2ph {
  margin: 2px 2px 12px;
}
html.ds3 .t2ph h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.7rem;
  line-height: 1.3;
}
html.ds3 .t2ph p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}
html.ds3 .tpanel > .t2ph {
  margin-top: 6px;
}
html.ds3 .t2chp {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
html.ds3 .t2chp button {
  min-height: 34px;
  padding: 0 13px !important;
  border-radius: 99px !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
}
html.ds3 .t2chp button.on {
  background: var(--accent) !important;
  border-color: var(--accent);
  color: #fff !important;
}
html.ds3 .t2kp {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
html.ds3 .t2kp > div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 10px 6px;
  text-align: center;
}
html.ds3 .t2kp b {
  display: block;
  font-family: var(--display);
  font-size: 1.3rem;
}
html.ds3 .t2kp b.ok {
  color: var(--c-green-2);
}
html.ds3 .t2kp b.bad {
  color: var(--c-danger);
}
html.ds3 .t2kp small {
  font-size: 0.7rem;
  color: var(--muted);
}
html.ds3 .t2Ti {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  flex: none;
  background: var(--accent-2, var(--c-line));
  color: var(--accent);
}
html.ds3 .t2Ti svg {
  width: 21px;
  height: 21px;
}
html.ds3 .t2Ti.gold {
  background: #fff1c9;
  color: var(--c-gold-text);
}
html.ds3 .t2Ti.red {
  background: var(--c-red-soft);
  color: var(--c-danger);
}
html.ds3 .t2Ti.v {
  background: #ede7fa;
  color: #5b3fb5;
}
html.ds3 .t2Ti.b {
  background: #e3f0fa;
  color: #1d5f8a;
}
html.ds3 .t2Ti.mute {
  background: var(--bg);
  color: var(--muted);
}
html.ds3[data-theme="dark"] .t2Ti.gold {
  background: var(--c-brown-2);
  color: #f1d27a;
}
html.ds3[data-theme="dark"] .t2Ti.red {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3[data-theme="dark"] .t2Ti.v {
  background: #2c2550;
  color: #c8b8ff;
}
html.ds3[data-theme="dark"] .t2Ti.b {
  background: #1a3445;
  color: #9fd0ee;
}
html.ds3 .t2tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
html.ds3 .t2tile {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 116px;
  padding: 12px !important;
  text-align: start;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-2xl) !important;
  color: var(--fg) !important;
  box-shadow: none;
}
html.ds3 .t2tile b {
  font-size: 0.92rem;
}
html.ds3 .t2tile small {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.5;
  font-weight: 400;
}
html.ds3 .t2wide,
html.ds3 .t2gi,
html.ds3 .t2rr,
html.ds3 .t2lr {
  display: flex !important;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: start;
  color: var(--fg) !important;
  box-shadow: none;
}
html.ds3 .t2wide {
  margin-top: 10px;
  padding: 12px !important;
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r-2xl) !important;
}
html.ds3 .t2wide > span:not(.t2Ti),
html.ds3 .t2gi .tx,
html.ds3 .t2rr .tx,
html.ds3 .t2lr .tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
html.ds3 .t2wide b,
html.ds3 .t2gi b,
html.ds3 .t2rr b,
html.ds3 .t2lr b {
  font-size: 0.88rem;
}
html.ds3 .t2wide small,
html.ds3 .t2gi small,
html.ds3 .t2rr small,
html.ds3 .t2lr small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
html.ds3 .t2wide > i,
html.ds3 .t2gi > i {
  font-style: normal;
  color: var(--muted);
  font-size: 1.1rem;
}
html.ds3 .t2srch {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 0 12px;
  margin-bottom: 10px;
}
html.ds3 .t2srch svg {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
}
html.ds3 .t2srch input {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 44px;
  flex: 1;
  padding: 0 !important;
}
html.ds3 .t2dl {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 700;
  margin: 14px 4px 6px;
}
html.ds3 .t2list2 {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 2px 12px;
}
html.ds3 .t2rr,
html.ds3 .t2lr {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 10px 0 !important;
  min-height: 60px;
}
html.ds3 .t2list2 > button:first-child {
  border-top: 0 !important;
}
html.ds3 .t2rr b small {
  display: inline;
  font-weight: 500;
}
html.ds3 .t2av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex: none;
  background: var(--c-line);
  color: var(--c-green);
}
html.ds3 .t2av.a1 {
  background: #fff1c9;
  color: var(--c-gold-text);
}
html.ds3 .t2av.a2 {
  background: #e3f0fa;
  color: #1d5f8a;
}
html.ds3 .t2av.a3 {
  background: var(--c-red-soft);
  color: #a3321f;
}
html.ds3 .t2av.a4 {
  background: #ede7fa;
  color: #5b3fb5;
}
html.ds3 .t2rr em,
html.ds3 .t2lr em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
  flex: none;
  background: var(--bg);
  color: var(--muted);
}
html.ds3 .t2rr em {
  font-family: var(--display);
  font-size: 0.8rem;
}
html.ds3 .t2rr em.h,
html.ds3 .t2lr em.o {
  background: #dff3e9;
  color: var(--c-green-2);
}
html.ds3 .t2rr em.m,
html.ds3 .t2lr em.w {
  background: #fff3d6;
  color: var(--c-gold-text);
}
html.ds3 .t2rr em.l {
  background: var(--c-red-soft);
  color: var(--c-danger);
}
html.ds3[data-theme="dark"] .t2rr em.h,
html.ds3[data-theme="dark"] .t2lr em.o {
  background: #173a2c;
  color: #8fe3bc;
}
html.ds3[data-theme="dark"] .t2rr em.m,
html.ds3[data-theme="dark"] .t2lr em.w {
  background: var(--c-brown-2);
  color: #f1d27a;
}
html.ds3[data-theme="dark"] .t2rr em.l {
  background: #3a2220;
  color: #f4a39a;
}
html.ds3 .t2lr .t2Ti {
  width: 36px;
  height: 36px;
}
html.ds3 .t2dots {
  font-style: normal;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--bg);
  color: var(--muted);
  flex: none;
  letter-spacing: 1px;
}
html.ds3 .t2chh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 4px 6px;
}
html.ds3 .t2chh b {
  flex: 1;
  font-size: 0.86rem;
}
html.ds3 .t2chh .lnk {
  background: none !important;
  border: 0 !important;
  color: var(--accent) !important;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 !important;
  min-height: 0;
  box-shadow: none;
}
html.ds3 .t2more {
  width: 100%;
  margin-top: 12px;
}
html.ds3 .t2gt {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 700;
  margin: 16px 6px 6px;
}
html.ds3 .t2grp {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  overflow: hidden;
  margin-bottom: 10px;
}
html.ds3 .t2gi {
  background: transparent !important;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 11px 14px !important;
  min-height: 60px;
}
html.ds3 .t2grp > .t2gi:first-child {
  border-top: 0;
}
html.ds3 .t2gi em {
  font-style: normal;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 42%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
html.ds3 .t2me {
  position: absolute !important;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0 !important;
  border-radius: 50% !important;
  background: var(--c-green) !important;
  color: var(--c-gold) !important;
  font-weight: 700;
  font-size: 1rem;
  border: 0 !important;
  box-shadow:
    0 0 0 2px var(--card),
    0 0 0 3.5px #d4af37;
  display: grid !important;
  place-items: center;
  order: 9;
}
html.ds3 button.sheet-item.t2bi {
  width: 100%;
  border: 0 !important;
  text-align: start;
  color: var(--fg) !important;
  box-shadow: none;
  background: var(--bg) !important;
  min-height: 0;
  padding: 10px !important;
  border-radius: var(--r-lg) !important;
}
html.ds3 #pSet #saveSet {
  position: sticky;
  bottom: 86px;
  z-index: 5;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
}

html.ds3 body.t2 aside.brand .themeBtn {
  display: none !important;
}
html.ds3 .sheet-shell .lesson-detail-sec-tabs,
html.ds3 .bottom-sheet .lesson-detail-sec-tabs {
  flex-wrap: wrap;
  overflow: visible;
  margin: 12px 0 6px;
  padding: 0;
}
html.ds3 .t2ph + .t2sub {
  margin-top: 0;
}
html.ds3 .t2stbl td b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  display: inline-block;
  vertical-align: middle;
}
/* أقسام علوية = مفتاح مقسّم، والشعب = رقائق صغيرة */
html.ds3 .t2sub {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--card) !important;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px !important;
  margin: 0 0 14px;
  width: 100%;
  box-sizing: border-box;
  max-width: 100%;
}
html.ds3 .t2sub:has(> button:nth-child(2):last-child),
html.ds3 .t2sub:has(> button:nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
html.ds3 .t2sub button {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 40px !important;
  padding: 0 6px !important;
  border: 0 !important;
  border-radius: var(--r-sm) !important;
  background: transparent !important;
  color: var(--fg) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  box-shadow: none;
  display: flex !important;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    background 0.2s,
    color 0.2s;
}
html.ds3 .t2sub button.on {
  background: var(--accent) !important;
  color: #fff !important;
}
html.ds3[data-theme="dark"] .t2sub {
  background: var(--card) !important;
}
html.ds3 #pT2 .t2tabs {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 12px;
}
html.ds3 #pT2 .t2tabs button {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  border: 0 !important;
  border-radius: var(--r-sm) !important;
  background: transparent !important;
  color: var(--fg) !important;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: none;
  padding: 0 4px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
html.ds3 #pT2 .t2tabs button.on {
  background: var(--accent) !important;
  color: #fff !important;
}
html.ds3 #pT2 .t2chips,
html.ds3 .t2chp {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
html.ds3 #pT2 .t2chips button,
html.ds3 .t2chp button {
  min-height: 34px !important;
  padding: 0 13px !important;
  border-radius: 99px !important;
  font-size: 0.8rem !important;
  font-weight: 600;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  box-shadow: none;
}
html.ds3 #pT2 .t2chips button.on,
html.ds3 .t2chp button.on {
  background: var(--accent) !important;
  border-color: var(--accent);
  color: #fff !important;
}
html.ds3 body.t2 main,
html.ds3 body.t2 #tBody,
html.ds3 body.t2 .tpanel {
  min-width: 0;
  max-width: 100%;
}
html.ds3 #pT2 .t2hd h2 {
  font-size: 1.7rem !important;
}
/* مركز الطباعة */
html.ds3 .t2ptg {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
html.ds3 .t2ptg label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 12px 6px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  cursor: pointer;
  font-weight: 600;
  font-size: 0.76rem;
  line-height: 1.4;
  min-height: 96px;
  justify-content: center;
}
html.ds3 .t2ptg label.on,
html.ds3 .t2ptg label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-2, var(--c-line));
}
html.ds3[data-theme="dark"] .t2ptg label.on,
html.ds3[data-theme="dark"] .t2ptg label:has(input:checked) {
  background: #173a2c;
}
html.ds3 .t2ptg input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
html.ds3 .t2ptg b {
  font-weight: 600;
}
html.ds3 .t2tg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 359px) {
  html.ds3 body.t2 aside.brand .login-chip {
    display: none !important;
  }
}
/* إدارة الشعب */
html.ds3 .secSh .sheet-section-form {
  background: var(--bg);
  border-radius: var(--r-xl);
  padding: 12px;
  margin-bottom: 10px;
}
html.ds3 .secSh .sheet-section-form > b {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
html.ds3 .secSh .sheet-section-form .hint {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}
html.ds3 .section-input {
  display: flex;
  gap: 8px;
}
html.ds3 .section-input input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  border-radius: var(--r-md) !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  padding: 0 12px !important;
  font: inherit;
  font-weight: 600;
  margin: 0 !important;
}
html.ds3 .section-input button {
  flex: none;
  min-height: 44px;
  padding: 0 18px !important;
  border-radius: var(--r-md) !important;
  background: var(--accent) !important;
  color: #fff !important;
  border: 0 !important;
  font-weight: 700;
  margin: 0 !important;
}
html.ds3 .section-move button.on {
  background: var(--accent) !important;
  border-color: var(--accent);
  color: #fff;
}
html.ds3 .secSh .sheet-foot .danger {
  background: transparent !important;
  color: var(--c-danger);
  border: 1px solid #f1c9c4;
  font-size: 0.85rem;
}
html.ds3[data-theme="dark"] .secSh .sheet-foot .danger {
  color: #f4a39a;
  border-color: #5a2d29;
}
html.ds3 .secSh .msg {
  margin: 6px 0 0;
}
/* الإحصائيات: لا تتمدد الصفحة بعرض الرسوم لو كثرت الفصول */
html.ds3 .chapter-grid > *,
html.ds3 .tpanel > .card,
html.ds3 .tpanel > div {
  min-width: 0;
  max-width: 100%;
}
html.ds3 .vbars {
  overflow-x: auto;
  scrollbar-width: none;
  gap: 6px;
}
html.ds3 .vbars::-webkit-scrollbar {
  display: none;
}
html.ds3 .vbars > div {
  flex: 1 0 30px;
  min-width: 30px;
}
html.ds3 .vbars > div b {
  font-size: 0.68rem;
  white-space: nowrap;
}
html.ds3 .tpanel div:has(> table) {
  overflow-x: auto;
  max-width: 100%;
}
html.ds3 .k3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
html.ds3 .k3 > * {
  min-width: 0;
  overflow-wrap: break-word;
}
html.ds3 .tpanel > .card {
  grid-template-columns: minmax(0, 1fr);
}
/* الشاشات المتوسطة (الأجهزة القابلة للطي مفتوحة، الأجهزة اللوحية): نفس واجهة الجوال في عمود بالوسط */
@media (min-width: 700px) and (max-width: 1099px) {
  html.ds3 body:not(.t2) #home,
  html.ds3 body:not(.t2) #xv,
  html.ds3 body:not(.t2) #student {
    justify-self: center;
    width: 100%;
    max-width: 760px;
    margin-inline: auto;
    box-sizing: border-box;
  }
  html.ds3 body:not(.t2) #hx,
  html.ds3 body:not(.t2) #ih,
  html.ds3 body:not(.t2) #hxBar {
    padding-inline: max(1.25rem, calc((100vw - 760px) / 2 + 0.75rem)) !important;
  }
  html.ds3 body:not(.t2) #bNav {
    padding-inline: max(0px, calc((100vw - 760px) / 2)) !important;
  }
}
/* سطح المكتب: شريط جانبي للتنقل فقط، والتحية وعنوان الصفحة أعلى المحتوى */
@media (min-width: 1100px) {
  html.ds3 aside.brand > #hx,
  html.ds3 aside.brand > #ih {
    display: none !important;
  }
  html.ds3 body.stuHd #home > #hx {
    display: flex !important;
    flex-direction: column;
    gap: 0.45rem;
    grid-column: 1;
    padding: 0 0 0.25rem;
    background: none;
    color: var(--hxT);
  }
  html.ds3 body.stuHd #home > #hx .home-logo,
  html.ds3 body.stuHd #home > #hx .home-bell-btn,
  html.ds3 body.stuHd #home > #hx .home-rank-ring {
    display: none !important;
  }
  html.ds3 body.stuHd #home > #hx .home-header {
    display: none !important;
  }
  html.ds3 body.dsk aside.brand > h1 br {
    display: none;
  }
  html.ds3 body.stuHd :is(#xv, #student) > #ih {
    display: flex !important;
    flex-direction: column;
    grid-column: 1/-1;
    padding: 0 0 0.5rem;
    background: none;
    color: var(--hxT);
    width: 100%;
    box-sizing: border-box;
  }
  html.ds3 body.stuHd :is(#xv, #student) > #ih :is(.home-bell-btn, .page-avatar-btn) {
    display: none !important;
  }
  html.ds3 body.stuHd :is(#xv, #student) > #ih .page-header {
    height: 40px;
  }
  html.ds3 #xv:has(> #ih) > .backBar,
  html.ds3 #student:has(> #ih) > #back {
    display: none !important;
  }
  html.ds3 body.dsk aside.brand .blogo {
    width: 52px !important;
    margin: 0;
  }
  html.ds3 body.dsk aside.brand > h1 {
    font-size: 1.2rem;
    line-height: 1.35;
    white-space: nowrap;
    margin: 2px 0 0;
  }
  html.ds3 body.dsk.hm2 #h2B .car {
    grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
    margin-inline: 0;
  }
}
/* الشاشات الضيقة جدًا (الشاشة الخارجية لبعض الأجهزة القابلة للطي) */
@media (max-width: 360px) {
  html.ds3 #hx .home-task-dots {
    display: none !important;
  }
  html.ds3 #hx .home-tasks-link {
    padding: 0 0.55rem !important;
    font-size: 0.78rem;
  }
  html.ds3 #hx .home-header {
    gap: 0.2rem;
  }
  html.ds3 .k3 {
    gap: 6px;
  }
  html.ds3 .k3 > * {
    padding-inline: 4px !important;
  }
  html.ds3 .k3 span {
    font-size: 0.68rem;
  }
}
html.ds3 .secSh .pin-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 10px;
}
html.ds3 .secSh .pin-form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px !important;
  min-height: 46px;
  border-radius: var(--r-md) !important;
  border: 1px solid var(--line) !important;
  background: var(--card) !important;
  color: var(--fg) !important;
  padding: 0 12px !important;
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.2em;
  text-align: center;
}
html.ds3 .section-students {
  display: flex;
  flex-direction: column;
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
}
html.ds3 .section-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0;
}
html.ds3 .section-stats:last-child {
  border-bottom: 0;
}
html.ds3 .section-stats input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
  flex: none;
  margin: 0;
}
html.ds3 .section-stats-alt {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
html.ds3 .section-stats-alt button {
  flex: 1;
  min-height: 42px;
  border-radius: var(--r-md) !important;
  font-weight: 700;
  margin: 0 !important;
}
html.ds3 .section-stats-alt .danger {
  color: var(--c-danger);
  border: 1px solid #f1c9c4;
  background: transparent !important;
}
html.ds3 .section-stats-alt .danger:disabled {
  opacity: 0.45;
}
html.ds3[data-theme="dark"] .section-stats-alt .danger {
  color: #f4a39a;
  border-color: #5a2d29;
}
@keyframes nudge {
  0%,
  100% {
    transform: none;
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
html.ds3 .nudge {
  animation: nudge 0.3s ease 2;
  border-color: #e9a23b;
}
@media (prefers-reduced-motion: reduce) {
  html.ds3 .nudge {
    animation: none;
  }
}

/* ===== من assets/site-style-21.css ===== */
/* توحيد أبعاد صفحات الطالب: مسافات على شبكة ٤/٨، لمس ٤٤ بكسل، ونص لا يقل عن ١٢ */
body:not(.t2) :is(.home-rank-ring, .page-avatar-btn, #themeBtn, #bMenu, #bBell, .home-logo) {
  min-width: 44px !important;
  min-height: 44px !important;
}
body:not(.t2) .home-tasks-link {
  min-height: 44px !important;
}
body:not(.t2) :is(.profile-tabs, .ds3Seg, .lab-seg, [role="tablist"]) button {
  min-height: 44px !important;
}
body:not(.t2) :is(.profile-tabs, .ds3Seg, .lab-seg, [role="tablist"], [role="radiogroup"]) button {
  min-width: 44px;
}
body:not(.t2) :is(.avatar-picker, .profile-stat, .h2T, .profile-week, .wl) {
  gap: 12px;
}
body:not(.t2) :is(.heatmap-days, .bottom-menu-section, .home-header) {
  gap: 8px;
}
body:not(.t2) :is(small, .pg, .games-tag, .games-count, .chapter-badge, .ds3Wk, .betaTag, .games-new-badge) {
  font-size: max(12px, 0.75rem) !important;
}

#sStart.isDone :is(#sForm, #sWho, #resumeMsg, #startErr, .row) {
  display: none !important;
}
.doneCard {
  display: grid;
  gap: 12px;
  justify-items: start;
}
.doneCard .done-check-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e4f3eb;
  color: var(--c-green-deep);
  font-size: 1.6rem;
  font-weight: 800;
}
.doneCard h3 {
  margin: 0;
}
.doneCard p {
  margin: 0;
}
.done-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}
.done-row > * {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 1 1 160px;
}

/* لوحة الألعاب داخل شبكة الصفحة: الهوامش التلقائية كانت تقلّصها لعرض المحتوى على الكمبيوتر */
body:not(.t2) #xv > .g2 {
  width: 100%;
  box-sizing: border-box;
}
body:not(.t2) .g2-head a {
  color: var(--g2-green, var(--c-green));
  text-decoration: none;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* أهداف لمس ٤٤px على الجوال (٣٠ أكتوبر، بموافقة المعلم) — كيبورد وردل ومقبض السحب مستثنين عمدًا */
/* ١) تكبير بسيط ظاهر (٤٠ → ٤٤) */
.sheet-close, .games-quest-node, .t3lcA, #t2me { min-width: 44px; min-height: 44px; }
.order-list button { min-width: 44px; min-height: 44px; }
.small.ghost { min-height: 44px; }
/* ٢) مساحة لمس أكبر بدون أي تغيير بالشكل (للمفاتيح الصغيرة) */
#ntfOn, #sndOn, #drkOn, #hapOn, #t2off { position: relative; }
/* داخل .tog الـ::after هو مقبض المفتاح نفسه (والسطر كله يضغط)، فما نوسّعه هناك — كان يطيّر المقبض فوق المسار (١ نوفمبر) */
:not(.tog) > #ntfOn::after, :not(.tog) > #sndOn::after, :not(.tog) > #drkOn::after, :not(.tog) > #hapOn::after, :not(.tog) > #t2off::after { content: ""; position: absolute; inset: -10px -4px; }

/* المرحلة ب: أسئلة المعلم — صورة السؤال، صور الخيارات، وخانة «أكمل الفراغ» */
.lesson-quiz-fig {
  margin: 8px 0 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px;
  display: grid;
  place-items: center;
}
.lesson-quiz-fig img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--r-sm, 8px);
}
.lesson-quiz-option .qoi {
  width: 72px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: var(--r-xs);
  flex: none;
}
.lesson-quiz-fill {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin: 4px 0 8px;
}
.lesson-quiz-fill input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 52px;
  font-size: 1.05rem;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--card);
  color: var(--fg);
}
.lesson-quiz-fill input:focus {
  border-color: var(--c-green);
  outline: none;
}
.lesson-quiz-fill button {
  min-height: 52px;
  min-width: 88px;
  border-radius: var(--r-lg);
  font-weight: 700;
}
.lesson-quiz-fill.ok input {
  border-color: var(--c-green-bright);
  background: color-mix(in srgb, var(--c-green-bright) 10%, var(--card));
}
.lesson-quiz-fill.no input {
  border-color: #dc2626;
  background: color-mix(in srgb, #dc2626 8%, var(--card));
}

/* المرحلة ج١: بطاقة «خطة اليوم» في رئيسية الطالب (assets/plan.js) */
.planC {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.planH {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.planH b {
  font-size: 1.1rem;
}
.planTag {
  display: inline-block;
  margin-inline-start: 8px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}
.planN {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.planBar {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  overflow: hidden;
}
.planBar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 0.4s ease;
}
.planC.done .planBar i {
  background: #d9a400;
}
.planDone {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  background: color-mix(in srgb, #d9a400 14%, var(--card));
  font-weight: 600;
}
.planL {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.planI {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  cursor: pointer;
  text-align: start;
}
.planI:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.planI .ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  font-size: 1.1rem;
}
.planI .tx {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.planI .tx b {
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}
.planI .tx small {
  color: var(--muted);
  font-size: 0.8rem;
}
.planI .st {
  flex: none;
  min-width: 52px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.planI.ok {
  opacity: 0.75;
}
.planI.ok .st {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
}
/* البطاقة أول شي في الرئيسية (قبل «كمّل من حيث وقفت») — الخطة إلزامية */
#home > #planCard {
  order: 0;
  margin-bottom: 4px;
}

/* المختبر بشكله الجديد (١ نوفمبر): ملخص بفلتر، مراحل تنطوي، صفوف مضغوطة، وشريط حفظ ثابت */
#labBox .lab2Top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
#labBox .lab2Top .hint {
  margin: 0;
}
#labBox .lab2Sum {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
#labBox .lab2Sum button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 62px;
  padding: 8px 4px;
  border-radius: 16px;
  background: var(--accent-2, #eef3f0);
  text-align: center;
  transition: transform 0.15s ease;
}
#labBox .lab2Sum button:active {
  transform: scale(0.97);
}
#labBox .lab2Sum button b {
  font-size: 1.25rem;
  font-variant-numeric: tabular-nums;
}
#labBox .lab2Sum button span {
  font-size: 0.75rem;
  color: var(--muted);
}
#labBox .lab2Sum button.on {
  background: var(--accent);
  color: #fff;
}
#labBox .lab2Sum button.on span {
  color: rgba(255, 255, 255, 0.85);
}
#labBox .lab2Sum button.on.f-try {
  background: #b7791f;
}
#labBox .lab2Sum button.on.f-off {
  background: #5b6b67;
}
#labBox .lab2All {
  align-self: flex-start;
}
#labBox .lab2Ph {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  overflow: hidden;
}
#labBox .lab2Ph > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 8px 14px;
  cursor: pointer;
}
#labBox .lab2Ph > summary::-webkit-details-marker {
  display: none;
}
#labBox .lab2Ph > summary .ic {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--accent-2, #eef3f0);
  font-size: 1.05rem;
}
#labBox .lab2Ph > summary b {
  flex: 1;
}
#labBox .lab2Ph > summary small {
  color: var(--muted);
  font-size: 0.78rem;
}
#labBox .lab2Ph > summary::after {
  content: "‹";
  color: var(--muted);
  transition: transform 0.2s ease;
}
#labBox .lab2Ph[open] > summary::after {
  transform: rotate(-90deg);
}
#labBox .lab2L {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
#labBox .lab2R {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-inline-start: 4px solid transparent;
}
#labBox .lab2R:last-child {
  border-bottom: 0;
}
#labBox .lab2R.on {
  border-inline-start-color: var(--accent);
}
#labBox .lab2R.try {
  border-inline-start-color: #d69e2e;
}
#labBox .lab2R.chg {
  background: color-mix(in srgb, #d69e2e 9%, var(--card));
}
#labBox .lab2R .t {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
#labBox .lab2R .t b {
  font-size: 0.92rem;
}
#labBox .lab2R .t small {
  color: var(--muted);
  font-size: 0.76rem;
}
#labBox .lab2Dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d69e2e;
  vertical-align: middle;
}
#labBox .lab2Seg {
  flex: none;
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--accent-2, #eef3f0);
}
#labBox .lab2Seg button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  min-width: 44px;
  min-height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  text-align: center;
  line-height: 34px;
  color: var(--muted);
}
#labBox .lab2Seg button.on {
  background: var(--card);
  color: var(--fg);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
#labBox .lab2R.on .lab2Seg button.on {
  background: var(--accent);
  color: #fff;
}
#labBox .lab2R.try .lab2Seg button.on {
  background: #d69e2e;
  color: #241600;
}
#labBox .lab2Seg button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
#labBox .lab2Bar {
  position: sticky;
  bottom: calc(96px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: #10231e;
  color: #fff;
  box-shadow: 0 10px 28px -10px rgba(0, 0, 0, 0.5);
}
#labBox .lab2Bar.show {
  display: flex;
}
#labBox .lab2Bar span {
  flex: 1;
  font-size: 0.85rem;
}
#labBox .lab2Bar .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
}
@media (min-width: 1100px) {
  #labBox .lab2Bar {
    bottom: 16px;
  }
}
/* مراجعة الكود #١٣ (١ نوفمبر): مساحة لمس ٤٤px لزر الخروج والتعليم في الاختبار المحاكي — بدون ما يتغير شكلهم */
.mock-exam-close,
.mock-exam-flag {
  position: relative;
}
.mock-exam-close::after,
.mock-exam-flag::after {
  content: "";
  position: absolute;
  inset: -8px;
}
/* المرحلة د: الخيار ينتظر تصحيح الخادم */
.lesson-quiz-option.wait {
  opacity: 0.6;
  pointer-events: none;
}

/* فحص ٢ نوفمبر: «سؤال مشابه» بعد الغلط في الدرس */
.simB{margin-top:8px}
.simQ{margin-top:10px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;display:flex;flex-direction:column;gap:6px}
.simQ button{text-align:start;justify-content:flex-start}
/* ٦ نوفمبر: «.ds2 button.ghost» يحط الخلفية var(--card) بـ !important — نغيّر المتغير نفسه للزر: الصح أخضر والغلط أحمر + علامة */
.simQ button.ok{--card:color-mix(in srgb,#1F9D63 16%,var(--bg));border-color:#1F9D63;font-weight:700}
.simQ button.no{--card:color-mix(in srgb,#B3261E 13%,var(--bg));border-color:#B3261E}
.simQ button.ok::before{content:"✓ ";color:#1F9D63;font-weight:700}
.simQ button.no::before{content:"✗ ";color:#B3261E;font-weight:700}
.simR{margin:4px 0 0;font-weight:600}
.simQ button.ok:disabled{opacity:1;border-color:#1F9D63;background:rgba(31,157,99,.14)}
.simQ button.no:disabled{opacity:1;border-color:#B3261E;background:rgba(179,38,30,.12)}
/* فحص ٢ نوفمبر: شريط «حالة الحفظ» العائم كان يغطي زر «السؤال التالي» وقت الأسئلة — يختفي لين يخلص الطالب الأسئلة */
body:has(#quiz:not([hidden]) .lesson-quiz-next) #duSyncBar, body:has(#quiz:not([hidden]) #check:not([hidden])) #duSyncBar { display: none; }

/* ---- صفحة الصيانة (٢ نوفمبر): نبتة + وقت الرجوع بعدّ تنازلي، نهاري/ليلي — الكود في app-core.js maint() ---- */
#maintO.mt2 {
  --mt-bg: #f2f7f4;
  --mt-fg: #10302a;
  --mt-mute: #4f6b66;
  --mt-card: #ffffff;
  --mt-line: #dceae2;
  --mt-g: var(--c-green);
  --mt-g2: var(--c-green-2);
  --mt-chip: #e3f1ea;
  --mt-soil: #c7a27a;
  --mt-top: #ddefe5;
  display: block;
  padding: 0;
  background: radial-gradient(120% 70% at 50% 0%, var(--mt-top) 0%, var(--mt-bg) 60%);
  color: var(--mt-fg);
  overflow-y: auto;
}
:root[data-theme="dark"] #maintO.mt2 {
  --mt-bg: #0b1513;
  --mt-fg: #e6eeea;
  --mt-mute: #9db3ab;
  --mt-card: #14221f;
  --mt-line: #22342f;
  --mt-g: #5cc097;
  --mt-g2: #5cc097;
  --mt-chip: #16302a;
  --mt-soil: #6b5640;
  --mt-top: #12302a;
}
#maintO .mt {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding-block: calc(18px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-bottom, 0px));
  padding-inline: max(22px, env(safe-area-inset-left, 0px)) max(22px, env(safe-area-inset-right, 0px));
}
#maintO .mt-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 800 1rem var(--display, inherit);
  color: var(--mt-g);
}
#maintO .mt-brand img {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
#maintO .mt-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
#maintO .mt-art {
  width: 150px;
  height: 150px;
}
#maintO .mt-bgc {
  fill: var(--mt-chip);
}
#maintO .mt-hole {
  fill: var(--mt-card);
}
#maintO .mt-soil {
  fill: var(--mt-soil);
}
#maintO .mt h2 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.35;
  font-weight: 800;
  color: var(--mt-fg);
  text-wrap: balance;
}
#maintO .mt-msg {
  margin: 0;
  max-width: 30ch;
  color: var(--mt-mute);
  font-size: 0.95rem;
}
#maintO .mt-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mt-card);
  border: 1px solid var(--mt-line);
  border-radius: var(--r-pill);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 8px 20px -14px rgba(13, 79, 60, 0.5);
}
#maintO .mt-left {
  font-size: 0.85rem;
  color: var(--mt-mute);
}
#maintO .mt-left b {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--mt-g);
  font-variant-numeric: tabular-nums;
}
#maintO .mt-safe {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--mt-chip);
  color: var(--mt-g2);
  border-radius: var(--r-pill);
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}
#maintO .mt-safe i {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--mt-g2);
  color: var(--mt-bg);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.7rem;
}
#maintO .mt-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--mt-mute);
}
#maintO .mt-foot a {
  color: inherit;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
}
#maintO .mt-dots {
  display: inline-flex;
  gap: 4px;
}
#maintO .mt-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mt-g2);
  opacity: 0.35;
}
@media (prefers-reduced-motion: no-preference) {
  #maintO .mt-lf {
    transform-origin: 75px 104px;
    animation: mtSway 3.2s ease-in-out infinite;
  }
  #maintO .mt-lf.r {
    animation-delay: -1.6s;
  }
  #maintO .mt-gear {
    transform-origin: 119.5px 40px;
    animation: mtGear 6s linear infinite;
  }
  #maintO .mt-dots i {
    animation: mtDot 1.2s infinite;
  }
  #maintO .mt-dots i:nth-child(2) {
    animation-delay: 0.2s;
  }
  #maintO .mt-dots i:nth-child(3) {
    animation-delay: 0.4s;
  }
}
@keyframes mtSway {
  50% {
    transform: rotate(6deg);
  }
}
@keyframes mtGear {
  to {
    transform: rotate(360deg);
  }
}
@keyframes mtDot {
  50% {
    opacity: 1;
  }
}
/* ---- المستثنين من الصيانة (٢ نوفمبر): شريط فوق + نافذة «ادخل برمزك» — الكود في app-core.js maint()/mtCode() ---- */
.maintBar.mtme {
  top: env(safe-area-inset-top);
  bottom: auto;
  inset-inline: 0;
  max-width: none;
  border-radius: 0;
  background: #fff3d1;
  color: #6b4c00;
  border-bottom: 1px solid #f0d9a0;
  font-size: 0.78rem;
  padding: 7px 12px;
  pointer-events: none;
}
:root[data-theme="dark"] .maintBar.mtme {
  background: #3a2f12;
  color: #f5d98a;
  border-bottom-color: #5a4a1c;
}
body.mtme {
  padding-top: 32px;
}
#maintO .mt-inv {
  border: 0;
  background: none;
  color: var(--mt-g2);
  font: inherit;
  font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  min-height: 44px;
  padding: 0 8px;
  cursor: pointer;
}
#maintO .mt-code {
  position: fixed;
  inset: auto 0 0;
  z-index: 2;
  max-width: 520px;
  margin-inline: auto;
  background: var(--mt-card);
  color: var(--mt-fg);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px -12px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
#maintO .mt-code b {
  font-size: 1.05rem;
}
#maintO .mt-code p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--mt-mute);
}
#maintO .mt-code input {
  font: inherit;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
  direction: ltr;
  text-transform: uppercase;
  border: 1.5px solid var(--mt-line);
  border-radius: 14px;
  padding: 10px;
  background: var(--mt-bg);
  color: var(--mt-fg);
}
#maintO .mt-code .go {
  border: 0;
  border-radius: 99px;
  background: var(--mt-g);
  color: #fff;
  font: inherit;
  font-weight: 700;
  min-height: 46px;
  cursor: pointer;
}
:root[data-theme="dark"] #maintO .mt-code .go {
  color: #0b1513;
}
#maintO .mt-code .go:disabled {
  opacity: 0.6;
}
#maintO .mt-code .x {
  border: 0;
  background: none;
  color: var(--mt-mute);
  font: inherit;
  min-height: 40px;
  cursor: pointer;
}
#maintO .mt-err {
  color: #b3261e;
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 1.2em;
}
:root[data-theme="dark"] #maintO .mt-err {
  color: #ff8a80;
}
/* اللوحة القديمة صارت احتياط (٢ نوفمبر): زر يرجّع للجديدة — app-core.js load() */
.t3Back {
  position: fixed;
  top: calc(60px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 9997;
  background: var(--c-green);
  color: #fff;
  border-radius: 99px;
  padding: 6px 14px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.35);
}
body:not(.t2) .t3Back {
  display: none;
}
@media (min-width: 900px) {
  .t3Back {
    top: auto;
    bottom: 20px;
    left: auto;
    right: 20px;
    transform: none;
    background: #fff;
    color: var(--c-green);
  }
}
/* الفصل الدراسي الجديد قبل ما ينضاف محتواه (٢ نوفمبر) — app-core.js renderHome2 */
.h2Soon {
  border: 2px dashed var(--line);
  border-radius: 18px;
  padding: 22px 16px;
  margin: 12px 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
}
.h2Soon b {
  color: var(--fg);
  font-size: 1.05rem;
}
/* بطل الفصل الدراسي (٢ نوفمبر) — app-core.js champHTML() */
.champ {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--c-green), var(--c-green-2));
  color: #fff;
}
.champ .cup {
  font-size: 2rem;
  flex: none;
}
.champ b {
  display: block;
  font-size: 1rem;
}
.champ small {
  opacity: 0.92;
  font-size: 0.82rem;
  line-height: 1.6;
}
.champ .x {
  margin-inline-start: auto;
  align-self: flex-start;
  border: 0;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex: none;
  cursor: pointer;
}
.rvTag {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent-2);
  color: var(--accent);
  border-radius: 99px;
  padding: 2px 10px;
  vertical-align: middle;
}

/* ٦ نوفمبر (الكمبيوتر): «مهام اليوم» في سطر واحد، و«⭐ تحدي» النجمة جنب الكلمة */
.h2T > b {
  white-space: nowrap;
}
.h2T .chapter-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
/* ٦ نوفمبر (الكمبيوتر): الفصل المختار واضح — الباقي يخفت، وشارة «✓ الفصل المختار»، والدروس تحت تومض لما تختار */
body.dsk #h2B .car .cv {
  transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
body.dsk #h2B .car:has(.cv.sel) .cv:not(.sel):not(.lk) {
  opacity: 0.72;
  filter: saturate(0.75);
}
body.dsk #h2B .car:has(.cv.sel) .cv:not(.sel):not(.lk):hover {
  opacity: 1;
  filter: none;
}
body.dsk #h2B .car .cv.sel {
  position: relative;
  transform: translateY(-3px);
  box-shadow: 0 0 0 3px var(--c-gold, #ffd166), 0 16px 32px rgba(13, 79, 60, 0.3);
}
body.dsk #h2B .car .cv.sel::after {
  content: "✓ الفصل المختار";
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  background: var(--c-gold, #ffd166);
  color: #3a2a00;
  font: 700 12px/1.6 "IBM Plex Sans Arabic", sans-serif;
  padding: 2px 10px;
  border-radius: 999px;
}
#h2B .sh2.lsFlash {
  animation: lsFlash 1.4s ease-out;
  border-radius: 12px;
}
@keyframes lsFlash {
  0%, 35% { background: color-mix(in srgb, var(--c-gold, #ffd166) 45%, transparent); }
  100% { background: transparent; }
}
#h2B .sh2 { scroll-margin-top: 90px; }
/* ٦ نوفمبر: شاشات التسجيل في الوضع الليلي — العناوين كانت لون حبر غامق على خلفية غامقة */
:root[data-theme="dark"] #gate.lab .duAside h2,
:root[data-theme="dark"] #gate.lab #gCardT {
  color: #e6eeea;
}
:root[data-theme="dark"] #gate.lab .duAside p {
  color: #9db0a7;
}
/* ٧ نوفمبر (ضد الغش — جهة الطالب): «ما أعرف» + «صحّح الذكاء الاصطناعي» + «من تاريخه» + سطر الأمانة + وسام الأمانة */
#quiz .lqIdk {
  align-self: center;
  margin: 2px auto 0;
  display: block;
  font-size: 0.85rem;
  color: var(--c-muted);
  border-style: dashed;
}
.lesson-quiz-feedback.n {
  background: color-mix(in srgb, var(--c-gold) 16%, transparent);
  color: var(--c-ink);
}
:root[data-theme="dark"] .lesson-quiz-feedback.n {
  background: color-mix(in srgb, var(--c-gold) 12%, #10201b);
  color: #f3ead2;
}
#quiz .lqAi,
#quiz .wxL,
.honL {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-radius: var(--r-md);
  font-size: 0.86rem;
  line-height: 1.7;
}
#quiz .lqAi {
  background: color-mix(in srgb, var(--c-mint) 26%, transparent);
  border-inline-start: 4px solid var(--c-green-2);
}
#quiz .wxL {
  background: color-mix(in srgb, var(--c-gold) 18%, transparent);
  border-inline-start: 4px solid var(--c-gold-dark);
}
.honL {
  padding: 4px 12px;
  font-size: 0.78rem;
  color: var(--c-muted);
  background: color-mix(in srgb, var(--c-mint) 16%, transparent);
  border-radius: var(--r-pill);
  text-align: center;
}
:root[data-theme="dark"] #quiz .lqAi,
:root[data-theme="dark"] #quiz .wxL {
  color: #e6eeea;
}
:root[data-theme="dark"] .honL {
  color: #a9c9bf;
}
#quiz .lesson-quiz-option.aiX {
  opacity: 0.55;
  text-decoration: line-through;
  cursor: not-allowed;
}
.lesson-quiz-option .aiC {
  margin-inline-start: auto;
  font-size: 0.9rem;
  text-decoration: none;
}
.lesson-quiz-feedback .lqAiOk {
  display: block;
  font-weight: 700;
}
.pfHon {
  padding: 1px 8px;
  border-radius: var(--r-pill);
  background: rgba(255, 226, 154, 0.14);
  color: #ffe29a;
  font-weight: 700;
}
.honL.out {
  color: var(--c-gold-text);
  background: color-mix(in srgb, var(--c-gold) 22%, transparent);
}
:root[data-theme="dark"] .honL.out {
  color: #ffe29a;
}
