/* base.css — التنسيق الأساسي (كان site-style-1 + site-style-2 + lab-design) */

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

/* Layout: teacher builder as numbered steps; student view = video + gated quiz cards */
:root {
  /* palette from Mohammed's performance-file theme: dark green sidebar, gold, mint */
  --bg: #f5f7f4;
  --card: #ffffff;
  --fg: var(--c-teal-deep);
  --line: #dce5e1;
  --accent: var(--c-green);
  --accent-2: #e8f1ed;
  --gold: var(--c-gold);
  --mint: var(--c-mint);
  --side: var(--c-green);
  --warn: var(--c-gold-5);
  --bad: var(--c-danger);
  --good: var(--c-green-2);
  --sideW: 250px;
  color-scheme: light;
  --display: "IBM Plex Sans Arabic", sans-serif;
  --body: "IBM Plex Sans Arabic", Tahoma, sans-serif;
  --muted: #4e6e75;
  --ok-bg: #e8f7ef;
  --ok-bd: var(--c-green-mid);
  --ok-fg: #0f5132;
  --bad-bg: #fdecea;
  --bad-bd: var(--c-red);
  --bad-fg: #7a1d16;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.75 var(--body);
  padding: 24px max(16px, env(safe-area-inset-right)) 60px max(16px, env(safe-area-inset-left));
  padding-right: calc(var(--sideW) + max(24px, env(safe-area-inset-right)));
}
.wrap {
  max-width: 900px;
  margin: auto;
  display: grid;
  gap: 18px;
}
/* layout: fixed right sidebar (desktop) / top band (phone) */
.brand {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sideW);
  background: var(--side);
  color: #fff;
  padding: 36px 24px max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  z-index: 5;
}
.brand .blogo {
  width: 150px;
  height: auto;
  margin-bottom: 18px;
}
.brand .bk {
  margin: 0;
  color: var(--mint);
  font-size: 0.85rem;
  letter-spacing: 0;
}
.brand h1 {
  margin: 0;
  font-size: 2.3rem;
  line-height: 1.15;
  color: var(--gold);
}
.brand .bs {
  margin: 0;
  color: #fff;
  opacity: 0.85;
}
.brand .bmeta {
  display: grid;
  gap: 2px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(159, 211, 191, 0.35);
}
.brand .bmeta span {
  color: var(--mint);
  font-size: 0.78rem;
}
.brand .bmeta b {
  font-weight: 500;
  margin-bottom: 6px;
}
.brand .dna {
  position: absolute;
  left: 18px;
  bottom: -30px;
  width: 110px;
  opacity: 0.9;
}
@media (max-width: 1099px) {
  body {
    padding-right: max(16px, env(safe-area-inset-right));
    padding-top: 0;
  }
  .brand {
    width: auto;
    margin: 0 calc(-1 * max(16px, env(safe-area-inset-right))) 18px calc(-1 * max(16px, env(safe-area-inset-left)));
    padding: 20px max(16px, env(safe-area-inset-right)) 18px max(16px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 12px;
    min-height: 0;
  }
  .brand h1 {
    font-size: 1.7rem;
  }
  .brand h1 br {
    display: none;
  }
  .brand .bk {
    grid-column: 1/-1;
  }
  .brand .bs {
    grid-column: 1;
  }
  .brand .blogo {
    width: 64px;
    margin: 0;
    grid-column: 2;
    grid-row: 1/4;
  }
  .brand .dna {
    display: none !important;
    position: static;
    width: 34px;
    height: 84px;
    grid-row: 1/4;
    grid-column: 2;
    margin: 0;
  }
  .brand .bmeta {
    display: none;
  }
}
body.watching .brand {
  display: none;
}
body.watching {
  padding-right: max(16px, env(safe-area-inset-right));
}
/* brand accents */
h2 {
  color: var(--fg);
}
.hchap h3,
.chap h3 {
  color: var(--accent);
  padding-inline-start: 10px;
  border-inline-start: 4px solid var(--gold);
}
#home .lcard.exam,
#extraCards .lcard.exam {
  background: #fff8e5;
  border-color: #e9c35a;
  border-style: dashed;
}
.boardCard {
  border-top: 4px solid var(--gold);
}
.boardCard .me {
  background: var(--accent);
  color: #fff;
}
.boardCard .me b {
  color: var(--gold) !important;
}
.boardCard .me span {
  color: #e8f1ed !important;
}
.tabs {
  display: flex;
  gap: 8px;
}
.tabs button {
  flex: 1;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 18px;
  display: grid;
  gap: 12px;
}
.card h2 {
  display: flex;
  gap: 10px;
  align-items: center;
}
.num {
  background: var(--accent);
  color: var(--card);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
.hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
label {
  display: grid;
  gap: 4px;
  font-weight: 500;
  font-size: 0.9rem;
}
input,
select,
textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}
button {
  font: inherit;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: var(--r-xs);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--card);
  cursor: pointer;
}
button.ghost {
  background: transparent;
  color: var(--accent);
}
button.small {
  padding: 4px 10px;
  font-size: 0.85rem;
}
button.danger {
  border-color: var(--bad);
  color: var(--bad);
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.video {
  position: relative;
  aspect-ratio: 16/9;
  max-width: 100%;
  background: #000;
  border-radius: var(--r-sm);
  overflow: hidden;
}
.video > div,
.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
body.watching .wrap {
  max-width: 1500px;
}
body.watching #student {
  width: 100%;
}
body.watching #sMain {
  padding: 12px;
}
.video.big {
  width: min(100%, calc((100dvh - 190px) * 16 / 9));
  margin-inline: auto;
  border-radius: var(--r-xs);
}
.seg {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--bg);
}
.q {
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  display: grid;
  gap: 6px;
}
.opt {
  display: flex;
  gap: 6px;
  align-items: center;
}
.opt input[type="radio"] {
  width: auto;
}
.out {
  font-size: 0.8rem;
  direction: ltr;
  word-break: break-all;
}
.progress {
  display: flex;
  gap: 4px;
}
.progress span {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
}
.progress span.done {
  background: var(--good);
}
.progress span.now {
  background: var(--warn);
}
.choice {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  cursor: pointer;
  background: var(--bg);
}
.choice:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-2);
}
.choice input {
  width: auto;
  margin-inline-end: 8px;
}
.msg {
  padding: 10px;
  border-radius: var(--r-xs);
  background: var(--accent-2);
}
.msg.bad {
  color: var(--bad);
}
.chap {
  display: grid;
  gap: 8px;
}
.hero {
  display: grid;
  gap: 4px;
  max-width: 65ch;
}
.hero p {
  margin: 0;
  color: var(--muted);
}
#home,
#homeList,
#teacher,
#student {
  width: 100%;
}
.hchap {
  display: grid;
  gap: 10px;
}
.hchap h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--fg);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.lcard {
  all: unset;
  cursor: pointer;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--card);
  transition:
    border-color 0.15s,
    transform 0.15s;
}
.lcard:hover,
.lcard:focus-visible {
  box-shadow: 0 6px 18px rgba(13, 79, 60, 0.1);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.lcard:focus-visible {
  outline: 3px solid var(--accent);
}
.lcard b {
  font-size: 1.02rem;
}
.lcard span {
  font-size: 0.85rem;
  color: var(--muted);
}
.lcard .st {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--warn);
}
.lcard .st.ok {
  color: var(--good);
}
.btnlink {
  display: inline-block;
  padding: 9px 16px;
  border-radius: var(--r-xs);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--card);
  text-decoration: none;
  font-weight: 500;
}
.btnlink.ghost {
  background: transparent;
  color: var(--accent);
}
.sent {
  font-size: 0.9rem;
}
#gate {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: radial-gradient(circle at 50% 30%, var(--c-green-4), var(--c-green) 60%, #093a2c);
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: auto;
}
body.gated {
  overflow: hidden;
}
.gate-box {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 22px;
  padding: 28px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: cardIn 0.45s both;
  text-align: center;
  box-sizing: border-box;
}
.gate-box h2 {
  margin: 6px 0 4px;
  color: var(--c-green);
}
.gate-box p {
  color: var(--muted);
  margin: 0 0 12px;
  line-height: 1.7;
}
.gate-box form,
.gate-box > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.gate-box [hidden] {
  display: none !important;
}
.gate-box label {
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 500;
}
.gate-box button {
  width: 100%;
  padding: 13px;
  font-size: 1rem;
}
.gate-back {
  background: transparent !important;
  color: var(--c-green);
  border: 1px solid var(--line);
}
.gate-code-input {
  text-align: center;
  font:
    700 1.6rem ui-monospace,
    monospace;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  padding: 12px;
}
.idc {
  position: relative;
  text-align: right;
  border-radius: var(--r-2xl);
  padding: 18px 20px;
  color: #fff;
  background: linear-gradient(135deg, var(--c-green-4), #093a2c);
  overflow: hidden;
  margin: 4px 0 8px;
  display: block !important;
}
.idc::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 70px;
  background: repeating-linear-gradient(170deg, transparent 0 14px, rgba(255, 209, 102, 0.18) 14px 17px);
}
.id-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-mint);
  font-size: 0.85rem;
}
.id-card-top img {
  height: 30px;
}
.id-card-name {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 14px;
}
.id-card-meta {
  color: var(--c-line-2);
  font-size: 0.92rem;
}
.id-card-code-label {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--c-mint);
}
.id-card-code {
  display: inline-block;
  margin-top: 4px;
  background: var(--c-gold);
  color: var(--c-teal-deep);
  font:
    700 1.7rem ui-monospace,
    monospace;
  letter-spacing: 0.3em;
  padding: 6px 14px 6px 8px;
  border-radius: var(--r-sm);
  direction: ltr;
}
.id-card-foot {
  margin-top: 14px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}
.acct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
}
.account-text {
  flex: 1;
  min-width: 220px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.account-text span {
  color: var(--muted);
  font-size: 0.9rem;
}
.account-code {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
  background: #fff4d6;
  color: var(--c-teal-deep);
  padding: 1px 8px;
  border-radius: 6px;
  direction: ltr;
  display: inline-block;
}
.acIn {
  width: 100%;
}
.acIn summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
}
.acIn .row {
  margin-top: 8px;
}
.acIn input {
  max-width: 180px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.ai {
  width: 100%;
  min-width: 90px;
  padding: 6px 8px;
  font-size: 0.88rem;
}
.ai.sm {
  min-width: 60px;
  width: 70px;
}
.ai.code {
  width: 96px;
  font-family: ui-monospace, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
td .ai.code + button {
  margin-inline-start: 4px;
  padding: 4px 8px;
}
.rbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.seg2 {
  display: flex;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  overflow: hidden;
}
.seg2 button {
  border: 0;
  border-radius: 0;
  background: var(--card);
  color: var(--muted);
  padding: 8px 14px;
}
.seg2 button.on {
  background: var(--accent);
  color: #fff;
}
.table-card {
  padding: 0;
  overflow: hidden;
}
.table-scroll {
  overflow-x: auto;
  max-height: 70vh;
}
.rt {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.rt th {
  position: sticky;
  top: 0;
  background: var(--accent-2);
  color: var(--accent);
  text-align: right;
  padding: 10px;
  font-weight: 700;
  white-space: nowrap;
  z-index: 1;
}
.rt td {
  padding: 9px 10px;
  border-top: 1px solid var(--line);
  vertical-align: middle;
}
/* ١ نوفمبر: التظليل عند المرور بالماوس بس — على الجوال الضغطة تخلي الصف «معلّق» فتبيضّ خانات بطاقات الحسابات */
@media (hover: hover) {
  .rt tr:hover td {
    background: #fafcfb;
  }
}
.rt .nw {
  white-space: nowrap;
  color: var(--muted);
}
.rt .sub {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}
.gr {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.85rem;
}
.gr.hi {
  background: #e3f4ec;
  color: var(--c-green-2);
}
.gr.md {
  background: #fff4d6;
  color: #8a6100;
}
.gr.lo {
  background: #fde7e5;
  color: var(--c-danger);
}
.tag {
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff4d6;
  color: #8a6100;
  font-weight: 500;
}
button.danger {
  background: transparent;
}
body.locked {
  padding: 0;
}
body.locked .brand {
  display: none;
}
body.locked .wrap {
  max-width: none;
  margin: 0;
  gap: 0;
}
.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
}
.lbox {
  width: min(100%, 380px);
  display: grid;
  gap: 10px;
  text-align: center;
  color: #fff;
}
.lbox .lk {
  margin: 0;
  color: var(--mint);
  font-size: 0.85rem;
}
.lbox h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 2.2rem;
  color: var(--gold);
  display: block;
}
.lbox .ls {
  margin: 0 0 14px;
  opacity: 0.85;
}
.lbox label {
  text-align: right;
  font-size: 0.85rem;
  color: var(--mint);
}
.lbox input {
  text-align: center;
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(159, 211, 191, 0.45);
  color: #fff;
  padding: 12px;
}
.lbox input:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
.lbox button {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--side);
  font-weight: 700;
  padding: 12px;
  font-size: 1rem;
}
.lerr {
  margin: 0;
  color: #ffb4a9;
}
.lback {
  color: var(--mint);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 6px;
}
.toggles {
  display: grid;
  gap: 8px;
}
.tog {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg);
  cursor: pointer;
}
.tog input {
  width: auto;
  margin-top: 4px;
}
.tog span {
  display: grid;
}
.tog small {
  color: var(--muted);
  font-weight: 400;
}
.visibility-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.visibility-chapter {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}
.visibility-chapter label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 400;
}
.visibility-chapter input {
  width: auto;
}
.saveBar {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  padding-block: 10px;
  display: grid;
  gap: 6px;
  border-top: 1px solid var(--line);
}
textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg);
  color: var(--fg);
  width: 100%;
}
.noteBar {
  font-weight: 500;
  border-inline-start: 4px solid var(--accent);
}
.boardCard .bhead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
}
.boardCard details {
  font-size: 0.88rem;
  max-width: 46ch;
}
.boardCard summary {
  cursor: pointer;
  color: var(--accent);
}
.me {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: var(--r-xs);
  background: var(--accent-2);
}
.me b {
  font-family: var(--display);
  font-size: 1.8rem;
  color: var(--accent);
}
.me span {
  color: var(--muted);
  font-size: 0.9rem;
}
.top-heading {
  margin: 4px 0 0;
  font-size: 1rem;
}
.top {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}
.top li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.top .rk {
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}
.top li:nth-child(-n + 3) .rk {
  color: var(--warn);
}
.top .nm {
  display: grid;
}
.top .nm small {
  color: var(--muted);
  font-size: 0.78rem;
}
.top b {
  font-variant-numeric: tabular-nums;
}
#extraCards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.lcard.rev {
  border-color: var(--warn);
}
.pts b {
  font-size: 1.15rem;
}
.summary-card {
  width: 100%;
  max-width: 1050px;
}
.summary-card ol {
  margin: 0;
  padding-inline-start: 1.3rem;
  display: grid;
  gap: 6px;
  line-height: 1.8;
}
.ttabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}
.ttabs button {
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  color: var(--muted);
  padding: 10px 14px;
}
.ttabs button.on {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 700;
}
.overGrid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 560px) {
  .overGrid {
    grid-template-columns: 1fr;
  }
}
.qr {
  background: #fff;
  padding: 10px;
  border-radius: var(--r-xs);
  width: fit-content;
}
.qr img,
.qr canvas {
  display: block;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.stats div {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg);
}
.stats b {
  font-family: var(--display);
  font-size: 1.6rem;
  color: var(--accent);
}
.stats span {
  font-size: 0.85rem;
  color: var(--muted);
}
.chapHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.examRow {
  border-style: dashed;
  border-color: var(--accent);
}
.qf.right {
  border-color: var(--good) !important;
}
.qf.wrong {
  border-color: var(--bad) !important;
}
.fb {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.7;
}
.qf.right .fb {
  color: var(--good);
}
.qf.wrong .fb {
  color: var(--bad);
}
.qf.wrong .fb b {
  color: var(--fg);
}
.lcard.exam {
  border-style: dashed;
  border-color: var(--accent);
  background: var(--accent-2);
}
.chap h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--accent);
}
.lrow {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  background: var(--bg);
}
.lrow b {
  font-weight: 500;
}
.lrow .lk {
  grid-column: 1/-1;
}
@media (max-width: 640px) {
  .lrow {
    grid-template-columns: 1fr 1fr;
  }
  .lrow b,
  .lrow input {
    grid-column: 1/-1;
  }
}
/* Certificate: always ivory paper, A4 landscape */
.certWrap {
  display: grid;
  gap: 14px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: none;
}
.certPaper {
  --ink: #1d3b2f;
  --gold: #a8822e;
  --paper: #fbf8f0;
  position: relative;
  width: 100%;
  max-width: 1050px;
  aspect-ratio: 297/210;
  background: var(--paper);
  color: var(--ink);
  padding: 5.5% 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  font-family: var(--body);
  container-type: inline-size;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  background-image: radial-gradient(circle at 50% 45%, rgba(168, 130, 46, 0.08), transparent 60%);
}
.cName {
  margin: 0;
  font-family: var(--display);
  font-size: 4.4cqi;
  color: var(--gold);
  border-bottom: 1px solid rgba(168, 130, 46, 0.5);
  padding: 0 4cqi 0.3cqi;
  min-width: 45%;
}
.certActions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}
.certPaper.certificate-paper {
  padding: 0 !important;
  border: 0;
  background: #fff !important;
  width: min(100%, 1123px);
  aspect-ratio: 1123/794;
  height: auto;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}
.certPaper.certificate-paper > .certificate-card {
  position: absolute;
  top: 0;
  right: 0;
  transform-origin: top right;
}
@media print {
  @page {
    size: A4 landscape;
    margin: 0;
  }
  .certPaper.certificate-paper {
    border-radius: 0;
  }
  .certPaper.certificate-paper > .certificate-card {
    transform: none !important;
  }
  body {
    background: #fff !important;
    padding: 0 !important;
  }
  body * {
    visibility: hidden;
  }
  #certPaper,
  #certPaper * {
    visibility: visible;
  }
  #certPaper {
    position: fixed;
    inset: 0;
    width: 297mm;
    height: 210mm;
    max-width: none;
    aspect-ratio: auto;
    box-shadow: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
