/* ============================================================
   جلسة — الطبقة الثالثة (١٢ أغسطس ٢٠٢٦)
   تجي بعد style.css و style2.css عمداً: ترتيب المصدر يحسم،
   فأي شي هنا يغلب اللي قبله بلا !important.
   ============================================================ */

/* ============ ١) الدخول وإنشاء الحساب ============ */
.auth-sheet { position: relative }
.auth-tabs {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--bg2) 70%, transparent); border: 1px solid var(--line); border-radius: 16px; padding: 5px;
}
.auth-tab {
  position: relative; z-index: 2; border: 0; background: none; cursor: pointer; padding: 12px 8px; border-radius: 12px;
  font: 800 16px/1 'Tajawal', sans-serif; color: var(--muted); transition: color .22s;
}
.auth-tab.on { color: #1a1206 }
.auth-ink {
  position: absolute; z-index: 1; inset: 5px auto 5px 5px; width: calc(50% - 5px); border-radius: 12px;
  background: linear-gradient(120deg, var(--acc), var(--acc2)); box-shadow: 0 8px 22px -12px var(--acc);
  transition: transform .28s cubic-bezier(.2, 1, .3, 1);
}
[dir='rtl'] .auth-ink { inset: 5px 5px 5px auto; transform: translateX(0) }
#authModal[data-tab='up'] .auth-ink { transform: translateX(-100%) }
[dir='ltr'] #authModal[data-tab='up'] .auth-ink { transform: translateX(100%) }
.auth-pane { display: none }
.auth-pane.on { display: block; animation: fadeUp .26s cubic-bezier(.2, 1, .3, 1) both }
.fld-hint { font-size: 12px; font-weight: 700; color: var(--muted); margin-inline-start: 6px }
.fld-hint.full { color: var(--no) }
.pass-fld { position: relative }
.pass-eye {
  position: absolute; inset-inline-end: 10px; bottom: 9px; width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; color: var(--muted); border-radius: 10px;
}
.pass-eye svg { width: 20px; height: 20px }
.pass-eye:hover { color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent) }
.pass-eye.on { color: var(--acc) }
.pass-rule { font-size: 13px; color: var(--muted); margin: -4px 0 12px }
.pass-rule b { color: var(--acc); font-family: monospace; font-size: 15px }
.gate-up { margin-top: 10px; background: transparent; border-color: var(--acc) }

/* ============ ٢) الشريط الجانبي: اللعبة والأصدقاء ============ */
.rail-live {
  width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-inline-start: auto;
  box-shadow: 0 0 10px var(--ok); animation: livePulse 1.6s ease-in-out infinite;
}
#railGame:not(.live) .rail-live { background: var(--muted); box-shadow: none; animation: none }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .45; transform: scale(.78) } }
.rail-badge {
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--no); color: #fff;
  font: 900 12px/19px 'Tajawal', sans-serif; text-align: center; margin-inline-start: auto;
}

/* ============ ٣) بطاقات الألعاب: ميلان بلا زوم ============
   طلبه: «أنيميشن الزوم خايس — أبغاها تتميّل كأنها بتطيح على اليسار».
   فانشال كل تكبير، وصار الميلان ٣D + ميل ثابت لليسار + بريق يمرّ. */
.gcard:hover { transform: none; box-shadow: 0 24px 60px -30px var(--gc), 0 0 34px -18px var(--gc) }
.gcard:hover .gcard-img { transform: none; filter: saturate(1.1) contrast(1.03) }
.gcard:active { transform: none }
.gcard.tilt {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(var(--tz, 0deg)) translateY(-6px);
  box-shadow: 0 44px 80px -34px var(--gc), 0 0 46px -18px var(--gc);
  transition: transform .16s ease-out, box-shadow .3s;
}
.gcard.tilt .gcard-img { transform: translateZ(18px); filter: saturate(1.12) contrast(1.05) }
.gcard { transition: transform .42s cubic-bezier(.2, .9, .3, 1), box-shadow .38s, border-color .3s }
/* اسم اللعبة يطلع من تحت عند التمرير — قبلها ما كان يبين ولا شي */
.gcard-name {
  position: absolute; z-index: 5; inset: auto 0 0 0; padding: 26px 12px 12px; text-align: center;
  font: 900 16px/1.2 'Reem Kufi', sans-serif; color: #fff; text-shadow: 0 2px 12px #000;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .82));
  opacity: 0; transform: translateY(10px); transition: opacity .28s, transform .28s; pointer-events: none;
}
.gcard.tilt .gcard-name, .gcard:hover .gcard-name { opacity: 1; transform: none }
/* ضغطة البطاقة: تنغرز وتومض وميضة وحدة */
.gcard-flash {
  position: absolute; inset: 0; z-index: 6; pointer-events: none; opacity: 0; border-radius: inherit;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), #fff, transparent 55%);
}
.gcard.fire { animation: cardFire .52s cubic-bezier(.2, 1, .3, 1) }
.gcard.fire .gcard-flash { animation: cardFlash .52s ease-out }
@keyframes cardFire {
  0% { transform: perspective(1000px) scale(1) }
  22% { transform: perspective(1000px) scale(.93) rotate(-2.4deg) }
  60% { transform: perspective(1000px) scale(1.04) rotate(1.2deg) }
  100% { transform: perspective(1000px) scale(1) }
}
@keyframes cardFlash { 0% { opacity: 0 } 18% { opacity: .82 } 100% { opacity: 0 } }
.gx.tilt .gx-img { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) rotate(var(--tz, 0deg)) }

