/* ============================================================
   أزهري — واجهة التطبيق
   ============================================================ */
@font-face {
  font-family: "Amiri";
  src: url("../fonts/Amiri-Regular.ttf") format("truetype");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Amiri";
  src: url("../fonts/Amiri-Bold.ttf") format("truetype");
  font-weight: 700; font-display: swap;
}
@font-face {
  font-family: "Salam";
  src: url("../fonts/salam.ttf") format("truetype");
  unicode-range: U+FDFA;
  font-display: swap;
}
@font-face {
  font-family: "Cairo";
  src: url("../fonts/Cairo.ttf") format("truetype");
  font-weight: 200 900; font-display: swap;
}

:root {
  --green: #10553B;
  --green-d: #0A3A28;
  --green-l: #1B7350;
  --gold: #C9A227;
  --gold-l: #E7CE84;
  --cream: #FBF6EA;
  --paper: #FFFDF8;
  --ink: #23211C;
  --ink-2: #5C574C;
  --line: #E4DCC9;
  --purple: #6B4C8A;
  --purple-d: #543A6D;
  --teal: #2E6B5E;
  --red: #9A3B4B;
  --radius: 18px;
  --shadow: 0 6px 22px rgba(16, 40, 30, .10);
  --shadow-s: 0 2px 10px rgba(16, 40, 30, .07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Cairo", "Salam", "Noto Kufi Arabic", system-ui, sans-serif;
  background: #EFE9DA;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(circle at 85% -10%, rgba(201,162,39,.18), transparent 55%),
    radial-gradient(circle at 0% 100%, rgba(16,85,59,.12), transparent 50%),
    #EFE9DA;
}
img, video, svg { max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: var(--teal); }

.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(0,0,0,.10);
  padding-bottom: 86px;
  position: relative;
  overflow-x: hidden;
}