[hidden] {
  display: none !important;
}
#splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 40%, var(--c-green-4), var(--c-green) 60%, #093a2c);
  display: grid;
  place-items: center;
  color: #fff;
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
  cursor: pointer;
}
#splash.out {
  opacity: 0;
  transform: scale(1.06);
  pointer-events: none;
}
.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.splash-fly {
  transition:
    transform 0.62s cubic-bezier(0.6, 0, 0.2, 1),
    opacity 0.62s ease;
}
.splash-rise {
  position: relative;
  animation: splash-rise 0.8s cubic-bezier(0.3, 0.8, 0.3, 1) 1.6s both;
}
@keyframes splash-rise {
  to {
    transform: translateY(-34px) scale(0.86);
  }
}
.splash-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.splash-particles i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px;
  border-radius: 50%;
  background: var(--c-gold);
  opacity: 0;
  animation: spBurst 1s ease-out 1.55s both;
}
.splash-particles i:nth-child(2n) {
  background: #ead7a0;
  width: 5px;
  height: 5px;
}
.splash-particles i:nth-child(1) {
  --x: 92px;
  --y: 0;
}
.splash-particles i:nth-child(2) {
  --x: 65px;
  --y: -65px;
}
.splash-particles i:nth-child(3) {
  --x: 0;
  --y: -92px;
}
.splash-particles i:nth-child(4) {
  --x: -65px;
  --y: -65px;
}
.splash-particles i:nth-child(5) {
  --x: -92px;
  --y: 0;
}
.splash-particles i:nth-child(6) {
  --x: -65px;
  --y: 65px;
}
.splash-particles i:nth-child(7) {
  --x: 0;
  --y: 92px;
}
.splash-particles i:nth-child(8) {
  --x: 65px;
  --y: 65px;
}
@keyframes spBurst {
  0% {
    opacity: 0;
    transform: none;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--x), calc(var(--y) - 40px));
  }
}
.splash-glow {
  text-align: center;
  min-height: 96px;
  margin-top: -18px;
  padding: 0 24px;
  transition: opacity 0.3s;
}
.splash-glow-1 {
  font-family: "Alexandria", sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.35;
  opacity: 0;
  animation: spUp 0.55s 1.95s both;
}
.splash-glow-1 b {
  color: var(--c-gold);
  font-weight: 700;
}
.splash-glow-2 {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffe7a3;
  font-weight: 700;
  font-size: 0.95rem;
  opacity: 0;
  animation: spUp 0.55s 2.2s both;
}
.splash-glow-2:empty {
  display: none;
}
#splash.hasG .spT {
  display: none;
}
#splash.rev {
  animation: spRev 0.62s cubic-bezier(0.7, 0, 0.3, 1) forwards;
  pointer-events: none;
}
@keyframes spRev {
  from {
    clip-path: circle(150% at var(--tx) var(--ty));
  }
  to {
    clip-path: circle(0% at var(--tx) var(--ty));
  }
}
#splash.rev .splash-glow,
#splash.rev .spT {
  opacity: 0;
}
body:has(#splash) .bdO,
body:has(#splash) .lvUpO,
body:has(#splash) .tourO {
  visibility: hidden;
}
.splash-butterfly {
  width: 150px;
  height: 150px;
  overflow: visible;
}
.splash-butterfly * {
  transform-box: view-box;
}
.splash-cocoon {
  transform-origin: 100px 100px;
  animation: splash-cocoon 1s cubic-bezier(0.5, 0, 0.2, 1) forwards;
}
@keyframes splash-cocoon {
  0% {
    opacity: 0;
    transform: translateY(50px) scale(0.2);
  }
  30% {
    opacity: 1;
    transform: none;
  }
  48% {
    transform: scale(1.04, 0.98) rotate(-3deg);
  }
  58% {
    transform: scale(1.04, 0.98) rotate(3deg);
  }
  82% {
    opacity: 1;
    transform: scaleX(0.15);
  }
  100% {
    opacity: 0;
    transform: scaleX(0.05);
  }
}
.splash-wing-lower,
.splash-wing-upper {
  transform-origin: 100px 100px;
  transform: scaleX(0) scaleY(0.6);
  animation: spOp 0.65s cubic-bezier(0.2, 0.9, 0.3, 1.25) forwards;
}
.splash-wing-lower {
  animation-delay: 0.78s;
}
.splash-wing-upper {
  animation-delay: 0.9s;
}
@keyframes spOp {
  to {
    transform: none;
  }
}
.splash-body {
  opacity: 0;
  animation: spFade2 0.3s 0.75s forwards;
}
@keyframes spFade2 {
  to {
    opacity: 1;
  }
}
.splash-antenna {
  opacity: 0;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation:
    spDraw 0.45s 1.25s ease forwards,
    spFade2 0.01s 1.25s forwards;
}
.splash-antenna-tip {
  opacity: 0;
  animation: spFade2 0.2s 1.6s forwards;
}
.splash-flap {
  transform-origin: 100px 100px;
  animation: spFlp 1.6s ease-in-out 1.6s infinite;
}
@keyframes spFlp {
  0%,
  100% {
    transform: scaleX(1);
  }
  50% {
    transform: scaleX(0.8);
  }
}
.splash-float {
  animation: spFl 3s ease-in-out 1.6s infinite;
}
@keyframes spFl {
  0%,
  100% {
    transform: none;
  }
  50% {
    transform: translateY(-5px);
  }
}
.spT {
  font-family: "Alexandria", sans-serif;
  font-size: 1.6rem;
  opacity: 0;
  animation: spUp 0.5s 1.3s ease forwards;
}
.spT b {
  color: var(--c-gold);
}
@keyframes spDraw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes spFade {
  to {
    opacity: 0.85;
  }
}
@keyframes spUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes spLoad {
  to {
    width: 100%;
  }
}
@keyframes spSpin {
  from {
    transform: rotateY(90deg);
  }
  to {
    transform: none;
  }
}
body.enter #home .card,
body.enter #home .lcard,
body.enter #home > * {
  animation: cardIn 0.5s both;
}
@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* أنيميشن البداية أسرع (٤ نوفمبر): F = أول فتحة في اليوم (~١٫٩ث)، Q = رجع نفس اليوم (~١٫١ث). app-enhancements.js يحط الكلاس */
#splash.F .splash-cocoon{animation-duration:.5s}
#splash.F .splash-wing-lower,#splash.F .splash-wing-upper{animation-duration:.45s}#splash.F .splash-wing-lower{animation-delay:.36s}#splash.F .splash-wing-upper{animation-delay:.44s}
#splash.F .splash-body{animation-delay:.34s}
#splash.F .splash-antenna{animation:spDraw .3s .55s ease forwards,spFade2 .01s .55s forwards}#splash.F .splash-antenna-tip{animation-delay:.8s}
#splash.F .splash-flap,#splash.F .splash-float{animation-delay:.8s}
#splash.F .splash-rise{animation:splash-rise .6s cubic-bezier(.3,.8,.3,1) .75s both}
#splash.F .splash-particles i{animation-delay:.72s}
#splash.F .splash-glow-1{animation-delay:.5s}#splash.F .splash-glow-2{animation-delay:.7s}#splash.F .spT{animation-delay:.5s}
#splash.F.rev{animation-duration:.45s}
#splash.Q .splash-cocoon{animation-duration:.01s}
#splash.Q .splash-wing-lower,#splash.Q .splash-wing-upper,#splash.Q .splash-body,#splash.Q .splash-antenna-tip{animation-delay:0s;animation-duration:.2s}
#splash.Q .splash-antenna{animation:spDraw .01s 0s forwards,spFade2 .01s 0s forwards}
#splash.Q .splash-flap,#splash.Q .splash-float{animation-delay:0s}
#splash.Q .splash-rise{animation:none}#splash.Q .splash-particles{display:none}
#splash.Q .splash-glow-1{animation-delay:.05s}#splash.Q .splash-glow-2{animation-delay:.15s}#splash.Q .spT{animation-delay:.05s}
#splash.Q.rev{animation-duration:.35s}
@media (prefers-reduced-motion: reduce) {
  #splash {
    display: none;
  }
  body.enter #home * {
    animation: none !important;
  }
}
.announce-bar {
  background: #fff4d6 !important;
  color: #5b4300;
  border: 1px solid #f3d98a;
  margin: 0 0 12px;
}
.assignment-card h2 {
  margin-top: 0;
}
.assignment-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  width: 100%;
  text-align: right;
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  margin-top: 8px;
  color: var(--fg);
  cursor: pointer;
}
.assignment-row b {
  grid-column: 1;
}
.assignment-row span {
  grid-column: 2;
  grid-row: 1/3;
  align-self: center;
  font-weight: 700;
  color: var(--accent);
}
.assignment-row small {
  color: var(--muted);
}
.assignment-row.soon {
  border-inline-start-color: var(--c-gold-dark);
}
.assignment-row.soon span {
  color: #b07d00;
}
.assignment-row.late {
  border-inline-start-color: var(--c-danger);
}
.assignment-row.late span {
  color: var(--c-danger);
}
.assignment-row.ok {
  opacity: 0.7;
  border-inline-start-color: var(--c-green-2);
}
.assignment-row.ok span {
  color: var(--c-green-2);
}
.toolWide {
  grid-column: 1/-1;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  background: linear-gradient(90deg, var(--accent-2), var(--card)) !important;
}
.toolWide span {
  margin-inline-start: auto;
}
.tools {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 0 16px;
}
@media (max-width: 760px) {
  .tools {
    grid-template-columns: repeat(2, 1fr);
  }
}
.tool {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  text-decoration: none;
  color: var(--fg);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.tool:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(13, 79, 60, 0.12);
}
.tool i {
  font-style: normal;
  font-size: 1.5rem;
}
.tool span {
  font-size: 0.8rem;
  color: var(--muted);
}
.tool .new {
  font-style: normal;
  color: var(--c-danger);
  font-weight: 700;
}
.profile-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.ring {
  --p: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--accent-2) 0);
  display: grid;
  place-content: center;
  text-align: center;
  position: relative;
}
.ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--card);
}
.ring b,
.ring span {
  position: relative;
}
.ring b {
  font-size: 1.4rem;
  color: var(--accent);
}
.ring span {
  font-size: 0.72rem;
  color: var(--muted);
}
.tip p {
  margin: 6px 0;
}
.chapter-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.2fr) 2fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}
.chapter-name {
  display: flex;
  flex-direction: column;
}
.chapter-name span {
  font-size: 0.8rem;
  color: var(--muted);
}
.bar {
  height: 10px;
  border-radius: 6px;
  background: var(--accent-2);
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #2e9c78);
  border-radius: 6px;
}
.chapter-count {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
}
.badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}
.bdg {
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  text-align: center;
  opacity: 0.45;
  filter: grayscale(1);
}
.bdg.on {
  opacity: 1;
  filter: none;
  border: 1px solid #f3d98a;
  background: linear-gradient(180deg, #fffbef, var(--card));
}
.bdg i {
  font-style: normal;
  font-size: 1.8rem;
  display: block;
}
.bdg b {
  display: block;
  font-size: 0.9rem;
}
.bdg span {
  font-size: 0.75rem;
  color: var(--muted);
}
.fc {
  perspective: 1200px;
  cursor: pointer;
  margin: 0 0 12px;
}
.flashcard-in {
  position: relative;
  min-height: 240px;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.fc.flip .flashcard-in {
  transform: rotateY(180deg);
}
.flashcard-front {
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(13, 79, 60, 0.08);
}
.flashcard-front p,
.flashcard-back p {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.8;
}
.flashcard-back small {
  color: var(--c-gold);
}
.flashcard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.chalIntro {
  text-align: center;
}
.chalIntro i {
  font-style: normal;
  font-size: 3rem;
  display: block;
}
.big-score {
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
  line-height: 1;
}
.challenge-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.chT {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.challenge-bar {
  height: 6px;
  background: var(--accent-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0 14px;
}
.challenge-bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transition: width 0.2s linear;
}
.challenge-question {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.8;
  min-height: 3.6em;
}
.challenge-options {
  display: grid;
  gap: 8px;
}
.challenge-options button {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  text-align: right;
  padding: 12px 14px;
}
.challenge-options button.ok {
  background: #e3f4ec;
  border-color: var(--c-green-2);
  color: var(--c-green-2);
}
.challenge-options button.no {
  background: #fde7e5;
  border-color: var(--c-danger);
  color: var(--c-danger);
}
.question-item {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.card.question-item {
  border-top: 1px solid var(--line);
  padding: 14px 18px;
}
.question-item small {
  color: var(--muted);
}
.question-item p {
  margin: 6px 0;
  line-height: 1.8;
}
.question-answer {
  background: var(--accent-2);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  line-height: 1.8;
}
.question-item textarea {
  width: 100%;
  margin: 6px 0;
}
.qdot {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--c-danger);
  color: #fff;
  font-size: 0.72rem;
  line-height: 18px;
  text-align: center;
}
.assignment-title {
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.assignment-title button {
  justify-self: start;
}
.qrModal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 950;
  display: grid;
  place-items: center;
  padding: 16px;
}
.qr-box {
  background: var(--card);
  border-radius: var(--r-2xl);
  padding: 22px;
  text-align: center;
  max-width: 360px;
  width: 100%;
}
#qrC {
  display: flex;
  justify-content: center;
  padding: 10px;
  background: #fff;
  border-radius: var(--r-md);
}
.themeBtn {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 800;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.2rem;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}
body.gated .themeBtn,
body.watching .themeBtn {
  display: none;
}
:root[data-theme="dark"] {
  --bg: #0c1719;
  --card: #132327;
  --fg: #e3eeea;
  --line: #24393d;
  --accent: #2e9c78;
  --accent-2: #1a332e;
  color-scheme: dark;
}
:root[data-theme="dark"] body {
  background: var(--bg);
  color: var(--fg);
}
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: #0f1e21;
  color: var(--fg);
  border-color: var(--line);
}
@media (hover: hover) {
  :root[data-theme="dark"] .rt tr:hover td {
    background: #18302f;
  }
}
:root[data-theme="dark"] .rt th {
  background: #1a332e;
  color: var(--c-mint);
}
:root[data-theme="dark"] .bdg.on {
  background: linear-gradient(180deg, #2b2a1a, var(--card));
}
:root[data-theme="dark"] .announce-bar {
  background: #2e2812 !important;
  color: #ffe39a;
  border-color: #5c4d1c;
}
:root[data-theme="dark"] .gate-box {
  background: var(--card);
}
:root[data-theme="dark"] .gate-box h2 {
  color: var(--c-mint);
}
:root[data-theme="dark"] .gate-back {
  color: var(--c-mint);
}
.ttabs {
  overflow-x: auto;
  scrollbar-width: thin;
}
.ttabs button {
  white-space: nowrap;
  flex: none;
}
.backBar {
  margin: 0 0 12px;
}
.chatWrap {
  display: flex;
  flex-direction: column;
  height: calc(100dvh - 120px);
  min-height: 460px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  overflow: hidden;
}
#pChat .chatWrap {
  height: 72vh;
}
.chatHead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
}
.chatHead div {
  display: flex;
  flex-direction: column;
}
.chatHead span {
  font-size: 0.78rem;
  color: var(--c-line-2);
}
:root[data-theme="dark"] .chatHead { background: #1e6b52; } /* فحص الشاشات ٧ نوفمبر: النعناعي الفاتح مع كتابة بيضا كان ٢٫٤:١ */
:root[data-theme="dark"] .chatHead span { color: rgba(255, 255, 255, 0.86); }
.chatHead .btnlink {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent !important;
}
.chat-pins {
  background: #fff8e1;
  border-bottom: 1px solid #f3d98a;
  font-size: 0.85rem;
  max-height: 70px;
  overflow: auto;
}
.chat-pins div {
  padding: 6px 14px;
  cursor: pointer;
  color: #5b4300;
}
.chatBox {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg) radial-gradient(circle at 20% 20%, rgba(13, 79, 60, 0.04) 0 2px, transparent 3px) 0 0/26px 26px;
}
.chat-day {
  text-align: center;
  margin: 8px 0;
}
.chat-day span {
  background: var(--accent-2);
  color: var(--accent);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--r-sm);
}
.chat-msg {
  align-self: flex-start;
  max-width: min(78%, 520px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 7px 11px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.3s;
}
.chat-msg.mine {
  align-self: flex-end;
  background: #dff3e9;
  border-color: #bfe3d0;
  border-radius: 14px 14px 4px 14px;
}
.chat-msg.tch:not(.mine) {
  border-inline-start: 3px solid var(--gold);
}
.chat-msg.flash {
  background: #fff1c2;
}
.chat-msg.del {
  opacity: 0.7;
}
.chat-who {
  display: block;
  font-size: 0.8rem;
  color: var(--accent);
}
.chat-who em {
  font-style: normal;
  background: var(--gold);
  color: var(--c-teal-deep);
  font-size: 0.72rem;
  padding: 0 6px;
  border-radius: 6px;
}
.chat-who small {
  color: var(--muted);
  font-weight: 400;
}
.chat-quote {
  border-inline-start: 3px solid var(--accent);
  background: rgba(13, 79, 60, 0.06);
  border-radius: 6px;
  padding: 4px 8px;
  margin: 4px 0;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--muted);
}
.chat-quote b {
  display: block;
  color: var(--accent);
}
.chat-text {
  line-height: 1.75;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.chat-text a {
  color: #1565c0;
}
.chat-image {
  display: block;
  max-width: 100%;
  max-height: 340px;
  border-radius: var(--r-sm);
  margin: 4px 0;
}
.chat-video {
  position: relative;
  width: min(420px, 70vw);
  aspect-ratio: 16/9;
  margin: 4px 0;
}
.chat-video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: var(--r-sm);
}
.chat-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--r-sm);
  background: #000;
}
.chat-file {
  display: flex;
  gap: 8px;
  align-items: center;
  background: var(--accent-2);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin: 4px 0;
  text-decoration: none;
  color: var(--fg);
}
.chat-file i {
  font-style: normal;
  font-size: 1.4rem;
}
.chat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 3px;
}
.chat-meta button {
  background: none !important;
  border: 0 !important;
  color: var(--accent) !important;
  padding: 0 !important;
  font-size: 0.72rem;
  cursor: pointer;
  min-height: 0;
}
.chat-compose {
  border-top: 1px solid var(--line);
  padding: 8px 10px;
  background: var(--card);
}
.chat-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.chat-row textarea {
  flex: 1;
  resize: none;
  border-radius: 20px;
  padding: 10px 14px;
  max-height: 140px;
  line-height: 1.5;
}
#cSend {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.1rem;
  flex: none;
  transform: scaleX(-1);
}
.chat-attach {
  width: 40px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  cursor: pointer;
  flex: none;
}
.chat-reply {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: var(--accent-2);
  border-radius: var(--r-xs);
  padding: 6px 10px;
  margin-bottom: 6px;
  font-size: 0.82rem;
}
.chat-reply button {
  background: none !important;
  color: var(--fg) !important;
  border: 0 !important;
  padding: 0 6px !important;
}
#cTg {
  margin-bottom: 6px;
  font-size: 0.85rem;
  padding: 6px;
}
.chat-progress {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 4px 6px;
}
.chat-lock {
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  margin: 6px 0;
}
:root[data-theme="dark"] .chat-msg.mine {
  background: #1d4136;
  border-color: #2b5a4b;
}
:root[data-theme="dark"] .chat-pins {
  background: #2e2812;
}
:root[data-theme="dark"] .chat-pins div {
  color: #ffe39a;
}
.chat-msg.pend {
  opacity: 0.75;
}
.cItem {
  display: contents;
}
.chat-meta .bad {
  color: var(--c-danger);
}
.toast {
  position: fixed;
  bottom: 80px;
  opacity: 0;
}
.toast.on {
  opacity: 1;
}
.gTile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 18px 10px;
  text-decoration: none;
  color: var(--fg);
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.gTile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(13, 79, 60, 0.14);
}
.gTile i {
  font-style: normal;
  font-size: 2.1rem;
}
.gTile span {
  font-size: 0.78rem;
  color: var(--muted);
}
.dq h2 {
  line-height: 1.8;
}
.wordle-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  margin: 14px 0;
  direction: rtl;
}
.wordle-row {
  display: flex;
  gap: 6px;
}
.wordle-tile {
  width: 46px;
  height: 50px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--card);
}
.wordle-tile.f {
  border-color: var(--muted);
}
.wordle-tile.g {
  background: #1e9e6a;
  border-color: #1e9e6a;
  color: #fff;
}
.wordle-tile.y {
  background: var(--c-gold-dark);
  border-color: var(--c-gold-dark);
  color: #fff;
}
.wordle-tile.b {
  background: #7c8b8f;
  border-color: #7c8b8f;
  color: #fff;
}
.wordle-tile.s {
  width: 22px;
  height: 22px;
  font-size: 0.75rem;
  border-radius: 4px;
  vertical-align: middle;
}
.kb {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}
.kb div {
  display: flex;
  flex-wrap: nowrap;
}
.kb button {
  width: clamp(26px, 8vw, 40px);
  background: var(--accent-2);
  color: var(--fg);
  border: 0;
  font-weight: 700;
}
.kb button.wide {
  font-size: 0.85rem;
}
.kb button.g {
  background: #1e9e6a;
  color: #fff;
}
.kb button.y {
  background: var(--c-gold-dark);
  color: #fff;
}
.kb button.b {
  background: #7c8b8f;
  color: #fff;
}
.match-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}
.match-grid > div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.match-grid button {
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  text-align: right;
  padding: 10px;
  font-size: 0.88rem;
  line-height: 1.6;
  min-height: 52px;
  transition: 0.2s;
}
.match-grid button.sel {
  border-color: var(--accent);
  background: var(--accent-2);
  box-shadow: 0 0 0 2px var(--accent);
}
.match-grid button.ok {
  background: #e3f4ec;
  border-color: var(--c-green-2);
  color: var(--c-green-2);
  opacity: 0.7;
}
.match-grid button.no {
  background: #fde7e5;
  border-color: var(--c-danger);
  animation: shake 0.3s;
}
@keyframes shake {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
.order-list {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.order-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px 10px;
  cursor: grab;
}
.order-list li.drag {
  opacity: 0.4;
}
.order-list li.ok {
  border-color: var(--c-green-2);
  background: #e3f4ec;
}
.order-list li.no {
  border-color: var(--c-danger);
  background: #fde7e5;
}
.order-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex: none;
}
.order-text {
  flex: 1;
}
.order-box {
  display: flex;
  gap: 4px;
}
.order-box button {
  padding: 4px 8px;
  background: var(--accent-2);
  color: var(--accent);
  border: 0;
  min-height: 0;
}
.lg {
  flex-direction: column;
}
.league-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
}
.league-row.me {
  border-color: var(--gold);
  background: linear-gradient(90deg, #fff8e1, var(--card));
}
.league-rank {
  font-size: 1.4rem;
  width: 34px;
  text-align: center;
}
.league-meta {
  flex: 1;
}
.league-meta small {
  color: var(--muted);
}
.duel-card {
  text-align: center;
}
.duel-big {
  font-style: normal;
  font-size: 3rem;
  display: block;
}
.duel-card .btnlink {
  margin-top: 10px;
}
.duel-result i {
  font-style: normal;
  font-size: 3rem;
}
.duel-result.win h2 {
  color: var(--c-green-2);
}

.av {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-2);
  font-size: 1rem;
  position: relative;
  vertical-align: middle;
  margin-inline-end: 6px;
  flex: none;
}
.av.st0 {
  font-size: 0.8rem;
}
.av.st1 {
  font-size: 0.9rem;
}
.av.st3,
.av.st4 {
  font-size: 1.15rem;
}
.av i {
  position: absolute;
  top: -9px;
  font-style: normal;
  font-size: 0.74rem;
}
.av.big {
  width: 96px;
  height: 96px;
  font-size: 2.6rem;
}
.av.big.st0 {
  font-size: 1.6rem;
}
.av.big.st1 {
  font-size: 2rem;
}
.av.big i {
  font-size: 1.4rem;
  top: -16px;
}
.av.fr-silver {
  box-shadow: 0 0 0 3px #b8c4c9;
}
.av.fr-gold {
  box-shadow:
    0 0 0 3px var(--c-gold-dark),
    0 0 10px var(--c-gold);
}
.av.fr-emerald {
  box-shadow:
    0 0 0 3px #1e9e6a,
    0 0 10px #7fe0b5;
}
.av.fr-fire {
  box-shadow:
    0 0 0 3px #d9480f,
    0 0 12px #ff8a3d;
}
.avatar-head {
  display: flex;
  gap: 18px;
  align-items: center;
}
.avatar-head > div {
  flex: 1;
}
.avatar-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 8px;
}
.avatar-picker button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  padding: 10px 4px;
}
.avatar-picker button.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.avatar-picker button i {
  font-style: normal;
  font-size: 1.8rem;
}
.avatar-picker button span {
  font-size: 0.78rem;
}
.avatar-picker button:disabled {
  opacity: 0.45;
}
.wheelWrap {
  text-align: center;
  margin-top: 14px;
}
.wheelBox {
  position: relative;
  width: min(300px, 80vw);
  aspect-ratio: 1;
  margin: 14px auto;
}
.wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 6px solid var(--c-teal-deep);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 1);
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.wheel span {
  justify-content: center;
}
.wheel span b {
  margin-top: 14px;
  font-size: 0.72rem;
}
.wordle-pointer {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 1.8rem;
  color: #d9480f;
  text-shadow: 0 2px 3px rgba(0, 0, 0, 0.3);
}
:root[data-theme="dark"] .league-row.me {
  background: linear-gradient(90deg, #2e2812, var(--card));
}
:root[data-theme="dark"] .order-list li.ok,
:root[data-theme="dark"] .match-grid button.ok {
  background: #173b2e;
}
:root[data-theme="dark"] .order-list li.no {
  background: #3b1a18;
}
.id-card-avatar {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}
.id-card-avatar .av.big {
  background: rgba(255, 255, 255, 0.12);
}
.wd {
  overflow: hidden;
}
.kb div {
  gap: 3px;
}
.kb button {
  width: min(40px, calc((100vw - 90px) / 11)) !important;
  min-width: 0 !important;
  padding: 10px 0 !important;
  font-size: 0.95rem;
}
.kb button.wide {
  width: auto !important;
  padding: 10px 8px !important;
}
.wordle-tile {
  width: min(46px, calc((100vw - 120px) / 7));
  height: min(50px, calc((100vw - 110px) / 7));
}
.league-meta b {
  font-size: 1rem !important;
  color: var(--fg) !important;
}
.league-row.me .league-meta b {
  color: var(--accent) !important;
}
:root[data-theme="dark"] #home .lcard.exam,
:root[data-theme="dark"] #extraCards .lcard.exam {
  background: #1f1d12;
  border-color: #8a7230;
}
:root[data-theme="dark"] .lcard.exam b {
  color: #ffe39a;
}
:root[data-theme="dark"] .gr.hi {
  background: #173b2e;
  color: #7fe0b5;
}
:root[data-theme="dark"] .gr.md {
  background: #3a3115;
  color: var(--c-gold);
}
:root[data-theme="dark"] .gr.lo {
  background: #3b1a18;
  color: #ff9a90;
}
:root[data-theme="dark"] .tag {
  background: #3a3115;
  color: var(--c-gold);
}
:root[data-theme="dark"] .account-code {
  background: var(--c-gold);
  color: var(--c-teal-deep);
}
:root[data-theme="dark"] .challenge-options button.ok,
:root[data-theme="dark"] .match-grid button.ok {
  background: #173b2e;
  color: #7fe0b5;
  border-color: #2e9c78;
}
:root[data-theme="dark"] .challenge-options button.no,
:root[data-theme="dark"] .match-grid button.no {
  background: #3b1a18;
  color: #ff9a90;
  border-color: var(--c-danger);
}
:root[data-theme="dark"] .chat-msg.flash {
  background: #3a3115;
}
:root[data-theme="dark"] .bdg {
  opacity: 0.6;
}
:root[data-theme="dark"] .bdg span {
  color: #a9bdb8;
}
:root[data-theme="dark"] th {
  background: #1a332e;
  color: var(--c-mint);
}
:root[data-theme="dark"] .msg {
  color: var(--fg);
}
:root[data-theme="dark"] .st {
  color: #a9bdb8;
}
:root[data-theme="dark"] .st.ok {
  color: #7fe0b5;
}
:root[data-theme="dark"] .question-answer {
  background: #1a332e;
}
:root[data-theme="dark"] .wordle-tile.b,
:root[data-theme="dark"] .kb button.b {
  background: #4a585c;
  border-color: #4a585c;
}
:root[data-theme="dark"] .league-row.me .league-meta b {
  color: #7fe0b5 !important;
}
:root[data-theme="dark"] .noteBar {
  background: #1a332e;
  color: var(--fg);
}
.duel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  text-decoration: none;
  color: var(--fg);
  border-inline-start-width: 4px;
}
.duel-row div {
  display: flex;
  flex-direction: column;
}
.duel-row small {
  color: var(--muted);
}
.duel-state {
  grid-column: 1/-1;
  font-weight: 700;
  font-size: 0.9rem;
}
.duel-score {
  grid-column: 2;
  grid-row: 1;
  font-style: normal;
  font-weight: 700;
  font-size: 1.2rem;
  direction: ltr;
}
.duel-row.win {
  border-inline-start-color: #1e9e6a;
}
.duel-row.win .duel-state {
  color: var(--c-green-2);
}
.duel-row.lose {
  border-inline-start-color: var(--c-danger);
}
.duel-row.lose .duel-state {
  color: var(--c-danger);
}
.duel-row.wait {
  border-inline-start-color: var(--c-gold-dark);
}
.duel-row.wait .duel-state {
  color: #8a6100;
}
:root[data-theme="dark"] .duel-row.win .duel-state {
  color: #7fe0b5;
}
:root[data-theme="dark"] .duel-row.lose .duel-state {
  color: #ff9a90;
}
:root[data-theme="dark"] .duel-row.wait .duel-state {
  color: var(--c-gold);
}
:root[data-theme="dark"] button:not(.ghost):not(.small):not(.gAlt):not(.gate-back):not(.themeBtn):not(.danger),
:root[data-theme="dark"] .btnlink:not(.ghost) {
  color: #fff;
}
:root[data-theme="dark"] button.small:not(.ghost):not(.danger) {
  color: #fff;
}
h1,
h2,
h3,
.hchap h3,
.chap h3 {
  font-weight: 700;
  letter-spacing: 0;
}
.brand h1 {
  font-family: "Alexandria", "IBM Plex Sans Arabic", sans-serif;
}
.brand .themeBtn {
  position: absolute;
  bottom: auto;
  top: 14px;
  left: 14px;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: none;
  z-index: 6;
}
.brand .themeBtn:hover {
  background: rgba(255, 255, 255, 0.22);
}
@media (max-width: 1099px) {
  .brand {
    position: relative !important;
  }
  .brand .themeBtn {
    top: auto;
    bottom: 14px;
    left: max(16px, env(safe-area-inset-left));
  }
}
/* unified look */
.card {
  border-radius: var(--r-xl);
  box-shadow:
    0 1px 2px rgba(15, 43, 51, 0.04),
    0 4px 16px rgba(15, 43, 51, 0.04);
}
.card h2 {
  font-size: 1.12rem;
  margin: 0 0 10px;
}
.lcard,
.tool,
.gTile {
  border-radius: var(--r-lg);
}
button,
.btnlink {
  border-radius: var(--r-sm);
  transition:
    transform 0.12s,
    box-shadow 0.12s,
    background 0.15s;
}
button:active,
.btnlink:active {
  transform: scale(0.97);
}
:root[data-theme="dark"] .card {
  box-shadow: none;
}
/* continue card */
.contCard {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  text-align: right;
  background: linear-gradient(135deg, var(--c-green-4), var(--c-green)) !important;
  color: #fff;
  border: 0;
  border-radius: var(--r-2xl);
  padding: 16px 18px;
  margin: 0 0 14px;
  box-shadow: 0 8px 24px rgba(13, 79, 60, 0.25);
}
.course-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-gold);
  color: var(--c-teal-deep);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex: none;
}
.course-card-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.course-card-title small {
  color: var(--c-line-2);
  font-size: 0.8rem;
}
.course-card-title b {
  font-size: 1.1rem;
  color: #fff;
}
.course-card-title .bar {
  background: rgba(255, 255, 255, 0.2);
  height: 6px;
}
.course-card-title .bar i {
  background: var(--c-gold);
}
/* search */
.srch {
  position: relative;
  margin: 0 0 14px;
}
.srch input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-lg);
  font-size: 1rem;
  box-sizing: border-box;
}
#srchRes {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 6px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  z-index: 30;
  max-height: 60vh;
  overflow: auto;
  padding: 6px;
}
#srchRes button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: right;
  background: transparent;
  color: var(--fg);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
}
#srchRes button:last-child {
  border-bottom: 0;
}
#srchRes small {
  color: var(--muted);
}
#srchRes span {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.6;
}
#srchRes mark {
  background: var(--c-gold);
  color: var(--c-teal-deep);
  border-radius: 3px;
  padding: 0 2px;
}
/* collapsible chapters */
.chapter-details {
  margin: 0 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--card);
  overflow: hidden;
}
.chapter-details summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.chapter-details summary::-webkit-details-marker {
  display: none;
}
.chIc {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--accent-2);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex: none;
}
.chapter-title {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.chapter-title b {
  color: var(--accent);
}
.chapter-title span {
  font-size: 0.85rem;
  color: var(--muted);
}
.chapter-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  width: 70px;
}
.chapter-progress .bar {
  width: 100%;
  height: 6px;
}
.chapter-progress small {
  color: var(--muted);
  font-size: 0.75rem;
}
.chapter-arrow {
  transition: transform 0.2s;
  color: var(--muted);
}
.chapter-details[open] .chapter-arrow {
  transform: rotate(180deg);
}
.chapter-details > .cards {
  padding: 0 12px 12px;
}
/* bottom nav */
.bNav {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 850;
  display: none;
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 6px 4px max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}
.bNav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--muted);
  border-radius: var(--r-sm);
}
.bNav a i {
  font-style: normal;
  font-size: 1.25rem;
  filter: grayscale(0.6);
  transition: transform 0.15s;
}
.bNav a.on {
  color: var(--accent);
  font-weight: 700;
}
.bNav a.on i {
  filter: none;
  transform: translateY(-2px) scale(1.12);
}
@media (max-width: 1099px) {
  .bNav:not([hidden]) {
    display: flex;
  }
  body.hasNav {
    padding-bottom: 76px;
  }
  body.hasNav .themeBtn:not(.brand .themeBtn) {
    bottom: 86px;
  }
  body.watching .bNav,
  body.gated .bNav {
    display: none !important;
  }
}
/* install */
.instTip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px !important;
  background: linear-gradient(135deg, var(--c-green-4), #0b3f30) !important;
  color: #fff;
  border: 0;
}
.instTip img {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow: 0 4px 12px #0005;
}
.instTip b {
  color: var(--c-gold);
}
.instTip .ghost {
  color: #fff;
  border-color: #fff6;
}
.instTip i {
  font-style: normal;
  font-size: 1.6rem;
}
.instTip div {
  gap: 2px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.instTip span {
  font-size: 0.82rem;
  color: var(--muted);
}
/* confetti */
.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}
/* skeleton */
.skel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0;
}
.skel i {
  display: block;
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--accent-2) 25%, var(--line) 50%, var(--accent-2) 75%);
  background-size: 200% 100%;
  animation: sk 1.2s infinite;
}
.skel i:nth-child(2) {
  width: 80%;
}
.skel i:nth-child(3) {
  width: 60%;
}
@keyframes sk {
  to {
    background-position: -200% 0;
  }
}
/* teacher today */
.todayGrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 760px) {
  .todayGrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
/* حسابات الطلاب على الجوال: بطاقة لكل طالب بدل جدول عريض */
@media (max-width: 700px) {
  #aTbl table.rt,
  #aTbl table.rt tbody {
    display: block;
  }
  #aTbl table.rt thead {
    display: none;
  }
  #aTbl table.rt tr {
    display: grid;
    grid-template-columns: auto 1fr 1fr;
    gap: 8px 10px;
    align-items: end;
    padding: 12px;
    margin: 0 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--card, #fff);
  }
  #aTbl table.rt td {
    display: block;
    border: 0;
    padding: 0;
    min-width: 0;
    white-space: normal;
  }
  #aTbl table.rt td[data-l]::before {
    content: attr(data-l);
    display: block;
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 2px;
  }
  #aTbl table.rt td:nth-child(1) {
    align-self: center;
  }
  #aTbl table.rt td:nth-child(2) {
    grid-column: 2/4;
  }
  #aTbl table.rt td:nth-child(3) {
    grid-column: 1/3;
  }
  #aTbl table.rt td:nth-child(5) {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
  }
  #aTbl table.rt td:nth-child(5)::before {
    flex-basis: 100%;
    margin: 0;
  }
  #aTbl table.rt td:nth-child(6),
  #aTbl table.rt td:nth-child(7),
  #aTbl table.rt td:nth-child(8) {
    font-size: 0.875rem;
  }
  #aTbl table.rt td.account-actions {
    grid-column: 1/-1;
    display: flex;
    gap: 6px;
    justify-content: flex-end;
  }
  #aTbl table.rt .ai {
    width: 100%;
    max-width: none;
  }
  #aTbl table.rt .ai.code {
    flex: 1;
    width: auto;
  }
}
#pSet .fold > h2 {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#pSet .fold > h2::after {
  content: "▾";
  color: var(--muted);
  font-size: 0.85em;
  transition: transform 0.2s;
}
#pSet .fold.cl > h2::after {
  transform: rotate(90deg);
}
#pSet .fold.cl > :not(h2) {
  display: none !important;
}
#pSet .fold.cl > h2 {
  margin-bottom: 0;
}
.zero-note {
  font-size: 0.55em;
  font-weight: 600;
  opacity: 0.75;
}
.teacher-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: right;
  background: var(--card) !important;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 14px;
}
.teacher-card i {
  font-style: normal;
  font-size: 1.4rem;
}
.teacher-card b {
  font-size: 1.9rem;
  color: var(--accent);
  line-height: 1.2;
}
.teacher-card span {
  font-weight: 700;
  font-size: 0.9rem;
}
.teacher-card small {
  color: var(--muted);
  font-size: 0.78rem;
}
.teacher-card.hot {
  border-color: var(--c-danger);
  background: linear-gradient(180deg, #fde7e5, var(--card)) !important;
}
.teacher-card.hot b {
  color: var(--c-danger);
}
.teacher-card.warn {
  border-color: var(--c-gold-dark);
}
.teacher-card.warn b {
  color: var(--c-gold-5);
}
:root[data-theme="dark"] .teacher-card.hot {
  background: linear-gradient(180deg, #3b1a18, var(--card)) !important;
}
.chapter-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.chapter-grid > .card:last-child {
  grid-column: 1/-1;
}
@media (max-width: 1099px) {
  .chapter-grid {
    grid-template-columns: 1fr;
  }
}
.chart {
  width: 100%;
  height: auto;
}
.chart .gl {
  stroke: var(--line);
  stroke-dasharray: 3 4;
}
.chart .ax {
  fill: var(--muted);
  font-size: 11px;
  font-family: inherit;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.8rem;
  color: var(--muted);
}
.legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 5px;
  vertical-align: middle;
}
.hbars > div {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  gap: 4px 8px;
  align-items: center;
  margin: 8px 0;
}
.hbars small {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: -4px;
}
.vbars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding-top: 20px;
}
.vbars > div {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}
.vbars i {
  width: 100%;
  max-width: 42px;
  background: linear-gradient(180deg, #2e9c78, var(--c-green));
  border-radius: 6px 6px 2px 2px;
}
.vbars b {
  font-size: 0.72rem;
  color: var(--accent);
}
.vbars span {
  font-size: 0.75rem;
  color: var(--muted);
}
/* grouped tabs */
.ttabs {
  flex-wrap: wrap;
  overflow: visible !important;
  row-gap: 4px;
  align-items: center;
}
.ttabs .tgrp {
  font-size: 0.74rem;
  color: var(--muted);
  padding: 0 6px 0 2px;
  margin-inline-start: 8px;
  border-inline-start: 1px solid var(--line);
  white-space: nowrap;
}
.ttabs .tgrp:first-of-type {
  margin-inline-start: 0;
}
.bulkBar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  position: sticky;
  top: 8px;
  z-index: 20;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.bulkBar .ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  background: transparent !important;
}
.bulkBar .danger {
  background: #fff !important;
}
.rt input[type="checkbox"] {
  width: 18px;
  height: 18px;
}
.who {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-2);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin: 6px 0 10px;
}
.who span {
  color: var(--muted);
  font-size: 0.85rem;
  margin-inline-start: auto;
}