/* ============ ٤) المؤشر: انشال المربّع الشفاف ============
   كان `.gcard-glow` يفرش تدرّجاً بمزج screen فوق البطاقة كاملة،
   فيبان كأنه **مربّع شفاف** يمشي مع المؤشر. انحذف العنصر كله،
   وبقيت الشعلة والنقطة والقوسان اللي يلفّان. */
.gcard-glow { display: none !important }
.cur-trail { width: 34px; height: 34px; margin: -17px 0 0 -17px; opacity: .3 }

/* ============ ٥) الأصدقاء ============ */
.fradd .row { gap: 10px }
.frgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 13px; margin-bottom: 8px }
.frcard {
  display: flex; flex-direction: column; gap: 10px; padding: 13px; border-radius: 18px;
  border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px);
  transition: border-color .25s, transform .25s;
}
.frcard:hover { border-color: color-mix(in srgb, var(--acc) 55%, transparent); transform: translateY(-3px) }
.fr-main { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; cursor: pointer; padding: 0; text-align: start }
.fr-av {
  position: relative; width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--frameA, #6b5836), var(--frameB, #3a2f1c)); padding: 2.5px;
}
.fr-av.sm { width: 40px; height: 40px; flex: 0 0 40px }
.fr-av > span {
  width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--bg2) center/cover;
  font: 900 20px/1 'Tajawal', sans-serif; color: var(--acc);
}
.pst {
  position: absolute; inset-inline-end: -1px; bottom: -1px; width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid var(--bg); display: block;
}
.pst.on { background: var(--ok); box-shadow: 0 0 9px var(--ok) }
.pst.away { background: #f5c542 }
.pst.off { background: #6b7280 }
.fr-id { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px }
.fr-id > b { font-size: 16.5px; font-weight: 900 }
.fr-play { font-size: 13px; font-weight: 700; color: var(--acc); display: flex; align-items: center; gap: 6px }
.fr-play b { width: 9px; height: 9px; border-radius: 3px; background: var(--gc, var(--acc)); box-shadow: 0 0 8px var(--gc, var(--acc)) }
.fr-play.idle { color: var(--ok) }
.fr-play.off { color: var(--muted) }
.fr-lv { display: flex; flex-direction: column; align-items: center; line-height: 1 }
.fr-lv b { font-size: 21px; font-weight: 900; color: var(--acc) }
.fr-lv small { font-size: 9px; letter-spacing: 1px; color: var(--muted) }
.fr-btns { display: flex; gap: 8px; flex-wrap: wrap }
.chip.wait { background: color-mix(in srgb, var(--muted) 20%, transparent); color: var(--muted) }
/* بروفايل الصديق */
.fprof { text-align: center }
.fp-av { width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; padding: 3px;
  background: linear-gradient(140deg, var(--frameA, #6b5836), var(--frameB, #3a2f1c)) }
.fp-av > span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--bg2) center/cover;
  font: 900 34px/1 'Tajawal', sans-serif; color: var(--acc) }
.fp-n { font: 900 26px/1.2 'Reem Kufi', sans-serif; margin: 0 0 4px }
.fp-t { font-size: 14px; margin: 0 0 12px; font-weight: 700 }
.fp-live { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 99px; font-weight: 800; font-size: 14px;
  background: color-mix(in srgb, var(--acc) 18%, transparent); color: var(--acc); margin-bottom: 16px }
.fp-live b:first-child { width: 10px; height: 10px; border-radius: 3px; background: var(--gc, var(--acc)) }
.fp-live.idle { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok) }
.fp-live.off { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted) }
.fp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px }
.fp-s { padding: 12px 6px; border-radius: 14px; background: color-mix(in srgb, var(--bg2) 74%, transparent); border: 1px solid var(--line) }
.fp-s b { display: block; font-size: 21px; font-weight: 900; color: var(--acc) }
.fp-s span { font-size: 12px; color: var(--muted); font-weight: 700 }
.fp-s.win b { color: var(--ok) }
.fp-s.lose b { color: var(--no) }
.invlist { display: flex; flex-direction: column; gap: 9px; max-height: 46vh; overflow-y: auto }
.invrow { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 14px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg2) 60%, transparent) }
.invrow b { flex: 1; font-size: 15.5px }
/* بطاقة الدعوة اللي تنطّ على الشاشة */
.invite { position: fixed; z-index: 1400; inset-block-start: 84px; inset-inline-end: 22px; animation: invIn .45s cubic-bezier(.2, 1.3, .4, 1) both }
.invite.out { animation: invOut .3s ease forwards }
.inv-in {
  padding: 16px 18px; border-radius: 18px; background: var(--bg2); border: 1px solid var(--acc); max-width: 320px;
  box-shadow: 0 30px 60px -26px #000, 0 0 34px -16px var(--acc); font-size: 15px; font-weight: 700;
}
.inv-b { display: flex; gap: 8px; margin-top: 12px }
@keyframes invIn { from { opacity: 0; transform: translateY(-18px) scale(.94) } to { opacity: 1; transform: none } }
@keyframes invOut { to { opacity: 0; transform: translateX(30px) } }
/* صفحة «ما أنت داخل لعبة» */
.nogame { text-align: center; padding: 46px 0 }
.ng-pad { width: 78px; height: 78px; margin: 0 auto 18px; color: var(--acc); opacity: .8 }
.ng-pad svg { width: 100%; height: 100% }