/* ---------------- app bar ---------------- */
.appbar {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(150deg, var(--green-l), var(--green) 55%, var(--green-d));
  color: #fff;
  padding: 12px 16px 13px;
  border-bottom: 3px solid var(--gold);
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 18px rgba(10,58,40,.25);
}
.appbar .mark {
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 13px;
  background: linear-gradient(160deg, #FFF7E2, #F0DCA6);
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.5px rgba(201,162,39,.9), 0 3px 10px rgba(0,0,0,.18);
}
.appbar .mark svg { width: 27px; height: 27px; }
.appbar h1 { font-size: 19px; margin: 0; font-weight: 800; letter-spacing: .2px; }
.appbar .sub { font-size: 11.5px; opacity: .82; font-weight: 600; margin-top: -2px; }
.appbar .who { font-size: 11.5px; font-weight: 700; background: rgba(255,255,255,.18); border: 0; color: inherit;
  border-radius: 999px; padding: 5px 12px; max-width: 118px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-family: inherit; cursor: pointer; margin-inline-start: 6px; }
.appbar .who[hidden] { display: none; }
.appbar .spacer { flex: 1; }
.appbar .pts {
  font-size: 12px; font-weight: 700; white-space: nowrap; flex: 0 0 auto;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px; padding: 5px 11px;
  display: flex; align-items: center; gap: 5px;
}
.appbar .pts b { color: var(--gold-l); }

/* ---------------- generic ---------------- */
.view { padding: 16px 16px 8px; animation: fadeUp .28s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 800; color: var(--green-d);
  margin: 22px 2px 10px;
}
.section-title::after {
  content: ""; flex: 1; height: 2px;
  background: linear-gradient(90deg, rgba(201,162,39,.55), transparent);
  border-radius: 2px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  box-shadow: var(--shadow-s);
}
.muted { color: var(--ink-2); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ---------------- hero ---------------- */
.hero {
  position: relative;
  border-radius: 22px;
  padding: 20px 18px 18px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(145deg, #1B7350, #10553B 55%, #0A3A28);
  box-shadow: 0 10px 28px rgba(10,58,40,.28);
  border: 1px solid rgba(201,162,39,.5);
}
.hero::after {
  content: ""; position: absolute; inset: -40% -30% auto auto;
  width: 240px; height: 240px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.32), transparent 65%);
}
.hero .eyebrow { font-size: 11.5px; letter-spacing: .5px; color: var(--gold-l); font-weight: 700; }
.hero h2 { margin: 4px 0 6px; font-size: 22px; line-height: 1.4; font-weight: 800; }
.hero p { margin: 0; font-size: 12.5px; opacity: .88; }
.hero .row { display: flex; align-items: center; gap: 12px; margin-top: 14px; position: relative; z-index: 2; }
.ring { position: relative; width: 62px; height: 62px; flex: 0 0 62px; }
.ring svg { transform: rotate(-90deg); }
.ring b {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--gold-l);
}
.hero .row .txt { font-size: 12px; line-height: 1.6; opacity: .92; }
.hero .row .txt b { color: #fff; font-size: 14px; }

/* ---------------- tiles ---------------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.tile {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 12px 12px;
  text-align: right;
  box-shadow: var(--shadow-s);
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.tile:active { transform: scale(.975); }
.tile .ic {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 8px;
  background: linear-gradient(150deg, rgba(16,85,59,.10), rgba(201,162,39,.14));
  color: var(--green);
}
.tile .ic svg { width: 22px; height: 22px; }
.tile b { display: block; font-size: 13.5px; font-weight: 800; }
.tile span { display: block; font-size: 11px; color: var(--ink-2); margin-top: 1px; }
.tile.soon { opacity: .62; }
.tile .badge {
  position: absolute; top: 9px; left: 9px;
  font-size: 9.5px; font-weight: 700; color: #8A6A1F;
  background: #FBF0CE; border: 1px solid #EBD79A;
  border-radius: 999px; padding: 1px 7px;
}
.tile.done .badge { color: #14543A; background: #DDF0E4; border-color: #B9DEC6; }

/* ---------------- lesson banner (booklet style) ---------------- */
.lesson-banner {
  position: relative;
  border-radius: 18px;
  padding: 18px 16px 16px;
  color: #fff;
  border: 2px solid var(--gold);
  background: linear-gradient(135deg, var(--purple), var(--purple-d));
  box-shadow: 0 8px 22px rgba(84,58,109,.28);
  overflow: hidden;
}
.lesson-banner::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 92% 8%, rgba(201,162,39,.35), transparent 42%),
    radial-gradient(circle at 6% 96%, rgba(255,255,255,.10), transparent 40%);
}
.lesson-banner .pill {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(231,206,132,.65);
  color: #FFF3D2;
  padding: 3px 11px; border-radius: 999px;
  position: relative;
}
.lesson-banner h2 {
  font-family: "Amiri", "Salam", serif;
  font-size: 30px; line-height: 1.5; margin: 9px 0 4px;
  font-weight: 700; position: relative;
  text-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.lesson-banner .sub {
  position: relative; font-size: 11.5px; color: #F3E7C6;
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
}
.lesson-banner .sub i { color: var(--gold-l); font-style: normal; }

/* ---------------- lesson hub actions ---------------- */
.hub { display: grid; gap: 10px; margin-top: 14px; }
.hub-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 13px;
  box-shadow: var(--shadow-s); text-align: right; width: 100%;
  transition: transform .15s ease;
}
.hub-item:active { transform: scale(.98); }
.hub-item .ic {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--purple), var(--purple-d));
}
.hub-item .ic svg { width: 22px; height: 22px; }
.hub-item .tx { flex: 1; }
.hub-item .tx b { display: block; font-size: 14px; font-weight: 800; }
.hub-item .tx span { font-size: 11.5px; color: var(--ink-2); }
.hub-item .st {
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: #F1EDE2; color: #6B6355; white-space: nowrap;
}
.hub-item .st.ok { background: #DDF0E4; color: #14543A; }
.hub-item .st.new { background: #FBF0CE; color: #8A6A1F; }

/* ---------------- reading view (booklet look) ---------------- */
.reader { padding-bottom: 10px; }
.r-h2 {
  display: inline-block;
  font-family: "Cairo", sans-serif;
  font-size: 16px; font-weight: 800; color: var(--green-d);
  margin: 22px 0 10px;
  padding-bottom: 5px;
  border-bottom: 2.5px solid var(--gold);
}
.r-h3 { font-size: 14.5px; font-weight: 800; color: var(--purple-d); margin: 16px 0 6px; }
.r-p { font-family: "Amiri", "Salam", serif; font-size: 18px; line-height: 2.05; margin: 0 0 10px; }
.hadith-box {
  background: var(--cream);
  border: 1.5px solid var(--gold);
  border-radius: 14px;
  padding: 16px 15px 12px;
  box-shadow: inset 0 0 0 3px #fff;
  position: relative;
}
.hadith-box .txt {
  font-family: "Amiri", "Salam", serif;
  font-size: 19.5px; line-height: 2.15;
  text-align: center; color: #2A2620;
}
.hadith-box .cap {
  font-size: 11px; color: #8B8271; text-align: center; margin-top: 8px;
  border-top: 1px dashed #DCCFAE; padding-top: 6px;
}
.narr-box {
  background: #F7F4EC;
  border-right: 4px solid var(--gold);
  border-radius: 10px;
  padding: 11px 13px;
  font-family: "Amiri", "Salam", serif; font-size: 17px; line-height: 2;
}
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 8px 0 6px; }
.tbl th {
  background: var(--teal); color: #fff; font-weight: 700;
  padding: 7px 9px; text-align: right; font-size: 12.5px;
  border: 1px solid #245A4F;
}
.tbl td {
  border: 1px solid #DED6C4; padding: 7px 9px;
  font-family: "Amiri", "Salam", serif; font-size: 15.5px; line-height: 1.85;
  vertical-align: top; background: #fff;
}
.tbl tr:nth-child(even) td { background: #FCFAF4; }
.tbl td:first-child { font-family: "Cairo", sans-serif; font-size: 12.5px; font-weight: 700; color: var(--green-d); background: #F6F2E7; }
.tbl .kw { color: var(--purple-d); font-weight: 700; }
ul.diamonds, ul.checks { list-style: none; padding: 0; margin: 6px 0 10px; }
ul.diamonds li, ul.checks li {
  position: relative; padding-right: 26px; margin-bottom: 7px;
  font-family: "Amiri", "Salam", serif; font-size: 17px; line-height: 1.95;
}
ul.diamonds li::before { content: "◆"; position: absolute; right: 2px; top: 0; color: var(--gold); font-size: 12px; }
ul.checks li::before { content: "✔"; position: absolute; right: 2px; top: 1px; color: var(--teal); font-size: 13px; }

/* ---------------- audio player ---------------- */
.player {
  background: linear-gradient(150deg, #2C2540, #1B1730);
  color: #fff; border-radius: 20px; padding: 18px 16px;
  box-shadow: 0 10px 26px rgba(28,22,48,.30);
  border: 1px solid rgba(201,162,39,.45);
}
.player .now { font-size: 11px; color: var(--gold-l); font-weight: 700; letter-spacing: .3px; }
.player .ttl { font-size: 15px; font-weight: 800; margin: 2px 0 12px; }
.player .bar { height: 6px; background: rgba(255,255,255,.16); border-radius: 999px; overflow: hidden; }
.player .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold-l), var(--gold)); border-radius: 999px; transition: width .2s linear; }
.player .times { display: flex; justify-content: space-between; font-size: 11px; color: rgba(255,255,255,.62); margin-top: 5px; }
.player .ctrls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 12px; }
.player .ctrls button { color: #fff; display: grid; place-items: center; }
.player .ctrls .big {
  width: 58px; height: 58px; border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-l), var(--gold));
  color: #2C2540; box-shadow: 0 6px 18px rgba(201,162,39,.45);
}
.player .ctrls .big svg { width: 26px; height: 26px; }
.player .ctrls .side { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.10); }
.player .ctrls .side svg { width: 18px; height: 18px; }
.player .rate { font-size: 12px; font-weight: 800; }
.seg-list { display: grid; gap: 8px; margin-top: 14px; }
.seg {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 13px; padding: 10px 12px; text-align: right; width: 100%;
}
.seg.active { border-color: var(--gold); background: #FFFBEE; box-shadow: 0 0 0 2px rgba(201,162,39,.18); }
.seg .n {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 8px;
  background: #F1EDE2; color: var(--green-d);
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.seg.active .n { background: var(--green); color: #fff; }
.seg .tx { flex: 1; font-size: 13px; font-weight: 600; }
.seg .d { font-size: 11px; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* ---------------- video ---------------- */
.vwrap { border-radius: 18px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.vwrap video { display: block; width: 100%; }
.vmeta svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }
.vmeta { display: flex; gap: 10px; margin-top: 12px; font-size: 12px; color: var(--ink-2); }

/* ---------------- mind map ---------------- */
.mind-wrap {
  position: relative; border-radius: 18px; overflow: hidden;
  background: radial-gradient(circle at 50% 0%, #FFFDF6, #F3EEE0);
  border: 1px solid var(--line); box-shadow: var(--shadow-s);
  touch-action: pan-y;
}
.mind-wrap svg { display: block; width: 100%; height: auto; }
.mind-tools { position: absolute; left: 10px; bottom: 10px; display: grid; gap: 6px; }
.mind-tools button {
  width: 34px; height: 34px; border-radius: 10px; background: #fff;
  border: 1px solid var(--line); box-shadow: var(--shadow-s);
  font-size: 16px; font-weight: 800; color: var(--green-d);
  display: grid; place-items: center;
}
.mind-node { cursor: pointer; }
.mind-node rect { transition: filter .15s ease, transform .15s ease; }
.mind-node:active rect { filter: brightness(.95); }
.mind-detail { margin-top: 12px; }

/* ---------------- exams ---------------- */
.exam-card {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px; box-shadow: var(--shadow-s);
  text-align: right; margin-bottom: 10px;
}
.exam-card .num {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 13px;
  display: grid; place-items: center; font-weight: 800; font-size: 16px;
  background: linear-gradient(150deg, #EFE7F7, #E2D5F0); color: var(--purple-d);
}
.exam-card .tx { flex: 1; }
.exam-card .tx b { display: block; font-size: 14px; }
.exam-card .tx span { font-size: 11.5px; color: var(--ink-2); }
.exam-card .res { font-size: 12px; font-weight: 800; }
.exam-card .res.ok { color: #1F7A5C; }
.exam-card .res.bad { color: var(--red); }

.q-wrap { padding-bottom: 6px; }
.q-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.q-top .prog { flex: 1; height: 7px; background: #EDE7D8; border-radius: 999px; overflow: hidden; }
.q-top .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--green)); border-radius: 999px; transition: width .25s ease; }
.q-top .cnt { font-size: 11.5px; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.q-text { font-family: "Amiri", "Salam", serif; font-size: 19px; line-height: 1.95; margin: 12px 0 14px; }
.q-type { font-size: 10.5px; font-weight: 800; color: #8A6A1F; background: #FBF0CE; border-radius: 999px; padding: 2px 9px; display: inline-block; }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 13px; padding: 11px 13px; margin-bottom: 9px;
  text-align: right; font-size: 15px; font-family: "Amiri", "Salam", serif;
  transition: border-color .15s, background .15s, transform .12s;
}
.opt:active { transform: scale(.99); }
.opt .k {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%;
  border: 1.5px solid #D6CDB8; display: grid; place-items: center;
  font-family: "Cairo", sans-serif; font-size: 12px; font-weight: 800; color: #8B8271;
}
.opt.sel { border-color: var(--purple); background: #F8F4FD; }
.opt.sel .k { background: var(--purple); border-color: var(--purple); color: #fff; }
.opt.good { border-color: #2E8B62; background: #E9F7EF; }
.opt.good .k { background: #2E8B62; border-color: #2E8B62; color: #fff; }
.opt.bad { border-color: #B94A5B; background: #FCEEF0; }
.opt.bad .k { background: #B94A5B; border-color: #B94A5B; color: #fff; }
.nav-row { display: flex; gap: 10px; margin-top: 14px; }

.btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 14px; font-weight: 800; font-size: 14px;
  background: linear-gradient(150deg, var(--green-l), var(--green));
  color: #fff; box-shadow: 0 6px 16px rgba(16,85,59,.24);
  transition: transform .14s ease, box-shadow .14s ease;
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--green-d); border: 1.5px solid var(--line); box-shadow: none; }
.btn.gold { background: linear-gradient(150deg, var(--gold-l), var(--gold)); color: #33280A; box-shadow: 0 6px 16px rgba(201,162,39,.32); }
.btn:disabled { opacity: .45; box-shadow: none; }

/* result */
.result-ring { position: relative; width: 148px; height: 148px; margin: 6px auto 10px; }
.result-ring svg { transform: rotate(-90deg); }
.result-ring .in {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.result-ring .in b { font-size: 34px; font-weight: 800; line-height: 1; color: var(--green-d); }
.result-ring .in span { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.grade-chip {
  display: inline-block; padding: 5px 16px; border-radius: 999px;
  font-weight: 800; font-size: 14px; color: #fff;
}
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 14px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 9px 6px; text-align: center; }
.stat b { display: block; font-size: 17px; font-weight: 800; color: var(--green-d); }
.stat span { font-size: 10.5px; color: var(--ink-2); }
.review { display: grid; gap: 9px; }
.rev {
  background: #fff; border: 1px solid var(--line); border-right-width: 4px;
  border-radius: 12px; padding: 10px 12px;
}
.rev.ok { border-right-color: #2E8B62; }
.rev.no { border-right-color: #B94A5B; }
.rev .q { font-family: "Amiri", "Salam", serif; font-size: 15.5px; line-height: 1.8; }
.rev .a { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.rev .a b { color: var(--green-d); }
.rev .why { font-size: 12px; color: #6B6355; margin-top: 3px; font-style: normal; }

/* ---------------- certificate ---------------- */
.cert-prev { border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); background: #fff; }
.cert-prev canvas { display: block; width: 100%; height: auto; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 5px; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  font-family: inherit; font-size: 15px; color: var(--ink);
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,162,39,.15); }

/* ---------------- game ---------------- */
.game-top { display: flex; gap: 9px; margin-bottom: 12px; }
.game-top .g {
  flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 13px;
  padding: 8px 10px; text-align: center;
}
.game-top .g b { display: block; font-size: 17px; color: var(--green-d); font-weight: 800; }
.game-top .g span { font-size: 10.5px; color: var(--ink-2); }
.match { display: grid; gap: 9px; }
.mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.chip {
  padding: 11px 10px; border-radius: 13px; border: 1.5px solid var(--line);
  background: #fff; font-size: 13.5px; font-weight: 700; text-align: center;
  transition: all .15s ease; min-height: 52px; display: grid; place-items: center;
}
.chip.word { font-family: "Amiri", "Salam", serif; font-size: 17px; }
.chip.sel { border-color: var(--purple); background: #F6F1FC; color: var(--purple-d); }
.chip.hit { border-color: #2E8B62; background: #E9F7EF; color: #1F7A5C; }
.chip.miss { animation: shake .35s; border-color: #B94A5B; }
.chip.gone { opacity: .35; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-5px)} 75%{transform:translateX(5px)} }

/* ---------------- leaderboard / profile ---------------- */
.lb-row { display: flex; align-items: center; gap: 11px; padding: 10px 2px; border-bottom: 1px dashed #E7DFCE; }
.lb-row:last-child { border-bottom: 0; }
.lb-row .rk {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
  background: #F1EDE2; color: #6B6355;
}
.lb-row.me .rk { background: var(--gold); color: #33280A; }
.lb-row .nm { flex: 1; font-size: 13.5px; font-weight: 700; }
.lb-row .pt { font-size: 13px; font-weight: 800; color: var(--green-d); }
.empty { text-align: center; padding: 26px 10px; color: var(--ink-2); font-size: 13px; }

/* ---------------- bottom nav ---------------- */
.nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  max-width: 520px; margin: 0 auto;
  background: rgba(255,253,248,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(20,40,30,.07);
}
.nav button {
  display: grid; justify-items: center; gap: 2px;
  font-size: 10px; font-weight: 700; color: #8B8271; padding: 4px 0;
  border-radius: 12px;
}
.nav button svg { width: 21px; height: 21px; }
.nav button.on { color: var(--green); }
.nav button.on svg { filter: drop-shadow(0 2px 4px rgba(16,85,59,.25)); }
.nav button.on .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

/* back button */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--green-d);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px 5px 10px; margin-bottom: 12px; box-shadow: var(--shadow-s);
}
.back svg { width: 14px; height: 14px; }

.toast {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #23211C; color: #fff; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: all .25s ease; z-index: 90; max-width: 88%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.note {
  display: flex; gap: 9px; align-items: flex-start;
  background: #F4F8F5; border: 1px dashed #BFD9C8; border-radius: 12px;
  padding: 10px 12px; font-size: 12px; color: #3B5A48; line-height: 1.7;
}
.note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 2px; }

@media (prefers-reduced-motion: reduce) {
  .view { animation: none !important; }
  * { transition: none !important; }
}

/* ============================================================
   طبقة الهوية البصرية الفاخرة (Premium) — أُضيفت بعد اعتماد أ. أحمد
   ============================================================ */
:root {
  --p-emerald: #0E6B4A;
  --p-emerald-d: #07301F;
  --p-gold-1: #F6E7B0;
  --p-gold-2: #D9B44A;
  --p-gold-3: #A9822A;
  --p-ink: #14231C;
  --p-glass: rgba(255,255,255,.72);
  --p-shadow-lg: 0 18px 44px rgba(9,42,30,.16), 0 3px 10px rgba(9,42,30,.08);
  --p-shadow-md: 0 10px 26px rgba(9,42,30,.12);
}

/* ---------- شاشة الافتتاح ---------- */
#splash {
  position: fixed; inset: 0; z-index: 999;
  display: grid; place-items: center; gap: 0;
  background:
    radial-gradient(circle at 50% 18%, rgba(217,180,74,.22), transparent 55%),
    radial-gradient(circle at 50% 92%, rgba(14,107,74,.45), transparent 60%),
    linear-gradient(160deg, #0B4B34, #07301F 60%, #05241A);
  transition: opacity .5s ease, transform .5s ease;
  font-family: "Cairo", sans-serif;
}
#splash.out { opacity: 0; transform: scale(1.03); pointer-events: none; }
#splash .sp-wrap { text-align: center; position: relative; z-index: 2; }
#splash .sp-logo {
  width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 30px;
  background: linear-gradient(160deg, #FFFDF3, #EBD79B);
  display: grid; place-items: center;
  box-shadow: 0 0 0 1.5px rgba(246,231,176,.9), 0 22px 50px rgba(0,0,0,.38), inset 0 2px 6px rgba(255,255,255,.9);
  animation: spPop .9s cubic-bezier(.2,.9,.25,1.2) both;
}
#splash .sp-logo svg { width: 62px; height: 62px; }
#splash h1 {
  font-family: "Amiri", serif; font-size: 46px; margin: 0; font-weight: 700;
  background: linear-gradient(135deg, #FFF7DA, #E7CE84 40%, #C9A227 65%, #FFF2C8);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: 1px;
}
#splash .sp-tag { color: rgba(255,255,255,.78); font-size: 13px; font-weight: 600; margin-top: 2px; letter-spacing: .4px; }
#splash .sp-line {
  width: 120px; height: 2px; margin: 20px auto 0; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(231,206,132,.9), transparent);
}
#splash .sp-bar { width: 150px; height: 3px; margin: 16px auto 0; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
#splash .sp-bar i { display: block; height: 100%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #C9A227, #FFF2C8); animation: spBar 1.5s ease-in-out infinite; }
#splash .sp-ring {
  position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px;
  border-radius: 50%; border: 1px solid rgba(231,206,132,.22);
  animation: spRing 2.6s ease-out infinite;
}
#splash .sp-ring:nth-child(2) { animation-delay: .9s; }
@keyframes spPop { from { opacity: 0; transform: scale(.7) translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spBar { 0% { transform: translateX(-120%); } 100% { transform: translateX(260%); } }
@keyframes spRing { 0% { transform: scale(.55); opacity: .8; } 100% { transform: scale(1.25); opacity: 0; } }

/* ---------- انتقالات الصفحات ---------- */
.view { animation: viewIn .34s cubic-bezier(.22,.9,.3,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(10px) scale(.995); } to { opacity: 1; transform: none; } }
.pfx > * { animation: riseIn .42s cubic-bezier(.22,.9,.3,1) both; }
.pfx > *:nth-child(1) { animation-delay: .02s; }
.pfx > *:nth-child(2) { animation-delay: .06s; }
.pfx > *:nth-child(3) { animation-delay: .1s; }
.pfx > *:nth-child(4) { animation-delay: .14s; }
.pfx > *:nth-child(5) { animation-delay: .18s; }
.pfx > *:nth-child(6) { animation-delay: .22s; }
.pfx > *:nth-child(7) { animation-delay: .26s; }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- البطل ---------- */
.ph {
  position: relative; overflow: hidden; border-radius: 26px; padding: 20px 18px 18px;
  color: #fff; border: 1px solid rgba(231,206,132,.42);
  background:
    radial-gradient(circle at 88% 6%, rgba(217,180,74,.34), transparent 46%),
    radial-gradient(circle at 4% 96%, rgba(31,163,116,.34), transparent 52%),
    linear-gradient(150deg, #12805A, #0B5B3E 52%, #062E20);
  box-shadow: 0 20px 44px rgba(6,46,32,.34), inset 0 1px 0 rgba(255,255,255,.14);
}
.ph::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255,255,255,.10) 48%, transparent 58%);
  animation: phShine 5.5s ease-in-out infinite;
}
@keyframes phShine { 0%,100% { transform: translateX(-40%); } 50% { transform: translateX(40%); } }
.ph-top { display: flex; align-items: center; gap: 8px; position: relative; z-index: 2; }
.ph-chip {
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px; color: #FFF6D8;
  background: rgba(255,255,255,.13); border: 1px solid rgba(231,206,132,.55);
  border-radius: 999px; padding: 4px 11px;
}
.ph-live { margin-inline-start: auto; font-size: 10px; font-weight: 700; color: #D9F3E5; display: flex; align-items: center; gap: 5px; }
.ph-live i { width: 6px; height: 6px; border-radius: 50%; background: #63E3A6; box-shadow: 0 0 0 3px rgba(99,227,166,.22); animation: livePulse 1.8s infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.ph-h {
  position: relative; z-index: 2; margin: 14px 0 6px;
  font-family: "Amiri", serif; font-size: 34px; line-height: 1.28; font-weight: 700;
  text-shadow: 0 3px 14px rgba(0,0,0,.28);
}
.ph-h span { display: block; font-size: 27px; color: #F2DFA4; }
.ph-sub { position: relative; z-index: 2; margin: 0; font-size: 12px; color: rgba(255,255,255,.86); line-height: 1.9; }
.ph-row { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.ph-ring { position: relative; width: 66px; height: 66px; flex: 0 0 66px; }
.ph-ring svg { transform: rotate(-90deg); }
.ph-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: #FFF2C8; }
.ph-cta {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(135deg, #FFF7DA, #E7CE84 45%, #C9A227);
  color: #3A2B08; font-weight: 800; font-size: 14px;
  border-radius: 15px; padding: 12px 14px;
  box-shadow: 0 8px 20px rgba(201,162,39,.34), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .14s ease;
}
.ph-cta:active { transform: scale(.97); }
.ph-cta svg { width: 18px; height: 18px; }

/* ---------- إحصاءات ---------- */
.pstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 12px; }
.pstats .ps {
  background: linear-gradient(160deg, #FFFFFF, #FBF7EC);
  border: 1px solid #E9E1CE; border-radius: 15px; padding: 10px 8px; text-align: center;
  box-shadow: 0 6px 16px rgba(9,42,30,.07);
}
.pstats .ps b { display: block; font-size: 18px; font-weight: 800; color: var(--p-emerald); line-height: 1.3; }
.pstats .ps span { font-size: 10.5px; color: #7C7466; font-weight: 600; }

/* ---------- بلاطات فاخرة ---------- */
.ptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.ptile {
  position: relative; overflow: hidden; text-align: right;
  background: linear-gradient(165deg, #FFFFFF, #FCF9F1);
  border: 1px solid #E7DFCC; border-radius: 18px; padding: 13px 12px 12px;
  box-shadow: 0 8px 20px rgba(9,42,30,.08);
  transition: transform .16s cubic-bezier(.2,.9,.3,1.2), box-shadow .16s ease;
}
.ptile:active { transform: scale(.965); box-shadow: 0 4px 12px rgba(9,42,30,.1); }
.ptile .pt-ic {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  color: #fff; margin-bottom: 9px;
  background: linear-gradient(150deg, var(--h1, #1B7350), var(--h2, #0A3A28));
  box-shadow: 0 8px 18px rgba(9,42,30,.22), inset 0 1px 0 rgba(255,255,255,.28);
}
.ptile .pt-ic svg { width: 23px; height: 23px; }
.ptile b { display: block; font-size: 13.5px; font-weight: 800; color: var(--p-ink); }
.ptile .pt-sub { display: block; font-size: 10.5px; color: #7C7466; margin-top: 2px; line-height: 1.6; }
.ptile .pt-badge {
  position: absolute; top: 10px; left: 10px; font-size: 9px; font-weight: 700;
  color: #8A6A1F; background: #FBF0CE; border: 1px solid #EBD79A;
  border-radius: 999px; padding: 1px 7px;
}
.ptile .pt-badge.ok { color: #14543A; background: #DDF0E4; border-color: #B9DEC6; }
.ptile .pt-shine {
  position: absolute; top: -60%; right: -30%; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.16), transparent 70%); pointer-events: none;
}

/* ---------- رأس قسم ---------- */
.psec {
  display: flex; align-items: center; gap: 9px; margin: 22px 2px 11px;
  font-size: 15px; font-weight: 800; color: #0B4B34;
}
.psec .dot { width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, #E7CE84, #C9A227); box-shadow: 0 0 0 3px rgba(201,162,39,.16); }
.psec::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201,162,39,.5), transparent); }

/* ---------- شريط الألعاب ---------- */
.gstrip { display: grid; grid-auto-flow: column; grid-auto-columns: 76%; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.gstrip::-webkit-scrollbar { display: none; }
.gmini {
  scroll-snap-align: start; position: relative; overflow: hidden; text-align: right;
  border-radius: 18px; padding: 14px 15px; color: #fff; min-height: 104px;
  box-shadow: 0 12px 26px rgba(9,42,30,.20);
}
.gmini b { display: block; font-size: 15px; font-weight: 800; }
.gmini span { font-size: 11px; opacity: .9; }
.gmini .gm-ico { position: absolute; left: 12px; bottom: 10px; opacity: .28; }
.gmini .gm-ico svg { width: 46px; height: 46px; }

/* ---------- حديث اليوم ---------- */
.phadith {
  position: relative; overflow: hidden; border-radius: 20px; padding: 20px 18px 14px;
  background: linear-gradient(160deg, #FFFDF6, #F8EFD8);
  border: 1px solid #E4D2A0;
  box-shadow: inset 0 0 0 4px #fff, 0 10px 26px rgba(9,42,30,.08);
}
.phadith .txt { font-family: "Amiri", serif; font-size: 20px; line-height: 2.1; text-align: center; color: #2A2620; }
.phadith .ref { font-size: 11px; color: #8B8271; text-align: center; margin-top: 8px; }
.phadith .orn { position: absolute; width: 34px; height: 34px; border: 2px solid rgba(201,162,39,.45); border-radius: 8px; }
.phadith .orn.tl { top: 8px; right: 8px; border-left: 0; border-bottom: 0; }
.phadith .orn.br { bottom: 8px; left: 8px; border-right: 0; border-top: 0; }

/* ---------- ركن الألعاب ---------- */
.gh {
  position: relative; overflow: hidden; border-radius: 26px; padding: 22px 18px 18px; color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(217,180,74,.32), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(122,86,164,.45), transparent 50%),
    linear-gradient(150deg, #1E6B57, #14463E 55%, #23173A);
  border: 1px solid rgba(231,206,132,.38);
  box-shadow: 0 20px 44px rgba(20,40,34,.32);
}
.gh .orb { position: absolute; border-radius: 50%; filter: blur(1px); opacity: .5; }
.gh .orb.a { width: 120px; height: 120px; top: -40px; left: -30px; background: radial-gradient(circle, rgba(201,162,39,.55), transparent 70%); animation: float1 7s ease-in-out infinite; }
.gh .orb.b { width: 90px; height: 90px; bottom: -30px; right: 20px; background: radial-gradient(circle, rgba(120,220,180,.45), transparent 70%); animation: float1 9s ease-in-out infinite reverse; }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(10px,-12px); } }
.gh h2 { position: relative; z-index: 2; font-family: "Amiri", serif; font-size: 30px; margin: 10px 0 4px; font-weight: 700; }
.gh .gh-sub { position: relative; z-index: 2; font-size: 12px; color: rgba(255,255,255,.85); }
.gh .gh-pts { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(231,206,132,.45); border-radius: 999px; padding: 6px 14px; }
.gh .gh-pts b { color: #FFF2C8; font-size: 14px; }

.gcards { display: grid; gap: 12px; margin-top: 14px; }
.gcard {
  position: relative; overflow: hidden; text-align: right; color: #fff;
  border-radius: 20px; padding: 16px 16px 14px;
  box-shadow: 0 14px 30px rgba(9,42,30,.18);
  transition: transform .16s cubic-bezier(.2,.9,.3,1.2);
}
.gcard:active { transform: scale(.975); }
.gcard::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.12) 52%, transparent 62%); }
.gcard .gc-top { display: flex; align-items: center; gap: 11px; position: relative; z-index: 2; }
.gcard .gc-ic { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 15px; display: grid; place-items: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28); }
.gcard .gc-ic svg { width: 24px; height: 24px; }
.gcard .gc-ic svg { width: 24px; height: 24px; }
.gcard b { display: block; font-size: 16px; font-weight: 800; }
.gcard span { font-size: 11px; opacity: .88; }
.gcard .gc-bot { position: relative; z-index: 2; display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.gcard .gc-best { font-size: 10.5px; background: rgba(0,0,0,.20); border-radius: 999px; padding: 3px 10px; }
.gcard .gc-go { margin-inline-start: auto; font-size: 12px; font-weight: 800; color: #2A2005; background: linear-gradient(135deg, #FFF7DA, #E7CE84); border-radius: 999px; padding: 6px 16px; }

/* ---------- شاشة اللعب ---------- */
.game-hud { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.game-hud .hud-i {
  flex: 1; text-align: center; background: linear-gradient(160deg, #fff, #FBF7EC);
  border: 1px solid #E9E1CE; border-radius: 14px; padding: 7px 6px;
  box-shadow: 0 6px 16px rgba(9,42,30,.07);
}
.game-hud .hud-i b { display: block; font-size: 16px; font-weight: 800; color: var(--p-emerald); line-height: 1.35; }
.game-hud .hud-i span { font-size: 9.5px; color: #7C7466; font-weight: 700; }
.game-hud .hud-t { position: relative; width: 58px; height: 58px; flex: 0 0 58px; }
.game-hud .hud-t svg { transform: rotate(-90deg); }
.game-hud .hud-t b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--p-emerald); }
.hud-snd { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: #F1EDE2; color: #5C574C; }
.hud-snd svg { width: 17px; height: 17px; }

.qbox {
  margin-top: 14px; border-radius: 20px; padding: 18px 16px;
  background: linear-gradient(160deg, #fff, #FBF7EC); border: 1px solid #E9E1CE;
  box-shadow: 0 12px 28px rgba(9,42,30,.09);
}
.qbox .q-tag { font-size: 10.5px; font-weight: 700; color: #8A6A1F; background: #FBF0CE; border-radius: 999px; padding: 2px 10px; display: inline-block; }
.qbox .q-t { font-family: "Amiri", serif; font-size: 21px; line-height: 1.95; margin: 10px 0 4px; color: #22201A; }
.opts { display: grid; gap: 9px; margin-top: 12px; }
.opt {
  display: flex; align-items: center; gap: 10px; text-align: right;
  background: #fff; border: 1.5px solid #E4DCC9; border-radius: 14px; padding: 11px 13px;
  font-size: 14px; font-weight: 600; color: #2A2620;
  transition: transform .13s ease, border-color .13s ease, background .13s ease;
}
.opt:active { transform: scale(.985); }
.opt .k { width: 24px; height: 24px; flex: 0 0 24px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #F1EDE2; color: #6B6355; }
.opt.ok { border-color: #2FA473; background: #E9F9F0; }
.opt.ok .k { background: #2FA473; color: #fff; }
.opt.bad { border-color: #D8778B; background: #FDEDF1; }
.opt.bad .k { background: #C2556C; color: #fff; }
.opt.dim { opacity: .45; }

.match2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }
.mchip {
  background: #fff; border: 1.5px solid #E4DCC9; border-radius: 14px;
  padding: 11px 10px; font-size: 13px; font-weight: 700; color: #2A2620; text-align: center;
  min-height: 54px; display: grid; place-items: center; line-height: 1.5;
  box-shadow: 0 5px 14px rgba(9,42,30,.06); transition: transform .13s ease, background .13s ease;
}
.mchip:active { transform: scale(.97); }
.mchip.sel { border-color: var(--p-emerald); background: #EAF6F0; box-shadow: 0 0 0 3px rgba(14,107,74,.14); }
.mchip.hit { border-color: #2FA473; background: #E9F9F0; animation: popIn .3s ease; }
.mchip.miss { border-color: #D8778B; background: #FDEDF1; animation: shake .34s ease; }
.mchip.gone { opacity: .28; pointer-events: none; }
.mchip.mean { font-family: "Amiri", serif; font-size: 14.5px; }

.order-pool { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; justify-content: center; }
.ochip {
  background: #fff; border: 1.5px solid #E4DCC9; border-radius: 12px;
  padding: 9px 12px; font-family: "Amiri", serif; font-size: 15px; line-height: 1.7;
  box-shadow: 0 5px 14px rgba(9,42,30,.06); transition: transform .13s ease;
}
.ochip:active { transform: scale(.96); }
.ochip.used { opacity: 0; pointer-events: none; transform: scale(.8); }
.order-line {
  min-height: 86px; margin-top: 12px; border-radius: 16px; padding: 12px;
  background: #FBF6EA; border: 1.5px dashed #D9C79A;
  font-family: "Amiri", serif; font-size: 17px; line-height: 2; text-align: center; color: #2A2620;
}
.order-line .tok { animation: popIn .26s ease; }
@keyframes popIn { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: none; } }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------- نتيجة اللعبة ---------- */
#winwrap {
  position: fixed; inset: 0; z-index: 900; display: grid; place-items: center;
  background: rgba(7,32,23,.55); backdrop-filter: blur(6px);
  animation: fadeIn .22s ease both; padding: 18px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.wincard {
  position: relative; z-index: 2;
  width: 100%; max-width: 360px; border-radius: 26px; padding: 22px 18px 18px; text-align: center;
  background: linear-gradient(170deg, #FFFDF6, #F7EED7);
  border: 1px solid #E4D2A0; box-shadow: 0 30px 70px rgba(0,0,0,.35);
  animation: winIn .42s cubic-bezier(.2,.9,.3,1.3) both;
}
@keyframes winIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
.wincard .medal {
  width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(150deg, #FFF7DA, #E7CE84 50%, #C9A227);
  box-shadow: 0 14px 30px rgba(201,162,39,.4), inset 0 2px 6px rgba(255,255,255,.8);
  font-size: 34px;
}
.wincard h3 { margin: 4px 0 2px; font-family: "Amiri", serif; font-size: 24px; color: #0B4B34; }
.wincard .wc-sub { font-size: 12.5px; color: #6B6355; }
.wincard .wc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 14px 0 6px; }
.wincard .wc-grid div { background: #fff; border: 1px solid #E9E1CE; border-radius: 13px; padding: 8px 4px; }
.wincard .wc-grid b { display: block; font-size: 16px; color: var(--p-emerald); }
.wincard .wc-grid span { font-size: 9.5px; color: #7C7466; font-weight: 700; }
.wincard .btn { margin-top: 12px; }

/* ---------- إشعار نقاط عائم ---------- */
.flypts {
  position: fixed; z-index: 950; font-weight: 800; font-size: 16px; color: #1B7350;
  pointer-events: none; animation: flyUp 1s ease-out forwards;
  text-shadow: 0 2px 8px rgba(255,255,255,.9);
}
@keyframes flyUp { 0% { opacity: 0; transform: translateY(6px) scale(.9); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px) scale(1.1); } }
#confetti { position: fixed; inset: 0; z-index: 940; pointer-events: none; }

/* ---------- شريط التنقل العائم ---------- */
.nav {
  background: rgba(255,253,248,.86) !important;
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-top: 1px solid rgba(201,162,39,.35) !important;
  box-shadow: 0 -10px 30px rgba(9,42,30,.10) !important;
}
.nav button.on { color: var(--p-emerald); }
.nav button.on svg { filter: drop-shadow(0 3px 8px rgba(14,107,74,.35)); }

/* ---------- إصلاحات القصّ والخطوط الكبيرة ---------- */
.ph-h { line-height: 1.45; padding-top: 2px; }
.gh h2 { line-height: 1.55; padding-top: 2px; }
.gcard b { line-height: 1.5; }
.gcard .gc-top > span:last-child { display: block; }
.gcard .gc-top > span:last-child > span { display: block; line-height: 1.6; margin-top: 1px; }

/* ---------- صفوف التحديات ---------- */
.grows { display: grid; gap: 9px; }
.grow {
  display: flex; align-items: center; gap: 11px; text-align: right; width: 100%;
  border-radius: 16px; padding: 11px 13px; color: #fff;
  box-shadow: 0 10px 22px rgba(9,42,30,.16);
  transition: transform .15s ease;
}
.grow:active { transform: scale(.98); }
.grow .gr-ic {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; display: grid; place-items: center;
  background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.28);
}
.grow .gr-ic svg { width: 20px; height: 20px; }
.grow b { display: block; font-size: 13.5px; font-weight: 800; }
.grow .gr-sub { font-size: 10.5px; opacity: .88; }
.grow .gr-go {
  margin-inline-start: auto; font-size: 11px; font-weight: 800; color: #2A2005;
  background: linear-gradient(135deg, #FFF7DA, #E7CE84); border-radius: 999px; padding: 5px 13px;
}

/* ---------- خريطة الأقسام ---------- */
.snav { display: grid; gap: 9px; }
.snav button {
  display: flex; align-items: center; gap: 11px; text-align: right; width: 100%;
  background: linear-gradient(160deg, #fff, #FCF9F1); border: 1px solid #E7DFCC;
  border-radius: 16px; padding: 12px 13px; box-shadow: 0 6px 16px rgba(9,42,30,.06);
  transition: transform .15s ease;
}
.snav button:active { transform: scale(.98); }
.snav .sn-ic {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(150deg, var(--h1, #1B7350), var(--h2, #0A3A28));
  box-shadow: 0 6px 14px rgba(9,42,30,.20);
}
.snav .sn-ic svg { width: 21px; height: 21px; }
.snav .sn-tx { flex: 1; }
.snav .sn-tx b { display: block; font-size: 13.5px; font-weight: 800; color: #14231C; }
.snav .sn-tx span { font-size: 10.5px; color: #7C7466; }
.snav .sn-prog { font-size: 11px; font-weight: 800; color: #0B4B34; background: #EAF6F0; border: 1px solid #C6E5D5; border-radius: 999px; padding: 4px 11px; white-space: nowrap; }
.snav .sn-prog.soon { background: #FBF0CE; border-color: #EBD79A; color: #8A6A1F; }

/* ---------- صفحة إمام ---------- */
.imam-hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 20px 18px 16px; color: #fff;
  border: 1px solid rgba(231,206,132,.4); box-shadow: 0 18px 40px rgba(9,42,30,.28);
}
.imam-hero .ih-ic {
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); margin-bottom: 10px;
}
.imam-hero .ih-ic svg { width: 28px; height: 28px; }
.imam-hero h2 { font-family: "Amiri", serif; font-size: 30px; margin: 0 0 4px; line-height: 1.5; }
.imam-hero .ih-book { font-size: 12px; color: #F2E4BE; }
.plist { display: grid; gap: 9px; margin-top: 12px; }
.pitem {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid #E7DFCC;
  border-radius: 14px; padding: 11px 13px; box-shadow: 0 5px 14px rgba(9,42,30,.05);
}
.pitem .pi-n { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #F1EDE2; color: #6B6355; }
.pitem b { font-size: 13px; font-weight: 700; flex: 1; }
.pitem .pi-s { font-size: 10px; font-weight: 700; color: #8A6A1F; background: #FBF0CE; border-radius: 999px; padding: 2px 9px; }

#winwrap > #confetti { z-index: 0 !important; }

/* ---------- شعار المنصة ---------- */
.appbar .mark { background: #FFFDF6; overflow: hidden; padding: 0; }
.appbar .mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
#splash .sp-logo { background: none; box-shadow: none; width: 150px; height: 150px; }
#splash .sp-logo img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 40px rgba(0,0,0,.45)); }

/* ---------- بطاقة المادة الجاهزة ---------- */
.subject-hero {
  display: block; width: 100%; text-align: right; position: relative; overflow: hidden;
  border-radius: 20px; padding: 16px 16px 14px; color: #fff;
  background: radial-gradient(circle at 90% 0%, rgba(217,180,74,.30), transparent 48%), linear-gradient(150deg, #12805A, #0A4A34 60%, #062E20);
  border: 1px solid rgba(231,206,132,.42);
  box-shadow: 0 16px 34px rgba(9,42,30,.26);
  transition: transform .15s ease;
}
.subject-hero:active { transform: scale(.98); }
.subject-hero .sh-top { display: flex; align-items: center; gap: 8px; }
.subject-hero .sh-badge { font-size: 10px; font-weight: 700; color: #2A2005; background: linear-gradient(135deg,#FFF7DA,#E7CE84); border-radius: 999px; padding: 3px 11px; }
.subject-hero .sh-prog { margin-inline-start: auto; font-size: 11px; font-weight: 800; color: #FFF2C8; }
.subject-hero b { display: block; font-family: "Amiri", serif; font-size: 26px; font-weight: 700; margin-top: 10px; }
.subject-hero .sh-sub { display: block; font-size: 11.5px; color: rgba(255,255,255,.86); margin-top: 2px; line-height: 1.8; }
.subject-hero .sh-parts { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.subject-hero .sh-parts i { font-style: normal; font-size: 10px; font-weight: 700; color: #F6E7B0; background: rgba(255,255,255,.14); border: 1px solid rgba(231,206,132,.4); border-radius: 999px; padding: 3px 10px; }

/* ===== تواصل مع الإدارة ===== */
.ct-list{display:flex;flex-direction:column;gap:10px;margin-top:14px}
.ct-row{display:flex;align-items:center;gap:12px;padding:14px;border-radius:16px;background:#fff;border:1px solid #ECE6D6;box-shadow:0 6px 18px rgba(24,32,26,.05);text-decoration:none;color:inherit}
.ct-row:active{transform:scale(.985)}
.ct-row.off{opacity:.62;box-shadow:none;background:#FCFAF3}
.ct-ic{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:#EAF4EF;color:#1F7A5C;flex:0 0 auto}
.ct-ic svg{width:22px;height:22px}
.ct-tx{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.ct-tx b{font-size:14.5px;color:#1B2440}
.ct-tx span{font-size:12px;color:#6B6355;line-height:1.5}
.ct-tx .ct-val{direction:ltr;unicode-bidi:plaintext;text-align:right;font-weight:600;color:#1F7A5C}
.ct-go{width:22px;height:22px;color:#9A917F;transform:rotate(180deg);flex:0 0 auto}

/* ===== لعبة سباق السرعة ===== */
.race{margin-top:4px}
.road{position:relative;height:78px;border-radius:18px;background:linear-gradient(180deg,#FBF7EC,#F0EAD8);border:1px solid #E4DCC6;box-shadow:inset 0 2px 8px rgba(24,32,26,.06);overflow:hidden;margin-bottom:12px}
.road .lane{position:absolute;left:9%;right:9%;top:50%;height:4px;border-radius:4px;transform:translateY(-50%);background:repeating-linear-gradient(90deg,#CFC4A2 0 16px,rgba(0,0,0,0) 16px 30px)}
.road .car{position:absolute;top:50%;left:0;transform:translate(-50%,-58%);transition:left .45s cubic-bezier(.3,1.3,.5,1)}
.road .car svg{display:block;filter:drop-shadow(0 4px 6px rgba(24,32,26,.18))}
.road .car.boost svg{filter:drop-shadow(0 0 10px rgba(231,206,132,.95))}
.road .flag{position:absolute;right:8px;top:50%;transform:translateY(-50%);font-size:20px;line-height:1;opacity:.9}
.spd{height:8px;border-radius:8px;background:#EDE7D6;overflow:hidden;margin:0 2px 10px}
.spd>span{display:block;height:100%;width:0;background:linear-gradient(90deg,#1F7A5C,#57C79A);transition:width .35s ease}
.hud-inline{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:12.5px;font-weight:700;color:#3A3226;margin:0 2px 10px}
.hud-inline #r-t{color:#8A3B2B}
.hud-inline #r-sc,.hud-inline #t-sc{color:#1F7A5C}
.hud-inline #t-st{color:#3A3226}

/* ===== البوكليت الأزهري ===== */
.bk{padding-bottom:90px}
.bk-page{background:#FFFDF7;border:1px solid #E6DEC8;border-radius:14px;padding:16px 14px;margin-top:12px;box-shadow:0 6px 18px rgba(24,32,26,.05)}
.bk-head{display:flex;justify-content:space-between;gap:8px;font-size:10.5px;color:#8A7B55;border-bottom:1px dashed #DED3B4;padding-bottom:8px;margin-bottom:12px}
.bk-cover{text-align:center}
.bk-gov{font-size:12px;color:#1F7A5C;font-weight:700}
.bk-title{font-family:Amiri,serif;font-size:23px;color:#1B2440;margin-top:8px}
.bk-sub{font-size:13px;color:#3A3226;margin-top:6px;font-weight:700}
.bk-sub2{font-size:11.5px;color:#6B6355;margin-top:4px}
.bk-marks{width:100%;border-collapse:collapse;margin-top:14px;font-size:12px}
.bk-marks th,.bk-marks td{border:1px solid #DED3B4;padding:7px 4px;text-align:center}
.bk-marks th{background:#F5F0E0;font-weight:700;color:#3A3226}
.bk-marks td:last-child{width:34%}
.bk-marks .bk-tot td{background:#FBF6E6;font-weight:700}
.bk-secret{display:flex;align-items:center;gap:10px;justify-content:center;margin-top:14px;font-size:12px;color:#3A3226}
.bk-box{width:120px;height:26px;border:1.5px dashed #B9A87A;border-radius:6px}
.bk-slip{margin-top:16px;border:1.5px dashed #B9A87A;border-radius:10px;padding:10px;text-align:right}
.bk-slip-h{font-size:11px;color:#8A7B55;margin-bottom:8px}
.bk-slip-r{display:flex;align-items:center;gap:8px;font-size:12px;color:#3A3226;margin-bottom:9px}
.bk-slip-r i{flex:1;border-bottom:1px dotted #C9BC98;height:12px}
.bk-instr h4{font-size:13.5px;color:#1F7A5C;margin:0 0 8px}
.bk-instr ol{margin:0;padding-inline-start:18px;font-size:12.5px;line-height:2;color:#3A3226}
.bk-noans{margin-top:16px;border:1.5px dashed #C9BC98;border-radius:10px;padding:26px 10px;text-align:center;font-size:12px;color:#9A917E;background:#FBF8EE}
.bk-qhead{display:flex;justify-content:space-between;align-items:center;background:#F3EFDF;border-radius:9px;padding:8px 11px;margin-bottom:12px}
.bk-qno{font-weight:700;font-size:13.5px;color:#1B2440}
.bk-qmk{font-size:11.5px;color:#8A7B55}
.bk-part{display:flex;gap:8px;margin-bottom:14px}
.bk-part-l{font-family:Amiri,serif;font-size:17px;color:#1F7A5C;font-weight:700;padding-top:2px}
.bk-part-b{flex:1}
.bk-essay,.bk-item-b{flex:1}
.bk-q{font-family:Amiri,serif;font-size:15.5px;line-height:1.95;color:#241F18;margin-bottom:8px}
.bk-write{width:100%;border:1px dashed #C9BC98;border-radius:8px;background:#FFFEFA;padding:9px;font-family:Amiri,serif;font-size:14px;line-height:2.4;color:#241F18;resize:vertical;background-image:repeating-linear-gradient(#FFFEFA 0 26px,#E9E0C6 26px 27px)}
.bk-mk-note{font-size:10.5px;color:#9A917E;margin-top:4px;text-align:left}
.bk-item{display:flex;gap:6px;margin-bottom:12px}
.bk-n{font-size:11.5px;color:#8A7B55;padding-top:3px}
.bk-opts{display:grid;gap:6px;grid-template-columns:1fr 1fr}
.bk-opts.tf{grid-template-columns:1fr 1fr}
.bk-opt{display:flex;align-items:center;gap:7px;background:#fff;border:1px solid #E6DEC8;border-radius:10px;padding:8px 9px;font-size:12.5px;color:#3A3226;text-align:right;font-family:inherit}
.bk-opt .bk-circle{width:22px;height:22px;border-radius:50%;border:1.4px solid #C9BC98;display:grid;place-items:center;font-size:11px;color:#8A7B55;flex:0 0 auto}
.bk-opt.on{border-color:#1F7A5C;background:#EFF7F2}
.bk-opt.on .bk-circle{background:#1F7A5C;border-color:#1F7A5C;color:#fff}
.bk-rough{margin-top:12px;border:1.5px dashed #C9BC98;border-radius:10px;min-height:420px;display:grid;place-items:start center;padding:12px;color:#B9A87A;font-size:12px}
.bk-bar{position:fixed;inset-inline:0;bottom:64px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 14px;background:rgba(255,253,247,.97);border-top:1px solid #E6DEC8;font-size:11.5px;color:#6B6355;z-index:60}
.bk-bar .btn{padding:9px 18px;font-size:13px}
.bk-res{border-radius:16px;padding:20px;text-align:center;color:#fff;background:linear-gradient(150deg,#1F7A5C,#0E4E3A)}
.bk-res.bad{background:linear-gradient(150deg,#8A3B2B,#4E1E14)}
.bk-res b{display:block;font-size:30px;font-family:Amiri,serif}
.bk-res span{font-size:13px;opacity:.92}
.bk-rrow{display:grid;grid-template-columns:1fr auto;gap:2px 8px;padding:9px 0;border-bottom:1px solid #F0EAD8;font-size:12.5px;color:#3A3226}
.bk-rrow b{color:#1F7A5C}
.bk-rrow .small{grid-column:1/-1}

/* ===== الأوضاع الأربعة ===== */
.modes{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:14px}
.mode{display:flex;flex-direction:column;align-items:center;gap:4px;padding:9px 4px;border-radius:13px;background:#fff;border:1px solid #ECE6D6;color:#6B6355;font-family:inherit;font-size:11.5px}
.mode svg{width:18px;height:18px}
.mode.on{background:#EFF7F2;border-color:#1F7A5C;color:#1F7A5C;font-weight:700}

/* ===== الرسوم التوضيحية ===== */
.fig{margin:12px 0 18px}
.fig svg{width:100%;height:auto;display:block;border-radius:14px}
.fig-cap{font-size:11.5px;color:var(--ink-2);text-align:center;margin-top:6px;line-height:1.7}

/* ===== منع تحميل الوسائط (قاعدة المنصة) ===== */
video, audio, img, canvas { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
video::-internal-media-controls-download-button { display: none; }
video::-webkit-media-controls-enclosure { overflow: hidden; }
.appbar .sub{white-space:nowrap;font-size:11px}
.appbar h1{font-size:18px;white-space:nowrap}
.appbar .who{max-width:88px;padding:4px 9px;font-size:10.5px}
.appbar .who{max-width:108px}
.appbar .who{max-width:88px}
.appbar{gap:8px} .appbar .mark{width:38px;height:38px;flex:0 0 38px} .appbar .pts{font-size:11px;padding:4px 9px} .appbar .spacer{flex:0 1 auto;min-width:0} .appbar .who{max-width:none;flex:1 1 auto;min-width:52px;white-space:normal;overflow:visible;text-overflow:clip;line-height:1.22;font-size:10px;padding:4px 8px;text-align:center}
.hhero{margin-bottom:14px} .hbayt{background:linear-gradient(155deg,#0F5A3E,#08321F);border:1px solid rgba(231,206,132,.5);border-radius:18px;padding:22px 16px 16px;text-align:center;box-shadow:0 10px 26px rgba(8,50,31,.22)} .hb1{font-family:Amiri,serif;font-size:27px;line-height:1.7;color:#F2D98B;font-weight:700} .hb2{font-family:Amiri,serif;font-size:21px;line-height:1.8;color:#E7CE84;opacity:.95;margin-top:4px} .hb-by{font-size:11.5px;color:#CBD9CE;opacity:.85;margin-top:10px} .hayah{margin-top:12px;background:#FCFAF3;border:1px solid #E7D9B4;border-radius:18px;padding:16px 14px;text-align:center} .ay-text{font-family:Amiri,serif;font-size:19px;line-height:2.1;color:#123A2A} .ay-text .aw{transition:background .18s;padding:1px 2px;border-radius:5px} .ay-text .aw.on{background:#FBE9A8;color:#5A430F} .ay-foot{display:flex;align-items:center;justify-content:space-between;margin-top:12px;gap:10px} .ay-ref{font-size:12px;color:#8A7A4E;font-weight:700} .ay-play{display:flex;align-items:center;gap:8px;background:linear-gradient(150deg,#1B7350,#0A3A28);color:#fff;border:0;border-radius:999px;padding:11px 18px;font-size:13.5px;font-weight:800;font-family:inherit;cursor:pointer;box-shadow:0 6px 16px rgba(11,75,52,.25)} .htiles{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:12px} .htile{display:flex;flex-direction:column;align-items:center;gap:6px;background:linear-gradient(150deg,var(--h1),var(--h2));color:#fff;border:0;border-radius:16px;padding:18px 10px;font-family:inherit;cursor:pointer;text-align:center} .htile b{font-size:16px} .htile span:last-child{font-size:10.5px;opacity:.85} .ht-ic{width:38px;height:38px;display:grid;place-items:center;background:rgba(255,255,255,.18);border-radius:12px}
.ay-play{white-space:nowrap;padding:11px 16px} .ay-foot{flex-wrap:nowrap}
.hgrade{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin-top:10px;background:#FBF7EC;border:1px solid #E7D9B4;border-radius:12px;padding:11px 14px;font-family:inherit;font-size:12.5px;color:#5A430F;cursor:pointer} .hgrade b{background:#0F5A3E;color:#fff;border-radius:999px;padding:4px 12px;font-size:11px}
.ay-play svg{flex:0 0 auto;width:16px;height:16px}
.appver{text-align:center;font-size:11px;color:#8A8F86;margin:14px 0 4px}

/* install sheet */
#inst-sheet{position:fixed;inset:0;z-index:9999;display:grid;place-items:center}
#inst-sheet .inst-bg{position:absolute;inset:0;background:rgba(16,26,20,.55)}
#inst-sheet .inst-card{position:relative;width:min(92vw,380px);background:#FFFDF6;border-radius:20px;padding:20px 18px 16px;box-shadow:0 18px 50px rgba(0,0,0,.28);text-align:right;animation:fadeUp .2s ease both}
.ay-auto{font-size:11px;color:#8A7A4E;font-weight:700;opacity:.85}
.spec-row{display:grid;gap:8px;margin-top:14px}
.spec-chip{display:flex;align-items:center;gap:8px;width:100%;background:#fff;border:1px solid var(--line);border-radius:14px;padding:11px 14px;font-family:inherit;cursor:pointer;box-shadow:var(--shadow-s);text-align:right}
.spec-chip .lbl{font-size:11.5px;color:#8A8271}
.spec-chip b{font-size:13.5px;color:var(--green-d);flex:1}
.spec-chip .car{font-size:11px;color:#8A8271}
.spec-les .ic{font-size:15px;font-weight:800;color:#fff}
#spec-sheet{position:fixed;inset:0;z-index:9999;display:grid;place-items:center}
#spec-sheet .spec-bg{position:absolute;inset:0;background:rgba(16,26,20,.55)}
#spec-sheet .spec-card{position:relative;width:min(92vw,380px);max-height:80vh;overflow:auto;background:#FFFDF6;border-radius:20px;padding:20px 18px 16px;box-shadow:0 18px 50px rgba(0,0,0,.28);text-align:right;animation:fadeUp .2s ease both}
.spec-opt{display:flex;align-items:center;justify-content:space-between;width:100%;background:#fff;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:8px;font-family:inherit;font-size:13.5px;cursor:pointer;text-align:right}
.spec-opt.on{border-color:#0F5A3E;background:#F3FAF5;font-weight:800;color:var(--green-d)}
.spec-opt .tick{color:#0F5A3E;font-weight:900}
.spec-chk{display:flex;align-items:flex-start;gap:9px;padding:9px 2px;font-size:13px;line-height:1.6;cursor:pointer}
.spec-chk input{width:18px;height:18px;margin-top:2px;accent-color:#0F5A3E}
.ay-text .hi{color:#B8860B;font-weight:700}
.ay-reader{font-size:11px;color:#8A7A4E;font-weight:700}
.ay-foot{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hub-item .st{flex:0 0 auto;align-self:center;line-height:1.5}
.spec-lrow{display:flex;align-items:center;gap:6px}.spec-lrow .spec-les{flex:1;margin:0}
.spec-pick{padding:0 4px;display:flex}.spec-pick input{width:22px;height:22px;accent-color:#0F5A3E}

/* اختيار الدرس في الألعاب: التخصص ← الصف ← المادة */
.gp-card{padding:10px 12px;margin-top:10px}
.gp-sel{display:flex;align-items:center;gap:10px;padding:8px 0;border-bottom:1px dashed #EDE5D2}
.gp-sel:last-child{border-bottom:0}
.gp-sel .lbl{flex:0 0 62px;font-size:12.5px;font-weight:800;color:#0B4B34}
.gp-sel select{flex:1;min-width:0;padding:9px 10px;border:1.5px solid #E0D6BE;border-radius:11px;background:#FFFDF7;font-family:Cairo,sans-serif;font-size:13px;font-weight:700;color:#2A2620;appearance:none;background-image:linear-gradient(45deg,transparent 50%,#8A7A55 50%),linear-gradient(135deg,#8A7A55 50%,transparent 50%);background-position:calc(0% + 12px) 55%,calc(0% + 17px) 55%;background-size:5px 5px,5px 5px;background-repeat:no-repeat}
.gp-empty{flex:1;padding:9px 10px;border:1.5px dashed #E0D6BE;border-radius:11px;color:#8A7A55;font-size:12.5px}