.ttabs .ti {
  font-style: normal;
  margin-inline-end: 4px;
  font-size: 0.95em;
}
.ttabs button[data-p="pChat"] {
  background: var(--accent-2);
  border-radius: 10px 10px 0 0;
}
.tahsili-nav {
  display: none;
}
@media (max-width: 1099px) {
  .ttabs {
    display: none !important;
  }
  #teacher:not([hidden]) ~ .tahsili-nav,
  body:has(#teacher:not([hidden])) .tahsili-nav {
    display: flex;
  }
  .tahsili-nav {
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 850;
    background: var(--card);
    border-top: 1px solid var(--line);
    padding: 6px 4px max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
  }
  body.locked .tahsili-nav {
    display: none !important;
  }
  .tahsili-nav button {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    background: transparent !important;
    color: var(--muted) !important;
    border: 0 !important;
    font-size: 0.74rem;
    padding: 4px 0;
    position: relative;
    box-shadow: none;
  }
  .tahsili-nav button i {
    font-style: normal;
    font-size: 1.25rem;
    filter: grayscale(0.6);
  }
  .tahsili-nav button.on {
    color: var(--accent) !important;
    font-weight: 700;
  }
  .tahsili-nav button.on i {
    filter: none;
    transform: scale(1.12);
  }
  .tahsili-nav .qdot {
    position: absolute;
    top: 0;
    left: calc(50% + 6px);
  }
  body:has(#teacher:not([hidden])) {
    padding-bottom: 76px;
  }
  body.chatMode #pChat .chatWrap {
    height: calc(100dvh - 200px);
  }
}
.tahsili-sheet {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 900;
  display: flex;
  align-items: flex-end;
}
.tahsili-sheet[hidden] {
  display: none;
}
.tahsili-sheet-inner {
  background: var(--card);
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  max-height: 80vh;
  overflow: auto;
  animation: cardIn 0.25s both;
}
.teacher-shortcuts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.tahsili-sheet-inner h4 {
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
}
.teacher-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.teacher-shortcuts button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.4rem;
  background: var(--accent-2) !important;
  color: var(--fg) !important;
  border: 0 !important;
  padding: 12px 4px;
  border-radius: var(--r-lg);
}
.teacher-shortcuts button span {
  font-size: 0.75rem;
  font-weight: 700;
}
.chapter-settings summary {
  cursor: pointer;
  list-style: none;
}
.chapter-settings summary::-webkit-details-marker {
  display: none;
}
.chapter-settings[open] summary {
  margin-bottom: 10px;
}
.noteBox {
  margin-top: 10px;
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
  padding: 8px 12px;
}
.noteBox summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}
.noteBox textarea {
  width: 100%;
  margin-top: 8px;
  box-sizing: border-box;
}
.noteBox small {
  color: var(--muted);
}
.notif-item {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}
.notif-item small {
  color: var(--muted);
}
.notif-item p {
  margin: 4px 0;
  line-height: 1.8;
}
.assignment-head {
  display: flex;
  gap: 12px;
  align-items: center;
}
.assignment-head i {
  font-style: normal;
  font-size: 2.4rem;
}
.assistant-log {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.assistant-bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--r-xl);
  line-height: 1.8;
}
.assistant-bubble.me {
  align-self: flex-end;
  background: #dff3e9;
  border-radius: 16px 16px 4px 16px;
}
.assistant-bubble.bot {
  align-self: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 4px;
}
.assistant-bubble ul {
  margin: 4px 0;
  padding-inline-start: 18px;
}
.assistant-bubble small {
  color: var(--muted);
}
.assignment-inner {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.assignment-inner textarea {
  flex: 1;
}
:root[data-theme="dark"] .assistant-bubble.me {
  background: #1d4136;
}
.inbox-dot {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--c-gold-dark);
  color: #fff;
  font-size: 0.72rem;
  line-height: 18px;
  text-align: center;
}
.book-page {
  background: var(--accent-2);
  border-radius: var(--r-md);
  padding: 8px 12px;
  margin: 6px 0;
}
.book-page p {
  margin: 4px 0;
  font-size: 0.92rem;
  line-height: 1.9;
}
.book-page details summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.82rem;
}
.book-page mark {
  background: var(--c-gold);
  color: var(--c-teal-deep);
  border-radius: 3px;
  padding: 0 2px;
}
.lcard.locked {
  opacity: 0.55;
  filter: grayscale(0.7);
  cursor: not-allowed;
}
.lcard.locked b {
  color: var(--muted) !important;
}
.st.lk {
  color: var(--muted) !important;
  font-weight: 500;
}
.gchs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px 12px;
  margin: 6px 0 4px;
  padding-inline-start: 24px;
}
.gchs label {
  font-size: 0.88rem;
}
.gchs small {
  color: var(--muted);
}
.tourO {
  position: fixed;
  inset: 0;
  z-index: 960;
  background: rgba(9, 58, 44, 0.75);
  backdrop-filter: blur(3px);
  display: grid;
  place-items: center;
  padding: 16px;
}
.tourB {
  position: relative;
  background: var(--card);
  border-radius: 22px;
  max-width: 420px;
  width: 100%;
  padding: 28px 22px 20px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  animation: cardIn 0.35s both;
}
.tourI {
  font-style: normal;
  font-size: 3.4rem;
  display: block;
  margin-bottom: 6px;
}
.tourB h2 {
  color: var(--accent);
  margin: 4px 0 8px;
}
.tourB p {
  line-height: 1.9;
  color: var(--fg);
  min-height: 5.7em;
}
.tourX {
  position: absolute;
  top: 10px;
  left: 10px;
  background: transparent !important;
  color: var(--muted);
  border: 0;
  font-size: 1.1rem;
  padding: 4px 8px;
}
.tourDots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0;
}
.tourDots span {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--line);
  transition: 0.2s;
}
.tourDots span.on {
  width: 22px;
  background: var(--accent);
}
.helpC {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.helpC i {
  font-style: normal;
  font-size: 2rem;
}
.helpC p {
  margin: 0;
  line-height: 1.9;
}
details summary {
  cursor: pointer;
}
.card details {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}
.card details p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.8;
}
.stars {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 8px 0 12px;
  direction: ltr;
}
.stars button {
  background: transparent !important;
  border: 0 !important;
  font-size: 2.2rem;
  color: #d5ddd9 !important;
  padding: 0 4px;
  transition: transform 0.12s;
}
.stars button.on {
  color: var(--c-gold-dark) !important;
}
.stars button:hover {
  transform: scale(1.15);
}
.rateBox {
  margin-top: 14px;
}
.rateBox textarea {
  width: 100%;
  box-sizing: border-box;
}
.rateL summary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}
.rateL summary b {
  flex: 1;
}
.rating-stars-small {
  color: var(--c-gold-dark);
  letter-spacing: 2px;
}
.rateL summary span:last-child {
  color: var(--muted);
  font-size: 0.85rem;
}
.truefalse-answer {
  background: #fff4d6;
  color: var(--c-teal-deep);
  border-radius: 6px;
  padding: 0 6px;
}
.truefalse-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.truefalse-buttons button {
  padding: 16px;
  font-size: 1.1rem;
}
.truefalse-buttons .tfT {
  background: var(--c-green-2) !important;
}
.truefalse-buttons .tfF {
  background: var(--c-danger) !important;
}
.truefalse-buttons button.ok {
  outline: 4px solid var(--c-gold);
}
.truefalse-buttons button.no {
  opacity: 0.5;
}
.blank {
  display: inline-block;
  min-width: 80px;
  border-bottom: 3px solid var(--accent);
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}
.bal {
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 10px 16px;
}
.bal b {
  display: block;
  font-size: 1.6rem;
  color: var(--c-gold);
}
.bal span {
  font-size: 0.75rem;
}
.shopG {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.shopI {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 8px;
}
.shopI span {
  color: var(--muted);
  font-size: 0.85rem;
}
.bg-ocean {
  background: linear-gradient(135deg, #0b4f6c, #01baef) !important;
  color: #fff;
}
.bg-sunset {
  background: linear-gradient(135deg, #ff7e5f, #feb47b) !important;
  color: #3a1c0f;
}
.bg-galaxy {
  background: linear-gradient(135deg, #1a1446, #5b2a86, #0b0b2b) !important;
  color: #fff;
}
.shopI.bg-ocean span,
.shopI.bg-galaxy span {
  color: #e6f4ff;
}
.idc.bg-ocean,
.idc.bg-sunset,
.idc.bg-galaxy {
  color: #fff;
}
label.choice.gone {
  opacity: 0.35;
  text-decoration: line-through;
}
.hintB {
  margin-top: 8px;
}
.k3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.k3 div {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  text-align: center;
}
.k3 b {
  display: block;
  font-size: 1.5rem;
  color: var(--accent);
}
.k3 span {
  font-size: 0.8rem;
  color: var(--muted);
}
.heat {
  border-collapse: collapse;
  font-size: 0.75rem;
}
.heat th,
.heat td {
  border: 1px solid var(--line);
  padding: 4px 5px;
  text-align: center;
  min-width: 26px;
}
.heat td.nw {
  text-align: right;
  min-width: 110px;
  font-size: 0.82rem;
}
.h4 {
  background: #1e9e6a;
  color: #fff;
}
.h3 {
  background: #8fd3b4;
}
.h2 {
  background: var(--c-gold);
}
.h1 {
  background: #f28b82;
}
.hl {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.75rem;
}
.vbars.hrs {
  height: 110px;
  gap: 2px;
}
.vbars.hrs i {
  max-width: none;
}
.pathS {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: var(--accent-2) !important;
  color: var(--fg);
  border: 0;
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-top: 8px;
}
.pathS i {
  font-style: normal;
  font-size: 1.3rem;
}
.pathS div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pathS small {
  color: var(--muted);
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.compare-grid div {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px;
  text-align: center;
}
.compare-grid b {
  display: block;
  font-size: 1.3rem;
  color: var(--accent);
}
.compare-grid small {
  color: var(--muted);
}
.compBan {
  background: linear-gradient(90deg, #d9480f, var(--c-gold-dark)) !important;
  color: #fff;
  border: 0;
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin: 0 0 12px;
  text-align: right;
  font-weight: 700;
}
.cTools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.cTools select {
  flex: 1;
  min-width: 150px;
  font-size: 0.85rem;
  padding: 6px;
}
.chat-scheduled {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.chat-scheduled input {
  font-size: 0.82rem;
  padding: 5px;
}
.aboutHero {
  text-align: center;
  background: linear-gradient(135deg, var(--c-green-4), #093a2c) !important;
  color: #fff;
}
.aboutHero h1 {
  color: var(--c-gold);
  margin: 6px 0;
}
.aboutHero p {
  color: var(--c-line-2);
}
:root[data-theme="dark"] .truefalse-answer {
  background: #3a3115;
  color: #ffe39a;
}

.streak-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.streak-flame {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 54px;
  filter: grayscale(1);
  opacity: 0.6;
}
.streak-flame.on {
  filter: none;
  opacity: 1;
}
.streak-flame i {
  font-style: normal;
  font-size: 1.7rem;
  line-height: 1;
}
.streak-flame.on i {
  animation: flk 1.4s ease-in-out infinite;
}
.streak-flame b {
  font-size: 1.2rem;
  color: #e8590c;
}
.streak-flame span {
  font-size: 0.74rem;
  color: var(--muted);
}
@keyframes flk {
  0%,
  100% {
    transform: scale(1) rotate(-3deg);
  }
  50% {
    transform: scale(1.12) rotate(3deg);
  }
}
.streak-msg {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.streak-msg b {
  font-size: 0.92rem;
}
.streak-msg span {
  font-size: 0.78rem;
  color: var(--muted);
}
.rank-bar {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.rank-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #e8590c, var(--c-gold));
}
.chat-level {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--accent-2);
  color: var(--accent);
  border-radius: var(--r-xs);
  padding: 0 6px;
}
.flashcard {
  perspective: 1000px;
  height: 230px;
  margin: 12px 0;
  cursor: pointer;
}
.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s;
  transform-style: preserve-3d;
}
.flashcard.flip .flashcard-inner {
  transform: rotateY(180deg);
}
.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: var(--r-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
}
.flashcard-front {
  background: linear-gradient(135deg, var(--c-green-4), #0b3f30);
  color: #fff;
}
.flashcard-front b {
  font-size: 1.5rem;
  color: var(--c-gold);
}
.flashcard-front small {
  color: var(--c-line-2);
}
.flashcard-back {
  background: var(--accent-2);
  color: var(--fg);
  transform: rotateY(180deg);
  border: 2px solid var(--accent);
}
.flashcard-back b {
  color: var(--accent);
}
.flashcard-back p {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.8;
}
.box-card {
  text-align: center;
}
.giftBox {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 20px auto 26px;
}
.gate-body {
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  height: 95px;
  background: linear-gradient(90deg, var(--c-danger) 42%, var(--c-gold) 42% 58%, var(--c-danger) 58%);
  border-radius: var(--r-xs);
}
.gate-lid {
  position: absolute;
  top: 25px;
  left: 0;
  right: 0;
  height: 32px;
  background: linear-gradient(90deg, #d63a2f 42%, var(--c-gold) 42% 58%, #d63a2f 58%);
  border-radius: var(--r-xs);
  transition: transform 0.6s;
  z-index: 2;
}
.giftBox.shake {
  animation: shk 0.25s 3;
}
.giftBox.open .gate-lid {
  transform: translateY(-55px) rotate(-18deg);
}
.gate-win {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent);
  animation: pop 0.5s;
}
@keyframes pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}
@keyframes shk {
  0%,
  100% {
    transform: rotate(0);
  }
  25% {
    transform: rotate(-6deg);
  }
  75% {
    transform: rotate(6deg);
  }
}
.k4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 560px) {
  .k4 {
    grid-template-columns: 1fr 1fr;
  }
}
.lg {
  flex-wrap: nowrap;
  white-space: nowrap;
}
.pre-post-head {
  font-size: 1rem;
  margin: 18px 0 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.lg {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.lg i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
  margin-inline-start: 6px;
}
.dist > div {
  display: grid;
  grid-template-columns: 100px 1fr 34px;
  gap: 8px;
  align-items: center;
  margin: 5px 0;
  font-size: 0.85rem;
}
.duel-bar {
  background: var(--line);
  border-radius: 6px;
  height: 14px;
  overflow: hidden;
}
.duel-bar i {
  display: block;
  height: 100%;
  border-radius: 6px;
}
.pre-post-line {
  position: relative;
  height: 8px;
  background: var(--line);
  border-radius: 4px;
  min-width: 110px;
  margin: 4px 0;
}
.pre-post-line span {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 4px;
}
.pre-post-line i {
  position: absolute;
  top: -3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-inline-start: -7px;
  z-index: 1;
  border: 2px solid var(--card);
}
.pre-post-line i.a {
  background: #9aa5a0;
}
.pre-post-line i.b {
  background: var(--accent);
}

/* student header */
#bMe,
#bMenu {
  display: none;
}
body.stuHd #acct {
  display: none !important;
}
body.stuHd #bMe {
  display: block;
  grid-column: 1/-1;
  margin-top: 12px;
  position: relative;
  z-index: 2;
}
body.stuHd #bMenu {
  display: grid;
}
.bIco {
  position: absolute;
  top: 14px;
  left: 58px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-md);
  place-items: center;
  font-size: 1.1rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  box-shadow: none;
  z-index: 6;
}
body.stuHd .brand .themeBtn {
  border-radius: var(--r-md);
}
.bottom-menu-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.bottom-menu-avatar .av,
.heatmap-head .av {
  margin: 0;
}
.bottom-menu-avatar .av {
  background: radial-gradient(circle at 35% 30%, #ffe8a3, #ffc94d) !important;
}
#home > #annBox:empty,
#home > #assignBox:empty {
  display: none;
}
.bottom-menu-avatar {
  flex: none;
  text-decoration: none;
  display: block;
  border-radius: 50%;
  box-shadow:
    0 0 0 3px #0e5641,
    0 0 0 5px var(--c-gold);
}
.bottom-menu-avatar .av,
.bottom-menu-avatar > * {
  width: 58px !important;
  height: 58px !important;
  font-size: 30px !important;
}
.bottom-menu-item {
  flex: 1;
  min-width: 0;
}
.bottom-menu-name {
  display: block;
  font-size: 1.02rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottom-menu-row {
  font-size: 0.78rem;
  margin-top: 1px;
}
.bottom-menu-row span {
  color: var(--c-gold);
  font-weight: 600;
}
.bottom-menu-row em {
  font-style: normal;
  color: #bfd9ce;
}
.bottom-menu-panel {
  height: 7px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 5px;
  margin-top: 8px;
  overflow: hidden;
}
.bottom-menu-panel i {
  display: block;
  height: 100%;
  background: linear-gradient(270deg, var(--c-gold), #f08c2e);
  border-radius: 5px;
  min-width: 6px;
}
.bottom-menu-pane {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.72rem;
  color: #bfd9ce;
  margin-top: 4px;
}
.bottom-menu-section {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.3fr;
  gap: 7px;
  margin-top: 10px;
}
.bottom-menu-section > * {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--r-lg);
  padding: 8px 4px 7px;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.bottom-menu-section b {
  font-size: 1rem;
  line-height: 1.3;
  color: #fff;
}
.bottom-menu-section b small {
  font-size: 0.74rem;
  opacity: 0.75;
  font-weight: 500;
}
.bottom-menu-section span {
  font-size: 0.72rem;
  color: #bfd9ce;
  white-space: nowrap;
}
.bottom-menu-section .off {
  opacity: 0.6;
}
.bottom-menu-section .bottom-menu-code {
  background: var(--c-gold) !important;
  border: 0 !important;
  color: var(--c-brown-3) !important;
  cursor: pointer;
  box-shadow: none;
}
.bottom-menu-code b {
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 1.5px;
  font-size: 0.92rem;
  color: var(--c-brown-3);
}
.bottom-menu-code span {
  color: #6b5513;
}
.hdO {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 900;
  animation: fdI 0.15s;
}
.hdM {
  position: fixed;
  top: 62px;
  left: max(14px, env(safe-area-inset-left));
  width: 236px;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  padding: 8px;
  z-index: 901;
  animation: mnI 0.18s ease-out;
}
.hdM:before {
  content: "";
  position: absolute;
  top: -7px;
  left: var(--ax, 58px);
  width: 14px;
  height: 14px;
  background: var(--card);
  transform: rotate(45deg);
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.heatmap-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 6px 8px 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.heatmap-head > *:first-child {
  width: 36px !important;
  height: 36px !important;
  font-size: 18px !important;
  flex: none;
}
.heatmap-head b {
  display: block;
  font-size: 0.88rem;
}
.heatmap-head span {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
  letter-spacing: 1px;
}
.hdM button {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: right;
  background: none !important;
  color: var(--fg) !important;
  border: 0 !important;
  box-shadow: none;
  padding: 11px 10px;
  border-radius: var(--r-sm);
  font-size: 0.95rem;
}
.hdM button:hover {
  background: var(--accent-2) !important;
}
.hdM button i {
  font-style: normal;
  width: 22px;
  text-align: center;
}
.hdM button em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.72rem;
  background: var(--c-gold);
  color: var(--c-brown-3);
  border-radius: 6px;
  padding: 1px 6px;
}
.hdM .dn {
  color: #c0392b;
  border-top: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  margin-top: 4px;
}
@keyframes mnI {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}
@keyframes fdI {
  from {
    opacity: 0;
  }
}
.instB {
  text-align: center;
}
.instB > img {
  width: 72px;
  height: 72px;
  border-radius: var(--r-2xl);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.instB h2 {
  margin: 10px 0 2px;
}
.instS {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.instS li {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--accent-2);
  border-radius: var(--r-lg);
  padding: 10px 12px;
}
.instS li > i {
  font-style: normal;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex: none;
}
.instS li div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.instS span {
  font-size: 0.8rem;
  color: var(--muted);
}
.instB button {
  width: 100%;
  margin-top: 8px;
}
@media (max-width: 1099px) {
  body.stuHd .brand {
    margin-bottom: 6px;
    padding-top: 14px;
    padding-bottom: 16px;
    grid-template-columns: auto 1fr;
    gap: 0 10px;
    background-image: radial-gradient(120% 90% at 90% 0, #1e8a68 0, transparent 55%);
  }
  body.stuHd .brand .blogo {
    width: 44px;
    grid-column: 1;
    grid-row: 1/3;
  }
  body.stuHd .brand .bk {
    display: none;
  }
  body.stuHd .brand h1 {
    grid-column: 2;
    grid-row: 1;
    font-size: 1.25rem;
    margin: 0;
    align-self: end;
  }
  body.stuHd .brand .bs {
    grid-column: 2;
    grid-row: 2;
    font-size: 0.75rem;
    margin: 0;
    align-self: start;
  }
  body.stuHd .brand .themeBtn {
    top: 14px;
    bottom: auto;
  }
}
@media (min-width: 1100px) {
  body.stuHd .brand {
    overflow-y: auto;
  }
  body.stuHd .brand .dna,
  body.stuHd .brand .bmeta {
    display: none !important;
  }
  body.stuHd #bMe {
    margin-top: 10px;
  }
  body.stuHd .bottom-menu-card {
    flex-direction: column;
    text-align: center;
  }
  body.stuHd .bottom-menu-avatar > * {
    width: 72px !important;
    height: 72px !important;
    font-size: 38px !important;
  }
  body.stuHd .bottom-menu-item {
    width: 100%;
  }
  body.stuHd .bottom-menu-name {
    white-space: normal;
  }
  body.stuHd .bottom-menu-section {
    grid-template-columns: 1fr 1fr 1fr;
  }
  body.stuHd .bottom-menu-section .bottom-menu-code {
    grid-column: 1/-1;
  }
}
.gpt {
  color: var(--c-gold-5);
}
:root[data-theme="dark"] .gpt {
  color: var(--c-gold);
}
/* league v2 */
.league-shield {
  display: inline-grid;
  place-items: center;
  font-style: normal;
  color: #fff;
  font-family: "Alexandria", inherit;
  font-weight: 700;
  border-radius: 9px;
  width: 24px;
  height: 24px;
  font-size: 0.8rem;
  flex: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.league-shield.xs {
  width: 22px;
  height: 22px;
  font-size: 0.72rem;
  border-radius: 7px;
}
.league-shield.sm {
  width: 24px;
  height: 24px;
}
.league-shield.lg {
  width: 60px;
  height: 60px;
  border-radius: var(--r-2xl);
  font-size: 1.6rem;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
}
.league-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.league-top div {
  flex: 1;
}
.league-top h2 {
  margin: 0;
}
.league-top small {
  color: var(--muted);
}
.league-top select {
  width: auto;
}
.league-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 12px;
}
.league-tabs button {
  background: none !important;
  color: var(--fg) !important;
  border: 0 !important;
  box-shadow: none;
  border-radius: var(--r-sm);
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 600;
}
.league-tabs button.on {
  background: var(--accent) !important;
  color: #fff !important;
}
.pitch {
  background: repeating-linear-gradient(90deg, #0f5a40 0 34px, #11654a 34px 68px);
  border-radius: 22px;
  padding: 14px 14px 16px;
  color: #fff;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}
.pitch:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(255, 255, 255, 0.18);
}
.pitch:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 76px;
  height: 76px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.pitch > * {
  position: relative;
  z-index: 1;
}
.pitch .rnd {
  text-align: center;
  font-size: 0.75rem;
  color: #d9f2e7;
}
.pitch .vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-top: 10px;
}
.pitch .tm {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pitch .tm b {
  font-size: 0.9rem;
  color: #fff;
}
.pitch .tm small {
  font-size: 0.74rem;
  color: var(--c-line-2);
  min-height: 1em;
}
.pitch .sc {
  font-family: "Alexandria", inherit;
  font-size: 2rem;
  display: flex;
  gap: 6px;
  align-items: center;
  background: rgba(0, 0, 0, 0.45);
  border-radius: var(--r-lg);
  padding: 2px 14px;
}
.pitch .sc i {
  font-style: normal;
  color: var(--c-gold);
  font-size: 1rem;
}
.cdn {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
}
.cdn div {
  background: rgba(0, 0, 0, 0.4);
  border-radius: var(--r-sm);
  padding: 4px 9px;
  text-align: center;
  min-width: 50px;
}
.cdn b {
  display: block;
  color: var(--c-gold);
}
.cdn span {
  font-size: 0.72rem;
  color: var(--c-line-2);
}
.pitch .lead {
  margin: 10px auto 0;
  width: max-content;
  max-width: 100%;
  background: var(--c-gold);
  color: var(--c-brown-3);
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.league-how {
  font-size: 0.75rem;
  margin: 8px 2px;
}
.league-heading {
  font-size: 1rem;
  margin: 16px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.league-heading span {
  margin-inline-start: auto;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
.lgT {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  overflow: hidden;
  font-size: 0.82rem;
}
.lgT .lr {
  display: grid;
  grid-template-columns: 34px 1fr 24px 24px 24px 38px 88px;
  align-items: center;
  padding: 8px 10px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.lgT .lr.hd {
  border: 0;
  color: var(--muted);
  font-size: 0.72rem;
  background: var(--accent-2);
}
.lgT .lr.mine {
  background: rgba(19, 102, 78, 0.14);
  box-shadow: inset -3px 0 0 var(--c-gold);
}
.lgT .n {
  text-align: right;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.lgT .pt {
  font-weight: 800;
  color: var(--c-gold-5);
  font-size: 0.95rem;
}
:root[data-theme="dark"] .lgT .pt {
  color: var(--c-gold);
}
.lgT em {
  font-style: normal;
  font-size: 0.55rem;
  margin-inline-start: 2px;
}
.lgT em.up {
  color: #16a34a;
}
.lgT em.dn {
  color: #dc2626;
}
.fm {
  display: flex;
  gap: 2px;
  justify-content: center;
}
.fm u {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  text-decoration: none;
  font-size: 0.55rem;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.fix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fx {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 10px;
  font-size: 0.8rem;
}
.fx.now b {
  color: var(--c-gold-5);
}
:root[data-theme="dark"] .fx.now b {
  color: var(--c-gold);
}
.fx span {
  color: var(--muted);
}
.goalC {
  background: linear-gradient(135deg, #1c3a6e, #122548);
  color: #fff;
  border-radius: var(--r-2xl);
  padding: 12px 14px;
}
.goalC p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #c8d8f5;
}
.goalC .gb,
.league-banner .bg {
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  margin: 8px 0 4px;
}
.goalC .gb i,
.league-banner .bg i {
  display: block;
  height: 100%;
  background: linear-gradient(270deg, #7fd1ff, #3b82f6);
}
.goalC small {
  font-size: 0.72rem;
  color: #c8d8f5;
}
.captain-card {
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg, #3a2a07, #1f1704);
  color: #fff;
  border: 1px solid rgba(224, 161, 0, 0.4);
  border-radius: var(--r-2xl);
  padding: 12px;
  margin-top: 12px;
}
.captain-card small {
  display: block;
  color: #e0c27a;
  font-size: 0.72rem;
}
.captain-card b {
  display: block;
}
.captain-card span {
  font-size: 0.72rem;
  color: #bfd9ce;
}
.league-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe8a3, #ffc94d);
  color: #5a3e00;
  display: inline-grid;
  place-items: center;
  font-weight: 800;
  flex: none;
  position: relative;
}
.league-avatar.big {
  width: 54px;
  height: 54px;
  font-size: 1.4rem;
  box-shadow: 0 0 0 3px var(--c-gold);
}
.league-avatar em {
  position: absolute;
  bottom: -4px;
  left: -4px;
  font-style: normal;
  background: var(--c-gold);
  color: var(--c-brown-3);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}
.pod {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8px;
}
.pd {
  text-align: center;
  width: 31%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.pd .league-avatar {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}
.pd.p0 .league-avatar {
  width: 54px;
  height: 54px;
  box-shadow: 0 0 0 3px var(--c-gold);
}
.pd b {
  font-size: 0.8rem;
}
.pd small {
  color: var(--c-gold-5);
  font-weight: 700;
}
.pd .st {
  width: 100%;
  margin-top: 4px;
  border-radius: 12px 12px 0 0;
  display: grid;
  place-items: center;
  font-family: "Alexandria", inherit;
  font-size: 1.3rem;
  color: #fff;
}
.pd.p0 .st {
  height: 78px;
  background: linear-gradient(var(--c-gold), var(--c-gold-dark));
  color: var(--c-brown-3);
}
.pd.p1 .st {
  height: 56px;
  background: linear-gradient(#94a3b8, #64748b);
}
.pd.p2 .st {
  height: 42px;
  background: linear-gradient(#d19a66, #9a6b3c);
}
.crown {
  font-size: 1.1rem;
}
.lu {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 4px 0;
  font-size: 0.85rem;
}
.lur {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
}
.lur + .lur {
  border-top: 1px solid var(--line);
}
.lur .k {
  width: 20px;
  color: var(--muted);
  text-align: center;
}
.lur b {
  flex: 1;
  font-weight: 500;
}
.lur .p {
  color: var(--c-gold-5);
  font-weight: 700;
}
.lur.mine {
  background: rgba(19, 102, 78, 0.14);
}
.lu .cut {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 12px;
}
.lu .cut:before,
.lu .cut:after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--line);
}
.league-banner {
  display: block;
  width: 100%;
  text-align: right;
  border: 0;
  border-radius: 20px;
  padding: 12px 14px;
  margin: 0 0 12px;
  color: #fff;
  background: linear-gradient(135deg, #7a1f0f, #c2410c 60%, var(--c-gold-dark)) !important;
  box-shadow: 0 8px 22px rgba(194, 65, 12, 0.3);
}
.league-banner .r {
  display: flex;
  align-items: center;
  gap: 10px;
}
.league-banner .mini {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: "Alexandria", inherit;
  font-size: 1.25rem;
}
.league-banner .mini em {
  font-style: normal;
  font-size: 0.9rem;
  color: #ffe7c2;
}
.league-banner .go {
  margin-inline-start: auto;
  background: #fff;
  color: #7a1f0f;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.league-banner small {
  display: block;
  font-size: 0.72rem;
  color: #ffe7c2;
}
.league-modal {
  text-align: center;
}
.league-modal p {
  min-height: 0 !important;
  margin: 6px 0;
  line-height: 1.7;
}
.league-modal .cup {
  font-size: 4rem;
  line-height: 1;
  filter: drop-shadow(0 6px 14px rgba(224, 161, 0, 0.5));
}
.league-modal h2 {
  color: var(--c-gold-5);
  margin: 6px 0;
}
:root[data-theme="dark"] .league-modal h2 {
  color: var(--c-gold);
}
.league-modal .mres {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0;
}
.league-modal .mres div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.1rem;
}
.league-modal b.w {
  color: #16a34a;
}
.league-modal b.l {
  color: #dc2626;
}
.league-modal button {
  width: 100%;
  margin-top: 10px;
  background: var(--c-gold) !important;
  color: var(--c-brown-3) !important;
  border: 0 !important;
  font-weight: 800;
}
.league-status {
  display: inline-block;
  border-radius: var(--r-pill);
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 700;
  background: #fff4d6;
  color: #7a5a00;
}
.league-status.on {
  background: #dcf5e8;
  color: #14532d;
}
#lgAdm .fx {
  margin-top: 6px;
}
.league-settings {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 8px 12px;
}
.league-settings summary {
  cursor: pointer;
  font-weight: 600;
}
.lgBoard {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: linear-gradient(160deg, #0b3f30, #06241b);
  color: #fff;
  padding: 4vh 6vw;
  overflow: auto;
}
.lgBoard h1 {
  text-align: center;
  color: var(--c-gold);
  font-size: 2.4rem;
  margin: 0 0 3vh;
}
.lgBoard .x {
  position: absolute;
  top: 16px;
  left: 16px;
}
.lgBoard .badge-map {
  display: flex;
  justify-content: center;
  gap: 4vw;
  flex-wrap: wrap;
  margin-bottom: 4vh;
}
.lgBoard .badge-map div {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 12px 20px;
}
.lgBoard .badge-map b {
  font-size: 2.4rem;
  font-family: "Alexandria", inherit;
}
.lgT.big {
  font-size: 1.3rem;
  max-width: 900px;
  margin: auto;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
}
.lgT.big .lr {
  grid-template-columns: 60px 1fr 60px 60px 60px 80px 160px;
  padding: 14px;
}
.lgT.big .lr.hd {
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-line-2);
  font-size: 1rem;
}
.lgT.big .pt {
  color: var(--c-gold);
  font-size: 1.5rem;
}
.lgT.big .fm u {
  width: 26px;
  height: 26px;
  font-size: 0.8rem;
}
@media (max-width: 420px) {
  .lgT .lr {
    grid-template-columns: 30px 1fr 20px 20px 20px 34px 82px;
    padding: 8px 6px;
  }
}

/* games hub v2 */
.bottom-menu-mini {
  display: none;
  gap: 6px;
  margin-top: 4px;
}
.bottom-menu-mini span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
}
@media (max-width: 1099px) {
  body.stuHd.inner .bottom-menu-section,
  body.stuHd.inner .bottom-menu-panel,
  body.stuHd.inner .bottom-menu-pane {
    display: none;
  }
  body.stuHd.inner .bottom-menu-mini {
    display: flex;
  }
  body.stuHd.inner .bottom-menu-card {
    padding: 8px 10px;
    border-radius: var(--r-xl);
  }
  body.stuHd.inner .bottom-menu-avatar > * {
    width: 42px !important;
    height: 42px !important;
    font-size: 22px !important;
  }
  body.stuHd.inner .brand .bs {
    display: none;
  }
  body.stuHd.inner .brand h1 {
    grid-row: 1/3;
    align-self: center;
  }
  body.hasNav .backBar {
    display: none;
  }
}
.dqC {
  display: block;
  background: linear-gradient(135deg, var(--c-green-4), #0b3f30);
  color: #fff;
  border-radius: 22px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  margin-bottom: 4px;
  transition: background 0.6s;
}
.dqC:after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(255, 209, 102, 0.13);
  left: -55px;
  top: -65px;
  pointer-events: none;
}
.dqC.gold {
  background: linear-gradient(135deg, #b7791f, #7a4e0b);
  animation: glw 2.4s ease-in-out infinite;
}
@keyframes glw {
  50% {
    box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.35);
  }
}
.dqC .t {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
}
.dqC h2 {
  margin: 0;
  font-size: 1.05rem;
  flex: 1;
  color: #fff;
}
.dqC .n {
  font-family: "Alexandria", inherit;
  font-size: 1.15rem;
  color: var(--c-gold);
}
.dqC .pb {
  height: 9px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0;
}
.dqC .pb i {
  display: block;
  height: 100%;
  background: linear-gradient(270deg, var(--c-gold), #f08c2e);
  border-radius: 6px;
  transition: width 0.6s;
}
.dqC .tasks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}
.dqC .tk {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.09);
  border-radius: var(--r-md);
  padding: 8px 10px;
  font-size: 0.85rem;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.dqC .tk .c {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  flex: none;
  border: 2px solid rgba(255, 255, 255, 0.4);
}
.dqC .tk.ok .c {
  background: var(--c-green-bright);
  border-color: var(--c-green-bright);
}
.dqC .tk.ok span:nth-child(2) {
  text-decoration: line-through;
  opacity: 0.7;
}
.dqC .tk em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--c-gold);
}
.dqC .pts {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.74rem;
  color: var(--c-line-2);
  position: relative;
  z-index: 1;
}
.dqC .pb2 {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  overflow: hidden;
}
.dqC .pb2 i {
  display: block;
  height: 100%;
  background: #7fe0b5;
}
.gSh {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 2px 8px;
  font-size: 1rem;
  font-weight: 700;
}
.gSh span {
  margin-inline-start: auto;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
.gG {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.gG.g3 {
  grid-template-columns: repeat(3, 1fr);
}
.g2 {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  position: relative;
  min-height: 100px;
  text-decoration: none;
  transition: transform 0.12s;
}
.g2:active {
  transform: scale(0.97);
}
.g2 > i {
  font-style: normal;
  font-size: 1.65rem;
  display: block;
}
.g2 > b {
  display: block;
  font-size: 0.9rem;
  margin-top: 4px;
}
.g2 > small {
  font-size: 0.74rem;
  color: var(--muted);
  display: block;
  margin-top: 2px;
}
.g2.done {
  opacity: 0.75;
}
.g3 .g2 {
  text-align: center;
  min-height: 96px;
}
.g2.wd {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 0;
}
.g2.wd > b {
  margin: 0;
}
.g2.wd > i {
  font-size: 1.6rem;
}
.g2.wd > small {
  margin-inline-start: auto;
}
.g2 .bd {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--r-pill);
  padding: 2px 8px;
}
.bd.ok {
  background: rgba(43, 182, 115, 0.15);
  color: #1e9e63;
}
.bd.new {
  background: var(--c-gold);
  color: var(--c-brown-3);
}
.bd.due {
  background: #dc2626;
  color: #fff;
  min-width: 22px;
  text-align: center;
}
.bd.wait {
  background: var(--accent-2);
  color: var(--muted);
}
.gG.daily .dly {
  min-height: 118px;
  color: #fff;
  border: 0;
  overflow: hidden;
  background: linear-gradient(140deg, #6d28d9, #4c1d95);
}
.gG.daily .dly.w {
  background: linear-gradient(140deg, #0e7490, #155e75);
}
.gG.daily .dly small {
  color: rgba(255, 255, 255, 0.8);
}
.gG.daily .dly:after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  left: -25px;
  bottom: -30px;
}
.gG.daily .dly > i {
  font-size: 2rem;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25));
}
.gG.daily .dly.done {
  opacity: 1;
  filter: saturate(0.55);
}
.gG.daily .bd.ok {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}
.g2.rec {
  grid-column: 1/-1;
  display: flex;
  gap: 12px;
  align-items: center;
  background: linear-gradient(135deg, #1c3a6e, #122548);
  color: #fff;
  border: 0;
  min-height: 0;
}
.g2.rec > i {
  width: 48px;
  height: 48px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-style: normal;
  flex: none;
}
.g2.rec div {
  display: flex;
  flex-direction: column;
}
.g2.rec small {
  color: #c8d8f5;
  font-size: 0.72rem;
}
.g2.rec b {
  font-size: 0.95rem;
}
.g2.rec .go {
  margin-inline-start: auto;
  background: #fff;
  color: #122548;
  border-radius: var(--r-pill);
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 700;
}
.dqC .tk.chl {
  background: rgba(255, 209, 102, 0.14);
  border: 1px dashed rgba(255, 209, 102, 0.55);
}
.dqC .tk.chl .c {
  border-color: var(--c-gold);
  font-size: 0.74rem;
}
.dqC .tk.chl span:nth-child(2) {
  display: flex;
  flex-direction: column;
  text-decoration: none !important;
  opacity: 1 !important;
}
.chGet {
  margin-inline-start: auto;
  background: var(--c-gold) !important;
  color: var(--c-brown-3);
  border: 0;
  border-radius: var(--r-pill);
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 800;
  animation: glw 1.6s infinite;
}

/* home v2 */
body.hm2 #tools,
body.hm2 #home > .hero,
body.hm2 #board,
body.hm2 #homeList,
body.hm2 #extraCards {
  display: none !important;
}
#h2A,
#h2B {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 12px;
  min-width: 0;
  max-width: 100%;
}
#h2A > *,
#h2B > * {
  min-width: 0;
}
#home {
  min-width: 0;
}
.h2T {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 10px 12px;
  color: var(--fg);
  text-decoration: none;
}
.h2T .ic {
  font-size: 1.15rem;
}
.h2T b {
  font-size: 0.9rem;
}
.h2T .dots {
  display: flex;
  gap: 5px;
}
.h2T .dots i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  font-style: normal;
  border: 2px solid var(--line);
  color: #fff;
}
.h2T .dots i.ok {
  background: var(--c-green-bright);
  border-color: var(--c-green-bright);
}
.chapter-badge {
  font-size: 0.74rem;
  background: rgba(255, 209, 102, 0.25);
  color: var(--c-gold-5);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  font-weight: 700;
}
.chapter-badge.ok {
  background: rgba(43, 182, 115, 0.15);
  color: #1e9e63;
}
:root[data-theme="dark"] .chapter-badge {
  color: var(--c-gold);
}
.h2T .ar {
  margin-inline-start: auto;
  color: var(--muted);
}
.h2W {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 12px;
}
.h2W .h {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 2px;
}
.h2W .h span {
  margin-inline-start: auto;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
}
.h2W .wl {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: none !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0;
  padding: 9px 0;
  color: var(--fg) !important;
  box-shadow: none;
  font-size: 0.88rem;
}
.h2W .wl:first-of-type {
  border-top: 0 !important;
}
.h2W .wl .c {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.74rem;
  border: 2px solid var(--line);
  flex: none;
  color: #fff;
}
.h2W .wl.ok .c {
  background: var(--c-green-bright);
  border-color: var(--c-green-bright);
}
.h2W .wl.ok b {
  opacity: 0.65;
}
.h2W .wl b {
  font-weight: 600;
}
.h2W .wl em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.72rem;
  color: var(--muted);
}
.h2W .wl em.due {
  color: #dc2626;
  font-weight: 700;
}
.ql {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ql a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 9px 2px;
  text-align: center;
  font-size: 0.72rem;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
}
.ql i {
  font-style: normal;
  display: block;
  font-size: 1.3rem;
  margin-bottom: 2px;
}
.rank-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(90deg, #fff4d6, var(--card));
  border: 1px solid rgba(233, 195, 90, 0.45);
  border-radius: var(--r-xl);
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--fg);
  text-decoration: none;
}
:root[data-theme="dark"] .rank-link {
  background: linear-gradient(90deg, #2e2812, var(--card));
}
.rank-link b {
  color: var(--c-gold-5);
}
:root[data-theme="dark"] .rank-link b {
  color: var(--c-gold);
}
.rank-link span {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 700;
}
.sh2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  margin-top: 4px;
}
.sh2 span {
  margin-inline-start: auto;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
}
.car {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  margin: 0 -16px;
  padding: 3px 16px 6px;
  scrollbar-width: none;
}
.car::-webkit-scrollbar {
  display: none;
}
.cv {
  flex: none;
  width: min(250px, 72vw);
  height: 140px;
  border-radius: 20px;
  color: #fff !important;
  padding: 13px;
  position: relative;
  overflow: hidden;
  scroll-snap-align: center;
  text-align: right;
  border: 0 !important;
  display: block;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}
.cv .big {
  position: absolute;
  left: -6px;
  bottom: -14px;
  font-size: 5.4rem;
  line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.25));
}
.cv small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.9;
}
.cv b {
  display: block;
  font-size: 1rem;
  margin-top: 3px;
  width: 66%;
  line-height: 1.4;
  color: #fff;
}
.cv .pg {
  position: absolute;
  bottom: 11px;
  right: 13px;
  font-size: 0.72rem;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--r-pill);
  padding: 3px 10px;
}
.cv.sel {
  outline: 3px solid var(--c-gold);
  outline-offset: -3px;
}
.cv.lk {
  filter: grayscale(0.75);
  opacity: 0.6;
}
.cdots {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: -4px;
}
.cdots i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: width 0.2s;
}
.cdots i.on {
  width: 18px;
  background: var(--accent);
}
.cdots i.ok {
  background: var(--c-green-bright);
}
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lc {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  text-align: right;
  background: var(--card) !important;
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 10px;
  color: var(--fg) !important;
  box-shadow: none;
}
.lc .th {
  width: 66px;
  height: 50px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: #fff;
  flex: none;
  position: relative;
}
.lc .th em {
  position: absolute;
  bottom: 3px;
  left: 4px;
  font-style: normal;
  font-size: 0.55rem;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 5px;
  padding: 0 4px;
}
.lc .tx {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.lc b {
  font-size: 0.9rem;
}
.lc small {
  font-size: 0.74rem;
  color: var(--muted);
}
.lc .r {
  margin-inline-start: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.lc .r.okc {
  color: #1e9e63;
}
.lpb {
  height: 5px;
  background: var(--line);
  border-radius: 4px;
  margin-top: 5px;
  overflow: hidden;
  width: 110px;
}
.lpb i {
  display: block;
  height: 100%;
  background: var(--c-gold);
}
.lc.cur {
  border: 2px solid var(--accent);
}
.lc.lk {
  opacity: 0.5;
}
.lc.exm {
  border: 1.5px dashed #e9c35a;
}
.final-exam-card {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: transparent !important;
  border: 1.5px dashed #e9c35a;
  border-radius: var(--r-2xl);
  padding: 12px;
  color: var(--fg) !important;
  box-shadow: none;
  font-size: 1.2rem;
}
.final-exam-card span {
  display: flex;
  flex-direction: column;
}
.final-exam-card b {
  font-size: 0.9rem;
}
.final-exam-card small {
  font-size: 0.72rem;
  color: var(--muted);
}
.final-exam-card.lk {
  opacity: 0.6;
}
.beta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.beta-row div {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.beta-row small {
  color: var(--muted);
  font-size: 0.75rem;
}
.beta-row > b {
  flex: 1;
}
#h2B .car .cv,
#h2B .car .cv:hover,
#h2B .car .cv:active,
#h2B .car .cv:focus {
  background: var(--g) !important;
  transform: none;
}
#h2B .car .cv {
  -webkit-tap-highlight-color: transparent;
  transition:
    outline-color 0.2s,
    box-shadow 0.2s;
}
#h2B .car .cv:focus-visible {
  outline: 3px solid var(--c-gold);
}
#h2B .lesson-list {
  animation: lsIn 0.25s ease-out;
}
@keyframes lsIn {
  from {
    opacity: 0.4;
    transform: translateY(4px);
  }
}
.chapter-star {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.12em;
}
.cv .big .chapter-star {
  width: 0.95em;
  height: 0.95em;
}
/* lesson v2 */
#sStart.lp > #sTitle,
#sStart.lp > #sMeta,
#sStart.lp > #sWho {
  display: none !important;
}
#sStart.lp {
  padding-top: 0;
  overflow: hidden;
}
.lesson-end-cover {
  background: var(--g);
  color: #fff;
  margin: -18px -18px 14px;
  padding: 18px 18px 22px;
  position: relative;
  overflow: hidden;
  min-height: 150px;
}
.lesson-end-cover small {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
}
.lesson-end-cover h2 {
  color: #fff;
  font-family: "Alexandria", inherit;
  font-size: 1.55rem;
  margin: 4px 0 10px;
  width: 72%;
  line-height: 1.35;
}
.lesson-end-chapter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
  width: 78%;
}
.lesson-end-chapter span {
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--r-pill);
  padding: 3px 10px;
  font-size: 0.72rem;
}
.lesson-end-icon {
  position: absolute;
  left: -10px;
  bottom: -22px;
  font-size: 7rem;
  line-height: 1;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}