/* ============ ٦) هيكل الغرفة الجديد ============
   اللاعبون شريط فوق (طلبه: «اللاعبين فوق بس شكله يتغيّر»)،
   والمسرح يملأ الباقي، والشات **مخفيّ** يرجع بضغطة. */
.room2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start }
.room2[data-chat='on'] { grid-template-columns: minmax(0, 1fr) 300px }
.room2[data-chat='on'] .rtop { grid-column: 1 / -1 }
.room2[data-chat='off'] .chat { display: none }
.room2 .chat { height: min(560px, 68vh); position: sticky; top: 80px }
.chat-x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 17px; margin-inline-start: auto; padding: 0 4px }
.chat-x:hover { color: var(--no) }
.rtop {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 15px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px) saturate(1.2);
}
.rt-l { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.rt-lbl { font-size: 13px; font-weight: 800; color: var(--muted); display: flex; align-items: center; gap: 7px; white-space: nowrap }
.room2 .plist { flex-direction: row; flex-wrap: wrap; gap: 8px }
.room2 .plist.tteam { margin-top: 4px }
.room2 .pl {
  flex-direction: column; align-items: center; gap: 5px; padding: 9px 10px 7px; min-width: 82px; border-radius: 16px;
  background: color-mix(in srgb, var(--bg2) 72%, transparent); border: 1px solid var(--line);
  animation: plIn .42s cubic-bezier(.2, 1.3, .4, 1) both; animation-delay: calc(var(--i, 0) * 55ms);
}
@keyframes plIn { from { opacity: 0; transform: translateY(-14px) scale(.85) } to { opacity: 1; transform: none } }
.room2 .pl.me { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent) }
.room2 .pl.host { border-color: var(--acc) }
.pl-avwrap { position: relative; width: 44px; height: 44px }
.room2 .pl-av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--bg) center/cover;
  font: 900 18px/1 'Tajawal', sans-serif; color: var(--acc); border: 1.5px solid var(--line) }