.lesson-end-box {
  background: var(--accent-2);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-bottom: 10px;
}
.lesson-end-box b {
  font-size: 0.9rem;
}
.lesson-end-box ul {
  margin: 6px 0 0;
  padding: 0 18px 0 0;
  font-size: 0.85rem;
  line-height: 1.9;
}
.lesson-end-parts {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lesson-end-parts .pt {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}
.lesson-end-parts .pt i {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--card);
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
}
.lesson-end-parts em {
  margin-inline-start: auto;
  font-style: normal;
  font-size: 0.75rem;
  color: var(--muted);
}
#sStart.lp #sGo {
  width: 100%;
  padding: 14px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: var(--r-xl);
  box-shadow: 0 6px 16px rgba(19, 102, 78, 0.3);
}
#sStart.lp .row {
  flex-direction: column;
  align-items: stretch;
}
.lpSubT {
  text-align: center;
  font-size: 0.75rem;
  margin: 6px 0 0;
}
#lpTop {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 8px;
  font-size: 0.9rem;
}
#lpTop span {
  margin-inline-start: auto;
  font-size: 0.75rem;
  color: var(--muted);
  background: var(--accent-2);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}
#prog {
  gap: 4px;
}
#prog span {
  height: 7px;
  border-radius: 4px;
}
.lesson-quiz {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.lesson-quiz-head {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.lesson-quiz-head b {
  color: var(--fg);
  font-size: 0.88rem;
}
.lesson-quiz-dots {
  margin-inline-start: auto;
  display: flex;
}
.lesson-quiz-dots i {
  height: 5px;
  background: var(--line);
}
.lesson-quiz-dots i.ok {
  background: var(--c-green-bright);
}
.lesson-quiz-dots i.no {
  background: #dc2626;
}
.lesson-quiz-dots i.now {
  background: var(--accent);
}
.lesson-quiz-question {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.7;
  margin: 2px 0;
}
.lesson-quiz-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.lesson-quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: var(--card) !important;
  color: var(--fg) !important;
  border: 2px solid var(--line) !important;
  border-radius: var(--r-lg);
  padding: 12px;
  font-size: 0.95rem;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.lesson-quiz-option .k {
  width: 28px;
  height: 28px;
  border-radius: var(--r-xs);
  background: var(--accent-2);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex: none;
}
.lesson-quiz-option.ok .k {
  background: var(--c-green-bright);
  color: #fff;
}
.lesson-quiz-option.no .k {
  background: #dc2626;
  color: #fff;
}
.lesson-quiz-option:disabled {
  opacity: 1;
  cursor: default;
}
.lesson-quiz-option.gone {
  opacity: 0.35 !important;
  text-decoration: line-through;
}
:root[data-theme="dark"] .lesson-quiz-option.ok {
  background: #0f3b27 !important;
}
:root[data-theme="dark"] .lesson-quiz-option.no {
  background: #3b1414 !important;
}
.lesson-quiz-feedback {
  border-radius: var(--r-lg);
  padding: 10px 12px;
  font-size: 0.88rem;
  line-height: 1.7;
}
.lesson-quiz-feedback b:first-child {
  display: block;
}
.lesson-quiz-feedback.g {
  background: #ecfdf3;
  color: #14532d;
}
.lesson-quiz-feedback.b {
  background: #fef2f2;
  color: #7f1d1d;
}
:root[data-theme="dark"] .lesson-quiz-feedback.g {
  background: #0f3b27;
  color: #bbf7d0;
}
:root[data-theme="dark"] .lesson-quiz-feedback.b {
  background: #3b1414;
  color: #fecaca;
}
.lesson-quiz-next {
  width: 100%;
  margin-top: 8px;
  padding: 13px;
  border-radius: var(--r-lg);
  font-weight: 800;
}
.lesson-quiz-hint {
  align-self: flex-start;
}
.lesson-quiz-result {
  text-align: center;
  padding: 16px 8px;
}
.lesson-quiz-result h3 {
  margin: 8px 0 4px;
}
.lesson-quiz-result p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}
.lesson-quiz-ring {
  width: 96px;
  height: 96px;
  margin: auto;
  border-radius: 50%;
  background: conic-gradient(var(--c-green-bright) calc(var(--p) * 1%), var(--line) 0);
  display: grid;
  place-items: center;
  position: relative;
}
.lesson-quiz-result.b .lesson-quiz-ring {
  background: conic-gradient(#f59e0b calc(var(--p) * 1%), var(--line) 0);
}
.lesson-quiz-ring:after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--card);
}
.lesson-quiz-ring b {
  position: relative;
  z-index: 1;
  font-size: 1.3rem;
}
#lpEnd {
  margin: -18px -18px 16px;
}
.lesson-end-inner {
  background: linear-gradient(170deg, var(--c-green-4), #083226);
  color: #fff;
  padding: 22px 16px;
  text-align: center;
  border-radius: var(--r-2xl);
  position: relative;
  overflow: hidden;
}
.lesson-end-inner:before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--c-gold) 2px, transparent 2px), radial-gradient(#7fe0b5 2px, transparent 2px),
    radial-gradient(#f472b6 2px, transparent 2px);
  background-size:
    50px 60px,
    70px 45px,
    60px 80px;
  background-position:
    0 0,
    20px 30px,
    40px 10px;
  opacity: 0.45;
  pointer-events: none;
}
.lesson-end-inner > * {
  position: relative;
}
.lesson-end-inner small {
  color: var(--c-line-2);
}
.lesson-end-ring {
  width: 150px;
  height: 150px;
  margin: 12px auto 4px;
  border-radius: 50%;
  background: conic-gradient(var(--c-gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.15) 0);
  display: grid;
  place-items: center;
}
.lesson-end-ring > div {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: #0b3f30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.lesson-end-ring b {
  font-family: "Alexandria", inherit;
  font-size: 2.2rem;
  color: var(--c-gold);
  line-height: 1.1;
}
.lesson-end-ring span {
  font-size: 0.72rem;
  color: var(--c-line-2);
}
.lesson-end-stars {
  font-size: 1.7rem;
  letter-spacing: 4px;
}
.lesson-end-stars span {
  color: rgba(255, 255, 255, 0.35);
}
.lesson-end-inner h2 {
  color: #fff;
  font-family: "Alexandria", inherit;
  margin: 6px 0 2px;
  font-size: 1.5rem;
}
.lesson-end-inner p {
  margin: 0;
  color: var(--c-line-2);
  font-size: 0.85rem;
}
.lesson-end-stats {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}
.lesson-end-stats div {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 8px 4px;
  font-size: 0.72rem;
  color: var(--c-line-2);
}
.lesson-end-stats b {
  display: block;
  font-size: 1.05rem;
  color: #fff;
}
.lesson-end-gain {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  padding: 10px;
  font-size: 0.82rem;
  display: flex;
  gap: 8px;
  text-align: right;
  align-items: center;
}
.lesson-end-gain b {
  color: var(--c-gold);
}
.lesson-end-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.lesson-end-buttons button,
.lesson-end-buttons a {
  width: 100%;
  border-radius: var(--r-lg);
  padding: 12px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  text-align: center;
  text-decoration: none;
}
.lesson-end-buttons .a {
  background: var(--c-gold) !important;
  color: var(--c-brown-3);
  border: 0;
}
#sCert.lpDone #certPaper {
  display: none;
}
#sCert.lpDone.lpShowCert #certPaper {
  display: block;
}
/* progress v2 */
.profile-hero {
  background: linear-gradient(135deg, var(--c-green-4), #0b3f30);
  color: #fff;
  border-radius: 20px;
  padding: 14px;
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
}
.profile-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: conic-gradient(var(--c-gold) calc(var(--p) * 1%), rgba(255, 255, 255, 0.15) 0);
  display: grid;
  place-items: center;
  flex: none;
}
.profile-ring > div {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #0b3f30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.profile-ring b {
  font-family: "Alexandria", inherit;
  color: var(--c-gold);
  font-size: 1.35rem;
  line-height: 1.1;
}
.profile-ring span {
  font-size: 0.72rem;
  color: var(--c-line-2);
}
.profile-info {
  flex: 1;
  min-width: 0;
}
.profile-info h2 {
  color: #fff;
  margin: 0;
  font-size: 1rem;
}
.profile-info p {
  margin: 2px 0 8px;
  font-size: 0.75rem;
  color: var(--c-gold);
}
.profile-mini {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.profile-mini div {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--r-sm);
  padding: 4px 8px;
  font-size: 0.72rem;
  color: var(--c-line-2);
}
.profile-mini b {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}
.profile-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 4px;
  margin-bottom: 10px;
}
.profile-tabs button {
  background: none !important;
  color: var(--fg) !important;
  border: 0 !important;
  box-shadow: none;
  border-radius: var(--r-sm);
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
.profile-tabs button.on {
  color: #fff !important;
}
.profile-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 12px;
  margin-bottom: 10px;
}
.profile-card h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.profile-card h4 span {
  margin-inline-start: auto;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
}
.profile-week {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 74px;
}
.profile-week div {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: var(--muted);
}
.profile-week i {
  display: block;
  border-radius: 6px 6px 0 0;
  background: var(--c-green-bright);
  margin-bottom: 3px;
}
.profile-week .t i {
  background: var(--c-gold);
}
.profile-week .t {
  color: var(--fg);
  font-weight: 700;
}
.profile-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: none !important;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0;
  padding: 8px 0;
  color: var(--fg) !important;
  box-shadow: none;
}
.profile-stat:first-of-type {
  border-top: 0 !important;
}
.profile-stat i {
  font-style: normal;
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--accent-2);
  display: grid;
  place-items: center;
  flex: none;
}
.profile-stat span {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}
.profile-stat b {
  font-size: 0.85rem;
}
.profile-stat small {
  font-size: 0.74rem;
  color: var(--muted);
}
.profile-stat em {
  font-style: normal;
  color: var(--accent);
  font-weight: 700;
}
.profile-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.profile-compare div {
  background: var(--accent-2);
  border-radius: var(--r-md);
  padding: 8px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--muted);
}
.profile-compare b {
  display: block;
  font-size: 1.05rem;
  color: var(--fg);
}
.profile-trend {
  color: #16a34a;
  font-weight: 700;
  font-size: 0.8rem;
  text-align: center;
  margin: 8px 0 0;
}
.profile-trend.dn {
  color: #dc2626;
}
.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.profile-actions > * {
  background: var(--card) !important;
  border: 1px solid var(--line) !important;
  color: var(--fg) !important;
  border-radius: var(--r-lg);
  padding: 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.profile-actions i {
  font-style: normal;
  font-size: 1.3rem;
}
.profile-actions .dis {
  opacity: 0.6;
}
.profile-actions small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}
.profile-chapter {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: right;
  background: none !important;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 0;
  color: var(--fg);
  box-shadow: none;
}
.profile-chapter:first-child {
  border-top: 0;
}
.profile-chapter .e {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex: none;
}
.profile-chapter .bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.profile-chapter .bar b {
  font-size: 0.85rem;
}
.profile-chapter .pb {
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.profile-chapter .pb i {
  display: block;
  height: 100%;
  background: var(--c-green-bright);
}
.profile-chapter em {
  font-style: normal;
  font-size: 0.74rem;
  color: var(--muted);
  text-align: end;
  white-space: nowrap;
}
.profile-chapter.lk {
  opacity: 0.5;
}
.profile-next {
  display: flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(135deg, #fff4d6, var(--card));
  border: 1px solid rgba(233, 195, 90, 0.45);
  border-radius: var(--r-xl);
  padding: 10px 12px;
  margin-bottom: 10px;
}
:root[data-theme="dark"] .profile-next {
  background: linear-gradient(135deg, #2e2812, var(--card));
}
.profile-next > i {
  font-style: normal;
  font-size: 1.8rem;
}
.profile-next div {
  display: flex;
  flex-direction: column;
}
.profile-next b {
  font-size: 0.88rem;
}
.profile-next span {
  font-size: 0.75rem;
  color: var(--muted);
}
.profile-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.profile-badges .bd {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  text-align: center;
  font-size: 0.74rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.profile-badges .bd > i {
  font-style: normal;
  font-size: 1.7rem;
}
.profile-badges .bd b {
  font-size: 0.72rem;
}
.profile-badges .bd small {
  color: #1e9e63;
  font-weight: 700;
}
.profile-badges .bd.on {
  border-color: #e9c35a;
  background: linear-gradient(#fff8e1, var(--card));
  box-shadow: 0 4px 12px rgba(233, 195, 90, 0.2);
}
:root[data-theme="dark"] .profile-badges .bd.on {
  background: linear-gradient(#2e2812, var(--card));
}
.profile-badges .bd.off > i {
  filter: grayscale(1);
  opacity: 0.55;
}
.profile-badges .bd.off b {
  color: var(--muted);
}
.profile-badges .pb {
  width: 80%;
  height: 4px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 3px;
  display: block;
}
.profile-badges .pb i {
  display: block;
  height: 100%;
  background: var(--accent);
}
.profile-badges .pb,
.profile-chapter .pb {
  display: flex !important;
  justify-content: flex-start;
}
#sMain #segLabel {
  display: none;
}
.h2W .wl.ip .c {
  background: var(--c-gold);
  border-color: var(--c-gold);
  color: var(--c-brown-3);
}
.h2W .wl.ip em {
  color: var(--accent);
  font-weight: 700;
}
.lpb {
  display: flex !important;
  justify-content: flex-start;
}
/* ===== desktop layout (>=1100px) ===== */
.dNav {
  display: none;
}
@media (min-width: 1100px) {
  :root {
    --sideW: 250px;
  }
  body.dsk .brand {
    padding: 22px 16px;
    gap: 6px;
    overflow-y: auto;
  }
  body.dsk .brand .blogo {
    width: 96px;
    margin-bottom: 4px;
  }
  body.dsk .brand h1 {
    font-size: 1.5rem;
  }
  body.dsk .brand .bs,
  body.dsk .brand .bk,
  body.dsk .brand .dna,
  body.dsk .brand .bmeta {
    display: none !important;
  }
  body.dsk .dNav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 10px 0;
  }
  body.dsk .dNav a {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 9px 12px;
    border-radius: var(--r-md);
    color: #e9f3ee;
    text-decoration: none;
    opacity: 0.85;
    font-size: 0.95rem;
  }
  body.dsk .dNav a:hover {
    background: rgba(255, 255, 255, 0.08);
    opacity: 1;
  }
  body.dsk .dNav a.on {
    background: rgba(255, 255, 255, 0.16);
    opacity: 1;
    font-weight: 700;
  }
  body.dsk .dNav i {
    font-style: normal;
    width: 22px;
    text-align: center;
  }
  body.dsk #bNav {
    display: none !important;
  }
  body.dsk > div.wrap {
    max-width: 1320px;
  }
  body.dsk #home.wrap,
  body.dsk #xv.wrap {
    max-width: none;
  }
  body.dsk.hm2 #home {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
    column-gap: 22px;
  }
  body.dsk.hm2 #home > * {
    grid-column: 1;
  }
  body.dsk.hm2 #home > #h2A {
    grid-column: 2;
    grid-row: 1 / span 30;
    position: sticky;
    top: 20px;
    display: grid;
    gap: 14px;
  }
  body.dsk.hm2 #h2B .car {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    overflow: visible !important;
    padding: 0 !important;
    scroll-snap-type: none;
  }
  body.dsk.hm2 #h2B .car .cv {
    width: auto !important;
    min-width: 0;
    margin: 0;
    transform: none !important;
    opacity: 1;
    min-height: 150px;
  }
  body.dsk.hm2 #h2B .car .cv.lk {
    opacity: 0.5;
  }
  body.dsk.hm2 #h2B .car .cv b {
    font-size: 1rem;
    line-height: 1.35;
  }
  body.dsk.hm2 #h2B .car .cv .big {
    transform: scale(0.75);
    transform-origin: bottom left;
  }
  body.dsk.hm2 #h2B .cdots {
    display: none;
  }
  body.dsk.hm2 #h2B .lesson-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  body.dsk.hm2 #h2B .lesson-list .lc {
    margin: 0;
  }
  body.dsk #student.wrap {
    max-width: 1400px;
  }
  body.dsk #sMain:not([hidden]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 8px 20px;
    align-items: start;
  }
  body.dsk #sMain > * {
    grid-column: 1;
  }
  body.dsk #sMain:has(> #quiz[hidden]):not(:has(> #dgIv)) {
    grid-template-columns: minmax(0, 1fr);
  }
  body.dsk #sMain > #quiz,
  body.dsk #sMain > #dgIv,
  body.dsk #sMain > #dgEarly {
    grid-column: 2;
  }
  body.dsk #sMain > #quiz {
    grid-row: 1 / span 12;
    max-height: calc(100dvh - 60px);
    overflow: auto;
    position: sticky;
    top: 20px;
  }
  body.dsk #sMain .video {
    width: 100%;
    max-width: calc((100dvh - 230px) * 16 / 9);
    margin-inline: auto;
  }
  body.dsk #sStart.lp {
    max-width: 1000px;
    margin: auto;
    width: 100%;
  }
  body.dsk #sMain > #quiz {
    margin: 0;
    max-width: none;
    width: 100%;
    align-content: start;
  }
  body.dsk #back {
    justify-self: start;
    width: auto;
    padding-inline: 22px;
  }
}
.ql a.trn {
  background: linear-gradient(135deg, var(--c-gold-2), #e9a90f) !important;
  color: var(--c-brown-ink);
  font-weight: 800;
}
.league-pitch {
  background: repeating-linear-gradient(0deg, #2f8f4e 0 38px, #2a8547 38px 76px);
  border-radius: var(--r-2xl);
  padding: 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 2px solid #ffffff55;
  margin: 10px 0;
}
.league-pitch-row {
  display: flex;
  justify-content: space-around;
}
.league-points {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 58px;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-shadow: 0 1px 2px #0009;
}
.league-points i {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: var(--c-green-deep);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 800;
  border: 2px solid var(--c-gold-2);
  position: relative;
}
.league-points.c i:after {
  content: "C";
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--c-gold-2);
  color: var(--c-brown-ink);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.72rem;
  display: grid;
  place-items: center;
}
.league-points.z i {
  border-color: var(--c-red);
  opacity: 0.65;
}
.league-points.lgMe i {
  box-shadow: 0 0 0 3px #fff;
}
.league-tabs:has(> button:nth-child(3)) {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
}
.league-points.e i {
  background: #ffffff44;
  color: #fff;
  border-style: dashed;
}
.league-points small {
  background: #0006;
  border-radius: 6px;
  padding: 0 4px;
  margin-top: 2px;
}
.league-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  margin: 10px 0;
}
.league-kpis div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 8px;
}
.league-kpis b {
  display: block;
  font-size: 1.3rem;
}
.league-kpis small {
  color: var(--muted);
}
.league-event {
  display: flex;
  gap: 6px;
  align-items: baseline;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  flex-wrap: wrap;
}
.league-event .m {
  color: var(--muted);
  font-size: 0.75rem;
  min-width: 52px;
}
.league-bench {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.league-bench span {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 4px 9px;
  font-size: 0.8rem;
}
.league-captain-box {
  background: var(--card);
  border: 2px solid var(--c-gold-2);
  border-radius: var(--r-lg);
  padding: 12px;
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.league-pick {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
}
.league-pick button {
  margin-inline-start: auto;
}
.league-v2 {
  margin-top: 12px;
  border: 2px dashed #2f8f4e;
  border-radius: var(--r-md);
  padding: 10px;
}
.tahsili-hero {
  background: linear-gradient(135deg, #1f8a5b, var(--c-green-deep));
  color: #fff;
  border-radius: var(--r-2xl);
  padding: 18px;
  display: grid;
  gap: 6px;
}
.tahsili-hero h2 {
  margin: 0;
}
.tahsili-hero p {
  margin: 0;
  opacity: 0.9;
}
.tahsili-hero small {
  opacity: 0.85;
}
.tahsili-hero button {
  background: var(--c-gold-2);
  color: var(--c-brown-ink);
  border: 0;
  border-radius: var(--r-md);
  padding: 12px;
  font-weight: 800;
  margin-top: 6px;
  cursor: pointer;
}
.lesson-quiz-explain {
  display: block;
  margin-top: 6px;
  line-height: 1.8;
  opacity: 0.9;
}
body.t3 #h2A,
body.t3 #contCard,
body.t3 #srchBox,
body.t3 .bNav a[href="#chat"] {
  display: none !important;
}
.tahsili-hero h2 {
  color: #fff;
}
.mock-exam-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  text-align: center;
  margin: 10px 0;
}
.mock-exam-rules div {
  border-radius: var(--r-md);
  padding: 10px;
}
.mock-exam-rules b {
  display: block;
  font-size: 1.2rem;
}
.mock-exam-rules span {
  font-size: 0.75rem;
}
.mock-exam-intro ul {
  line-height: 2;
  padding-inline-start: 18px;
}
.mock-exam-clock {
  font-weight: 800;
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}
.mock-exam-nav {
  justify-content: space-between;
}
.mock-exam-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 5px;
  margin: 12px 0;
}
.mock-exam-grid button {
  all: unset;
  cursor: pointer;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: 6px 0;
  font-size: 0.8rem;
  background: var(--card);
}
.mock-exam-result {
  text-align: center;
}
.mock-exam-result .lesson-quiz-ring {
  margin: 10px auto;
}
.mock-exam-history {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60px;
  justify-content: center;
  margin-top: 8px;
}
.mock-exam-history i {
  width: 14px;
  background: #1f8a5b;
  border-radius: 4px 4px 0 0;
}
.mock-exam-review-q.g {
  border-inline-start: 4px solid var(--c-green-mid);
}
.mock-exam-review-q.b {
  border-inline-start: 4px solid var(--c-red);
}
.mock-exam-review-q p {
  margin: 6px 0;
}
@media (max-width: 420px) {
  .mock-exam-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}
.tPred {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--r-lg);
  padding: 10px 12px;
  display: grid;
  gap: 2px;
}
.tPred b {
  font-size: 1.8rem;
  line-height: 1.1;
}
.tPred span,
.tPred small {
  font-size: 0.8rem;
  opacity: 0.9;
}
.tPred.off {
  font-size: 0.85rem;
  opacity: 0.85;
}
.mock-exam-result .tPred {
  background: var(--soft, #eef4f0);
  color: var(--fg, inherit);
  margin: 10px 0;
  text-align: center;
}
.lesson-quiz-option.strk span:last-child {
  text-decoration: line-through;
  opacity: 0.45;
}
.lesson-quiz-option.strk {
  border-style: dashed;
}
.lesson-quiz-option.sel {
  background: rgba(31, 138, 91, 0.16) !important;
  border-color: #1f8a5b !important;
}
.lesson-quiz-why {
  margin-top: 6px;
  font-size: 0.88rem;
  line-height: 1.9;
}
.lesson-quiz-why summary {
  cursor: pointer;
  font-weight: 700;
}
#lqSim {
  margin-top: 8px;
}
.tahsili-sim {
  margin-top: 10px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}
.tahsili-summary ul {
  line-height: 2.1;
  padding-inline-start: 20px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.t3 .lesson-quiz-option {
    color: inherit;
  }
}
body.t3 #instTip {
  display: none !important;
}
body.t3.inner #bMe .t3Pred {
  display: none;
}
body.t3 .lesson-quiz-explain {
  font-size: 0.95rem;
}
body.t3 .lesson-quiz-why {
  font-size: 0.93rem;
}
.t3Hd {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}
.t3Hd b {
  display: block;
  font-size: 1.1rem;
}
.t3Hd small {
  color: #d6eadf;
}
.t3Hd .bottom-menu-avatar {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin-inline-end: 6px;
  width: 48px;
  height: 48px;
  flex: none;
}
.t3Pred {
  margin-top: 12px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: var(--r-xl);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.t3Pred b {
  display: block;
}
.t3Pred small {
  color: #d6eadf;
  line-height: 1.6;
}
.t3Rg {
  --p: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--c-gold-2) calc(var(--p) * 1%), rgba(255, 255, 255, 0.18) 0);
  display: grid;
  place-items: center;
  flex: none;
}
.t3Rg span {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #123a2c;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff;
  font-size: 0.95rem;
}
.card .t3Pred,
.xv .t3Pred {
  background: var(--c-green-deep);
}
.t3Act {
  display: grid;
  gap: 8px;
}
.t3Cta {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--r-xl);
  padding: 14px;
  font-weight: 800;
  font-size: 1.05rem;
  background: var(--c-gold-2);
  color: #2a2100;
  text-align: center;
  cursor: pointer;
}
.t3Cta small {
  display: block;
  font-weight: 500;
  font-size: 0.8rem;
  margin-top: 2px;
  opacity: 0.85;
}
.t3Cta.g {
  background: #1f8a5b;
  color: #fff;
}
.t3U {
  display: grid;
  gap: 8px;
}
.t3U button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 10px;
  color: var(--fg);
}
.t3U .ic {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #1f8a5b, var(--c-green-deep));
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex: none;
}
.t3U .tx {
  flex: 1;
  min-width: 0;
}
.t3U b {
  display: block;
}
.t3U small {
  color: var(--muted);
}
.t3U .pb {
  display: block;
  height: 6px;
  background: var(--line);
  border-radius: 4px;
  margin-top: 6px;
  overflow: hidden;
}
.t3U .pb i {
  display: block;
  height: 100%;
  background: var(--c-green-bright);
}
.t3U em {
  font-style: normal;
  font-weight: 800;
  color: #1f8a5b;
}
.t3Ch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.t3Ch a {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 9px 12px;
  text-decoration: none;
  color: var(--fg);
  font-size: 0.92rem;
}
body.t3 #h2B .sh2 {
  display: flex;
  justify-content: space-between;
  margin: 16px 2px 8px;
}
.mock-exam-rules div {
  background: var(--card) !important;
  border: 1px solid var(--line);
}
.mock-exam-rules b {
  color: #c99a2e;
}
.mock-exam-rules span {
  color: var(--fg) !important;
}
body.t3 .lesson-quiz-question {
  font-size: 1.08rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
body.t3 .lesson-quiz-option {
  min-height: 52px;
  font-size: 1rem;
  line-height: 1.55;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}
body.t3 .lesson-quiz-option .k {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex: none;
  background: transparent;
  border: 1.5px solid var(--muted);
  color: var(--fg);
}
body.t3 .lesson-quiz-option.sel {
  border-color: #c99a2e !important;
  background: rgba(245, 197, 66, 0.16) !important;
}
body.t3 .lesson-quiz-option.sel .k {
  background: var(--c-gold-2);
  border-color: var(--c-gold-2);
  color: #2a2100;
}
body.t3 .lesson-quiz-option.strk span:last-child {
  opacity: 0.4;
}
.mock-exam-grid .a {
  background: #1f8a5b !important;
  color: #fff;
}
.mock-exam-grid .f {
  background: var(--c-red) !important;
  color: #fff;
  box-shadow: none;
}
.mock-exam-grid .cur {
  outline: 2px solid var(--c-gold-2);
  outline-offset: 1px;
}
.mock-exam-clock {
  background: var(--c-gold-2);
  color: #2a2100;
  border-radius: var(--r-sm);
  padding: 3px 10px;
}
.mock-exam-clock.low {
  animation: pulse 1s infinite;
  background: var(--c-red);
  color: #fff;
}
body.t3 #xv,
body.t3 .xv {
  max-width: 640px;
  margin-inline: auto;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body.t3 .lesson-quiz-option.ok {
    background: #123f2a !important;
    color: #eafff2 !important;
  }
  :root:not([data-theme="light"]) body.t3 .lesson-quiz-option.no {
    background: #3d1714 !important;
    color: #ffecea !important;
  }
}
:root[data-theme="dark"] body.t3 .lesson-quiz-option.ok {
  background: #123f2a !important;
  color: #eafff2 !important;
}
:root[data-theme="dark"] body.t3 .lesson-quiz-option.no {
  background: #3d1714 !important;
  color: #ffecea !important;
}
html.t3pre:not(.t3ok) #home > * {
  display: none !important;
}
html.t3pre:not(.t3ok) #home::before {
  content: "";
  display: block;
  height: 430px;
  border-radius: var(--r-xl);
  background:
    linear-gradient(var(--bg), var(--bg)) 0 76px/100% 10px no-repeat,
    linear-gradient(var(--bg), var(--bg)) 0 152px/100% 26px no-repeat,
    linear-gradient(90deg, var(--line) 0, var(--card) 40%, var(--line) 80%) 0 0/200% 100%;
  animation: skel 1.2s linear infinite;
  opacity: 0.7;
}
@keyframes skel {
  to {
    background-position:
      0 76px,
      0 152px,
      -200% 0;
  }
}
html.t3pre #h2A,
html.t3pre #contCard,
html.t3pre #srchBox,
html.t3pre .bNav a[href="#chat"],
html.t3pre .bNav a[href="#games"],
html.t3pre #instTip {
  display: none !important;
}
.t3AccR {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.t3AccR span {
  color: var(--muted);
  min-width: 80px;
}
.t3AccR b {
  flex: 1;
}
.tahsili-unit-label {
  display: block;
  margin: 10px 0 6px;
  font-size: 0.9rem;
}
.challenge-options button.on {
  background: #1f8a5b !important;
  color: #fff !important;
  border-color: #1f8a5b !important;
}
.t3R h3 {
  margin: 20px 0 8px;
  font-size: 1.02rem;
}
.t3K {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.t3K div {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px 4px;
  text-align: center;
}
.t3K b {
  display: block;
  font-size: 1.3rem;
  color: #c99a2e;
}
.t3K small {
  color: var(--fg);
}
.t3BA {
  display: flex;
  align-items: center;
  gap: 8px;
}
.t3BA > div {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
  text-align: center;
}
.t3BA small {
  display: block;
  color: var(--muted);
}
.t3BA b {
  display: block;
  font-size: 1.6rem;
}
.t3BA span {
  font-size: 0.75rem;
  color: var(--muted);
}
.t3BA > i {
  font-style: normal;
  font-size: 1.3rem;
  color: var(--muted);
}
em.up {
  color: var(--c-green-mid);
  font-style: normal;
  font-weight: 800;
  margin-inline-start: 4px;
  font-size: 0.85rem;
}
em.dn {
  color: var(--c-red);
  font-style: normal;
  font-weight: 800;
  margin-inline-start: 4px;
  font-size: 0.85rem;
}
.t3R .mock-exam-history {
  height: 90px;
  margin-top: 12px;
}
.t3R .mock-exam-history i {
  position: relative;
  width: 20px;
}
.t3R .mock-exam-history s {
  position: absolute;
  top: -16px;
  inset-inline: 0;
  text-align: center;
  font-size: 0.72rem;
  text-decoration: none;
  color: var(--muted);
}
.t3Rec {
  display: grid;
  gap: 8px;
}
.t3Rec button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--c-gold-2);
  border-radius: var(--r-md);
  padding: 10px;
  color: var(--fg);
  line-height: 1.6;
  font-size: 0.93rem;
}
.t3Rec i {
  font-style: normal;
  font-size: 1.2rem;
}
.t3Rec span {
  flex: 1;
}
.t3Rec b {
  color: var(--muted);
}
.t3T {
  display: grid;
  gap: 10px;
}
.t3T > div {
  display: grid;
  grid-template-columns: 1fr 70px auto auto;
  gap: 8px;
  align-items: center;
}
.t3T span b {
  display: block;
  font-size: 0.93rem;
}
.t3T span small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}
.t3T .tr {
  height: 8px;
  background: var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.t3T .tr i {
  display: block;
  height: 100%;
}
.t3T em {
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}
.t3ba2 {
  grid-column: 1/-1;
  margin: -4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.t3T > div:has(.t3ba2) {
  grid-template-columns: 1fr 70px auto;
}
.t3G ol {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}
.t3G li {
  display: flex;
  gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
}
.t3G li i {
  font-style: normal;
  font-size: 1.5rem;
}
.t3G li b {
  display: block;
}
.t3G li span {
  color: var(--muted);
  line-height: 1.7;
  font-size: 0.92rem;
}
.t3G .tip {
  background: rgba(245, 197, 66, 0.14);
  border-radius: var(--r-md);
  padding: 10px;
  margin-bottom: 12px;
  line-height: 1.7;
}
.lesson-quiz-head {
  gap: 10px;
}
.lesson-quiz-head b {
  white-space: nowrap;
  flex: none;
}
.lesson-quiz-dots {
  flex: 1;
  min-width: 0;
  max-width: 260px;
  gap: 1px;
  overflow: hidden;
}
.lesson-quiz-dots i {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  border-radius: 1px;
}

/* ===== Tahsili practice: design A (calm card) ===== */
body.tq:has(#quiz:not([hidden])) #back,
body.tq:has(#quiz:not([hidden])) #lpTop,
body.tq:has(#quiz:not([hidden])) #lpHero ~ *:empty {
  display: none !important;
}
body.tq #student.wrap,
body.tq #student {
  max-width: 1040px;
}
body.tq #sMain {
  background: none !important;
  border: 0;
  box-shadow: none;
  padding: 0 !important;
}
body.tq #quiz {
  padding: 0 !important;
  background: none !important;
  border: 0;
  box-shadow: none;
  margin: 0;
}
.test-quiz {
  display: block;
  --tq-card: var(--card);
  --tq-line: var(--line);
}
.test-quiz-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 10px;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 5;
}
.test-quiz-close {
  all: unset;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  flex: none;
}
.test-quiz-progress {
  flex: 1;
  height: 7px;
  border-radius: 7px;
  background: var(--line);
  overflow: hidden;
}
.test-quiz-progress i {
  display: block;
  height: 100%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--c-green-mid), #5ed39a);
  transition: width 0.3s;
}
.test-quiz-count {
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}
.test-quiz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.test-quiz-meta span {
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 2px 10px;
  color: var(--muted);
  background: var(--card);
}
.test-quiz-meta .d1 {
  color: var(--c-green-mid);
}
.test-quiz-meta .d2 {
  color: #c99a2e;
}
.test-quiz-meta .d3 {
  color: var(--c-red);
}
.test-quiz-meta .sc {
  color: var(--c-green-mid);
  font-weight: 700;
}
.test-quiz-grid {
  display: grid;
  gap: 12px;
}
.test-quiz-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  padding: 16px;
}
.test-quiz-card .lesson-quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.85;
  margin: 0;
}
.test-quiz-figure {
  margin-top: 12px;
  background: #fff;
  border-radius: var(--r-lg);
  padding: 10px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}