.pl-crown { position: absolute; inset-block-start: -9px; inset-inline-start: 50%; transform: translateX(-50%); width: 18px; color: var(--acc) }
.pl-crown svg { width: 18px; height: 18px }
.pl-x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; color: var(--no); font-weight: 900 }
.pl-dot { position: absolute; inset-inline-end: -1px; bottom: 0; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--bg2) }
.pl-dot.on { background: var(--ok) }
.pl-dot.off { background: #6b7280 }
.pl-nm { font-size: 13px; font-weight: 900; max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.room2 .pl-s { font-size: 12px; font-weight: 900; color: var(--acc); background: none; padding: 0 }
.room2 .pl.pick:hover { transform: translateY(-4px); border-color: var(--acc) }
.room2 .crownbtn { position: absolute; inset-block-start: 2px; inset-inline-end: 2px }
.rt-r { display: flex; align-items: center; gap: 12px; flex-wrap: wrap }
.rt-code {
  display: flex; flex-direction: column; align-items: center; padding: 7px 16px; border-radius: 14px; cursor: pointer;
  background: color-mix(in srgb, var(--acc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--acc) 45%, transparent);
}
.rt-code:hover { background: color-mix(in srgb, var(--acc) 22%, transparent) }
.rt-code small { font-size: 10.5px; color: var(--muted); font-weight: 700 }
.rt-code b { font: 900 24px/1.1 'Tajawal', sans-serif; letter-spacing: 5px; color: var(--acc) }
.rt-btns { display: flex; gap: 7px; flex-wrap: wrap }
.rt-b {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 13px; border-radius: 13px; cursor: pointer;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--bg2) 70%, transparent); color: var(--txt);
  font: 800 13.5px/1 'Tajawal', sans-serif; transition: border-color .2s, background .2s, transform .2s;
}
.rt-b svg { width: 18px; height: 18px }
.rt-b:hover { border-color: var(--acc); color: var(--acc); transform: translateY(-2px) }
.rt-b.on { border-color: var(--acc); color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent) }
.rt-b.danger { border-color: color-mix(in srgb, var(--no) 55%, transparent); color: var(--no) }
.rt-b.danger:hover { background: color-mix(in srgb, var(--no) 16%, transparent); border-color: var(--no) }
@media (max-width: 900px) {
  .room2[data-chat='on'] { grid-template-columns: minmax(0, 1fr) }
  .rtop { flex-direction: column; align-items: stretch }
  .rt-r { justify-content: space-between }
}

/* ============ ٧) لوحة التحكم ============ */
.adbar .row { gap: 10px; flex-wrap: wrap }
.adtabs { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap }
.adtab {
  padding: 9px 18px; border-radius: 99px; cursor: pointer; border: 1px solid var(--line); background: transparent;
  color: var(--muted); font: 800 14px/1 'Tajawal', sans-serif; transition: all .2s;
}
.adtab:hover { border-color: var(--acc); color: var(--acc) }
.adtab.on { background: linear-gradient(120deg, var(--acc), var(--acc2)); color: #1a1206; border-color: transparent }
.adlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 14px }
.adcard.mine { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc) inset }
.ad-nums { display: flex; gap: 14px; align-items: center; margin-inline-start: auto }
.ad-xp, .ad-cn { display: flex; flex-direction: column; align-items: center; line-height: 1.1 }
.ad-xp b, .ad-cn b { font-size: 19px; font-weight: 900 }
.ad-xp b { color: var(--acc) }
.ad-cn b { color: #f2c75c }
.ad-xp span, .ad-cn span { font-size: 10.5px; color: var(--muted); font-weight: 700 }
.ad-grp { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 9px 0; border-top: 1px dashed var(--line) }
.ad-lb { font-size: 12px; font-weight: 900; color: var(--muted); min-width: 52px }
.badge.off { background: color-mix(in srgb, var(--muted) 24%, transparent); color: var(--muted) }
.adfail {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 34px 18px; border-radius: 20px; text-align: center;
  background: color-mix(in srgb, var(--no) 12%, transparent); border: 1.5px solid var(--no);
}
.adfail b { font-size: 19px; color: var(--no) }
.adfail span { font-size: 14px; color: var(--muted) }
.lb-act { display: flex; gap: 6px; flex-wrap: wrap; margin-inline-start: 10px }
.adlb .lb-r { flex-wrap: wrap }

/* ============ ٨) المتصدّرون: المراكز الثلاثة لها هيبة ============ */
.lb-med { display: inline-block; width: 34px; height: 34px }
.med { width: 34px; height: 34px; display: block }
.lb-r.top { position: relative; overflow: hidden }
.lb-r.p1 { border-color: #ffd75e; background: linear-gradient(100deg, color-mix(in srgb, #ffd75e 16%, transparent), transparent 62%) }
.lb-r.p2 { border-color: #dfe6ee; background: linear-gradient(100deg, color-mix(in srgb, #dfe6ee 13%, transparent), transparent 62%) }
.lb-r.p3 { border-color: #e0a367; background: linear-gradient(100deg, color-mix(in srgb, #e0a367 13%, transparent), transparent 62%) }
.lb-r.p1::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(72deg, transparent 44%, rgba(255, 240, 190, .28) 50%, transparent 56%);
  animation: lbShine 3.4s ease-in-out infinite;
}
@keyframes lbShine { 0%, 100% { transform: translateX(-60%) } 50% { transform: translateX(60%) } }
.lb-avw { position: relative; display: grid; place-items: center; padding: 2.5px; border-radius: 50%;
  background: linear-gradient(140deg, var(--frameA, transparent), var(--frameB, transparent)) }
.hat { position: absolute; inset-block-start: -13px; inset-inline-start: 50%; transform: translateX(-50%); width: 34px; height: 22px; z-index: 3 }
.hat.fl { animation: hatFl 1.7s ease-in-out infinite }
.hat.ha { animation: hatHa 3s linear infinite }
@keyframes hatFl { 0%, 100% { transform: translateX(-50%) scaleY(1) } 50% { transform: translateX(-50%) scaleY(1.16) } }
@keyframes hatHa { 0%, 100% { transform: translateX(-50%) rotate(-7deg) } 50% { transform: translateX(-50%) rotate(7deg) } }
/* ألوان الأسماء المشتراة */
.nc { background-clip: text; -webkit-background-clip: text; color: transparent }
.nc.c-gold { background-image: linear-gradient(100deg, #ffe27a, #d9a441, #ffe27a) }
.nc.c-fire { background-image: linear-gradient(100deg, #ff5a2b, #ffb347, #ff5a2b) }
.nc.c-sea { background-image: linear-gradient(100deg, #38bdf8, #34d399, #38bdf8) }
.nc.c-royal { background-image: linear-gradient(100deg, #c084fc, #f472b6, #c084fc); background-size: 200% 100%; animation: ncMove 4s linear infinite }
.nc.c-mint { background-image: linear-gradient(100deg, #86efac, #5eead4, #86efac) }
@keyframes ncMove { to { background-position: 200% 0 } }

/* ============ ٩) المتجر وفلوس جلسة ============ */
.wallet {
  display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 22px;
  border: 1px solid color-mix(in srgb, #f2c75c 45%, transparent); margin-bottom: 22px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, #f2c75c 15%, transparent), transparent 70%), var(--panel);
  backdrop-filter: blur(14px);
}
.wallet::after {
  content: ''; position: absolute; inset: -50%; pointer-events: none;
  background: linear-gradient(72deg, transparent 45%, rgba(255, 235, 180, .16) 50%, transparent 55%);
  animation: lbShine 5s ease-in-out infinite;
}
.w-coin { width: 54px; height: 54px; display: block; animation: coinSpin 6s ease-in-out infinite }
.w-coin svg { width: 100%; height: 100% }
@keyframes coinSpin { 0%, 100% { transform: rotateY(0) } 50% { transform: rotateY(180deg) } }
.w-t { line-height: 1.15 }
.w-t b { display: block; font: 900 30px/1 'Tajawal', sans-serif; color: #f2c75c }
.w-t span { font-size: 12.5px; color: var(--muted); font-weight: 700 }
.w-p { font-size: 13.5px; color: var(--muted); margin: 0; max-width: 460px }
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin-bottom: 10px }
.sitem {
  display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 16px 13px 14px; border-radius: 20px; text-align: center;
  border: 1px solid var(--line); background: var(--panel); backdrop-filter: blur(14px); transition: transform .25s, border-color .25s;
}
.sitem:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--acc) 60%, transparent) }
.sitem.wear { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset }
.si-view { height: 76px; display: grid; place-items: center; width: 100% }
.si-av { position: relative; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  background: var(--bg2); border: 1.5px solid var(--line); font: 900 22px/1 'Tajawal', sans-serif; color: var(--acc) }
.si-name { font: 900 21px/1 'Tajawal', sans-serif }
.sitem > b { font-size: 16px; font-weight: 900 }
.si-d { font-size: 12.5px; color: var(--muted); margin: 0; min-height: 32px }
.si-cost { font-size: 13.5px; font-weight: 900; color: #f2c75c }
.si-cost.own { color: var(--ok) }
.si-cost.no { color: var(--muted) }

/* ============ ١٠) الإعدادات: بطاقة الحساب ============ */
.acct { display: flex; flex-direction: column; gap: 2px }
.acct-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 0; border-bottom: 1px dashed var(--line);
}
.acct-row:last-of-type { border-bottom: 0 }
.acct-k { font-size: 14.5px; font-weight: 800; display: flex; flex-direction: column; gap: 2px }
.acct-k i { font-size: 12px; font-weight: 600; color: var(--muted); font-style: normal }
.acct-v { display: flex; align-items: center; gap: 10px }
.acct-v > b { font-size: 16px; font-weight: 900; color: var(--acc) }
.secret { letter-spacing: 2px; font-family: monospace }
.secret.open { letter-spacing: 0; font-family: 'Tajawal', sans-serif }
.pst-pick { gap: 6px; flex-wrap: wrap }

/* ============ ١١) مسرح المافيا ============
   طاولة وكراسي، ومستضيف يتكلّم فوقها، وستارة تنقفل بالليل
   وما تنفتح إلا لصاحب الدور اللي ناداه. */
.mstage { display: flex; flex-direction: column; gap: 12px }
.mtable {
  position: relative; aspect-ratio: 4/3; min-height: 380px; border-radius: 26px; overflow: hidden;
  border: 1px solid var(--line); background: radial-gradient(120% 90% at 50% 0%, #1b2440, #0a0d18 70%);
  transition: background .9s ease;
}
.mtable.day { background: radial-gradient(120% 90% at 50% 0%, #4a3a1e, #1d1608 72%) }
/* السماء والقمر */
.msky { position: absolute; inset: 0; pointer-events: none; opacity: 1; transition: opacity .8s }
.mtable.day .msky { opacity: .18 }
.mmoon {
  position: absolute; inset-block-start: 7%; inset-inline-end: 9%; width: 62px; height: 62px; border-radius: 50%;
  background: radial-gradient(circle at 34% 34%, #fff8e0, #d9c98f 62%, #b8a468);
  box-shadow: 0 0 34px 10px rgba(255, 245, 210, .22); animation: moonBreath 6s ease-in-out infinite;
}
.mmoon::after { content: ''; position: absolute; inset: 12% 16% auto auto; width: 13px; height: 13px; border-radius: 50%; background: rgba(0, 0, 0, .08) }
@keyframes moonBreath { 0%, 100% { transform: translateY(0); filter: brightness(1) } 50% { transform: translateY(-5px); filter: brightness(1.12) } }
.mstar { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: .8; animation: twinkle 3s ease-in-out infinite }
.mstar.s1 { inset: 14% auto auto 12%; animation-delay: .2s }
.mstar.s2 { inset: 9% auto auto 34%; animation-delay: .9s }
.mstar.s3 { inset: 21% auto auto 62%; animation-delay: 1.5s; width: 4px; height: 4px }
.mstar.s4 { inset: 6% auto auto 78%; animation-delay: 2.1s }
.mstar.s5 { inset: 27% auto auto 24%; animation-delay: 1.1s }
@keyframes twinkle { 0%, 100% { opacity: .25 } 50% { opacity: 1 } }
/* المستضيف — شخصية من اللعبة لا واحد من اللاعبين */
.mhost {
  position: absolute; inset-block-start: 12px; inset-inline-start: 50%; transform: translateX(-50%); z-index: 6;
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: min(90%, 480px);
}
.mhost-av { width: 62px; height: 70px; filter: drop-shadow(0 6px 16px rgba(0, 0, 0, .6)); animation: hostBob 3.6s ease-in-out infinite }
.mhost-f { width: 100%; height: 100% }
@keyframes hostBob { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-4px) } }
.mhost-say {
  margin: 0; padding: 9px 18px; border-radius: 999px; text-align: center; font: 800 15px/1.35 'Tajawal', sans-serif;
  background: rgba(10, 8, 4, .72); color: #ffe9b0; border: 1px solid rgba(255, 210, 120, .35);
  box-shadow: 0 8px 26px -12px #000; animation: sayIn .45s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes sayIn { from { opacity: 0; transform: translateY(-8px) scale(.94) } to { opacity: 1; transform: none } }
/* الطاولة والكراسي */
.mring { position: absolute; inset: 0 }
.mtbl {
  position: absolute; inset-block-start: 52%; inset-inline-start: 50%; transform: translate(-50%, -50%); width: 40%; aspect-ratio: 1.55;
  border-radius: 50%; background: radial-gradient(60% 60% at 40% 32%, #6b4a24, #3c2a13 72%);
  box-shadow: 0 22px 44px -18px #000, inset 0 0 40px -10px #000; border: 2px solid #86602f;
}
.seat {
  position: absolute; inset-block-start: var(--y); inset-inline-start: var(--x); translate: -50% -50%;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; z-index: 4;
  animation: seatIn .5s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * 90ms); cursor: default;
}
@keyframes seatIn { from { opacity: 0; transform: translateY(14px) scale(.6) } to { opacity: 1; transform: none } }
.seat-ch { position: relative; display: block }
.seat-av {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--bg2) center/cover;
  border: 2.5px solid #8a6a3a; font: 900 21px/1 'Tajawal', sans-serif; color: var(--acc);
  box-shadow: 0 8px 20px -8px #000; transition: transform .22s, border-color .22s, box-shadow .22s;
}
/* الكرسي تحت الشخصية */
.seat-ch::after {
  content: ''; position: absolute; inset-block-start: 46px; inset-inline-start: 50%; translate: -50% 0;
  width: 40px; height: 16px; border-radius: 0 0 12px 12px; background: linear-gradient(#5a3f1e, #35240f); z-index: -1;
}
.seat-nm {
  font-size: 12.5px; font-weight: 900; color: #f3e6cc; text-shadow: 0 2px 8px #000; max-width: 88px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.seat.me .seat-av { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 35%, transparent) }
.seat.dead { opacity: .42; filter: grayscale(.85) }
.seat-x { position: absolute; inset: 0; display: grid; place-items: center; font-size: 30px; color: #ff5f5f; font-weight: 900 }
.seat.can { cursor: pointer }
.seat.can .seat-av { animation: seatCall 1.7s ease-in-out infinite }
@keyframes seatCall { 0%, 100% { box-shadow: 0 8px 20px -8px #000 } 50% { box-shadow: 0 0 0 5px rgba(255, 95, 95, .35), 0 8px 20px -8px #000 } }
.seat.can:hover .seat-av { transform: translateY(-5px) scale(1.08); border-color: #ff5f5f }
.seat.sel .seat-av { border-color: #ff5f5f; box-shadow: 0 0 0 4px rgba(255, 95, 95, .5) }
.seat-shield, .seat-mark, .seat-known {
  position: absolute; inset-block-start: -10px; inset-inline-end: -10px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(8, 10, 14, .9); border: 1.5px solid currentColor;
}
.seat-shield { color: #7ee2a0; animation: shieldPop .4s cubic-bezier(.2, 1.5, .4, 1) both }
.seat-shield svg { width: 16px; height: 16px }
.seat-mark { color: #ff5f5f }
.seat-mark svg, .seat-known svg { width: 15px; height: 15px }
.seat-known.ok { color: #7ee2a0 }
.seat-known.bad { color: #ff5f5f }
@keyframes shieldPop { from { transform: scale(0) rotate(-40deg) } to { transform: scale(1) rotate(0) } }
.seat-t {
  position: absolute; inset-block-start: -8px; inset-inline-start: -8px; min-width: 22px; height: 22px; border-radius: 99px;
  background: var(--acc); color: #1a1206; font: 900 12px/22px 'Tajawal', sans-serif; text-align: center;
}
/* الستارة تنقفل وتنفتح */
.mcurtain { position: absolute; inset: 0; z-index: 8; pointer-events: none; display: grid; place-items: center }
.mcurtain .cl, .mcurtain .cr {
  position: absolute; inset-block: 0; width: 52%; background: repeating-linear-gradient(90deg, #5a0f14, #7a1a20 14px, #4a0c11 28px);
  box-shadow: inset 0 0 60px -10px #000; transition: transform .85s cubic-bezier(.5, 0, .2, 1);
}
.mcurtain .cl { left: 0; transform: translateX(-101%) }
.mcurtain .cr { right: 0; transform: translateX(101%) }
.mtable.shut .mcurtain .cl, .mtable.shut .mcurtain .cr { transform: translateX(0) }
.mcur-t {
  position: relative; z-index: 2; padding: 12px 24px; border-radius: 999px; font: 900 18px/1 'Reem Kufi', sans-serif;
  color: #ffd9a0; background: rgba(0, 0, 0, .5); opacity: 0; transition: opacity .5s .4s;
}
.mtable.shut .mcur-t { opacity: 1 }
/* مؤشر ماوس لكل دور: سكينة للمافيا، إبرة للطبيب، مجهر للمحقّق */
html[data-mrole="knife"] .mstage, html[data-mrole="knife"] .seat.can {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M4 26l7-7 3 3-7 7z' fill='%23a0713a'/%3E%3Cpath d='M12 18 26 4l1 5-11 12z' fill='%23e6e9ee' stroke='%23999999' stroke-width='.7'/%3E%3C/svg%3E") 4 26, pointer;
}
html[data-mrole="needle"] .mstage, html[data-mrole="needle"] .seat.can {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Cpath d='M6 24l4-4 3 3-4 4z' fill='%237ee2a0'/%3E%3Cpath d='M11 19 22 8l3 3-11 11z' fill='%23dfe6ee' stroke='%2377818f' stroke-width='.7'/%3E%3Cpath d='M23 7l3-3' stroke='%237ee2a0' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") 6 24, pointer;
}
html[data-mrole="lens"] .mstage, html[data-mrole="lens"] .seat.can {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%237cc4ff' stroke-width='2.4'/%3E%3Cpath d='M18 18l8 8' stroke='%237cc4ff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 12 12, pointer;
}
.mrole-e { width: 34px; height: 34px; display: block; color: var(--rc) }
.mrole-e svg { width: 100%; height: 100% }
.mgr-e { width: 22px; height: 22px; display: inline-block }
.mgr-e svg { width: 100%; height: 100% }
.mini.loud { font-size: 15px; font-weight: 900; color: var(--acc) }
@media (max-width: 720px) {
  .mtable { min-height: 320px }
  .seat-av { width: 42px; height: 42px }
  .seat-ch::after { inset-block-start: 37px; width: 32px }
}

/* ============ ١٢) سين جيم: اللوح على رسمة عزوز ============
   صورة الفئة في النص، وصفّ فلوس يمينها وصفّ يسارها (٢٠٠/٤٠٠/٦٠٠ مرّتين). */
.sturn {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 18px; border-radius: 16px; margin-bottom: 14px;
  background: color-mix(in srgb, var(--bg2) 76%, transparent); border: 1px solid var(--line);
}
.sturn.mine { border-color: var(--acc); background: color-mix(in srgb, var(--acc) 12%, transparent) }
.st-lbl { font-size: 13px; color: var(--muted); font-weight: 800 }
.sturn > b { font: 900 21px/1 'Reem Kufi', sans-serif; color: var(--acc) }
.st-you { margin-inline-start: auto; font-weight: 900; color: var(--ok); font-size: 14.5px }
.st-wait { margin-inline-start: auto; font-weight: 800; color: var(--muted); font-size: 14px }
.sgrid6 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px }
@container (max-width: 900px) { .sgrid6 { grid-template-columns: repeat(2, 1fr) } }
@container (max-width: 560px) { .sgrid6 { grid-template-columns: 1fr } }
.scat2 {
  display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px; border-radius: 18px;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(12px);
  animation: cardIn .45s cubic-bezier(.2, 1, .3, 1) both; animation-delay: calc(var(--i, 0) * 60ms);
}
.sside { display: flex; flex-direction: column; gap: 7px }
.spic {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 116px;
  border-radius: 14px; padding: 8px 6px; text-align: center;
  background: linear-gradient(160deg, color-mix(in srgb, var(--acc) 16%, transparent), transparent 70%), var(--bg2);
  border: 1px solid color-mix(in srgb, var(--acc) 30%, transparent);
}
.spic-e { font-size: 32px; line-height: 1 }
.spic b { font-size: 14px; font-weight: 900; line-height: 1.25 }
.smoney {
  position: relative; min-width: 66px; padding: 9px 6px; border-radius: 12px; cursor: pointer; overflow: hidden;
  border: 1px solid color-mix(in srgb, #f2c75c 45%, transparent); color: #f2c75c;
  background: color-mix(in srgb, #f2c75c 12%, transparent);
  font: 900 17px/1 'Tajawal', sans-serif; transition: transform .18s, background .18s, color .18s;
}
.smoney:not(:disabled):hover { transform: translateY(-3px); background: #f2c75c; color: #2a1c05 }
.smoney:disabled { cursor: default }
/* الخانة المخلّصة: تصدأ ويجيها ✕ */
.smoney.used {
  color: #6b6156; border-color: #4a4238; background: repeating-linear-gradient(45deg, #3a332b, #3a332b 5px, #2f2922 5px, #2f2922 10px);
  animation: rustIn .5s ease both;
}
.smoney.used .sm-v { opacity: .35 }
.sm-x { position: absolute; inset: 0; pointer-events: none }
.sm-x::before, .sm-x::after {
  content: ''; position: absolute; inset-block-start: 50%; inset-inline-start: 8%; width: 84%; height: 2.6px; background: #8a2b22;
  border-radius: 2px; box-shadow: 0 0 6px rgba(0, 0, 0, .5);
}
.sm-x::before { transform: rotate(28deg) }
.sm-x::after { transform: rotate(-28deg) }
@keyframes rustIn { from { transform: scale(1.12); filter: brightness(1.6) } to { transform: none; filter: none } }
/* الفلوس في لوح الفريق */
.tp-s.money { display: flex; align-items: center; justify-content: center; gap: 8px }
.coin { width: 26px; height: 26px }
.pwchip.used { opacity: .35; text-decoration: line-through }
/* توزيع الفلوس بعد الجواب */
.saward {
  margin-top: 18px; padding: 16px; border-radius: 18px; text-align: center;
  background: color-mix(in srgb, var(--acc) 10%, transparent); border: 1.5px solid color-mix(in srgb, var(--acc) 50%, transparent);
}
.sa-t { display: block; font-size: 16px; font-weight: 800; margin-bottom: 12px }
.sa-t b { color: #f2c75c; font-size: 20px }
.sa-btns { display: flex; gap: 9px; justify-content: center; flex-wrap: wrap }
.sawarded {
  margin-top: 18px; padding: 14px; border-radius: 16px; text-align: center; font-weight: 900; font-size: 16.5px;
  background: color-mix(in srgb, var(--ok) 14%, transparent); border: 1.5px solid var(--ok); color: var(--ok);
}
.sfix { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: center; margin-top: 14px;
  padding-top: 12px; border-top: 1px dashed var(--line) }
.sfix > span { font-size: 12.5px; color: var(--muted); font-weight: 800 }