.test-quiz-figure img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.test-quiz-side .lesson-quiz-options {
  display: grid;
  gap: 9px;
}
.test-quiz .lesson-quiz-option {
  min-height: 54px;
  border-radius: var(--r-lg) !important;
  border-width: 1.5px !important;
}
.test-quiz .lesson-quiz-option .k {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--line) !important;
  border: 0;
  font-weight: 700;
}
.test-quiz .lesson-quiz-option.ok {
  border-color: var(--c-green-mid) !important;
  background: rgba(31, 157, 99, 0.12) !important;
}
.test-quiz .lesson-quiz-option.ok .k {
  background: var(--c-green-mid) !important;
  color: #fff;
}
.test-quiz .lesson-quiz-option.no {
  border-color: var(--c-red) !important;
  background: rgba(217, 72, 59, 0.1) !important;
}
.test-quiz .lesson-quiz-option.no .k {
  background: var(--c-red) !important;
  color: #fff;
}
.test-quiz-feedback {
  margin-top: 12px;
  border-radius: var(--r-lg);
  padding: 12px 14px;
  line-height: 1.8;
  font-size: 0.95rem;
  border: 1px solid;
}
.test-quiz-feedback.g {
  background: rgba(31, 157, 99, 0.1);
  border-color: rgba(31, 157, 99, 0.35);
}
.test-quiz-feedback.g b {
  color: var(--c-green-mid);
}
.test-quiz-feedback.b {
  background: rgba(217, 72, 59, 0.08);
  border-color: rgba(217, 72, 59, 0.35);
}
.test-quiz-feedback.b b {
  color: var(--c-red);
}
.test-quiz-feedback p {
  margin: 6px 0 0;
}
.test-quiz-feedback .why {
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: 6px;
}
.test-quiz-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: stretch;
}
.test-quiz-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: 1;
  text-align: center;
  border-radius: var(--r-lg);
  padding: 13px;
  font-weight: 700;
  background: var(--c-green-mid);
  color: #fff;
}
.test-quiz-btn.g {
  flex: 0 0 auto;
  background: var(--card);
  color: var(--fg);
  border: 1px solid var(--line);
  padding-inline: 16px;
}
@media (max-width: 1099px) {
  .test-quiz-actions {
    position: sticky;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--bg);
    padding: 8px 0;
    margin-bottom: 4px;
    z-index: 4;
  }
}
@media (min-width: 1100px) {
  .test-quiz.hasfig .test-quiz-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .test-quiz.hasfig .test-quiz-card {
    position: sticky;
    top: 60px;
  }
  .test-quiz.nofig {
    max-width: 760px;
    margin: 0 auto;
  }
  .test-quiz.nofig .test-quiz-side .lesson-quiz-options {
    grid-template-columns: 1fr 1fr;
  }
  .test-quiz .test-quiz-actions .test-quiz-btn {
    flex: 0 0 240px;
  }
  .test-quiz .test-quiz-actions {
    justify-content: flex-start;
  }
}
/* ===== Tahsili mock: design B (exam sheet) ===== */
.mock-exam {
  --sh-paper: #fffdf8;
  --sh-bg: #f4f1ea;
  --sh-line: #ddd6c6;
  --sh-ink: #1d2420;
  --sh-mut: #6b6f66;
  --sh-brand: var(--c-green-3);
  background: var(--sh-bg);
  color: var(--sh-ink);
  border-radius: var(--r-xl);
  margin: -4px 0 0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mock-exam {
    --sh-paper: #1a221e;
    --sh-bg: #121915;
    --sh-line: #2c3a33;
    --sh-ink: #e8efe9;
    --sh-mut: #9fb0a7;
  }
}
:root[data-theme="dark"] .mock-exam {
  --sh-paper: #1a221e;
  --sh-bg: #121915;
  --sh-line: #2c3a33;
  --sh-ink: #e8efe9;
  --sh-mut: #9fb0a7;
}
.mock-exam-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--sh-brand);
  color: #fff;
  padding: 10px 14px;
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 5;
}
.mock-exam-head .t {
  font-weight: 700;
}
.mock-exam-close {
  all: unset;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: var(--r-xs);
  background: rgba(255, 255, 255, 0.15);
  display: grid;
  place-items: center;
}
.mock-exam .mock-exam-clock {
  margin-inline-start: auto;
  background: #f6c445;
  color: #2a1f00;
  border-radius: var(--r-xs);
  padding: 2px 10px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.mock-exam .mock-exam-clock.low {
  background: var(--c-red);
  color: #fff;
}
.mock-exam-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}
.mock-exam-sheet {
  background: var(--sh-paper);
  border: 1px solid var(--sh-line);
  border-radius: var(--r-xs);
  padding: 14px;
}
.mock-exam-number {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.mock-exam-number b {
  background: var(--sh-brand);
  color: #fff;
  border-radius: 6px;
  padding: 0 10px;
}
.mock-exam-number span {
  font-size: 0.8rem;
  color: var(--sh-mut);
}
.mock-exam-flag {
  all: unset;
  cursor: pointer;
  margin-inline-start: auto;
  font-size: 0.8rem;
  border: 1px solid var(--sh-line);
  border-radius: 6px;
  padding: 2px 10px;
  color: var(--sh-mut);
}
.mock-exam-flag.on {
  background: #f6d7cf;
  color: #8a2a1f;
  border-color: #e4a594;
}
.mock-exam .lesson-quiz-question {
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.85;
  margin: 0 0 10px;
  color: var(--sh-ink);
}
.mock-exam-figure {
  border: 1px dashed var(--sh-line);
  border-radius: 6px;
  padding: 8px;
  display: grid;
  place-items: center;
  margin: 0 0 10px;
  background: #fff;
}
.mock-exam-figure img {
  max-width: 100%;
  max-height: 260px;
  object-fit: contain;
}
.mock-exam .lesson-quiz-options {
  display: block !important;
}
.mock-exam .lesson-quiz-option {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  display: flex !important;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 6px !important;
  font-size: 1rem;
  color: var(--sh-ink);
  background: none !important;
  line-height: 1.6;
}
.mock-exam .lesson-quiz-option .k {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #b9b19f;
  background: none !important;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex: none;
  color: var(--sh-mut);
}
.mock-exam .lesson-quiz-option.sel {
  font-weight: 700;
}
.mock-exam .lesson-quiz-option.sel .k {
  background: var(--sh-brand) !important;
  border-color: var(--sh-brand);
  color: #fff;
}
.mock-exam .lesson-quiz-option.strk span:last-child {
  text-decoration: line-through;
  opacity: 0.45;
}
.mock-exam-nav {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.mock-exam-nav-btn {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  flex: 1;
  text-align: center;
  border-radius: var(--r-xs);
  padding: 11px;
  font-weight: 700;
  border: 1px solid var(--sh-line);
  background: var(--sh-paper);
  color: var(--sh-ink);
}
.mock-exam-nav-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.mock-exam-nav-btn.p {
  background: var(--sh-brand);
  color: #fff;
  border-color: var(--sh-brand);
}
.mock-exam-nav-btn.end {
  width: 100%;
  background: #8a2a1f;
  color: #fff;
  border-color: #8a2a1f;
  margin-top: 10px;
}
.mock-exam-side {
  background: var(--sh-paper);
  border: 1px solid var(--sh-line);
  border-radius: var(--r-xs);
  padding: 12px;
}
.mock-exam-side h4 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
}
.mock-exam-side h4 span {
  color: var(--sh-mut);
  font-weight: 500;
}
.mock-exam .mock-exam-grid {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 4px;
  margin: 0;
}
.mock-exam .mock-exam-grid button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  text-align: center;
  font-size: 0.75rem;
  border: 1px solid var(--sh-line);
  border-radius: 5px;
  padding: 5px 0;
  background: var(--sh-bg);
  color: var(--sh-ink);
}
.mock-exam .mock-exam-grid .a {
  background: #cfe5d8 !important;
  border-color: #9cc8ae;
  color: #13311f;
}
.mock-exam .mock-exam-grid .f {
  background: #f6d7cf !important;
  border-color: #e4a594;
  color: #5a1a12;
}
.mock-exam .mock-exam-grid .cur {
  outline: 2px solid var(--sh-brand);
  outline-offset: 1px;
}
.mock-exam-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--sh-mut);
  margin: 8px 0 0;
  flex-wrap: wrap;
}
.mock-exam-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid var(--sh-line);
  display: inline-block;
  background: var(--sh-bg);
}
.mock-exam-legend i.a {
  background: #cfe5d8;
}
.mock-exam-legend i.f {
  background: #f6d7cf;
}
@media (max-width: 420px) {
  .mock-exam .mock-exam-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}
@media (min-width: 1100px) {
  .mock-exam-body {
    grid-template-columns: 1fr 260px;
    align-items: start;
    padding: 16px;
  }
  .mock-exam-side {
    position: sticky;
    top: 70px;
  }
  .mock-exam .mock-exam-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}
.mock-exam-review-q .mock-exam-figure {
  margin: 8px 0;
}
body.tq #sMain:not([hidden]) {
  display: block !important;
}
body.tq #sMain:has(> #quiz:not([hidden])) > *:not(#quiz) {
  display: none !important;
}
body.tq #sMain > #quiz {
  grid-column: auto;
  max-height: none;
  overflow: visible !important;
  position: static !important;
  width: 100% !important;
}
body.tq #student.wrap {
  max-width: 1040px;
  margin-inline: auto;
}
.mock-exam .lesson-quiz-option {
  border: 0;
  border-top: 1px solid var(--sh-line);
  border-radius: 0;
}
.mock-exam .lesson-quiz-option.sel {
  background: rgba(15, 92, 63, 0.08) !important;
}

/* ===== audit fixes ===== */
bdi[dir="ltr"] {
  unicode-bidi: isolate;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.small {
  min-height: 40px;
  padding: 8px 12px;
}
[data-close],
[aria-label="حذف السؤال"] {
  min-width: 44px;
  min-height: 44px;
}
.mock-exam .mock-exam-grid button,
.mock-exam-grid button {
  min-height: 40px;
  display: grid;
  place-items: center;
}
.bNav a {
  padding: 8px 0 !important;
  min-height: 56px;
  font-size: 0.76rem !important;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ok-bg: #123a28;
    --ok-fg: #bff0d6;
    --bad-bg: #3b1a17;
    --bad-fg: #ffd6d1;
    --muted: #9fb2a8;
  }
}
:root[data-theme="dark"] {
  --ok-bg: #123a28;
  --ok-fg: #bff0d6;
  --bad-bg: #3b1a17;
  --bad-fg: #ffd6d1;
  --muted: #9fb2a8;
}
.lesson-quiz-option.ok {
  background: var(--ok-bg) !important;
  border-color: var(--ok-bd) !important;
  color: var(--ok-fg) !important;
}
.lesson-quiz-option.no {
  background: var(--bad-bg) !important;
  border-color: var(--bad-bd) !important;
  color: var(--bad-fg) !important;
}

/* ===== polish pass ===== */
[dir="rtl"] body,
[dir="rtl"] p,
[dir="rtl"] li,
[dir="rtl"] button,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] span:not([class*="Code"]):not([class*="-code"]):not(.heatmap-head span) {
  letter-spacing: 0;
}
h1,
h2,
h3 {
  line-height: 1.4;
}
em {
  font-style: normal;
}
@media (max-width: 767px) {
  input,
  select,
  textarea {
    font-size: max(16px, 1em);
  }
}
#netBar {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 2000;
  background: #7a1d16;
  color: #fff;
  text-align: center;
  font-size: 0.9rem;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 16px 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}
.t3Empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--r-xl);
  padding: 20px;
}
.t3Empty span {
  color: var(--muted);
  font-size: 0.9rem;
}
#siteFt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  justify-content: center;
  align-items: center;
  margin: 32px 0 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted);
}
#siteFt a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
}
.toast {
  max-width: calc(100vw - 32px);
  overflow-wrap: anywhere;
}
.lesson-quiz-question,
.lesson-quiz-option,
.test-quiz-card,
.t3U b,
.lc .tx b {
  overflow-wrap: anywhere;
}
button:not(:disabled):active,
.lesson-quiz-option:not(:disabled):active,
.t3Cta:active,
.test-quiz-btn:active {
  transform: scale(0.98);
}
button,
.lesson-quiz-option,
.t3Cta,
.test-quiz-btn,
.t3U button {
  transition:
    transform 0.15s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.2s,
    border-color 0.2s,
    box-shadow 0.2s;
}
@media (hover: hover) {
  .t3U button:hover,
  .lc:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  }
}
img {
  max-width: 100%;
  height: auto;
}
html.t3pre .dNav a[href="#games"],
html.t3pre .dNav a[href="#cards"],
html.t3pre .dNav a[href="#assist"],
html.t3pre .dNav a[href="#notes"],
html.t3pre .dNav a[href="#chat"],
body.t3 .dNav a[href="#games"],
body.t3 .dNav a[href="#cards"],
body.t3 .dNav a[href="#assist"],
body.t3 .dNav a[href="#notes"],
body.t3 .dNav a[href="#chat"] {
  display: none !important;
}

/* mock exam: use desktop width */
body.t3 #xv:has(.mock-exam),
body.t3 .xv:has(.mock-exam) {
  max-width: 1120px;
}
#xv:has(.mock-exam),
body.t3 .xv:has(.mock-exam) {
  width: 100%;
  box-sizing: border-box;
}
.mock-exam,
.mock-exam .mock-exam-main,
.mock-exam .mock-exam-sheet {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}
#xv {
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 599px) {
  #xv .mock-exam {
    width: auto;
    margin-inline: -16px;
    border-radius: 0;
  }
  .mock-exam .mock-exam-body {
    padding: 10px;
  }
  .mock-exam .mock-exam-sheet {
    padding: 14px 14px;
  }
}
@media (min-width: 1100px) {
  .mock-exam .mock-exam-body {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
    padding: 20px;
  }
  .mock-exam .mock-exam-head {
    padding: 14px 20px;
  }
  .mock-exam .mock-exam-head .t {
    font-size: 1.15rem;
  }
  .mock-exam .mock-exam-clock {
    font-size: 1.15rem;
    padding: 4px 14px;
  }
  .mock-exam .mock-exam-sheet {
    padding: 22px 26px;
  }
  .mock-exam .lesson-quiz-question {
    font-size: 1.3rem;
    line-height: 1.9;
  }
  .mock-exam .lesson-quiz-option {
    font-size: 1.1rem;
    padding: 15px 8px !important;
  }
  .mock-exam .lesson-quiz-option .k {
    width: 34px;
    height: 34px;
  }
  .mock-exam .mock-exam-nav-btn {
    padding: 14px;
    font-size: 1.05rem;
  }
  .mock-exam .mock-exam-grid button {
    min-height: 44px;
    font-size: 0.9rem;
  }
  .mock-exam .mock-exam-figure img {
    max-height: 340px;
  }
}
@media (max-width: 1099px) {
  .mock-exam .mock-exam-side {
    order: 3;
  }
}
.tahsili-unit-go {
  width: 100%;
  margin-top: 14px;
  min-height: 52px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-green-3);
  color: #fff;
  font: inherit;
  font-weight: 800;
  font-size: 1.05rem;
  cursor: pointer;
  transition: transform 0.15s;
}
.tahsili-unit-go:active {
  transform: scale(0.98);
}
.tahsili-unit-go:focus-visible {
  outline: 2px solid var(--c-gold-2);
  outline-offset: 2px;
}
.betaTag {
  display: inline-block;
  vertical-align: middle;
  margin-inline-start: 6px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  background: var(--c-gold-2);
  color: var(--c-brown-ink);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.6;
  letter-spacing: 0;
  font-family: inherit;
}
#bBell {
  left: 102px;
  display: grid;
}
#bBell i {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--c-red);
  color: #fff;
  font-size: 0.68rem;
  font-style: normal;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.lvO {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
@media (min-width: 700px) {
  .lvO {
    align-items: center;
  }
}
.live-panel {
  background: var(--card);
  color: var(--ink);
  width: min(520px, 100%);
  max-height: 80dvh;
  overflow: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
}
@media (min-width: 700px) {
  .live-panel {
    border-radius: 20px;
  }
}
.live-panel h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.live-panel h3 button {
  margin-inline-start: auto;
}
.live-note {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  margin-bottom: 10px;
  line-height: 1.8;
}
.live-note.new {
  border-color: var(--c-gold-2);
  background: rgba(245, 197, 66, 0.1);
}
.live-note small {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.lvT {
  position: fixed;
  inset-inline: 12px;
  top: calc(12px + env(safe-area-inset-top));
  z-index: 10040;
  max-width: 520px;
  margin-inline: auto;
  background: var(--c-green-deep);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 14px 16px;
  box-shadow: 0 12px 30px #0005;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.7;
  animation: lvIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.lvT b {
  display: block;
  color: var(--c-gold-2);
}
.lvT button {
  all: unset;
  cursor: pointer;
  margin-inline-start: auto;
  min-width: 32px;
  text-align: center;
  font-size: 1.1rem;
}
@keyframes lvIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
}
#maintO {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
}
#maintO .mi {
  font-size: 3.4rem;
  animation: mtSp 3s ease-in-out infinite;
}
#maintO h2 {
  margin: 12px 0 6px;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
}
#maintO p {
  color: var(--muted);
  line-height: 1.9;
  max-width: 420px;
  margin: 0 auto;
}
@keyframes mtSp {
  50% {
    transform: rotate(-20deg);
  }
}
.maintBar {
  position: fixed;
  bottom: calc(84px + env(safe-area-inset-bottom));
  inset-inline: 12px;
  z-index: 9998;
  max-width: 520px;
  margin-inline: auto;
  background: #8a2a1f;
  color: #fff;
  border-radius: var(--r-md);
  padding: 8px 12px;
  text-align: center;
  font-weight: 700;
  font-size: 0.9rem;
}
.live-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.live-list .live-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.live-list .live-note div {
  flex: 1;
}
.betaTag.dev-only {
  display: none;
}
body.dsk .betaTag.dev-only {
  display: inline-block;
}
/* ===== DS2: التصميم الموحّد (2026-10-23) — للتراجع: احذف كلاس ds2 من <html> ===== */
:root.ds2 {
  --bg: #f6f4ee;
  --card: #ffffff;
  --fg: #17201b;
  --muted: #5e6862;
  --line: #e6e1d5;
  --accent: var(--c-green-3);
  --accent-2: #e7f2ec;
  --gold: #f2c14e;
  --side: var(--c-green-deep);
  --bad: #b5402f;
  --good: var(--c-green-3);
  --warn: var(--c-gold-text);
}
:root.ds2[data-theme="dark"] {
  --bg: #0e1714;
  --card: #16221d;
  --fg: #e6eeea;
  --muted: #9db0a7;
  --line: #26352f;
  --accent: #3fa37d;
  --accent-2: #1b2e26;
  --gold: #e8bc52;
}
@media (prefers-color-scheme: dark) {
  :root.ds2:not([data-theme="light"]):not([data-theme]) {
    --bg: #0e1714;
    --card: #16221d;
    --fg: #e6eeea;
    --muted: #9db0a7;
    --line: #26352f;
    --accent: #3fa37d;
    --accent-2: #1b2e26;
  }
}
.ds2 .ico {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.15em;
  flex: none;
}
/* بطاقات وعناوين */
.ds2 .card {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: none;
}
.ds2 .card > h2,
.ds2 #xv h2 {
  font-size: 1.06rem;
  line-height: 1.5;
}
.ds2 #xv > .card:first-child > h2,
.ds2 #xv > div:first-child > .card:first-child > h2 {
  font-size: 1.3rem;
}
/* أزرار: أساسي + ثانوي */
.ds2 button:not(.lesson-quiz-option):not(.cv):not(.bIco):not(.mock-exam-nav-btn):not([class*="tq"]):not([class*="test-quiz"]),
.ds2 .btnlink {
  border-radius: var(--r-lg);
}
.ds2 button.ghost,
.ds2 .btnlink.ghost {
  background: var(--card) !important;
  color: var(--fg) !important;
  border: 1.5px solid #d9d3c4 !important;
}
:root.ds2[data-theme="dark"] button.ghost {
  border-color: var(--line) !important;
}
.ds2 button.small,
.ds2 .btnlink.small {
  min-height: 44px;
}
/* الشريط السفلي */
.ds2 .bNav a i {
  filter: none;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
  padding: 3px 16px;
  border-radius: var(--r-pill);
  transform: none !important;
  color: var(--muted);
}
.ds2 .bNav a.on i {
  background: var(--accent-2);
  color: var(--accent);
}
.ds2 .bNav a {
  font-size: 0.72rem;
}
/* رأس داخلي مختصر على الجوال */
@media (max-width: 1099px) {
  .ds2 body.stuHd.inner #bMe {
    display: none !important;
  }
}
/* درسك التالي */
.ds2 .contCard {
  background: var(--accent) !important;
  box-shadow: none;
  border-radius: var(--r-2xl);
}
.ds2 .contCard .course-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--c-green-deep);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex: none;
}
/* مهام اليوم وشريط الاختصارات */
.ds2 .h2T {
  border-radius: var(--r-xl);
}
.ds2 .h2T .ic {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: #fbf1d6;
  color: var(--c-gold-text);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}
.ds2 .ql a {
  border-radius: var(--r-xl);
  padding: 10px 2px;
  font-weight: 600;
}
.ds2 .ql i {
  width: 40px;
  height: 40px;
  margin: 0 auto 4px;
  border-radius: var(--r-md);
  background: var(--accent-2);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}
.ds2 .ql a.trn {
  background: var(--gold) !important;
  color: var(--c-brown-ink);
}
.ds2 .ql a.trn i {
  background: rgba(0, 0, 0, 0.08);
  color: var(--c-brown-ink);
}
.ds2 #h2B .ql {
  order: 9;
}
/* بطاقات الفصول: اللون حسب الحالة */
.ds2 .car .cv,
.ds2 #h2B .car .cv:hover,
.ds2 #h2B .car .cv:active,
.ds2 #h2B .car .cv:focus {
  background: var(--c-green-deep) !important;
  box-shadow: none;
}
.ds2 .car .cv.sel {
  background: var(--accent) !important;
  outline: 3px solid var(--gold);
}
.ds2 .car .cv.lk {
  background: #e9e4d8 !important;
  color: #5e6862 !important;
  filter: none;
  opacity: 1;
}
.ds2 .car .cv.lk b {
  color: #3b4540;
}
.ds2 .car .cv.lk .pg {
  background: #fff;
  color: #5e6862;
}
.ds2 .cv .big {
  filter: none;
  opacity: 0.5;
}
.ds2 .cv .big svg * {
  fill: none !important;
  stroke: var(--gold) !important;
  stroke-width: 1.2 !important;
}
.ds2 .car .cv.lk .big svg * {
  stroke: #b9b19f !important;
}
/* الألعاب */
.ds2 .g2 {
  border-radius: var(--r-xl);
  text-align: start;
  min-height: 0;
  padding: 14px;
}
.ds2 .g2 > i {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-2);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  margin-bottom: 8px;
}
.ds2 .g2.wd > i {
  margin: 0;
}
.ds2 .g2.dly {
  background: var(--accent) !important;
  border: 0;
  color: #fff;
}
.ds2 .g2.dly > i {
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
}
.ds2 .g2.dly > small {
  color: #c9ded3;
}
.ds2 .g2.rec {
  background: var(--card) !important;
  color: var(--fg);
  border: 1px solid var(--line);
}
.ds2 .g2.rec > i {
  background: #fbf1d6;
  color: var(--c-gold-text);
}
.ds2 .g2.rec small {
  color: var(--muted);
}
.ds2 .g2.rec .go {
  background: var(--accent);
  color: #fff;
}
.ds2 .dqC,
.ds2 .dqC.gold {
  background: var(--accent) !important;
  animation: none;
  border-radius: var(--r-2xl);
}
.ds2 .dqC:after {
  display: none;
}
.ds2 .gSh {
  font-weight: 700;
}
/* المساعدة */
.ds2 .helpC i {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--accent-2);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex: none;
}
.ds2 .helpC h2 {
  font-size: 1rem !important;
  margin: 0 0 2px;
}
.ds2 .helpC p {
  font-size: 0.92rem;
  color: var(--muted);
}

.ds2 #h2B .car .cv,
.ds2 #h2B .car .cv:hover,
.ds2 #h2B .car .cv:active,
.ds2 #h2B .car .cv:focus {
  background: var(--c-green-deep) !important;
}
.ds2 #h2B .car .cv.sel {
  background: var(--accent) !important;
}
.ds2 #h2B .car .cv.lk {
  background: #e9e4d8 !important;
}
.ds2 .lc {
  border-radius: var(--r-xl);
}
.ds2 .lc .th {
  width: 48px;
  height: 48px;
  background: var(--accent-2) !important;
  color: var(--accent);
  font-size: 1.25rem;
}
.ds2 .lc .th em {
  background: var(--accent);
  color: #fff;
  bottom: -4px;
  left: -4px;
  font-size: 0.58rem;
}
.ds2 .lc.exm .th {
  background: #fbf1d6 !important;
  color: var(--c-gold-text);
}
.ds2 .lc.exm {
  border-color: #ead9a6;
}
.ds2 .final-exam-card {
  border-color: #ead9a6;
}
.ds2 .final-exam-card .icw {
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: #fbf1d6;
  color: var(--c-gold-text);
  display: grid;
  place-items: center;
}
.ds2 .profile-hero {
  background: var(--side);
}
.ds2 .profile-stat i {
  color: var(--accent);
}
.ds2 .profile-actions i {
  color: var(--accent);
}
.ds2 #xv > .card > i:first-child .icw,
.ds2 #xv > .card > i:first-child {
  color: var(--accent);
}
.ds2 .icw {
  display: inline-grid;
  place-items: center;
}
/* منصة الصدارة + الرأس + الاختصارات + المكافآت (ds2) */
.ds2 .rank-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--side);
  color: #fff;
  border-radius: var(--r-2xl);
  padding: 12px 14px;
  text-decoration: none;
  min-height: 64px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.ds2 .rank-strip:active {
  transform: scale(0.98);
}
.ds2 .rank-strip .rank-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(242, 193, 78, 0.16);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex: none;
}
.ds2 .rank-strip .rank-title {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ds2 .rank-strip .rank-title b {
  font-size: 0.95rem;
}
.ds2 .rank-strip .rank-title small {
  font-size: 0.76rem;
  color: #c9ded3;
}
.ds2 .rank-strip .rank-title em {
  font-style: normal;
  color: var(--gold);
  font-weight: 700;
}
.ds2 .rank-strip .rank-avatars {
  display: flex;
  align-items: center;
}
.ds2 .rank-strip .rank-avatars > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--side);
  background: #e7f2ec;
  display: grid;
  place-items: center;
  overflow: hidden;
  margin-inline-start: -10px;
  font-size: 1rem;
  position: relative;
}
.ds2 .rank-strip .rank-avatars > span:first-child {
  margin-inline-start: 0;
  background: var(--gold);
  z-index: 3;
}
.ds2 .rank-strip .rank-avatars .p2 {
  z-index: 2;
  background: #d6ddda;
}
.ds2 .rank-strip .rank-avatars .p3 {
  z-index: 1;
  background: #e8c9a6;
}
.ds2 .rank-strip .av,
.ds2 .rank-page .av {
  font-size: inherit;
  width: auto;
  height: auto;
  background: none;
  border: 0;
  box-shadow: none;
  margin: 0;
  padding: 0;
}
.ds2 .rank-strip .av i,
.ds2 .rank-page .rank-avatar.sm .av i {
  display: none;
}
.ds2 .rank-strip .rank-chevron {
  color: #c9ded3;
  font-size: 1.4rem;
  line-height: 1;
}
.ds2 .rank-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 84px;
}
.ds2 .rank-podium {
  background: var(--side);
  color: #fff;
  border-radius: 22px;
  padding: 16px 12px 0;
  overflow: hidden;
}
.ds2 .rank-podium h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #fff;
  text-align: center;
}
.ds2 .rank-podium-places {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  text-align: center;
}
.ds2 .rkC {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}
.ds2 .rkC b {
  font-size: 0.85rem;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ds2 .rkC small {
  font-size: 0.76rem;
  color: #c9ded3;
}
.ds2 .rkC.r1 small {
  color: var(--gold);
  font-weight: 700;
}
.ds2 .rank-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #d6ddda;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  border: 3px solid rgba(255, 255, 255, 0.25);
}
.ds2 .rkC.r1 .rank-avatar {
  width: 64px;
  height: 64px;
  background: var(--gold);
  border-color: #ffe7a3;
  font-size: 2rem;
}
.ds2 .rkC.r3 .rank-avatar {
  background: #e8c9a6;
}
.ds2 .rkC .crown {
  width: 28px;
  height: 20px;
  background: var(--gold);
  clip-path: polygon(0 100%, 7% 25%, 36% 55%, 50% 0, 64% 55%, 93% 25%, 100% 100%);
}
.ds2 .rkC .st {
  width: 100%;
  border-radius: 12px 12px 0 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.3rem;
  background: rgba(255, 255, 255, 0.1);
  color: #e3e7e5;
  margin-top: 4px;
}
.ds2 .rkC.r1 .st {
  height: 76px;
  background: var(--gold);
  color: var(--c-brown-ink);
  font-size: 1.6rem;
}
.ds2 .rkC.r2 .st {
  height: 54px;
}
.ds2 .rkC.r3 .st {
  height: 40px;
  color: #ebc9a6;
}
.ds2 .rank-list {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  min-width: 0;
}
.ds2 .rank-page,
.ds2 .rank-podium,
.ds2 .rank-podium-places {
  min-width: 0;
  max-width: 100%;
}
.ds2 .rank-row .nm b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ds2 .rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.ds2 .rank-row:first-child {
  border-top: 0;
}
.ds2 .rank-row .n {
  width: 22px;
}
.ds2 .rank-avatar.sm {
  width: 36px;
  height: 36px;
  font-size: 1.15rem;
  border: 0;
  background: var(--accent-2);
}
.ds2 .rank-row .nm {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ds2 .rank-row .nm b {
  font-size: 0.95rem;
}
.ds2 .rank-row .nm small {
  font-size: 0.74rem;
  color: var(--muted);
}
.ds2 .rank-row .pt {
  font-size: 0.95rem;
  color: var(--fg);
}
.ds2 .rank-row .nm b {
  color: var(--fg) !important;
}
.ds2 .rank-row .n {
  color: var(--muted);
}
.ds2 .rkC b {
  color: #fff !important;
}
.ds2 .rank-me b {
  color: #fff !important;
}
.ds2 .rkH summary {
  cursor: pointer;
  font-weight: 700;
  min-height: 28px;
}
.ds2 .rank-strip .rank-hint {
  color: var(--gold);
  font-weight: 700;
}
.ds2 .rank-box h3 {
  margin: 4px 2px 8px;
  font-size: 1.02rem;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.ds2 .rank-box h3 span {
  margin-inline-start: auto;
  font-size: 0.85rem;
  color: var(--accent);
}
.ds2 .rank-goal {
  margin: 0 2px 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--c-gold-text);
  background: #fbf1d6;
  border-radius: var(--r-md);
  padding: 8px 12px;
}
.ds2 .rank-row.isMe {
  background: var(--accent-2);
}
.ds2 .rank-row.isMe .nm b {
  color: var(--accent) !important;
}

.ds2 .rank-me {
  position: fixed;
  inset-inline: 0;
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 840;
  margin: 0 auto;
  max-width: 640px;
  background: var(--accent);
  color: #fff;
  border-radius: 20px 20px 0 0;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
}
@media (min-width: 1100px) {
  .ds2 .rank-me {
    position: sticky;
    bottom: 12px;
    border-radius: var(--r-xl);
  }
}
.ds2 .rank-me .rk {
  min-width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--gold);
  color: var(--c-brown-ink);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.05rem;
}
.ds2 .rank-me span:last-child {
  display: flex;
  flex-direction: column;
}
.ds2 .rank-me small {
  font-size: 0.76rem;
  color: #c9ded3;
}
/* الرأس المختصر في الرئيسية */
.ds2 body.stuHd:not(.inner) #bottom-menu-code {
  display: none !important;
}
.ds2 body.stuHd:not(.inner) .bottom-menu-section {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}
.ds2 #bMe .bottom-menu-panel i {
  background: var(--gold) !important;
}
.ds2 #bMe .bottom-menu-pane span:first-child {
  display: none;
}
.ds2 .brand #bBell,
.ds2 .brand .themeBtn,
.ds2 .brand #bMenu {
  font-size: 1.15rem;
  color: #fff;
}
/* الاختصارات */
@media (max-width: 1099px) {
  .ds2 body.hm2 #srchBox {
    order: 1;
  }
  .ds2 body.hm2 #contCard {
    order: 2;
  }
  .ds2 body.hm2 #h2A > .h2T {
    order: 3;
  }
  .ds2 body.hm2 #rkStrip {
    order: 3;
  }
  .ds2 body.hm2 #h2B > .sh2 {
    order: 4;
  }
  .ds2 body.hm2 #h2B > .car {
    order: 4;
  }
}
.ds2 #h2B .ql {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.ds2 #h2B .ql a {
  grid-column: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  border-radius: var(--r-lg);
}
.ds2 #h2B .ql a i {
  width: auto;
  height: auto;
  margin: 0;
  background: none !important;
  font-size: 1.1rem;
}
.ds2 #h2B .ql a:nth-child(1),
.ds2 #h2B .ql a:nth-child(2) {
  grid-column: span 3;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 118px;
  padding: 14px;
  font-size: 1rem;
  border: 0;
  text-align: start;
}
.ds2 #h2B .ql a:nth-child(1) i,
.ds2 #h2B .ql a:nth-child(2) i {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}
.ds2 #h2B .ql a:nth-child(1) {
  background: linear-gradient(160deg, #f7d57a, #f2c14e) !important;
  color: var(--c-brown-ink) !important;
}
.ds2 #h2B .ql a:nth-child(1) i {
  background: rgba(43, 32, 0, 0.1) !important;
  color: var(--c-brown-ink);
}
.ds2 #h2B .ql a:nth-child(2) {
  background: var(--accent) !important;
  color: #fff !important;
}
.ds2 #h2B .ql a:nth-child(2) i {
  background: rgba(255, 255, 255, 0.12) !important;
  color: var(--gold);
}
.ds2 #h2B .ql a:nth-child(1)::after {
  content: "راجع الأسئلة اللي أخطأت فيها";
  font-size: 0.74rem;
  font-weight: 500;
  color: #5c4600;
}
.ds2 #h2B .ql a:nth-child(2)::after {
  content: "يوصلك الرد بإشعار";
  font-size: 0.74rem;
  font-weight: 500;
  color: #c9ded3;
}
.ds2 #h2B .ql a:nth-child(n + 3) i {
  color: var(--accent);
}
/* المكافآت */
.ds2 .gG.g3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.ds2 .gG.g3 .g2 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  padding: 12px;
  flex-wrap: wrap;
}
.ds2 .gG.g3 .g2 > i {
  margin: 0;
  width: 40px;
  height: 40px;
}
.ds2 .gG.g3 .g2 > b {
  margin: 0;
  flex: 1;
}
.ds2 .gG.g3 .g2 > small {
  flex-basis: 100%;
  margin-top: -6px;
  padding-inline-start: 50px;
}
.ds2 .gG.g3 .g2:first-child {
  grid-column: 1/-1;
}
.ds2 .gG.g3 .g2:first-child:not(.done) {
  border: 2px solid var(--gold);
  background: var(--card);
}
.ds2 .gG.g3 .g2:first-child:not(.done) > i {
  background: #fbf1d6;
  color: var(--c-gold-text);
}
.ds2 .gG.g3 .g2 .bd.new {
  position: static;
  order: 3;
  background: var(--gold);
  color: var(--c-brown-ink);
  padding: 6px 14px;
  border-radius: var(--r-md);
  font-size: 0.85rem;
}

@media (max-width: 1099px) {
  .ds2 body.hm2 #home {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .ds2 body.hm2 #h2A,
  .ds2 body.hm2 #h2B {
    display: contents;
  }
  .ds2 body.hm2 #home > *,
  .ds2 body.hm2 #h2A > *,
  .ds2 body.hm2 #h2B > * {
    order: 6;
    margin-bottom: 0;
  }
  .ds2 body.hm2 #home > #annBox,
  .ds2 body.hm2 #home > #assignBox {
    order: 0;
  }
  .ds2 body.hm2 #contCard {
    order: 1;
  }
  .ds2 body.hm2 #h2A > .h2T {
    order: 2;
  }
  .ds2 body.hm2 #h2B > .sh2 {
    order: 3;
  }
  .ds2 body.hm2 #h2B > .car {
    order: 4;
  }
  .ds2 body.hm2 #h2B > .car ~ .sh2,
  .ds2 body.hm2 #h2B > .car ~ *:not(.ql) {
    order: 5;
  }
  .ds2 body.hm2 #h2A > .h2W {
    order: 7;
  }
  .ds2 body.hm2 #srchBox {
    order: 8;
  }
  .ds2 body.hm2 #h2B > .ql {
    order: 9;
  }
  .ds2 body.hm2 #home > footer,
  .ds2 body.hm2 #home > .siteFt {
    order: 20;
  }
}

.ds2 .profile-chapter .bar {
  height: auto !important;
  overflow: visible !important;
  background: none !important;
  border-radius: 0;
}
.ds2 .profile-chapter .e {
  background: var(--accent-2) !important;
  color: var(--accent);
}
.ds2 .profile-chapter.lk .e {
  background: #efebe1 !important;
}
.ds2 .profile-chapter .pb i,
.ds2 .profile-week i {
  background: var(--accent);
}
.ds2 .profile-week {
  height: 120px;
  gap: 10px;
  padding-top: 8px;
}
.ds2 .profile-week i {
  border-radius: var(--r-xs);
  width: 70%;
  margin: 0 auto 6px;
  min-height: 6px;
}
.ds2 .profile-week .t i {
  background: var(--gold);
}
.ds2 .tog {
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--card);
  font-weight: 500;
  min-height: 56px;
}
.ds2 .tog input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 28px;
  border-radius: var(--r-pill);
  background: #d9d3c4;
  position: relative;
  margin: 0;
  flex: none;
  cursor: pointer;
  transition: background 0.2s;
  border: 0;
}
.ds2 .tog input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: inset-inline-start 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.ds2 .tog input[type="checkbox"]:checked {
  background: var(--accent);
}
.ds2 .tog input[type="checkbox"]:checked::after {
  inset-inline-start: 23px;
}
.ds2 .tog input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ds2 .tog + .tog {
  margin-top: 8px;
}

.ds2 .t3U .ic {
  background: var(--accent-2) !important;
  color: var(--accent);
  font-size: 1.3rem;
}
.ds2 .t3U .pb i {
  background: var(--accent);
}
.ds2 .t3Cta {
  border-radius: var(--r-2xl);
  background: var(--gold);
  color: var(--c-brown-ink);
}
.ds2 .t3Cta.g {
  background: var(--accent);
  color: #fff;
}
.ds2 .t3Cta .icw {
  margin-inline-end: 6px;
}
.ds2 #xv .card button .icw,
.ds2 #xv button .icw {
  margin-inline-end: 6px;
}

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

/* ===== واجهة المختبر: الدخول والتسجيل ===== */
@keyframes lbF {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes lbF2 {
  0%,
  100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(8px) rotate(6deg);
  }
}
@keyframes lbIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes lbPop {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }
  70% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes lbSh {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-10px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-6px);
  }
  80% {
    transform: translateX(4px);
  }
}
@keyframes login-confetti-fall {
  0% {
    transform: translateY(-30px) rotate(0);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translateY(105vh) rotate(340deg);
    opacity: 0;
  }
}
#gate.lab {
  display: block;
  font-family: var(--body, "IBM Plex Sans Arabic"), Tahoma, sans-serif;
}
#gate.lab .gate-box {
  padding: 0;
  text-align: right;
  animation: none;
  color: var(--c-ink);
}
#gate.lab .login-screen {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  position: relative;
}
#gate.lab .login-actions {
  display: flex;
  flex-direction: column;
}
#gate.lab button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#gate.lab .login-next,
#gate.lab .login-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: none;
}
#gate.lab .login-next {
  border: 0;
  background: var(--c-green);
  color: #fff;
}
#gate.lab .login-secondary {
  border: 2px solid var(--c-green);
  background: #fff;
  color: var(--c-green);
  min-height: 54px;
  font-size: 1rem;
}
#gate.lab .login-next:active,
#gate.lab .login-secondary:active {
  transform: scale(0.97);
}
#gate.lab .login-next[disabled] {
  opacity: 0.7;
}
#gate.lab .login-top {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 2;
}
#gate.lab .login-top img {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
}
#gate.lab .login-top b {
  font-family: var(--display, Alexandria), sans-serif;
  font-size: 1.2rem;
  color: var(--c-green);
}
#gate.lab .login-top span {
  margin-right: auto;
  font-size: 0.82rem;
  color: var(--c-muted);
}
#gate.lab .login-top a {
  font-size: 0.82rem;
  color: var(--c-green);
  font-weight: 700;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
#gate.lab .login-scene {
  position: relative;
  flex: none;
  pointer-events: none;
}
#gate.lab .login-scene > * {
  position: absolute;
}
#gate.lab .login-scene .bg {
  inset: 0;
  width: 100%;
  height: 100%;
}
#gate.lab .f1 {
  animation: lbF 5s ease-in-out infinite;
}
#gate.lab .f2 {
  animation: lbF2 6s ease-in-out infinite;
}
#gate.lab .f3 {
  animation: lbF 7s ease-in-out -2s infinite;
}
#gate.lab .login-title {
  font-family: var(--display, Alexandria), sans-serif;
  color: var(--c-ink);
}
#gate.lab .login-title mark {
  background: var(--c-gold);
  color: var(--c-green);
}
#gate.lab .login-lead {
  margin: 10px 0 0;
}
#gate.lab .login-teacher-link {
  text-align: center;
  text-decoration: none;
}
#gate.lab .login-teacher-link b {
  color: var(--c-green);
}
#gate.lab .login-step-header {
  display: flex;
  align-items: center;
}
#gate.lab .login-back {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#gate.lab .login-step-dots {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}
#gate.lab .login-step-dots i {
  border-radius: 4px;
  background: #fff;
  transition: background 0.3s;
}
#gate.lab [data-st="1"] .login-step-dots i:nth-child(1),
#gate.lab [data-st="2"] .login-step-dots i:nth-child(2),
#gate.lab [data-st="3"] .login-step-dots i:nth-child(3) {
  background: var(--c-gold-4);
}
#gate.lab [data-st="2"] .login-step-dots i:nth-child(1),
#gate.lab [data-st="3"] .login-step-dots i:nth-child(-n + 2) {
  background: var(--c-green);
}
#gate.lab #gStepT {
  font-size: 0.82rem;
  color: var(--c-muted);
  min-width: 44px;
  text-align: left;
}
#gate.lab .login-lens {
  display: block;
}
#gate.lab .login-lens g {
  display: none;
}
#gate.lab [data-st="1"] .login-lens .c1,
#gate.lab [data-st="2"] .login-lens .c2,
#gate.lab [data-st="3"] .login-lens .c3 {
  display: inline;
  animation: lbPop 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: 64px 64px;
}
#gate.lab .login-chat {
  display: flex;
  align-items: flex-start;
  margin-top: 14px;
}
#gate.lab .login-avatar {
  flex: none;
  border-radius: 50%;
  background: var(--c-gold);
  font-family: var(--display, Alexandria), sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
#gate.lab .login-bubble {
  background: #fff;
  border-radius: 4px 18px 18px 18px;
  font-weight: 500;
}
#gate.lab .login-step {
  display: none;
}
#gate.lab [data-st="1"] .login-step[data-s="1"],
#gate.lab [data-st="2"] .login-step[data-s="2"],
#gate.lab [data-st="3"] .login-step[data-s="3"] {
  display: block;
  animation: lbIn 0.4s both;
}
#gate.lab .login-question {
  display: block;
  font-family: var(--display, Alexandria), sans-serif;
  font-weight: 700;
  color: var(--c-ink);
}
#gate.lab .login-kicker {
  margin: 0;
  font-weight: 700;
  color: var(--c-green);
}
#gate.lab .login-kicker + .login-question {
  margin-top: 2px;
}
#gate.lab #gName {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  border-radius: var(--r-2xl);
  padding: 0 18px;
  font: inherit;
  background: #fff;
  color: var(--c-ink);
  outline: none;
}
#gate.lab .login-hint {
  margin: 8px 0 0;
  line-height: 1.6;
}
#gate.lab .login-error {
  margin: 12px 0 0;
  color: var(--c-danger);
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  gap: 6px;
  align-items: center;
}
#gate.lab .login-error.ok {
  color: var(--c-green-2);
}
#gate.lab .login-error.wait {
  color: var(--c-muted);
  font-weight: 500;
}
#gate.lab .login-tiles {
  display: grid;
}
#gate.lab .login-tiles-row {
  grid-template-columns: 1fr;
}
#gate.lab .login-tiles button {
  border: 2px solid #cfe0d7;
  background: #fff;
  color: var(--c-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#gate.lab .login-tiles button::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid #cfe0d7;
}
#gate.lab .login-tiles-grid button {
  justify-content: center;
  font-family: var(--display, Alexandria), sans-serif;
  font-size: 1.8rem;
}
#gate.lab .login-tiles-grid button::after {
  display: none;
}
#gate.lab .login-tiles button:active {
  transform: scale(0.96);
}
#gate.lab .login-tiles button[aria-pressed="true"] {
  background: var(--c-green);
  border-color: var(--c-green);
  color: #fff;
}
#gate.lab .login-tiles button[aria-pressed="true"]::after {
  background: var(--c-gold);
  border: 5px solid #fff;
}
#gate.lab .login-tiles-grid button[aria-pressed="true"] {
  color: var(--c-gold);
}
#gate.lab .shk {
  animation: lbSh 0.45s;
}
#gate.lab .login-deco {
  position: absolute;
  left: -34px;
  top: 84px;
  width: 150px;
  height: 150px;
  pointer-events: none;
}
#gate.lab .login-code {
  position: relative;
  margin-top: 26px;
}
#gate.lab .login-code-boxes {
  display: flex;
  gap: 7px;
  justify-content: center;
}
#gate.lab .login-code-boxes i {
  width: 46px;
  height: 60px;
  border-radius: var(--r-xl);
  background: #fff;
  border: 2px solid #cfe0d7;
  font:
    700 1.6rem var(--display, Alexandria),
    sans-serif;
  font-style: normal;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
#gate.lab .login-code.foc .login-code-boxes i.cur {
  border-color: var(--c-green);
  box-shadow: 0 0 0 4px #cdebdd;
}
#gate.lab .login-code.bad .login-code-boxes i {
  border-color: var(--c-danger);
  background: #fdecea;
}
#gate.lab .login-code.good .login-code-boxes i {
  border-color: var(--c-green-2);
  background: #e3f4ec;
}
#gate.lab #gCode {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  font-size: 16px;
  padding: 0;
  border: 0;
  cursor: text;
  letter-spacing: 0;
}
#gate.lab .login-link {
  background: transparent;
  border: 0;
  min-height: 44px;
  font-weight: 700;
  color: var(--c-green);
  font-size: 0.95rem;
  width: auto;
  padding: 0 10px;
  align-self: center;
}
#gate.lab .login-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 48, 42, 0.45);
  z-index: 2;
  animation: lbIn 0.2s both;
}
#gate.lab .login-sheet {
  position: fixed;
  right: 0;
  left: 0;
  bottom: 0;
  max-width: 440px;
  margin: 0 auto;
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 14px 22px calc(26px + env(safe-area-inset-bottom));
  z-index: 3;
  animation: lbIn 0.35s both;
  box-sizing: border-box;
}
#gate.lab .login-sheet::before {
  content: "";
  display: block;
  width: 44px;
  height: 5px;
  border-radius: 3px;
  background: #dce7e1;
  margin: 0 auto 16px;
}
#gate.lab .login-sheet h3 {
  margin: 0;
  font-family: var(--display, Alexandria), sans-serif;
  font-size: 1.5rem;
  color: var(--c-ink);
}
#gate.lab .login-sheet ol {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
#gate.lab .login-sheet li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  line-height: 1.6;
}
#gate.lab .login-sheet li b {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #e4f3ec;
  color: var(--c-green);
  display: flex;
  align-items: center;
  justify-content: center;
}
#gate.lab .login-sheet .login-next {
  margin-top: 18px;
}
#gate.lab .login-card-screen {
  color: #fff;
  text-align: center;
  overflow: hidden;
}
#gate.lab .login-card-screen h2 {
  margin: 34px 0 0;
  font-family: var(--display, Alexandria), sans-serif;
  font-weight: 700;
  font-size: 1.85rem;
  color: var(--c-gold);
}
#gate.lab .login-card-screen > p {
  margin: 6px 0 0;
  color: #cfe8dd;
  line-height: 1.7;
}
#gate.lab .login-card-screen .idc {
  margin: 24px 0 0;
  animation: lbPop 0.55s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
}
#gate.lab .login-lock {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 16px 0 0;
  font-size: 0.9rem;
  color: var(--c-gold);
}
#gate.lab .login-card-screen .login-secondary {
  background: transparent;
  border-color: var(--c-gold);
  color: var(--c-gold);
}
#gate.lab .login-card-screen .login-next {
  background: var(--c-gold-4);
  color: #3a2a00;
}
#gate.lab .login-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: none;
}
#gate.lab .login-card-screen.new .login-confetti {
  display: block;
}
#gate.lab .login-confetti i {
  position: absolute;
  top: 0;
  width: 10px;
  height: 14px;
  border-radius: 3px;
  animation: login-confetti-fall 2.8s ease-in 3 both;
}
#gate.lab .login-confetti i:nth-child(1) {
  left: 10%;
  background: var(--c-gold);
}
#gate.lab .login-confetti i:nth-child(2) {
  left: 24%;
  background: var(--c-mint);
  animation-delay: 0.5s;
}
#gate.lab .login-confetti i:nth-child(3) {
  left: 40%;
  background: #ff9f7a;
  animation-delay: 0.2s;
}
#gate.lab .login-confetti i:nth-child(4) {
  left: 56%;
  background: var(--c-gold);
  animation-delay: 0.8s;
}
#gate.lab .login-confetti i:nth-child(5) {
  left: 70%;
  background: #fff;
  animation-delay: 0.35s;
}
#gate.lab .login-confetti i:nth-child(6) {
  left: 84%;
  background: var(--c-mint);
  animation-delay: 1.1s;
}
#gate.lab .login-confetti i:nth-child(7) {
  left: 48%;
  background: #ff9f7a;
  animation-delay: 1.4s;
}
#gate.lab .login-confetti i:nth-child(8) {
  left: 92%;
  background: var(--c-gold);
  animation-delay: 0.65s;
}
/* المعلم */
#tGate.lab {
  background: #e4f3ec !important;
  background-image: none !important;
  position: relative;
  overflow: hidden;
}
#tGate.lab .lbox {
  position: relative;
  z-index: 1;
  background: transparent !important;
  border: 0;
  color: var(--c-ink);
  width: min(100%, 400px);
  padding: 24px 22px !important;
  gap: 0;
}
#tGate.lab .login-scene-alt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
#tGate.lab .login-scene-alt > * {
  position: absolute;
}
#tGate.lab .f1 {
  animation: lbF 5s ease-in-out infinite;
}
#tGate.lab .f3 {
  animation: lbF 7s ease-in-out -2s infinite;
}
#tGate.lab .f2 {
  animation: lbF2 6s ease-in-out infinite;
}
#tGate.lab .login-chip {
  justify-self: center;
  height: 30px;
  padding: 0 12px;
  border-radius: 15px;
  background: var(--c-green);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}
#tGate.lab .lbox h2 {
  margin: 10px 0 0;
  font-family: var(--display, Alexandria), sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  line-height: 1.3;
  color: var(--c-ink);
}
#tGate.lab .lbox .ls {
  margin: 4px 0 0;
  color: var(--c-muted);
  opacity: 1;
}
#tGate.lab .lbox input#pin {
  margin-top: 20px;
  height: 62px;
  border-radius: 31px;
  background: #fff !important;
  border: 2px solid var(--c-green);
  color: var(--c-ink);
  font-size: 1.5rem;
  letter-spacing: 0.4em;
  text-align: center;
  box-shadow: none;
}
#tGate.lab .lbox input#pin:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px #cdebdd;
}
#tGate.lab .lerr {
  margin: 10px 0 0;
  color: var(--c-danger);
  font-weight: 700;
  font-size: 0.92rem;
}
#tGate.lab .login-numpad {
  display: none;
  grid-template-columns: repeat(3, 74px);
  gap: 12px 30px;
  justify-content: center;
  margin-top: 20px;
}
#tGate.lab .login-numpad button,
#tGate.lab .login-numpad span {
  width: 74px;
  height: 74px;
}
#tGate.lab .login-numpad button {
  border-radius: 50% !important;
  border: 2px solid #cfe0d7 !important;
  background: #fff !important;
  color: var(--c-ink) !important;
  font:
    500 1.7rem var(--display, Alexandria),
    sans-serif !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
#tGate.lab .login-numpad button:active {
  background: var(--c-line) !important;
}
#tGate.lab .login-numpad button.del {
  border-color: transparent !important;
  background: transparent !important;
}
@media (pointer: coarse) {
  #tGate.lab .login-numpad {
    display: grid;
  }
}
#tGate.lab #pinGo {
  margin-top: 18px;
  min-height: 58px;
  border-radius: 29px;
  background: var(--c-green) !important;
  border: 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.08rem;
}
#tGate.lab .lback {
  color: var(--c-muted);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
}
#tGate.lab .shk {
  animation: lbSh 0.45s;
}
@media (max-width: 600px) {
  #tGate.lab .login-scene-alt .f1 {
    top: 10px !important;
    right: 12px !important;
    width: 64px;
    height: 54px;
  }
  #tGate.lab .login-scene-alt .f3 {
    top: 18px !important;
    left: 14px !important;
    width: 56px;
    height: 56px;
  }
  #tGate.lab .login-scene-alt .f2 {
    display: none;
  }
}
.sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
@media (prefers-reduced-motion: reduce) {
  #gate.lab *,
  #tGate.lab * {
    animation: none !important;
  }
}
@media (min-width: 1100px) {
  #gate.lab .login-screen {
    min-height: min(100dvh, 900px);
  }
}

/* ===== من lab-design.css ===== */
/* Approved laboratory design. Scoped to the existing account gate. */
#gate.lab {
  background: #f3f8f4;
  padding: 28px 20px;
  color: var(--c-ink);
}
#gate.lab .gate-box {
  max-width: 1140px;
  min-height: 0;
  margin: 0 auto;
  background: #e4f3ec;
  border: 1px solid #cfe0d7;
  border-radius: 28px;
  box-shadow: 0 16px 55px #153d2910;
  overflow: hidden;
}
#gate.lab .duHeader {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 23px 38px;
  min-height: 90px;
  position: relative;
  z-index: 1;
}
#gate.lab .duHeader img {
  display: none;
}
#gate.lab .duHeader b {
  font:
    700 28px/1.4 Alexandria,
    sans-serif;
  color: var(--c-green);
}
#gate.lab .duHeader b:after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  background: var(--c-gold);
  border-radius: 50%;
}
#gate.lab .duHeader span {
  margin: 0;
  color: var(--c-muted);
  border-inline-start: 1px solid #b9d8c7;
  padding-inline-start: 16px;
  font-size: 13px;
}
#gate.lab .duHeader a {
  margin-inline-start: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: var(--c-green);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 5px;
}
#gate.lab .login-screen {
  min-height: 650px;
  padding: 8px 64px 48px;
  animation: duEnter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  gap: 0;
}
#gate.lab #gChoose {
  padding: 22px 64px 56px;
  display: block;
}
#gate.lab .duWelcomeBody {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 54px;
  min-height: 570px;
}
#gate.lab .duWelcomeCopy {
  max-width: 470px;
}
#gate.lab .duEyebrow {
  display: block;
  color: var(--c-green);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
#gate.lab .duEyebrow:before {
  content: "";
  display: inline-block;
  vertical-align: middle;
  width: 18px;
  height: 2px;
  background: #a18229;
  margin-inline-end: 8px;
}
#gate.lab .login-title {
  font-size: 44px;
  line-height: 1.65;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 0;
}
#gate.lab .login-title mark {
  border-radius: var(--r-xl);
  padding: 0 12px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
#gate.lab .login-lead {
  font-size: 17px;
  line-height: 1.95;
  margin-top: 20px;
  max-width: 400px;
  color: var(--c-muted);
}
#gate.lab .login-actions {
  margin-top: 27px;
  padding-top: 0;
  gap: 12px;
  max-width: 390px;
  width: 100%;
}
#gate.lab .login-next,
#gate.lab .login-secondary {
  min-height: 56px;
  padding: 12px 22px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 29px;
  transition:
    background 0.2s,
    transform 0.18s,
    box-shadow 0.2s;
}
#gate.lab .login-next {
  box-shadow: 0 4px 0 #063c2c;
}
#gate.lab .login-next:hover {
  background: #0a6348;
  box-shadow: 0 6px 0 #063c2c;
  transform: translateY(-2px);
}
#gate.lab .login-next:active {
  box-shadow: 0 1px 0 #063c2c;
  transform: translateY(3px);
}
#gate.lab .login-secondary:hover {
  background: #f3fbf7;
}
#gate.lab button:focus-visible,
#gate.lab a:focus-visible {
  outline: 3px solid #ac7a08;
  outline-offset: 4px;
}
#gate.lab .login-teacher-link {
  font-size: 13px;
  line-height: 1.7;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-muted);
}
#gate.lab .duVisual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  min-width: 0;
}
#gate.lab .login-scene {
  width: 390px;
  max-width: 100%;
  height: 330px;
  margin: 0;
  overflow: visible;
}
#gate.lab .duCaption {
  text-align: center;
  font-size: 14px;
  color: var(--c-muted);
}
#gate.lab .duCaption strong {
  display: block;
  font:
    500 17px/1.8 Alexandria,
    sans-serif;
  color: var(--c-green);
  margin-bottom: 5px;
}
#gate.lab .duShadow {
  width: 180px;
  height: 12px;
  background: #0d4f3c0c;
  border-radius: 50%;
  filter: blur(5px);
  animation: duShadow 5s ease-in-out infinite;
}
#gate.lab #gReg,
#gate.lab #gLog {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: 90px;
}
#gate.lab .duFormContent {
  min-width: 0;
  max-width: 470px;
  width: 100%;
  margin: 0 auto;
}
#gate.lab .login-step-header {
  margin: 3px 0 22px;
  gap: 14px;
}
#gate.lab .login-back {
  direction: ltr;
}
#gate.lab .login-step-dots i {
  height: 7px;
}
#gate.lab .login-lens {
  width: 100px;
  height: 100px;
  margin: 0 auto 20px;
}
#gate.lab .login-chat {
  margin: 0 0 23px;
  gap: 10px;
}
#gate.lab .login-avatar {
  width: 36px;
  height: 36px;
}
#gate.lab .login-bubble {
  font-size: 14px;
  line-height: 1.75;
  padding: 10px 14px;
  animation: duBubble 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#gate.lab .login-question {
  font-size: 27px;
  line-height: 1.6;
  letter-spacing: -0.4px;
  margin: 0 0 19px;
}
#gate.lab .duFieldLabel {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 7px;
}
#gate.lab #gName {
  margin: 0;
  height: 60px;
  font-size: 18px;
  border: 2px solid #9bc7b1;
}
#gate.lab #gName:focus {
  border-color: var(--c-green);
  box-shadow: 0 0 0 4px #c7e7d6;
}
#gate.lab #gName::placeholder {
  font-size: 16px;
  color: #73897c;
  opacity: 1;
}
#gate.lab .login-hint {
  font-size: 14px;
  color: var(--c-muted);
  margin-top: 9px;
}
#gate.lab .login-tiles {
  margin-top: 0;
  gap: 11px;
}
#gate.lab .login-tiles button {
  min-height: 61px;
  border-radius: 22px;
  padding: 12px 18px;
  font-size: 17px;
  font-weight: 600;
  transition:
    background 0.22s,
    border-color 0.22s,
    transform 0.22s,
    color 0.22s;
}
#gate.lab .login-tiles button:hover {
  border-color: #83b69a;
  transform: translateY(-1px);
}
#gate.lab .login-tiles button[aria-pressed="true"] {
  animation: duSelect 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#gate.lab .login-tiles-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
#gate.lab .login-tiles-grid button {
  min-height: 82px;
  font:
    600 27px Alexandria,
    sans-serif;
  padding: 12px;
  border-radius: 20px;
}
#gate.lab .duSummary {
  margin-top: 21px;
  padding-top: 16px;
  border-top: 1px solid #bfdccc;
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
#gate.lab .duAside {
  border-inline-start: 1px solid #c6e0d1;
  padding-inline-start: 50px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 20px;
  min-width: 0;
}
#gate.lab .duAside .login-scene {
  width: 300px;
  transform: scale(0.82);
  margin: -30px -30px;
}
#gate.lab .duAside h2 {
  font:
    600 24px/1.8 Alexandria,
    sans-serif;
  text-align: center;
  color: var(--c-ink);
  margin: 0;
}
#gate.lab .duAside mark {
  background: var(--c-gold);
  color: var(--c-green);
  padding: 1px 8px;
  border-radius: var(--r-xs);
}
#gate.lab .duAside p {
  font-size: 14px;
  color: var(--c-muted);
  text-align: center;
  max-width: 250px;
  margin: 0;
}
#gate.lab .duMiniSteps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 8px;
}
#gate.lab .duMiniSteps span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--c-muted);
}
#gate.lab .duMiniSteps b {
  display: grid;
  place-items: center;
  background: #fff;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  font-weight: 400;
}
#gate.lab .duMiniSteps .on b {
  background: var(--c-gold);
}
#gate.lab .duIn {
  animation: duEnter 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#gate.lab .duBack {
  animation: duBack 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#gate.lab #gLog .login-deco {
  display: none;
}
#gate.lab #gLog .duLoginBody {
  margin-top: 45px;
}
#gate.lab #gLog .login-kicker {
  font-size: 13px;
  margin-bottom: 12px;
}
#gate.lab #gLog .login-code-boxes {
  gap: 7px;
}
#gate.lab #gLog .login-code-boxes i {
  flex: 1;
  max-width: 52px;
  min-width: 0;
}
#gate.lab.carded {
  background: #f3f8f4;
}
#gate.lab #gCard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 70px;
  padding: 28px 72px 60px;
  text-align: right;
  color: var(--c-ink);
  overflow: visible;
}
#gate.lab #gCard h2 {
  font-size: 32px;
  line-height: 1.65;
  color: var(--c-ink);
  margin: 0;
}
#gate.lab #gCard .duCardCopy > p {
  color: var(--c-muted);
  font-size: 16px;
  line-height: 1.9;
  margin: 15px 0 0;
}
#gate.lab #gCard .login-actions {
  max-width: 370px;
}
#gate.lab #gCard .login-next {
  background: var(--c-green);
  color: white;
}
#gate.lab #gCard .login-secondary {
  background: #fff;
  border-color: var(--c-green);
  color: var(--c-green);
}
#gate.lab #gCard .login-lock {
  color: var(--c-muted);
  justify-content: flex-start;
  margin: 16px 0 0;
  font-size: 13px;
}
#gate.lab #gCard .idc {
  margin: 0;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 40px #0d4f3c25;
  animation: duCard 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
#gate.lab #gCard .id-card-name {
  overflow-wrap: anywhere;
}
#gate.lab #gCard .id-card-meta {
  overflow-wrap: anywhere;
}
#gate.lab .duCardStatus {
  color: var(--c-muted);
  font-size: 13px;
  line-height: 1.8;
  margin-top: 15px;
  min-height: 24px;
}
#gate.lab .duSpinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #ffffff60;
  border-top-color: white;
  border-radius: 50%;
  animation: duSpin 0.7s linear infinite;
}
#gate.lab .login-confetti {
  height: 100%;
  max-height: 800px;
}
#abK {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
#duSyncBar {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 110;
  max-width: calc(100vw - 40px);
}
#duSyncButton {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  min-height: 44px;
  background: var(--card, #fff);
  border: 1px solid var(--line, #cfe0d7);
  color: var(--fg, var(--c-ink));
  border-radius: 24px;
  box-shadow: 0 4px 20px #10302a14;
  font:
    500 13px/1.5 "IBM Plex Sans Arabic",
    sans-serif;
}
#duSyncButton .duDot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22825e;
  flex: none;
}
#duSyncButton[data-state="pending"] .duDot,
#duSyncButton[data-state="error"] .duDot {
  background: #a67b16;
}
#duSyncButton[data-state="saving"] .duDot {
  animation: duPulse 1s ease-in-out infinite;
}
body.gated #duSyncBar,
body:has(#teacher:not([hidden])) #duSyncBar {
  display: none;
}
#duSaveDialog {
  border: 1px solid var(--line, #cfe0d7);
  border-radius: 24px;
  padding: 28px;
  width: min(440px, calc(100% - 28px));
  max-height: 80dvh;
  overflow: auto;
  background: var(--card, #fff);
  color: var(--fg, var(--c-ink));
  font:
    16px/1.8 "IBM Plex Sans Arabic",
    sans-serif;
  box-shadow: 0 15px 70px #10302a25;
}
#duSaveDialog::backdrop {
  background: #10302a66;
  backdrop-filter: blur(4px);
}
#duSaveDialog[open] {
  animation: duBubble 0.25s ease both;
}
#duSaveDialog h2 {
  margin: 0 0 18px;
  font-size: 22px;
}
#duSaveDialog .duDialogClose {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg, #e4f3ec);
  color: var(--fg, var(--c-ink));
  font-size: 23px;
  padding: 0;
}
#duSaveDialog p {
  margin: 10px 0;
  color: var(--muted, var(--c-muted));
  font-size: 14px;
}
#duSaveDialog ul {
  margin: 15px 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
#duSaveDialog li {
  padding: 12px 14px;
  background: var(--bg, #e4f3ec);
  border-radius: var(--r-md);
  font-size: 14px;
  overflow-wrap: anywhere;
}
#duSaveDialog .duRetry {
  width: 100%;
  min-height: 46px;
  background: var(--accent, var(--c-green));
  color: #fff;
  border: 0;
  border-radius: 24px;
  margin-top: 10px;
  font:
    600 15px "IBM Plex Sans Arabic",
    sans-serif;
}
#duUpdate {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 10080;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  background: #fff1c8;
  color: #4e3c0b;
  padding: 10px 18px;
  font:
    14px/1.6 "IBM Plex Sans Arabic",
    sans-serif;
  box-shadow: 0 3px 15px #10302a12;
}
#duUpdate button {
  background: var(--c-green);
  color: white;
  border: 0;
  min-height: 36px;
  border-radius: 20px;
  padding: 5px 17px;
  font: inherit;
}
body.duUpdateReady #gate {
  padding-top: 76px;
}
@keyframes duEnter {
  from {
    opacity: 0;
    transform: translateX(-14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes duBack {
  from {
    opacity: 0;
    transform: translateX(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes duBubble {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes duCard {
  from {
    opacity: 0;
    transform: perspective(1000px) rotateY(-24deg) translateY(20px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes duShadow {
  50% {
    transform: scale(0.87);
    opacity: 0.6;
  }
}
@keyframes duSelect {
  50% {
    transform: scale(1.025);
  }
}
@keyframes duPulse {
  50% {
    opacity: 0.3;
  }
}
@keyframes duSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 900px) {
  #gate.lab {
    padding: 0;
    background: #e4f3ec;
  }
  #gate.lab .gate-box {
    max-width: 440px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
  }
  #gate.lab .duHeader {
    padding: 18px 23px;
    min-height: 77px;
    gap: 10px;
  }
  #gate.lab .duHeader b {
    font-size: 25px;
  }
  #gate.lab .duHeader span {
    display: none;
  }
  #gate.lab .duHeader a {
    font-size: 13px;
  }
  #gate.lab .login-screen {
    min-height: 0;
    padding: 8px 25px 35px;
  }
  #gate.lab #gChoose {
    padding: 0 25px 30px;
  }
  #gate.lab .duWelcomeBody {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    min-height: 0;
  }
  #gate.lab .duWelcomeCopy {
    text-align: center;
    width: 100%;
  }
  #gate.lab .duWelcomeCopy > .duEyebrow,
  #gate.lab .duCaption,
  #gate.lab .duShadow {
    display: none;
  }
  #gate.lab .duVisual {
    gap: 0;
  }
  #gate.lab .login-scene {
    width: 345px;
    height: 274px;
    transform: scale(0.86);
    transform-origin: top center;
    margin-bottom: -40px;
  }
  #gate.lab .login-title {
    font-size: 32px;
    line-height: 1.65;
  }
  #gate.lab .login-lead {
    font-size: 15px;
    line-height: 1.85;
    margin-top: 15px;
  }
  #gate.lab .login-actions {
    margin-top: 24px;
    gap: 11px;
    max-width: none;
  }
  #gate.lab .login-next,
  #gate.lab .login-secondary {
    min-height: 54px;
    font-size: 16px;
  }
  #gate.lab #gReg,
  #gate.lab #gLog {
    display: block;
    padding: 8px 25px 35px;
    min-height: calc(100dvh - 77px);
  }
  #gate.lab .duAside {
    display: none;
  }
  #gate.lab .login-step-header {
    margin-bottom: 23px;
    gap: 11px;
  }
  #gate.lab .login-lens {
    width: 105px;
    height: 105px;
    margin-bottom: 23px;
  }
  #gate.lab .login-question {
    font-size: 26px;
    margin-bottom: 20px;
  }
  #gate.lab #gName {
    font-size: 17px;
  }
  #gate.lab .login-bubble {
    font-size: 14px;
  }
  #gate.lab #gCard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 15px 25px 35px;
    min-height: 0;
  }
  #gate.lab .duCardCopy {
    display: contents;
  }
  #gate.lab #gCard h2 {
    order: 0;
    text-align: center;
    font-size: 26px;
  }
  #gate.lab #gCard .duCardCopy > p:not(.duCardStatus) {
    order: 1;
    text-align: center;
    font-size: 14px;
    margin-top: 9px;
  }
  #gate.lab #gCard .idc {
    order: 2;
    margin-top: 12px;
    max-width: 390px;
  }
  #gate.lab #gCard .login-lock {
    order: 3;
    font-size: 13px;
    justify-content: center;
  }
  #gate.lab #gCard .login-actions {
    order: 4;
    width: 100%;
    max-width: none;
    margin-top: 16px;
  }
  #gate.lab #gCard .duCardStatus {
    order: 5;
    text-align: center;
    margin-top: 6px;
  }
  #gate.lab #gLog .duLoginBody {
    margin-top: 32px;
  }
  #duSyncBar {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    max-width: calc(100vw - 24px);
  }
  #duSyncButton {
    font-size: 12px;
    padding: 8px 12px;
  }
  #duUpdate {
    font-size: 13px;
    gap: 7px;
    padding: 8px 12px;
  }
  body.duUpdateReady #gate {
    padding-top: 72px;
  }
}
@media (max-width: 370px) {
  #gate.lab #gChoose,
  #gate.lab #gReg,
  #gate.lab #gLog {
    padding-inline: 19px;
  }
  #gate.lab .login-title {
    font-size: 28px;
  }
  #gate.lab .login-scene {
    transform: scale(0.77);
    margin-bottom: -58px;
  }
  #gate.lab .login-question {
    font-size: 23px;
  }
  #gate.lab .login-tiles-grid {
    gap: 7px;
  }
  #gate.lab .login-tiles-grid button {
    min-height: 72px;
  }
  #gate.lab .login-chat {
    gap: 7px;
  }
  #gate.lab .login-bubble {
    font-size: 13px;
  }
  #gate.lab #gCard {
    padding-inline: 19px;
  }
  #gate.lab #gCard .id-card-name {
    font-size: 1.2rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  #gate.lab *,
  #gate.lab *:before,
  #gate.lab *:after,
  #duSyncBar *,
  #duSaveDialog,
  #duUpdate {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ١ نوفمبر ٢٠٢٦ — وميض لوحة المعلم: اللوحة القديمة تنخفي لين تجهز الجديدة (body.t2)؛ لو ما حمّلت t2.js ترجع تظهر (body.t2x) */
body:not(.t2):not(.t2x) #tBody { visibility: hidden; }
