/* =========================================================
   سِجَال | تنسيقات شاشة المقدّم وجوال المشارك
   الهوية المشتركة في ../assets/athar.css
   وفوقها هوية اللعبة: ساحة مهرجان ليلية، رايات بألوان الفرق، إنارة حبال، أكشاك فقرات
   ========================================================= */

/* ---------- ثيم الساحة الليلي (افتراضي) ---------- */
[data-theme="fest"]{
  --bg:#170F33;
  --bg-paint:
    radial-gradient(80% 45% at 50% -10%, rgba(255,181,71,.30), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(224,85,155,.20), transparent 70%),
    radial-gradient(60% 50% at 0% 90%, rgba(15,163,177,.16), transparent 70%),
    linear-gradient(180deg,#1E1446 0%,#140D2E 60%,#0E0922 100%);
  --text:#FFF7E8; --text-2:#E8DAC0;
  --accent:#FFC94A; --accent-hover:#FFD877; --on-accent:#2A1A00;
  --hl:#FF8A5B; --hl-2:#FFC94A;
  --surface:rgba(255,240,220,.07); --surface-2:rgba(255,240,220,.13);
  --solid:#251B52; --line:rgba(255,233,200,.17);
  --cell:rgba(255,255,255,.08); --cell-label:rgba(255,233,200,.45);
  --shadow:0 12px 32px rgba(0,0,0,.4); --scrim:rgba(8,5,20,.78);
}
[data-theme="fest"] .logo-main{display:none;}
[data-theme="fest"] .logo-rev{display:block;}
.theme-dot.sw-fest{background:radial-gradient(circle at 50% 30%,#FFC94A 0 22%,transparent 24%),linear-gradient(135deg,#1E1446,#3A1F66);}

/* ---------- متغيرات اللعبة لكل ثيم ---------- */
:root,[data-theme="light"]{
  --gold:#F5A50B; --gold-dk:#B86E00; --gold-ink:#2A1A00;
  --ok:#16A34A; --ok-dk:#0E7A37; --bad:#E5484D; --bad-dk:#A3262B;
  --edge:#C6D8F1; --edge-accent:#0F4FB0; --pattern:.05; --bulb:#F5A50B; --bulb-glow:rgba(245,165,11,.35);
  --booth:#FFFFFF; --rope:rgba(10,36,99,.35);
}
[data-theme="navy"]{
  --gold:#FBBF24; --gold-dk:#B07A00; --gold-ink:#2A1A00;
  --ok:#34D399; --ok-dk:#0E6B45; --bad:#F87171; --bad-dk:#9B2C2C;
  --edge:rgba(0,0,0,.4); --edge-accent:#4C9FD8; --pattern:.06; --bulb:#FDE68A; --bulb-glow:rgba(253,230,138,.35);
  --booth:#0F2F7A; --rope:rgba(220,238,254,.35);
}
[data-theme="blue"]{
  --gold:#FCD34D; --gold-dk:#B07A00; --gold-ink:#2A1A00;
  --ok:#BBF7D0; --ok-dk:#0B5E2C; --bad:#FFD1D1; --bad-dk:#9B2C2C;
  --edge:rgba(10,36,99,.32); --edge-accent:#0A2463; --pattern:.07; --bulb:#FFF3B0; --bulb-glow:rgba(255,243,176,.4);
  --booth:rgba(255,255,255,.14); --rope:rgba(255,255,255,.45);
}
[data-theme="fest"]{
  --gold:#FFC94A; --gold-dk:#B9781A; --gold-ink:#2A1A00;
  --ok:#3DDC97; --ok-dk:#11805A; --bad:#FF6B6B; --bad-dk:#A3262B;
  --edge:rgba(0,0,0,.5); --edge-accent:#B9781A; --pattern:.05; --bulb:#FFD877; --bulb-glow:rgba(255,201,74,.55);
  --booth:#231A4D; --rope:rgba(255,233,200,.35);
}

/* ---------- أساسيات ---------- */
*{box-sizing:border-box; margin:0; padding:0;}
html{-webkit-text-size-adjust:100%; background:var(--bg-paint); background-attachment:fixed; background-color:var(--bg);}
html,body{overflow-x:clip;}
body{
  min-height:100vh; min-height:100dvh; color:var(--text);
  font-family:"Thmanyah Sans","IBM Plex Sans Arabic",system-ui,sans-serif;
  font-weight:500; font-size:16px; line-height:1.7;
  display:flex; flex-direction:column;
}
/* إنارة الحبال والنقش المائي */
.sky{position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden;}
.sky::after{
  content:""; position:absolute; inset:0;
  background:var(--text); opacity:var(--pattern);
  -webkit-mask:url("img/pattern.svg") 0 0 / 300px 300px repeat; mask:url("img/pattern.svg") 0 0 / 300px 300px repeat;
}
.lights{
  position:absolute; left:-2%; right:-2%; top:62px; height:44px;
  background:radial-gradient(circle at 50% 8px, var(--bulb) 0 4px, var(--bulb-glow) 5px, transparent 14px) 0 0 / 46px 44px repeat-x;
  -webkit-mask:radial-gradient(120% 220% at 50% -150%, transparent 70%, #000 71%); mask:radial-gradient(120% 220% at 50% -150%, transparent 70%, #000 71%);
  animation:twinkle 2.6s ease-in-out infinite alternate;
}
.lights::before{content:""; position:absolute; left:0; right:0; top:6px; height:2px; background:var(--rope); border-radius:50%;}
@keyframes twinkle{from{opacity:.75;} to{opacity:1;}}
.topbar, main{position:relative; z-index:1;}
h1,h2,h3,h4,strong,b{font-weight:700;}
button,input,textarea{font:inherit; color:inherit;}
button{cursor:pointer; -webkit-tap-highlight-color:transparent; touch-action:manipulation;}
ul,ol{list-style:none;}
[hidden]{display:none !important;}
:focus-visible{outline:3px solid var(--hl); outline-offset:2px;}
.muted{color:var(--text-2); font-size:.9rem;}
.hint{color:var(--text-2); font-size:.84rem;}
code{font-family:inherit; background:var(--surface-2); padding:1px 6px; border-radius:6px;}

/* ---------- الشريط العلوي ---------- */
.topbar{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px clamp(12px,3vw,28px); border-bottom:1px solid var(--line);
  background:color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter:blur(6px);
}
.brand{display:flex; align-items:center; gap:10px; min-width:0; text-decoration:none; color:inherit;}
.brand .logo{height:46px; width:auto; flex:none;}
.brand-text{display:flex; flex-direction:column; min-width:0; line-height:1.35;}
.brand-text strong{font-size:1.1rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.brand-text small{color:var(--text-2); font-size:.8rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.top-tools{display:flex; align-items:center; gap:8px; flex:none;}
.icon-btn{width:42px; height:42px; border-radius:50%; display:grid; place-items:center; background:var(--surface); border:1px solid var(--line); transition:transform .15s ease, background .2s ease; font-size:1.1rem;}
.icon-btn:hover{background:var(--surface-2);}
.icon-btn:active{transform:scale(.92);}
.net{display:flex; align-items:center; gap:7px; padding:4px 10px; border-radius:999px; background:var(--surface); border:1px solid var(--line); font-size:.78rem; font-weight:700; white-space:nowrap;}
.net i{position:relative; width:9px; height:9px; border-radius:50%; background:var(--cell-label); flex:none;}
.net[data-on="true"]{border-color:color-mix(in srgb, var(--ok) 55%, transparent);}
.net[data-on="true"] i{background:var(--ok);}
.net[data-on="true"] i::after{content:""; position:absolute; inset:0; border-radius:50%; background:var(--ok); animation:live 1.5s ease-out infinite;}
@keyframes live{0%{transform:scale(1); opacity:.8;} 100%{transform:scale(2.8); opacity:0;}}
.snd .bars{display:flex; align-items:center; gap:3px; height:20px;}
.snd .bars i{width:3.5px; height:100%; border-radius:3px; background:var(--text); transform-origin:50% 100%; transform:scaleY(.35);}
.snd[aria-pressed="true"] .bars i{animation:eq 1s ease-in-out infinite;}
.snd[aria-pressed="true"] .bars i:nth-child(2){animation-delay:-.35s; animation-duration:.8s;}
.snd[aria-pressed="true"] .bars i:nth-child(3){animation-delay:-.6s; animation-duration:1.15s;}
.snd[aria-pressed="true"] .bars i:nth-child(4){animation-delay:-.2s; animation-duration:.9s;}
@keyframes eq{0%,100%{transform:scaleY(.3);} 50%{transform:scaleY(1);}}
.snd[aria-pressed="false"] .bars{position:relative; opacity:.5;}
.snd[aria-pressed="false"] .bars i{transform:scaleY(.22);}
.snd[aria-pressed="false"] .bars::after{content:""; position:absolute; left:-3px; right:-3px; top:50%; height:2.5px; border-radius:2px; background:var(--text); transform:rotate(-38deg);}
@media (max-width:520px){ .net b{display:none;} .net{padding:6px;} .theme-dot{width:24px; height:24px;} .brand .logo{height:38px;} .icon-btn{width:38px; height:38px;} }

/* ---------- الأزرار المجسّمة ---------- */
.btn{
  min-height:48px; padding:10px 20px; border-radius:14px; border:1px solid var(--line);
  background:var(--solid); color:var(--text); font-weight:700; font-size:1rem;
  box-shadow:0 4px 0 var(--edge); transition:transform .12s ease, box-shadow .12s ease, background .2s ease, opacity .2s;
}
.btn:hover{background:var(--surface-2); transform:translateY(-1px);}
.btn:active{transform:translateY(4px); box-shadow:0 0 0 var(--edge);}
.btn:disabled,.btn:disabled:active{opacity:.45; cursor:not-allowed; transform:none; box-shadow:0 2px 0 var(--edge);}
.btn-primary{background:var(--accent); color:var(--on-accent); border-color:transparent; box-shadow:0 5px 0 var(--edge-accent);}
.btn-primary:hover{background:var(--accent-hover);}
.btn-primary:active{transform:translateY(5px); box-shadow:0 0 0 var(--edge-accent);}
.btn-gold{background:linear-gradient(180deg,#FFD877,var(--gold)); color:var(--gold-ink); border-color:transparent; box-shadow:0 6px 0 var(--gold-dk), 0 14px 30px rgba(245,165,11,.3);}
.btn-gold:hover{background:linear-gradient(180deg,#FFE29A,#FFC94A);}
.btn-gold:active{transform:translateY(6px); box-shadow:0 0 0 var(--gold-dk);}
.btn.big{min-height:58px; font-size:1.15rem; padding:12px 30px; border-radius:18px;}
.btn-ghost{background:transparent; border-color:transparent; color:var(--text-2); box-shadow:none;}
.btn-ghost:hover{background:var(--surface);}
.btn-ghost:active{transform:scale(.97); box-shadow:none;}
.btn-danger,.danger{color:var(--bad);}
.btn.btn-danger{background:var(--bad); color:#fff; box-shadow:0 5px 0 var(--bad-dk);}
.chip{padding:5px 14px; border-radius:999px; border:1px solid var(--line); background:var(--surface); font-weight:700; font-size:.88rem;}
.chip:hover{background:var(--surface-2);}
.tchip{display:inline-flex; align-items:center; gap:4px; padding:2px 11px; border-radius:999px; font-weight:700; font-size:.88rem; white-space:nowrap;
  background:color-mix(in srgb, var(--tc) 22%, transparent); border:1.5px solid var(--tc);}
.tchip.mini{padding:0 8px; font-size:.75rem;}

/* ---------- الشاشات ---------- */
main{flex:1; padding:clamp(12px,2.6vw,26px); display:flex; flex-direction:column;}
.screen{display:none;}
.screen.active{display:block; animation:screenIn .45s ease both;}
@keyframes screenIn{from{opacity:0; transform:translateY(14px);} to{opacity:1; transform:none;}}

/* ---------- صورة البطل: جوالات ترتفع تحت حبل الرايات ---------- */
.hero{width:clamp(240px,52vw,380px); aspect-ratio:320/210; margin:0 auto;}
.hero.small{width:clamp(200px,60vw,280px);}
.hero svg{width:100%; height:100%; overflow:visible; display:block;}
.h-rope{fill:none; stroke:var(--rope); stroke-width:2.5;}
.hb path{fill:var(--rope);}
.hb circle{fill:var(--bulb); filter:drop-shadow(0 0 5px var(--bulb-glow)); animation:chase 1.8s ease-in-out infinite; animation-delay:calc(var(--i) * .15s);}
.hb:nth-child(3n+1) circle{fill:#FF8A5B;} .hb:nth-child(3n+2) circle{fill:#5CC2F5;}
@keyframes chase{0%,100%{opacity:.35;} 40%{opacity:1;}}
@keyframes sway{from{transform:rotate(-7deg);} to{transform:rotate(7deg);}}
.h-spark{transform:translate(160px,96px);}
.h-spark path{fill:var(--gold); animation:spark 2s ease-in-out infinite; transform-box:fill-box; transform-origin:center;}
.h-spark .glow{fill:var(--gold); opacity:.22; animation:pulse 2s ease-out infinite; transform-box:fill-box; transform-origin:center;}
@keyframes spark{0%,100%{transform:scale(1) rotate(0);} 50%{transform:scale(1.18) rotate(18deg);}}
@keyframes pulse{0%{transform:scale(.6); opacity:.45;} 100%{transform:scale(2.2); opacity:0;}}
.h-waves path{fill:none; stroke:var(--gold); stroke-width:2.5; stroke-dasharray:4 7; stroke-linecap:round; opacity:.8; animation:flow 1.1s linear infinite;}
@keyframes flow{to{stroke-dashoffset:-22;}}
.h-phone rect:first-child{stroke:rgba(0,0,0,.25); stroke-width:1.5;}
.h-phone .scr{fill:#fff; opacity:.92;}
.h-phone text{font-size:16px; text-anchor:middle; font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif;}
.h-phone{animation:bob 2.2s ease-in-out infinite;}
.p0{--x:62px; --y:172px;} .p0 rect:first-child{fill:#E8554E;}
.p1{--x:122px; --y:160px; animation-delay:-.5s;} .p1 rect:first-child{fill:#E59A1C;}
.p2{--x:198px; --y:160px; animation-delay:-1s;} .p2 rect:first-child{fill:#1FA971;}
.p3{--x:258px; --y:172px; animation-delay:-1.5s;} .p3 rect:first-child{fill:#8257E5;}
.h-phone{transform:translate(var(--x),var(--y)) rotate(var(--r,0deg));}
.p0{--r:-12deg;} .p1{--r:-5deg;} .p2{--r:5deg;} .p3{--r:12deg;}
@keyframes bob{0%,100%{transform:translate(var(--x),var(--y)) rotate(var(--r));} 50%{transform:translate(var(--x),calc(var(--y) - 10px)) rotate(var(--r));}}

/* ---------- البداية ---------- */
.intro{max-width:900px; margin:0 auto; text-align:center; padding-top:clamp(8px,4vh,40px);}
.intro h1,.join h1{font-size:clamp(2.6rem,9vw,4.2rem); line-height:1.2; letter-spacing:-.5px; text-shadow:0 4px 0 color-mix(in srgb, var(--gold) 35%, transparent);}
.lead{color:var(--text-2); font-size:clamp(1rem,2.4vw,1.15rem); max-width:48ch; margin:6px auto 0;}
.intro-actions{display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin:22px 0 26px;}
.booths{display:flex; flex-wrap:wrap; gap:10px; justify-content:center;}
.booth{
  position:relative; display:inline-flex; align-items:center; gap:7px; padding:8px 14px 8px 16px;
  border-radius:12px 12px 8px 8px; background:var(--booth); border:1px solid var(--line); font-weight:700; font-size:.92rem;
  box-shadow:0 4px 0 var(--edge);
}
.booth::before{content:""; position:absolute; inset:-1px -1px auto; height:7px; border-radius:12px 12px 0 0;
  background:repeating-linear-gradient(90deg, var(--gold) 0 12px, #E8554E 12px 24px);}
.booth i{font-style:normal; font-size:1.15rem;}
.local-note{margin:22px auto 0; max-width:60ch; padding:10px 14px; border-radius:12px; background:var(--surface); border:1px dashed var(--line); color:var(--text-2); font-size:.88rem;}

/* ---------- الانتظار ---------- */
.lobby{display:grid; grid-template-columns:minmax(260px,330px) 1fr; gap:18px; max-width:1300px; margin:0 auto; width:100%;}
.join-card{
  text-align:center; padding:18px; border-radius:22px; background:var(--booth); border:1px solid var(--line); box-shadow:var(--shadow);
  position:relative; overflow:hidden;
}
.join-card::before{content:""; position:absolute; inset:0 0 auto; height:10px; background:repeating-linear-gradient(90deg,#E8554E 0 20px,#E59A1C 20px 40px,#1FA971 40px 60px,#8257E5 60px 80px,#E0559B 80px 100px,#0FA3B1 100px 120px);}
.join-card small{color:var(--text-2); font-weight:700;}
.qr{background:#fff; border-radius:16px; padding:10px; width:min(240px,70vw); margin:8px auto; box-shadow:0 6px 0 var(--edge);}
.qr svg,.qr img{width:100%; height:auto; display:block;}
.code{font-size:clamp(2.6rem,6vw,3.6rem); font-weight:700; letter-spacing:6px; line-height:1.2; color:var(--gold); text-shadow:0 3px 0 rgba(0,0,0,.25); direction:ltr;}
.join-link{display:block; color:var(--text-2); font-size:.8rem; word-break:break-all; direction:ltr;}
.lobby-count{margin-top:8px; font-size:1.05rem;}
.lobby-count b{font-size:1.5rem; color:var(--gold);}
.teams-board{display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:12px; align-content:start;}
.tcol{border-radius:18px; background:var(--booth); border:1px solid var(--line); overflow:hidden; box-shadow:0 5px 0 var(--edge);}
.tcol header{display:flex; justify-content:space-between; align-items:center; padding:10px 14px; background:var(--tc); color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.3);}
.tcol header span{background:rgba(0,0,0,.2); padding:0 10px; border-radius:999px;}
.chips{display:flex; flex-wrap:wrap; gap:6px; padding:12px; min-height:70px; align-content:flex-start;}
.pchip{padding:4px 12px; border-radius:999px; border:1.5px solid color-mix(in srgb, var(--tc) 60%, transparent); background:var(--surface); font-weight:700; font-size:.9rem; animation:popIn .35s ease both;}
.pchip i{font-style:normal; margin-left:3px;}
.pchip.lead{background:color-mix(in srgb, var(--tc) 30%, transparent); border-color:var(--tc);}
.pchip.off{opacity:.45; text-decoration:line-through;}
.chips .empty{color:var(--text-2); font-size:.85rem;}
@keyframes popIn{from{transform:scale(.6); opacity:0;} to{transform:none; opacity:1;}}
.lobby-actions{display:flex; gap:10px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:18px;}
.playlist-sum{color:var(--text-2); font-size:.95rem;}
.warn{color:var(--bad);}
@media (max-width:760px){ .lobby{grid-template-columns:1fr;} }

/* ---------- المسرح ---------- */
.stage-wrap{display:grid; grid-template-columns:1fr minmax(200px,250px); gap:16px; max-width:1500px; margin:0 auto; width:100%;}
.stage-main{min-width:0; display:flex; flex-direction:column; gap:12px;}
.stage-head{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;}
.g-title{display:flex; align-items:center; gap:10px;}
.g-ico{width:52px; height:52px; border-radius:14px; display:grid; place-items:center; font-size:1.7rem; background:var(--booth); border:1px solid var(--line); box-shadow:0 4px 0 var(--edge);}
.g-title b{display:block; font-size:1.35rem; line-height:1.3;}
.g-title small{color:var(--text-2);}
.g-live{display:flex; align-items:center; gap:12px;}
.answered{font-size:1rem; color:var(--text-2);}
.answered b{color:var(--gold); font-size:1.4rem;}
.stage{
  position:relative; min-height:clamp(320px,58vh,700px); border-radius:24px; padding:clamp(14px,2.4vw,30px);
  background:color-mix(in srgb, var(--booth) 88%, transparent); border:1px solid var(--line); box-shadow:var(--shadow);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; text-align:center;
}
.stage-foot{display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap;}
.who{display:flex; gap:6px; flex-wrap:wrap; justify-content:center; flex:1;}
.tdot{padding:4px 12px; border-radius:999px; border:2px solid var(--tc); background:var(--surface); font-weight:700; font-size:.9rem; transition:background .3s;}
.tdot.done{background:var(--tc); color:#fff;}
.tdot.pts b{color:var(--gold);}
.side-score{border-radius:20px; background:var(--booth); border:1px solid var(--line); padding:12px; align-self:start; position:sticky; top:12px; box-shadow:var(--shadow);}
.side-score h4{margin-bottom:6px; color:var(--text-2); font-size:.9rem;}
.srow{position:relative; display:grid; grid-template-columns:22px 1fr auto; gap:8px; align-items:center; padding:8px 8px; border-radius:12px; overflow:hidden; margin-bottom:6px; border-inline-start:4px solid var(--tc);}
.srow .bar{position:absolute; inset:0 auto 0 0; width:var(--w); background:color-mix(in srgb, var(--tc) 22%, transparent); z-index:-0; transition:width .6s ease;}
.srow > *:not(.bar){position:relative; z-index:1;}
.srow .pos{font-weight:700; color:var(--text-2);}
.srow .nm{display:flex; flex-direction:column; line-height:1.3; min-width:0;}
.srow .nm small{color:var(--text-2); font-size:.75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.srow .pts{font-weight:700; font-size:1.15rem; text-align:left; display:flex; flex-direction:column; line-height:1.2;}
.srow .pts small{font-size:.75rem; color:var(--gold);}
@media (max-width:900px){ .stage-wrap{grid-template-columns:1fr;} .side-score{position:static;} }

/* حلقة الوقت */
.ring{position:relative; width:64px; height:64px; flex:none;}
.ring svg{width:100%; height:100%; transform:rotate(-90deg);}
.ring circle{fill:none; stroke-width:4.5;}
.ring .r-bg{stroke:var(--surface-2);}
.ring .r-fg{stroke:var(--gold); stroke-linecap:round; stroke-dasharray:calc(var(--k) * 100) 100; transition:stroke-dasharray .25s linear;}
.ring b{position:absolute; inset:0; display:grid; place-items:center; font-size:1.25rem;}
.ring.hot .r-fg{stroke:var(--bad);}
.ring.hot b{color:var(--bad); animation:beat .5s ease-in-out infinite alternate;}
@keyframes beat{to{transform:scale(1.15);}}
.ring.pre b{color:var(--text-2);}

/* ---------- تعريف الفقرة: لافتة الكشك ---------- */
.g-intro{max-width:760px;}
.booth-sign{
  position:relative; display:inline-flex; flex-direction:column; align-items:center; gap:4px; padding:26px 34px 18px; border-radius:22px;
  background:var(--solid); border:2px solid var(--line); box-shadow:0 8px 0 var(--edge), var(--shadow); animation:signIn .6s cubic-bezier(.2,1.4,.4,1) both;
}
.booth-sign::before{content:""; position:absolute; inset:-2px -2px auto; height:14px; border-radius:22px 22px 0 0; background:repeating-linear-gradient(90deg,var(--gold) 0 18px,#E8554E 18px 36px);}
.booth-sign .b-ico{font-size:clamp(3rem,7vw,4.5rem); line-height:1.1; animation:sway 1.6s ease-in-out infinite alternate; transform-origin:50% 90%;}
.booth-sign h2{font-size:clamp(1.8rem,4.5vw,2.8rem); line-height:1.25;}
.booth-sign.small{padding:20px 22px 14px;}
.booth-sign.small h2{font-size:1.6rem;}
@keyframes signIn{from{transform:translateY(-30px) rotate(-4deg); opacity:0;} to{transform:none; opacity:1;}}
.mode-badge{padding:3px 14px; border-radius:999px; font-size:.88rem; font-weight:700; background:var(--surface-2); border:1px solid var(--line);}
.m-team{background:color-mix(in srgb, var(--gold) 25%, transparent); border-color:var(--gold);}
.m-solo{background:color-mix(in srgb, #0FA3B1 25%, transparent); border-color:#0FA3B1;}
.m-duel{background:color-mix(in srgb, #E0559B 25%, transparent); border-color:#E0559B;}
.m-mines{background:color-mix(in srgb, var(--bad) 25%, transparent); border-color:var(--bad);}
.how{margin:16px auto 0; max-width:60ch; font-size:clamp(1rem,2vw,1.2rem); color:var(--text-2);}
.roles{margin-top:14px; display:flex; gap:6px; flex-wrap:wrap; justify-content:center; align-items:center;}

/* ---------- محتوى الفقرات ---------- */
.q-big{font-size:clamp(1.3rem,3.4vw,2.3rem); font-weight:700; line-height:1.5; max-width:30ch;}
.q-big.small{font-size:clamp(1.05rem,2.4vw,1.5rem);}
.q-big .place{color:var(--gold);}
.q-cat{display:inline-block; padding:2px 12px; border-radius:999px; background:var(--surface-2); font-size:.85rem; color:var(--text-2);}
.unit-tag{color:var(--text-2);}
.cite,.why{color:var(--text-2); font-size:.92rem;}
.judge{color:var(--text-2); font-size:.85rem;}
.judging{position:absolute; inset:auto 0 12px; text-align:center; font-weight:700; color:var(--gold); animation:beat .6s ease-in-out infinite alternate;}

/* اختيارات */
.mc{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; width:100%; max-width:900px;}
.mc-opt{
  display:flex; align-items:center; gap:10px; padding:12px 14px; min-height:60px; border-radius:16px; text-align:right;
  background:var(--solid); border:2px solid var(--line); box-shadow:0 5px 0 var(--edge); font-weight:700; font-size:clamp(1rem,2.2vw,1.35rem);
  transition:transform .12s, box-shadow .12s, background .2s, opacity .3s;
}
.mc-opt i{flex:none; width:34px; height:34px; border-radius:10px; display:grid; place-items:center; font-style:normal; background:var(--surface-2); font-size:.95rem;}
.mc-opt span{flex:1;}
.mc-opt .cnt{flex:none; min-width:30px; padding:0 8px; border-radius:999px; background:var(--surface-2); font-size:.9rem;}
button.mc-opt:active:not(:disabled){transform:translateY(5px); box-shadow:none;}
button.mc-opt:disabled{cursor:default;}
.mc-opt[aria-pressed="true"]{background:var(--accent); color:var(--on-accent); border-color:transparent; box-shadow:0 5px 0 var(--edge-accent);}
.mc-opt.is-right{background:var(--ok); color:#fff; border-color:transparent; box-shadow:0 5px 0 var(--ok-dk); animation:popIn .4s ease both;}
.mc-opt.is-dim{opacity:.45;}
.mc-big .mc-opt{min-height:84px; font-size:1.3rem; justify-content:center;}
@media (max-width:520px){ .mc{grid-template-columns:1fr;} .mc-big{grid-template-columns:1fr 1fr;} .mc-big .mc-opt{min-height:96px;} }

/* إدخال رقم */
.num-in{display:flex; gap:10px; width:100%; max-width:440px; align-items:stretch;}
.num-box{flex:1; position:relative;}
.num-box input{width:100%; height:60px; border-radius:16px; border:2px solid var(--line); background:var(--solid); padding:0 16px 0 70px; font-size:1.6rem; font-weight:700; text-align:center; direction:ltr;}
.num-box input.bad{border-color:var(--bad);}
.num-box small{position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-2); font-size:.85rem; max-width:60px; overflow:hidden; white-space:nowrap;}

/* الحقيقة */
.truth{display:flex; flex-direction:column; align-items:center; padding:10px 26px; border-radius:18px; background:color-mix(in srgb, var(--gold) 18%, transparent); border:2px solid var(--gold); animation:popIn .45s ease both;}
.truth small{color:var(--text-2); font-weight:700;}
.truth b{font-size:clamp(1.6rem,4.5vw,2.8rem); color:var(--gold); line-height:1.3;}
.truth b i{font-style:normal; font-size:.5em; color:var(--text);}
.rank-list{width:100%; max-width:640px; display:flex; flex-direction:column; gap:8px;}
.rank-list li{display:flex; align-items:center; gap:10px; padding:8px 14px; border-radius:14px; background:var(--surface); border:1px solid var(--line); animation:slideIn .4s ease both;}
.rank-list li:nth-child(2){animation-delay:.08s;} .rank-list li:nth-child(3){animation-delay:.16s;} .rank-list li:nth-child(4){animation-delay:.24s;}
.rank-list li.first{background:color-mix(in srgb, var(--gold) 22%, transparent); border-color:var(--gold);}
.rank-list .guess{font-size:1.25rem;}
.rank-list small{color:var(--text-2); flex:1;}
.rank-list strong{color:var(--gold); font-size:1.2rem;}
.rank-list .exact{font-style:normal; padding:0 10px; border-radius:999px; background:var(--ok); color:#fff; font-size:.85rem;}
.rank-list .empty{justify-content:center; color:var(--text-2);}
@keyframes slideIn{from{transform:translateX(30px); opacity:0;} to{transform:none; opacity:1;}}
.team-res{display:flex; gap:8px; flex-wrap:wrap; justify-content:center;}
.tres{display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:999px; border:2px solid var(--tc); font-weight:700;}
.tres.ok{background:color-mix(in srgb, var(--ok) 25%, transparent);}
.tres.no{opacity:.75;}
.tres.ok b{color:var(--ok);} .tres.no b{color:var(--bad);}
.tres em{font-style:normal; font-size:.8rem; color:var(--gold);}
.solo-sum{display:flex; flex-direction:column; align-items:center; gap:6px;}
.solo-sum b{color:var(--gold); font-size:1.2rem;}
.fast-list{display:flex; flex-wrap:wrap; gap:6px; justify-content:center;}
.fast-list li{display:flex; align-items:center; gap:6px; padding:4px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--line); font-weight:700;}
.fast-list li i{font-style:normal; color:var(--gold);}
.fast-list li b{color:var(--gold);}

/* كم السعر */
.product{display:flex; align-items:center; gap:18px; padding:18px 24px 26px; border-radius:22px; background:var(--solid); border:2px solid var(--line); box-shadow:0 7px 0 var(--edge); position:relative; text-align:right; max-width:640px;}
.p-emo{font-size:clamp(3rem,7vw,5rem); line-height:1;}
.product b{display:block; font-size:clamp(1.25rem,3vw,2rem); line-height:1.35;}
.product small{color:var(--text-2); font-size:1rem;}
.tagprice{position:absolute; bottom:-16px; left:14px; padding:4px 14px 4px 18px; background:var(--gold); color:var(--gold-ink); font-weight:700; border-radius:8px 999px 999px 8px; transform:rotate(-6deg); box-shadow:0 3px 0 var(--gold-dk);}

/* كم السعر: بطاقة السلعة برسمتها والنطاقات */
:root{--b-ex:#1FA971; --b-r:#E8554E; --b-y:#F2C21B; --b-g:#3B98EA;}
.pcard{position:relative; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:6px 18px; width:min(100%,640px); padding:16px 20px 18px; border-radius:24px; background:var(--solid); border:2px solid var(--line); box-shadow:0 7px 0 var(--edge); text-align:right; animation:popIn .45s ease both;}
.pc-art{grid-row:span 2; width:clamp(120px,26vw,190px); aspect-ratio:4/3; border-radius:18px; display:grid; place-items:center; background:radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--gold) 38%, transparent), transparent 70%), var(--surface);}
.pc-art svg{width:100%; height:100%;}
.pc-art .p-emo{font-size:clamp(3rem,8vw,5rem);}
.pc-txt b{display:block; font-size:clamp(1.15rem,2.8vw,1.8rem); line-height:1.35;}
.pc-txt small{color:var(--text-2); font-size:.95rem;}
.pc-tag{justify-self:start; display:inline-flex; align-items:baseline; gap:6px; padding:4px 16px 4px 18px; background:var(--gold); color:var(--gold-ink); font-weight:800; border-radius:8px 999px 999px 8px; transform:rotate(-4deg); box-shadow:0 3px 0 var(--gold-dk);}
.pc-tag span{font-size:1.4rem;} .pc-tag i{font-style:normal; font-size:.9rem;}
.pc-bands{grid-column:1/-1; display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin-top:8px;}
.bd{display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px; font-size:.85rem; font-weight:700; border:2px solid var(--bc); background:color-mix(in srgb, var(--bc) 16%, transparent);}
.bd b{color:var(--text);}
.b-ex{--bc:var(--b-ex);} .b-r{--bc:var(--b-r);} .b-y{--bc:var(--b-y);} .b-g{--bc:var(--b-g);} .b-o{--bc:var(--line);}
.host .stage .pcard.big{width:min(100%,820px); padding:22px 28px 24px; margin:10px 0;}
.host .stage .pcard.big .pc-art{width:clamp(170px,22vw,260px);}
.host .stage .pcard.big .pc-txt b{font-size:clamp(1.5rem,3vw,2.4rem);}
.pg-body .pcard{grid-template-columns:1fr; text-align:center; justify-items:center; padding:12px 14px 14px;}
.pg-body .pcard .pc-art{grid-row:auto; width:min(62vw,220px);}
.pg-body .pcard .pc-tag{justify-self:center;}

/* كشف كم السعر */
.pr-rev{width:min(100%,760px); display:flex; flex-direction:column; align-items:center; gap:12px;}
.pr-top{display:flex; align-items:center; gap:12px; text-align:right;}
.pr-art{width:92px; aspect-ratio:4/3; border-radius:14px; background:var(--surface); display:grid; place-items:center;}
.pr-art svg{width:100%; height:100%;} .pr-art .p-emo{font-size:2.6rem;}
.pr-name b{display:block; font-size:1.1rem; line-height:1.35;} .pr-name small{color:var(--text-2);}
.pr-truth{display:flex; flex-direction:column; align-items:center; padding:8px 28px; border-radius:18px; background:color-mix(in srgb, var(--gold) 16%, transparent); border:2px solid var(--gold); transition:transform .3s ease, box-shadow .3s ease;}
.pr-truth small{color:var(--text-2); font-weight:700;}
.pr-truth b{font-size:clamp(1.8rem,5vw,3rem); color:var(--gold); line-height:1.25; font-variant-numeric:tabular-nums;}
.pr-truth b i{font-style:normal; font-size:.45em; color:var(--text);}
.pr-rev.t-on .pr-truth{transform:scale(1.06); box-shadow:0 0 0 6px color-mix(in srgb, var(--gold) 25%, transparent);}
.pr-gauge{position:relative; direction:ltr; width:100%; height:44px; border-radius:999px; background:var(--surface); border:2px solid var(--line); overflow:visible;}
.pr-gauge .zone{position:absolute; top:4px; bottom:4px; border-radius:999px; background:var(--bc); opacity:0; transform:scaleX(.05); transition:transform .6s cubic-bezier(.2,.9,.3,1.2), opacity .4s;}
.pr-gauge.on .zone.b-g{opacity:.45; transform:none;} .pr-gauge.on .zone.b-y{opacity:.7; transform:none; transition-delay:.15s;}
.pr-gauge.on .zone.b-r{opacity:.95; transform:none; transition-delay:.3s;}
.pr-gauge .mid{position:absolute; left:50%; top:-6px; bottom:-6px; width:4px; margin-left:-2px; border-radius:2px; background:var(--b-ex); box-shadow:0 0 0 3px color-mix(in srgb, var(--b-ex) 30%, transparent);}
.pr-gauge .lab{position:absolute; bottom:-20px; font-size:.75rem; color:var(--text-2); font-weight:700;}
.pr-gauge .lab.lo{left:6px;} .pr-gauge .lab.hi{right:6px;}
.pr-gauge .mk{position:absolute; top:50%; width:18px; height:18px; margin:-9px 0 0 -9px; border-radius:50%; background:var(--c); border:3px solid var(--solid); box-shadow:0 2px 0 var(--edge); animation:mkDrop .45s cubic-bezier(.2,.9,.3,1.4) both;}
.pr-gauge .mk.edge{border-style:dashed;}
.pr-gauge .mk.b-ex{width:24px; height:24px; margin:-12px 0 0 -12px; z-index:2;}
.pr-gauge .mk.me{outline:3px solid var(--gold); outline-offset:2px; z-index:3;}
@keyframes mkDrop{from{transform:translateY(-34px) scale(.6); opacity:0;} to{transform:none; opacity:1;}}
.pr-rev > .pc-bands{margin-top:12px;}
.pr-list{width:100%; display:flex; flex-direction:column; gap:7px; max-height:min(52vh,520px); overflow:auto; padding:2px;}
.pr-row{display:flex; align-items:center; gap:10px; padding:7px 12px; border-radius:14px; background:var(--surface); border:2px solid var(--line); border-inline-start:6px solid var(--bc); animation:slideIn .35s ease both;}
.pr-row .rk{font-style:normal; font-weight:800; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--gold); color:var(--gold-ink); flex:none;}
.pr-row .guess{font-size:1.2rem; font-variant-numeric:tabular-nums;}
.pr-row small{flex:1; color:var(--text-2); font-size:.85rem;}
.pr-row .band{font-style:normal; font-size:.8rem; font-weight:800; padding:2px 8px; border-radius:999px; background:color-mix(in srgb, var(--bc) 22%, transparent);}
.pr-row strong{min-width:44px; text-align:left;}
.pr-row.top{padding:10px 14px; font-size:1.05rem;}
.pr-row.wait{border-color:var(--gold); border-inline-start-color:var(--gold); animation:waitPulse .34s ease-in-out infinite alternate;}
.pr-row.wait .guess{color:var(--gold);}
.pr-row.flip{animation:flipIn .5s ease both;}
.pr-row.b-ex.flip{background:color-mix(in srgb, var(--b-ex) 22%, var(--surface)); box-shadow:0 0 0 4px color-mix(in srgb, var(--b-ex) 30%, transparent);}
.pr-row.me{outline:3px solid var(--gold); outline-offset:1px;}
@keyframes waitPulse{from{transform:scale(1);} to{transform:scale(1.025);}}
@keyframes flipIn{0%{transform:rotateX(80deg);} 100%{transform:none;}}
.bk-art svg{width:52px; height:39px; display:block;}
.pg-body .pr-rev{gap:10px;} .pg-body .pr-art{width:64px;} .pg-body .pr-name b{font-size:.95rem;}
.pg-body .pr-list{max-height:none;}
@media (prefers-reduced-motion: reduce){.pr-gauge .zone,.pr-gauge .mk,.pr-row{animation:none !important; transition:none !important;}}

/* المحتوى أكبر على الشاشة الكبيرة */
.host .stage .product{transform:scale(1.25); margin:20px 0;}
.host .stage .rx-grid{width:min(100%,560px);}
.host .stage .mc{max-width:1000px;}
.host .stage .mc-opt{min-height:72px;}

/* سرعة البديهة */
.rx-cmd{font-size:clamp(1.3rem,3.4vw,2.2rem); font-weight:700; padding:6px 22px; border-radius:14px; background:color-mix(in srgb, var(--gold) 20%, transparent); border:2px solid var(--gold);}
.rx-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; width:min(100%,520px);}
.rx-cell{position:relative; aspect-ratio:1; border-radius:18px; background:#fff; border:2px solid rgba(0,0,0,.08); box-shadow:0 5px 0 var(--edge); display:grid; place-items:center; transition:transform .1s, opacity .3s;}
.rx-cell svg{width:68%; height:68%;}
.rx-cell:active:not(:disabled){transform:translateY(5px); box-shadow:none;}
.rx-cell:disabled{cursor:default;}
.rx-cell.picked{outline:4px solid var(--accent); outline-offset:2px;}
.rx-cell.is-right{outline:5px solid var(--ok); outline-offset:2px; animation:popIn .4s ease both;}
.rx-cell.is-dim{opacity:.35;}
.rx-emo{font-size:clamp(2rem,9vw,3.4rem); line-height:1;}
.rx-word{font-size:clamp(1.1rem,5vw,1.9rem); font-weight:700;}
.rx-cell .cnt{position:absolute; top:6px; left:6px; min-width:26px; padding:0 6px; border-radius:999px; background:#0A2463; color:#fff; font-size:.85rem;}

/* المشاهد */
.scene-wrap{position:relative; width:100%; max-width:760px; border-radius:18px; overflow:hidden; border:3px solid var(--line); box-shadow:0 7px 0 var(--edge);}
.scene-wrap svg{display:block; width:100%; height:auto;}
.scene-wrap.mini{max-width:340px;}
.scene-wrap.big{max-width:900px;}
.scene-wrap.look{border-color:var(--gold); animation:focus 1s ease-in-out infinite alternate;}
@keyframes focus{to{box-shadow:0 0 0 6px color-mix(in srgb, var(--gold) 35%, transparent), 0 7px 0 var(--edge);}}
.look-tag{position:absolute; top:10px; right:10px; padding:2px 12px; border-radius:999px; background:var(--gold); color:var(--gold-ink); font-weight:700;}

/* تحدي الرسم */
.frame{margin:0; padding:10px 10px 6px; background:#fff; border-radius:12px; box-shadow:0 6px 0 var(--edge); color:#0A2463; transform:rotate(-1deg); border-top:8px solid var(--tc, var(--gold));}
.frame svg,.frame img{display:block; width:100%; height:auto; border-radius:4px; aspect-ratio:4/3; object-fit:cover; background:#fff;}
.frame figcaption{text-align:center; font-weight:700; font-size:.92rem; padding-top:4px; display:flex; gap:8px; justify-content:center; flex-wrap:wrap; align-items:center;}
.frame figcaption .sim{font-size:.82rem; padding:0 8px; border-radius:999px; background:#EEF4FF;}
.frame figcaption b{color:#B86E00;}
.frame.win{outline:5px solid var(--gold); outline-offset:3px; transform:rotate(1deg) scale(1.03);}
.frame.ref{max-width:200px; margin:0 auto; transform:none; padding:6px;}
.draw-host{display:flex; flex-direction:column; align-items:center; gap:14px; width:100%;}
.draw-host .frame{width:min(100%,520px);}
.drawers{display:flex; gap:8px; flex-wrap:wrap; justify-content:center;}
.drawer{padding:6px 14px; border-radius:999px; border:2px solid var(--tc); font-weight:700; animation:beat .8s ease-in-out infinite alternate;}
.drawer.done{background:var(--tc); color:#fff; animation:none;}
.gallery{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:16px; width:100%;}
.gallery .frame:nth-child(even){transform:rotate(1.5deg);}
.wait-note{color:var(--text-2); text-align:center;}
.pad{width:100%; max-width:560px; margin:0 auto; display:flex; flex-direction:column; gap:8px;}
.pad-c{width:100%; aspect-ratio:4/3; background:#fff; border-radius:14px; touch-action:none; border:3px solid var(--line); box-shadow:0 5px 0 var(--edge);}
.swatches{display:flex; flex-wrap:wrap; gap:6px; justify-content:center;}
.sw{width:32px; height:32px; border-radius:50%; background:var(--c); border:2px solid rgba(0,0,0,.25);}
.sw.on{outline:3px solid var(--gold); outline-offset:2px; transform:scale(1.1);}
.pad-row{display:flex; gap:6px; align-items:center; justify-content:center; flex-wrap:wrap;}
.tool{width:46px; height:46px; border-radius:12px; background:var(--solid); border:1px solid var(--line); box-shadow:0 3px 0 var(--edge); font-size:1.1rem;}
.tool.on{background:var(--accent); color:var(--on-accent);}
.tool.size{font-size:18px;}


/* أدق وصف */
.desc-rev{display:grid; grid-template-columns:minmax(200px,340px) 1fr; gap:16px; width:100%; text-align:right; align-items:start;}
.desc-top{display:flex; flex-direction:column; gap:10px;}
.desc-top li{padding:10px 14px; border-radius:14px; background:var(--surface); border:1px solid var(--line);}
.desc-top header{display:flex; align-items:center; gap:8px; font-weight:700;}
.desc-top header i{font-style:normal; color:var(--gold);}
.desc-top header b{margin-inline-start:auto; color:var(--gold);}
.desc-top p{font-size:.95rem; max-height:6.8em; overflow:hidden;}
.desc-top small{color:var(--ok);}
.desc-in{width:100%; display:flex; flex-direction:column; gap:8px;}
.desc-in textarea{width:100%; border-radius:14px; border:2px solid var(--line); background:var(--solid); padding:10px 12px; font-size:1rem; resize:vertical;}
.desc-in .row{display:flex; justify-content:space-between; align-items:center;}
.sent-text{padding:10px; border-radius:12px; background:var(--surface); text-align:right;}
.hits{color:var(--ok); font-weight:700;}
@media (max-width:760px){ .desc-rev{grid-template-columns:1fr;} }

/* الخرائط */
.map-wrap{width:100%; max-width:820px; border-radius:18px; overflow:hidden; border:3px solid var(--line); box-shadow:0 6px 0 var(--edge);}
.map{display:block; width:100%; height:auto;}
.map .sea{fill:#3A78C9;}
[data-theme="fest"] .map .sea,[data-theme="navy"] .map .sea{fill:#1D3E7A;}
.map .land{fill:#D8CFBC; stroke:#8D7F66; stroke-width:1.2;}
.map .land.hi{fill:#F4D58E; stroke:#7A5A1E; stroke-width:2.4;}
.map-wrap.tap{cursor:crosshair; touch-action:manipulation;}
.pin.pulse path{animation:drop .35s cubic-bezier(.3,1.6,.5,1) both; transform-box:fill-box; transform-origin:50% 100%;}
@keyframes drop{from{transform:translateY(-30px) scale(.6);} to{transform:none;}}
.dist{stroke-width:3; stroke-dasharray:8 6; opacity:.9;}
.truth-star circle{fill:var(--gold); opacity:.35; animation:pulse 1.4s ease-out infinite; transform-box:fill-box; transform-origin:center;}
.truth-star path{fill:#FFD34D; stroke:#7A4A00; stroke-width:1.5; transform:scale(1.6);}
.pin-send{width:100%; max-width:420px;}
.pin-rev{display:grid; grid-template-columns:1.6fr 1fr; gap:16px; width:100%; align-items:center;}
@media (max-width:760px){ .pin-rev{grid-template-columns:1fr;} }

/* رتّبها صح */
.cards-row{display:flex; gap:10px; flex-wrap:wrap; justify-content:center;}
.ocard{display:flex; align-items:center; gap:8px; padding:12px 16px; border-radius:14px; background:var(--solid); border:2px solid var(--line); box-shadow:0 5px 0 var(--edge); font-weight:700; font-size:clamp(1rem,2.2vw,1.3rem);}
.ocard i{font-style:normal; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; background:var(--gold); color:var(--gold-ink); font-size:.9rem; flex:none;}
.cards-row.right .ocard{border-color:var(--ok); animation:popIn .4s ease both;}
.sorter{display:flex; flex-direction:column; gap:8px; width:100%; max-width:460px; margin:6px auto;}
.sorter .ocard{touch-action:none; user-select:none; cursor:grab; text-align:right;}
.sorter .ocard span{flex:1;}
.sorter .ocard button{width:36px; height:36px; border-radius:10px; border:1px solid var(--line); background:var(--surface-2); font-size:.8rem;}
.sorter .ocard button:disabled{opacity:.3;}
.sorter .ocard.dragging{z-index:2; position:relative; box-shadow:0 14px 28px rgba(0,0,0,.35); border-color:var(--gold); cursor:grabbing;}
.sorter.done .ocard{border-color:var(--ok);}
.order-send{width:100%; max-width:460px;}

/* أكمل المثل */
.verse{font-size:clamp(1.3rem,3.4vw,2.3rem); line-height:1.9; font-weight:700; max-width:34ch; padding:14px 24px; border-radius:18px; background:var(--surface); border-inline-start:6px solid var(--gold);}
.verse .gap{color:var(--gold); letter-spacing:2px;}
.verse mark{background:var(--ok); color:#fff; padding:0 10px; border-radius:8px; animation:popIn .4s ease both;}

/* الألغام */
.mines{display:grid; grid-template-columns:repeat(var(--n),1fr); gap:8px; width:min(100%,460px); margin:0 auto;}
.mcell{
  position:relative; aspect-ratio:1; border-radius:14px; font-size:clamp(1.2rem,5vw,2rem);
  background:linear-gradient(160deg, color-mix(in srgb, var(--solid) 80%, #fff 20%), var(--solid)); border:2px solid var(--line); box-shadow:0 5px 0 var(--edge);
  transition:transform .12s, background .3s;
}
.mcell:not(:disabled):hover{transform:translateY(-2px);}
.mcell:not(:disabled):active{transform:translateY(5px); box-shadow:none;}
.mcell:disabled{cursor:default;}
.mcell.safe{background:color-mix(in srgb, var(--ok) 35%, var(--solid)); border-color:var(--ok); color:#fff; box-shadow:0 2px 0 var(--ok-dk);}
.mcell.boom{background:var(--bad); border-color:var(--bad); box-shadow:0 2px 0 var(--bad-dk); animation:shake .5s ease both;}
.mcell.bomb-show{background:color-mix(in srgb, var(--bad) 25%, var(--solid));}
.mcell.mine-mark{outline:3px dashed var(--bad); outline-offset:-6px;}
.mcell.picked{outline:4px solid var(--gold);}
.owners{position:absolute; bottom:4px; left:0; right:0; display:flex; gap:3px; justify-content:center;}
.owners i{width:10px; height:10px; border-radius:50%; border:1.5px solid #fff;}
@keyframes shake{0%,100%{transform:none;} 20%{transform:translate(-5px,2px) rotate(-4deg);} 40%{transform:translate(5px,-2px) rotate(4deg);} 60%{transform:translate(-3px,1px);} 80%{transform:translate(3px,-1px);}}
.mines-host{display:grid; grid-template-columns:minmax(260px,480px) minmax(220px,1fr); gap:20px; align-items:center; width:100%;}
.mines-side{display:flex; flex-direction:column; gap:12px; align-items:center;}
.actors{display:flex; flex-wrap:wrap; gap:8px; justify-content:center;}
.actor{display:inline-flex; gap:6px; align-items:center; padding:6px 14px; border-radius:999px; border:2px solid var(--tc); font-weight:700;}
.actor b{color:var(--gold);}
.actor.done{background:color-mix(in srgb, var(--tc) 30%, transparent);}
.actor.now{background:var(--tc); color:#fff; transform:scale(1.08); box-shadow:0 0 0 5px color-mix(in srgb, var(--tc) 30%, transparent);}
.actor.out{opacity:.5; text-decoration:line-through;}
.actor.won{background:color-mix(in srgb, var(--ok) 25%, transparent);}
.m-turn{font-size:clamp(1.2rem,3vw,1.8rem); padding:8px 20px; border-radius:16px; border:3px solid var(--tc, var(--gold)); display:flex; flex-direction:column; align-items:center;}
.m-turn b{color:var(--tc, var(--gold));}
.m-turn small{font-size:.9rem; color:var(--text-2);}
.m-turn.me{background:var(--gold); color:var(--gold-ink); border-color:var(--gold-dk); animation:beat .6s ease-in-out infinite alternate;}
.m-flash{font-size:clamp(1.3rem,3.4vw,2rem); font-weight:700; padding:10px 22px; border-radius:16px; display:flex; flex-direction:column; align-items:center; animation:popIn .35s ease both;}
.m-flash small{font-size:.9rem;}
.m-flash.boom{background:var(--bad); color:#fff; animation:shake .6s ease both;}
.m-flash.ok{background:color-mix(in srgb, var(--ok) 30%, transparent); border:2px solid var(--ok);}
.m-msg{text-align:center; color:var(--text-2);}
.m-msg b{color:var(--gold);}
.m-msg.out{color:var(--bad); font-weight:700;}
.m-end{font-size:1.5rem;}
@media (max-width:760px){ .mines-host{grid-template-columns:1fr;} }

/* ---------- النتائج ---------- */
.board{max-width:900px; margin:0 auto; text-align:center;}
.board h2{font-size:clamp(1.6rem,4vw,2.4rem);}
.board-sub{color:var(--text-2); font-size:1.1rem; margin-bottom:16px;}
.podium-list{display:flex; flex-direction:column; gap:10px;}
.prow{display:grid; grid-template-columns:50px minmax(90px,180px) 1fr auto; gap:12px; align-items:center; padding:12px 16px; border-radius:18px; background:var(--booth); border:1px solid var(--line); border-inline-start:6px solid var(--tc); animation:slideIn .45s ease both; animation-delay:calc(var(--i) * .1s); box-shadow:0 4px 0 var(--edge);}
.prow.first{border-color:var(--gold); border-inline-start-color:var(--tc); box-shadow:0 0 0 3px color-mix(in srgb, var(--gold) 40%, transparent), 0 4px 0 var(--edge);}
.prow .pos{font-size:1.6rem;}
.prow .nm{font-size:1.25rem; text-align:right;}
.prow .bar{height:16px; border-radius:999px; background:var(--surface-2); overflow:hidden;}
.prow .bar i{display:block; height:100%; width:var(--w); background:var(--tc); border-radius:999px; animation:grow 1s ease both; animation-delay:calc(var(--i) * .1s + .2s);}
@keyframes grow{from{width:0;}}
.prow .pts{font-size:1.5rem; font-weight:700; display:flex; flex-direction:column; line-height:1.15; min-width:70px;}
.prow .pts small{font-size:.85rem; color:var(--gold);}
.prow .pts em{font-style:normal; font-size:.85rem;}
.players-top{margin-top:20px;}
.players-top h4{color:var(--text-2); margin-bottom:8px;}
.players-top ol{display:flex; flex-wrap:wrap; gap:8px; justify-content:center;}
.players-top li{display:flex; gap:6px; align-items:center;}
.players-top li b{color:var(--gold);}
.board-actions{display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-top:22px;}
.crown{font-size:clamp(4rem,10vw,6rem); animation:signIn .8s cubic-bezier(.2,1.4,.4,1) both;}
.confetti{position:fixed; inset:0; width:100%; height:100%; pointer-events:none; z-index:50;}
@media (max-width:560px){ .prow{grid-template-columns:36px 1fr auto;} .prow .bar{display:none;} }

/* ---------- النوافذ ---------- */
.modal{position:fixed; inset:0; z-index:40; background:var(--scrim); display:grid; place-items:center; padding:14px; backdrop-filter:blur(3px);}
.modal-card{width:min(100%,440px); max-height:calc(100dvh - 28px); overflow:auto; background:var(--solid); color:var(--text); border:1px solid var(--line); border-radius:22px; padding:20px; box-shadow:var(--shadow); animation:popIn .3s ease both;}
.modal-card.wide{width:min(100%,760px);}
.modal-card h3{font-size:1.3rem; margin-bottom:10px;}
.modal-actions{display:flex; gap:10px; margin-top:16px; justify-content:flex-start;}
.modal-actions.single{justify-content:center;}
.field{display:flex; flex-direction:column; gap:4px; margin-bottom:12px; text-align:right;}
.field span{font-weight:700; font-size:.92rem;}
.field input,.field textarea,.set-sec textarea{width:100%; border-radius:14px; border:2px solid var(--line); background:var(--surface); padding:10px 14px; font-size:1.05rem;}
.set-sec{padding:14px 0; border-bottom:1px solid var(--line);}
.set-sec h4{margin-bottom:8px;}
.set-sec textarea{font-size:.95rem; margin-top:6px;}
.presets{display:flex; gap:6px; flex-wrap:wrap; margin-bottom:8px;}
.pl{display:flex; flex-direction:column; gap:6px;}
.pl li{display:flex; align-items:center; gap:10px; padding:6px 10px; border-radius:12px; background:var(--surface); border:1px solid var(--line); transition:opacity .2s;}
.pl li.off{opacity:.5;}
.pl-ico{font-style:normal; font-size:1.3rem;}
.pl-name{flex:1; display:flex; flex-direction:column; line-height:1.3; min-width:0;}
.pl-name small{color:var(--text-2); font-size:.78rem;}
.stepper{display:inline-flex; align-items:center; gap:4px;}
.stepper button,.mv button{width:30px; height:30px; border-radius:8px; border:1px solid var(--line); background:var(--surface-2); font-weight:700;}
.stepper b{min-width:22px; text-align:center;}
.stepper small{color:var(--text-2); font-size:.75rem;}
.stepper.locked{opacity:.4; pointer-events:none;}
.mv{display:inline-flex; gap:3px;}
.mv button:disabled{opacity:.3;}
.sw-toggle{position:relative; width:44px; height:26px; flex:none;}
.sw-toggle input{opacity:0; position:absolute; inset:0; cursor:pointer;}
.sw-toggle span{position:absolute; inset:0; border-radius:999px; background:var(--surface-2); border:1px solid var(--line); transition:background .2s; pointer-events:none;}
.sw-toggle span::after{content:""; position:absolute; top:3px; right:3px; width:18px; height:18px; border-radius:50%; background:#fff; transition:transform .2s; box-shadow:0 1px 3px rgba(0,0,0,.3);}
.sw-toggle input:checked + span{background:var(--ok);}
.sw-toggle input:checked + span::after{transform:translateX(-18px);}
.row-set{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:6px 0; flex-wrap:wrap;}
.row-set.chk{cursor:pointer;}
.row-set.chk input{width:22px; height:22px; accent-color:var(--ok);}
.row-set small{color:var(--text-2);}
.seg{display:inline-flex; border-radius:12px; overflow:hidden; border:1px solid var(--line);}
.seg button{padding:6px 12px; background:var(--surface); border:0; font-weight:700; font-size:.88rem;}
.seg button[aria-pressed="true"]{background:var(--accent); color:var(--on-accent);}
.names{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; margin-top:8px;}
.tname{display:flex; align-items:center; gap:6px; padding:4px 8px; border-radius:12px; border:2px solid var(--tc); background:var(--surface);}
.tname i{width:12px; height:12px; border-radius:50%; background:var(--tc); flex:none;}
.tname input{flex:1; min-width:0; background:none; border:0; padding:4px; font-weight:700;}
.pm-body{display:flex; flex-direction:column; gap:10px;}
.pm-move{display:flex; flex-wrap:wrap; gap:6px; align-items:center;}
.pm-move .chip{border-color:var(--tc);}
.hq-opts{display:flex; flex-direction:column; gap:6px;}
.hq-opt{display:flex; gap:8px; align-items:center;}
.hq-opt input[type=radio]{width:22px; height:22px; accent-color:var(--ok);}
.hq-opt input[type=text]{flex:1; border-radius:12px; border:2px solid var(--line); background:var(--surface); padding:8px 12px;}
.toast{position:fixed; bottom:20px; left:50%; transform:translateX(-50%); z-index:60; padding:10px 20px; border-radius:999px; background:var(--text); color:var(--bg); font-weight:700; box-shadow:var(--shadow);}
.toast.in{animation:toastIn .3s ease both;}
@keyframes toastIn{from{transform:translate(-50%,20px); opacity:0;} to{transform:translate(-50%,0); opacity:1;}}
#quizBox{margin-top:4px;}
.seg{flex-wrap:wrap;}
@media (max-width:600px){
  .pl li{flex-wrap:wrap; row-gap:6px;}
  .pl-name{flex:1 1 calc(100% - 110px);}
  .pl .stepper{margin-inline-start:auto;}
  .row-set{align-items:flex-start;}
}

/* ---------- جوال المشارك ---------- */
body.play main{padding:10px 12px 22px;}
.join{max-width:420px; margin:0 auto; text-align:center; display:flex; flex-direction:column; gap:4px;}
.join h1{margin-bottom:10px;}
.join .btn{margin-top:6px;}
.err{color:var(--bad); font-weight:700; margin-top:8px;}
.pick-team{max-width:520px; margin:0 auto; text-align:center;}
.pick-team h2{font-size:1.7rem;}
.team-pick{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:16px;}
.tpick{display:flex; flex-direction:column; align-items:center; gap:2px; padding:20px 10px 14px; border-radius:18px; background:var(--tc); color:#fff; border:0; box-shadow:0 6px 0 color-mix(in srgb, var(--tc) 55%, #000); text-shadow:0 1px 2px rgba(0,0,0,.35); position:relative; overflow:hidden;}
.tpick::before{content:""; position:absolute; inset:0 0 auto; height:8px; background:repeating-linear-gradient(90deg,rgba(255,255,255,.5) 0 10px,transparent 10px 20px);}
.tpick b{font-size:1.3rem;}
.tpick small{font-size:.8rem; opacity:.95;}
.tpick:active{transform:translateY(6px); box-shadow:none;}
.wait-card{max-width:480px; margin:6vh auto 0; text-align:center; padding:24px 18px; border-radius:24px; background:var(--booth); border:1px solid var(--line); box-shadow:var(--shadow); display:flex; flex-direction:column; gap:10px; align-items:center;}
.w-ico{font-size:3.6rem; line-height:1.1; animation:sway 1.6s ease-in-out infinite alternate;}
.lead-badge{display:inline-block; padding:4px 14px; border-radius:999px; background:color-mix(in srgb, var(--gold) 25%, transparent); border:1.5px solid var(--gold); color:var(--text); font-size:.92rem;}
.big-num{font-size:2rem; color:var(--gold);}
.mini-rank{width:100%; display:flex; flex-direction:column; gap:6px;}
.mini-rank li{display:flex; justify-content:space-between; padding:8px 14px; border-radius:12px; background:var(--surface); border-inline-start:5px solid var(--tc);}
.mini-rank li.mine{background:color-mix(in srgb, var(--tc) 25%, transparent); outline:2px solid var(--tc);}
.pbar{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 12px; border-radius:16px; background:var(--booth); border:1px solid var(--line); margin-bottom:10px;}
.pb-g{font-weight:700;}
.pbar > small{color:var(--text-2);}
.pb-role{flex:1; font-size:.85rem; min-width:0;}
.pb-role .lead-badge{font-size:.8rem; padding:2px 10px;}
#pTimer .ring{width:50px; height:50px;}
#pTimer .ring b{font-size:1rem;}
.pgame{display:block;}
.pg-body{display:flex; flex-direction:column; align-items:center; gap:12px; text-align:center;}
.pg-body .q-big{font-size:1.25rem;}
.pg-body .verse{font-size:1.15rem;}
.pg-body .product{padding:14px 16px;}
.pg-body .mc{max-width:none;}
.pg-body .rx-grid{width:100%;}
.pg-body .rx-cmd{font-size:1.25rem; position:sticky; top:4px; z-index:2; background:var(--solid);}
.sent-note{margin-top:12px; text-align:center; font-weight:700; color:var(--ok); animation:popIn .3s ease both;}
.consult{padding:8px 14px; border-radius:12px; background:var(--surface); border:1px dashed var(--line); color:var(--text-2);}
.my-pts{display:flex; gap:10px; align-items:center; justify-content:center; font-size:1.1rem;}
.my-pts b{color:var(--gold);}
.pg-body.reveal .scene-wrap.mini{max-width:100%;}

/* احترام تقليل الحركة */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important;}
}
.product{margin-bottom:12px;}

/* ---------- بنك الفقرات ---------- */
.bank-cats{display:flex; flex-direction:column; gap:8px; margin:8px 0 12px;}
.bc-row{display:flex; flex-direction:column; gap:4px; padding:8px 10px; border-radius:12px; background:var(--surface); border:1px solid var(--line);}
.bc-chips{display:flex; flex-wrap:wrap; gap:6px;}
.chip.on{background:var(--accent); color:var(--on-accent); border-color:transparent;}
.chip small{opacity:.75; font-size:.75rem;}
.modal-card.bank{width:min(100%,900px); display:flex; flex-direction:column;}
.bk-tabs{display:flex; gap:6px; overflow-x:auto; padding-bottom:6px; scroll-snap-type:x mandatory;}
.bk-tab{flex:none; scroll-snap-align:start; padding:8px 14px; border-radius:12px; border:1px solid var(--line); background:var(--surface); font-weight:700; white-space:nowrap; box-shadow:0 3px 0 var(--edge);}
.bk-tab.on{background:var(--gold); color:var(--gold-ink); border-color:transparent; box-shadow:0 3px 0 var(--gold-dk);}
.bk-tab small{opacity:.7;}
.bk-tools{display:flex; gap:10px; align-items:center; margin:8px 0;}
.bk-tools input{flex:1; min-width:0; border-radius:12px; border:2px solid var(--line); background:var(--surface); padding:8px 12px; font-size:1rem;}
.bk-tools span{color:var(--text-2); font-size:.9rem; white-space:nowrap;}
.bk-filters{display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-bottom:10px;}
.bk-sep{width:1px; height:22px; background:var(--line); margin:0 4px;}
.bk-list{display:flex; flex-direction:column; gap:8px; max-height:52vh; overflow:auto; padding:2px;}
.bk-list li{display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 12px; border-radius:14px; background:var(--surface); border:1px solid var(--line); border-inline-start:4px solid var(--gold);}
.bk-list li > div{flex:1 1 220px; min-width:0; display:flex; flex-direction:column; line-height:1.5;}
.bk-list li small{color:var(--text-2); font-size:.85rem;}
.bk-list li strong{color:var(--gold); white-space:nowrap;}
.bk-list mark{background:var(--ok); color:#fff; padding:0 6px; border-radius:6px;}
.bk-emo{font-size:1.6rem;}
.bk-cat,.bk-lvl{font-size:.75rem; padding:1px 10px; border-radius:999px; background:var(--surface-2); white-space:nowrap;}
.bk-lvl.l0{background:color-mix(in srgb, var(--ok) 25%, transparent);}
.bk-lvl.l1{background:color-mix(in srgb, var(--gold) 28%, transparent);}
.bk-lvl.l2{background:color-mix(in srgb, var(--bad) 25%, transparent);}
.bk-list .empty{justify-content:center; color:var(--text-2); border-inline-start-color:var(--line);}
.seg.locked{opacity:.5; pointer-events:none;}
.drawer.all{--tc:var(--gold); animation:beat .8s ease-in-out infinite alternate;}
.teams-board.solo{grid-template-columns:1fr;}
.solo-col .chips{min-height:120px; gap:8px;}
.solo-col .pchip{font-size:1rem; padding:6px 14px; border-color:var(--tc); background:color-mix(in srgb, var(--tc) 18%, transparent);}
.ai-why{display:block; color:var(--bad); font-size:.78rem; margin-top:2px;}

/* =========================================================
   الحصالة (لعب الفرق)
   ========================================================= */
.bk-ov{position:fixed; inset:0; z-index:60; display:grid; place-items:center; padding:16px; background:color-mix(in srgb, #0B0620 70%, transparent); backdrop-filter:blur(3px); opacity:0; transition:opacity .3s ease;}
.bk-ov.in{opacity:1;} .bk-ov.out{opacity:0;}
.bk-box{position:relative; width:min(100%,620px); padding:18px 18px 16px; border-radius:28px; text-align:center; background:radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--gold) 22%, var(--solid)), var(--solid) 70%); border:2px solid var(--gold); box-shadow:0 10px 0 var(--gold-dk), 0 30px 80px rgba(0,0,0,.45); transform:scale(.85) translateY(30px); transition:transform .45s cubic-bezier(.2,.9,.3,1.3); overflow:visible;}
.bk-ov.in .bk-box{transform:none;}
.bk-h{margin:0; font-size:1.5rem; letter-spacing:.5px;}
.bk-stage{position:relative; width:min(66vw,270px); margin:6px auto 0; aspect-ratio:220/190;}
.bk-jar{width:100%; height:100%; overflow:visible; transform-origin:50% 92%;}
.bk-jar .shard{opacity:0; transform-box:view-box;}
.bk-jar.broke .whole{opacity:0;} .bk-jar.broke .shard{opacity:1; animation:1.2s cubic-bezier(.2,.7,.4,1) both;}
.bk-jar.broke .sA{transform-origin:90px 70px; animation-name:shA;}
.bk-jar.broke .sB{transform-origin:130px 70px; animation-name:shB;}
.bk-jar.broke .sC{transform-origin:80px 150px; animation-name:shC;}
.bk-jar.broke .sD{transform-origin:140px 150px; animation-name:shD;}
@keyframes shA{35%{transform:translate(-40px,-42px) rotate(-16deg);} 100%{transform:translate(-74px,30px) rotate(-48deg);}}
@keyframes shB{35%{transform:translate(42px,-46px) rotate(16deg);} 100%{transform:translate(76px,26px) rotate(52deg);}}
@keyframes shC{35%{transform:translate(-34px,-8px) rotate(-8deg);} 100%{transform:translate(-62px,30px) rotate(-16deg);}}
@keyframes shD{35%{transform:translate(30px,-10px) rotate(6deg);} 100%{transform:translate(56px,32px) rotate(12deg);}}
.bk-jar .crack{stroke-dasharray:260; stroke-dashoffset:260; transition:stroke-dashoffset .3s ease;}
.bk-jar.cracked .crack{stroke-dashoffset:0;}
.bk-jar.broke .crack{opacity:0;}
.bk-jar .peek{transition:transform .25s ease;}
.bk-jar.bump{animation:bkBump .22s ease;}
.bk-jar.bump .peek{transform:translateY(6px);}
.bk-jar.shake{animation:bkShake .09s linear infinite alternate;}
.bk-jar.wiggle{animation:bkWiggle .5s ease 3;}
@keyframes bkBump{50%{transform:scale(1.05,.95);}}
@keyframes bkShake{from{transform:rotate(-3deg) translateX(-3px);} to{transform:rotate(3deg) translateX(3px);}}
@keyframes bkWiggle{25%{transform:rotate(-6deg);} 75%{transform:rotate(6deg);}}
.bk-hammer{position:absolute; width:50%; top:-30%; right:-22%; opacity:0; transform-origin:90% 90%; transform:rotate(55deg); pointer-events:none;}
.bk-stage.swing .bk-hammer{animation:bkSwing .62s cubic-bezier(.5,0,.6,1) both;}
@keyframes bkSwing{0%{opacity:0; transform:rotate(60deg);} 25%{opacity:1; transform:rotate(70deg);} 55%{opacity:1; transform:rotate(-12deg);} 75%{opacity:1; transform:rotate(-4deg);} 100%{opacity:0; transform:rotate(20deg);}}
.bk-glow{position:absolute; inset:10% 20%; border-radius:50%; background:radial-gradient(circle, rgba(255,214,107,.9), transparent 65%); opacity:0; pointer-events:none;}
.bk-stage.flash .bk-glow{animation:bkFlash .7s ease;}
@keyframes bkFlash{20%{opacity:1; transform:scale(1.4);} 100%{opacity:0; transform:scale(2);}}
.bk-count{display:flex; flex-direction:column; align-items:center; margin-top:2px;}
.bk-count b{font-size:clamp(2rem,7vw,3rem); color:var(--gold); line-height:1.1; font-variant-numeric:tabular-nums; text-shadow:0 3px 0 var(--gold-dk);}
.bk-count small{color:var(--text-2); font-weight:700;}
.bk-carry{margin:4px 0 0; color:var(--text-2); font-size:.9rem;}
.bk-teams{display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin-top:12px;}
.bk-team{position:relative; min-width:110px; padding:8px 12px 10px; border-radius:16px; background:color-mix(in srgb, var(--tc) 20%, var(--surface)); border:2px solid var(--tc); display:flex; flex-direction:column; align-items:center; gap:2px; transition:transform .4s ease, opacity .4s ease, filter .4s ease, box-shadow .4s ease;}
.bk-team b{font-size:1rem;} .bk-team .raw{font-size:.85rem; color:var(--text-2);}
.bk-team .got{font-style:normal; font-weight:800; font-size:1.3rem; min-height:1.4em; color:var(--gold);}
.bk-team.me{outline:3px solid var(--gold); outline-offset:2px;}
.bk-team.won{transform:translateY(-6px) scale(1.08); box-shadow:0 0 0 5px color-mix(in srgb, var(--gold) 45%, transparent), 0 10px 26px rgba(0,0,0,.35);}
.bk-team.lost{opacity:.5; filter:grayscale(.7);} .bk-team.lost .got{color:var(--text-2);}
.bk-msg{min-height:1.6em; margin:12px 0 4px; font-size:1.1rem;}
.bk-msg b{color:var(--gold);}
.bk-skip{margin-top:6px; padding:6px 18px; border-radius:999px; border:1px solid var(--line); background:var(--surface); color:var(--text); font:inherit; cursor:pointer;}
.bk-coin{position:absolute; z-index:3; border-radius:50%; pointer-events:none; background:radial-gradient(circle at 35% 30%, #FFF1B8, #F7C948 45%, #D99A0B 80%); box-shadow:inset 0 0 0 2px #B87A00, inset 0 0 0 5px #F7C948, inset 0 0 0 6px #C98A06, 0 2px 4px rgba(0,0,0,.35);}
@media (prefers-reduced-motion: reduce){.bk-jar,.bk-hammer,.bk-glow{animation:none !important;} .bk-jar .shard{transition:none;}}

/* اختيار طريقة اللعب في الواجهة */
.mode-pick{display:grid; grid-template-columns:1fr 1fr; gap:12px; width:min(100%,560px); margin:6px auto 14px;}
.mode-card{position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; padding:14px 12px 12px; border-radius:20px; border:2px solid var(--line); background:var(--surface); color:var(--text); font:inherit; cursor:pointer; box-shadow:0 5px 0 var(--edge); transition:transform .15s ease, box-shadow .15s ease, border-color .2s, background .2s;}
.mode-card:active{transform:translateY(4px); box-shadow:0 1px 0 var(--edge);}
.mode-card .mc-ico{font-size:2.2rem; line-height:1;}
.mode-card b{font-size:1.15rem;} .mode-card small{color:var(--text-2); font-size:.85rem; line-height:1.5;}
.mode-card[aria-pressed="true"]{border-color:var(--gold); background:color-mix(in srgb, var(--gold) 16%, var(--surface)); box-shadow:0 5px 0 var(--gold-dk);}
.mode-card[aria-pressed="true"]::after{content:'✓'; position:absolute; top:8px; left:10px; width:24px; height:24px; border-radius:50%; display:grid; place-items:center; background:var(--gold); color:var(--gold-ink); font-weight:800; font-size:.9rem;}
.mode-card .coin-mini{display:inline-block; animation:bkWiggle 1.6s ease-in-out infinite;}
.side-bank{margin:10px 0 0; text-align:center; font-weight:700; color:var(--text-2); font-size:.9rem;} .side-bank b{color:var(--gold);}

/* سرعة البديهة: الصور والعدّ والإعلان */
.rx-grid.rx-img .rx-cell svg{width:84%; height:84%;}
.rx-field{width:min(100%,560px); border-radius:16px; box-shadow:0 5px 0 var(--edge); overflow:hidden;}
.rx-fsvg{display:block; width:100%; height:auto;}
.rx-field.show .tg{animation:rxPulse .9s ease-in-out infinite alternate; transform-box:fill-box; transform-origin:center;}
.rx-field .nb{animation:popIn .25s ease both; transform-box:fill-box; transform-origin:center;}
@keyframes rxPulse{to{opacity:.55;}}
.rx-opts{display:grid; grid-template-columns:repeat(4,1fr); gap:10px; width:min(100%,560px);}
.rx-cell.rx-opt{aspect-ratio:auto; min-height:64px;}
.rx-num{font-size:clamp(1.6rem,6vw,2.4rem); font-weight:800; color:#0A2463;}
.rx-cell.my-wrong{outline:4px dashed var(--b-r, #E8554E); outline-offset:2px; opacity:.7;}
.rx-rev{display:flex; flex-direction:column; align-items:center; gap:12px; width:100%;}
.rx-ann{display:flex; flex-direction:column; align-items:center; gap:8px; width:min(100%,560px);}
.rx-ban{position:relative; display:grid; grid-template-columns:auto 1fr auto auto; align-items:center; gap:10px; width:100%; padding:12px 16px; border-radius:18px; background:linear-gradient(135deg, color-mix(in srgb, var(--gold) 30%, var(--solid)), var(--solid)); border:2px solid var(--gold); box-shadow:0 6px 0 var(--gold-dk); animation:rxBan .55s cubic-bezier(.2,.9,.3,1.3) both; overflow:hidden;}
.rx-ban::after{content:''; position:absolute; inset:0; background:linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%); transform:translateX(-120%); animation:rxShine 1.2s .5s ease both;}
.rx-ban small{font-weight:800; color:var(--gold); font-size:1rem;}
.rx-ban .who{justify-self:start; display:flex; gap:6px; align-items:center; font-size:1.1rem;}
.rx-ban .time{font-size:clamp(1.4rem,4vw,2rem); color:var(--gold); font-variant-numeric:tabular-nums;}
.rx-ban em{font-style:normal; font-weight:800;}
.rx-ban.none{display:block; text-align:center; font-size:1.3rem; font-weight:800; border-color:var(--line); box-shadow:0 6px 0 var(--edge); background:var(--surface);}
@keyframes rxBan{from{transform:translateY(24px) scale(.85); opacity:0;} to{transform:none; opacity:1;}}
@keyframes rxShine{to{transform:translateX(120%);}}
.rx-podium{display:flex; flex-wrap:wrap; justify-content:center; gap:8px; margin:0; padding:0; list-style:none;}
.rx-podium li{display:flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px; background:var(--surface); border:1px solid var(--line); animation:slideIn .4s calc(.35s + var(--d) * .2s) ease both;}
.rx-podium li i{font-style:normal; font-weight:800; color:var(--gold);}
.rx-podium li span{color:var(--text-2); font-variant-numeric:tabular-nums;}
.rx-sum{margin:0; color:var(--text-2);}
.rx-me{margin:0; padding:6px 14px; border-radius:12px; font-weight:800;}
.rx-me.ok{background:color-mix(in srgb, var(--ok, #1FA971) 20%, transparent); color:var(--ok, #1FA971);}
.rx-me.no{background:color-mix(in srgb, #E8554E 18%, transparent); color:#E8554E;}
.rx-me.none{color:var(--text-2);}
.pg-body .rx-opts{width:100%;} .pg-body .rx-field{width:100%;}

/* عين الصقر: صور حقيقية وبقعة ضوء عند الكشف */
.hk-wrap{position:relative; width:min(100%,860px); border-radius:18px; overflow:hidden; box-shadow:0 8px 0 var(--edge), 0 18px 40px rgba(0,0,0,.35); background:#000;}
.hk-wrap img{display:block; width:100%; height:100%; object-fit:cover; user-select:none; -webkit-user-drag:none;}
.hk-wrap.look{animation:hkIn .5s ease both;}
.hk-wrap.look .look-tag{position:absolute; top:10px; right:10px;}
@keyframes hkIn{from{transform:scale(.94); opacity:0; filter:blur(6px);} to{transform:none; opacity:1; filter:none;}}
.hk-spot{position:absolute; inset:0; width:100%; height:100%; pointer-events:none;}
.hk-spot .dim{opacity:0; transition:opacity .6s ease;}
.hk-spot .hole{transform-box:fill-box; transform-origin:center; transform:scale(7);}
.hk-spot .ring{opacity:0; transform-box:fill-box; transform-origin:center;}
.hk-wrap.spot .dim{opacity:.72;}
.hk-wrap.spot .hole{animation:hkHole 1s cubic-bezier(.3,.8,.3,1) forwards;}
.hk-wrap.spot .ring{animation:hkRing 1.2s .8s ease-out infinite;}
@keyframes hkHole{to{transform:scale(1);}}
@keyframes hkRing{0%{opacity:1; transform:scale(1);} 100%{opacity:0; transform:scale(1.5);}}
.hk-rev{display:flex; flex-direction:column; align-items:center; gap:10px; width:100%;}
.hk-ans{padding:8px 22px; border-radius:14px; font-size:clamp(1.2rem,3.2vw,1.8rem); font-weight:800; background:color-mix(in srgb, var(--ok, #1FA971) 22%, var(--solid)); border:2px solid var(--ok, #1FA971); animation:popIn .4s ease both;}
.hk-res{width:100%; display:flex; flex-direction:column; align-items:center; gap:10px;}
.bk-photo img{width:64px; height:44px; object-fit:cover; border-radius:8px; display:block;}
.hk-rev .hk-wrap{height:min(48vh,500px); width:auto; max-width:100%;}
.pg-body .hk-wrap, .pg-body .hk-rev .hk-wrap{width:100%; height:auto;}
.host .stage .hk-wrap.look{width:min(100%,980px);}
@media (prefers-reduced-motion: reduce){.hk-wrap.spot .hole{animation:none; transform:none;} .hk-wrap.spot .ring{animation:none; opacity:1;}}

/* أسئلة السرعة: الجولة الذهبية */
.q-gold{display:inline-flex; align-items:center; gap:6px; padding:5px 14px; border-radius:999px; font-weight:800; background:linear-gradient(90deg,#FFD877,#F5A50B,#FFD877); background-size:200% 100%; color:#2A1A00; box-shadow:0 4px 0 #B86E00; animation:goldShine 2.4s linear infinite;}
@keyframes goldShine{to{background-position:-200% 0;}}
.q-big.gold{padding:10px 18px; border-radius:16px; border:2px solid var(--gold); box-shadow:0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent), 0 0 30px color-mix(in srgb, var(--gold) 30%, transparent);}
.gold-splash{position:fixed; inset:0; z-index:56; display:grid; place-items:center; pointer-events:none; background:radial-gradient(circle at 50% 50%, rgba(245,165,11,.35), rgba(10,6,32,.55) 70%); animation:gsFade 1.9s ease both;}
.gs-box{display:flex; flex-direction:column; align-items:center; gap:4px; padding:22px 40px; border-radius:26px; background:linear-gradient(180deg,#FFE29A,#F5A50B); color:#2A1A00; box-shadow:0 10px 0 #B86E00, 0 30px 80px rgba(245,165,11,.5); animation:gsIn 1.9s both;}
.gs-box i{font-style:normal; font-size:3rem; line-height:1; animation:spark 1s ease-in-out infinite;}
.gs-box b{font-size:clamp(1.6rem,5vw,2.8rem);} .gs-box small{font-weight:700; font-size:1.05rem;}
.gold-splash.small .gs-box{padding:14px 26px;} .gold-splash.small .gs-box i{font-size:2.2rem;}
@keyframes gsFade{0%{opacity:0;} 12%,80%{opacity:1;} 100%{opacity:0;}}
@keyframes gsIn{0%{transform:scale(.5) rotate(-6deg); animation-timing-function:cubic-bezier(.34,1.45,.64,1);} 30%{transform:none;} 82%{transform:none; animation-timing-function:cubic-bezier(.7,0,.84,0);} 100%{transform:translateY(-40vh) scale(.8);}}
@media (prefers-reduced-motion: reduce){.q-gold,.gold-splash,.gs-box,.gs-box i{animation:none !important;}}

/* تحدي الرسم: الكشف بالتشويق */
.dr-rev{display:flex; flex-direction:column; align-items:center; gap:14px; width:100%;}
.dr-rev .frame.orig{width:min(100%,300px); transform:rotate(-1.5deg);}
.dr-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(190px,1fr)); gap:16px; width:100%;}
.dr-grid.many{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));}
.dr-card{position:relative; animation:moIn .5s cubic-bezier(.34,1.45,.64,1) both;}
.dr-card:nth-child(even){transform:rotate(1.2deg);}
.dr-card.wait img{filter:blur(10px) saturate(.4); transition:filter .4s ease;}
.dr-card img{transition:filter .5s cubic-bezier(.16,1,.3,1);}
.dr-card.wait .dr-sim{opacity:.3;}
.dr-card .dr-sim{font-size:1.05rem; color:#0A2463; font-variant-numeric:tabular-nums;}
.dr-card figcaption em{font-style:normal; font-weight:800; color:#B86E00;}
.dr-rk{position:absolute; top:-12px; right:-10px; z-index:2; width:30px; height:30px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-weight:800; background:#0A2463; color:#fff; border:2px solid #fff;}
.dr-card.top .dr-rk{background:var(--gold); color:var(--gold-ink);}
.dr-note{margin:6px 2px 2px; font-size:.85rem; line-height:1.5; color:#3B4A6B; text-align:center; animation:moPop .4s cubic-bezier(.34,1.45,.64,1) both;}
.dr-card.win{outline:5px solid var(--gold); outline-offset:3px; box-shadow:0 0 0 10px color-mix(in srgb, var(--gold) 25%, transparent), 0 10px 0 var(--edge); animation:drWin .7s cubic-bezier(.34,1.45,.64,1) both;}
@keyframes drWin{0%{transform:scale(1);} 50%{transform:scale(1.07) rotate(-1deg);} 100%{transform:scale(1.03);}}
.dr-crown{position:absolute; top:-30px; left:50%; transform:translateX(-50%); font-size:2rem; animation:drCrown .6s cubic-bezier(.34,1.45,.64,1) both;}
@keyframes drCrown{from{transform:translate(-50%,-30px) scale(.4); opacity:0;} to{transform:translateX(-50%); opacity:1;}}
.dr-card.me{box-shadow:0 0 0 4px var(--accent), 0 6px 0 var(--edge);}
.pg-body .dr-grid{grid-template-columns:1fr 1fr; gap:12px;}
.pg-body .dr-rev .frame.orig{width:min(70%,240px);}
.frame img.target.photo{object-fit:cover;}
/* أدوات الرسم */
.tool:disabled{opacity:.35; box-shadow:none;}
.tool.size{display:grid; place-items:center;}
.tool.size i{display:block; border-radius:50%;}
.pad-send{width:100%; margin-top:4px;}
.swatches{display:flex; flex-wrap:wrap; gap:6px; justify-content:center;}
@media (prefers-reduced-motion: reduce){.dr-card,.dr-card.win,.dr-crown,.dr-note{animation:none !important;}}

/* ---------- أدق وصف: صورة حقيقية وكشف بالتشويق ---------- */
.scene-wrap .desc-photo,.ds-pic .desc-photo{display:block; width:100%; height:auto; user-select:none; -webkit-user-drag:none;}
.ds-rev{display:grid; grid-template-columns:minmax(220px,380px) 1fr; gap:18px; width:100%; align-items:start; text-align:right;}
.ds-rev .judge{grid-column:1/-1;}
.ds-pic{position:sticky; top:8px; transform:rotate(-1.2deg); margin:0;}
.ds-pic svg{display:block; width:100%; height:auto;}
.ds-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px;}
.ds-card{position:relative; padding:12px 14px 12px; border-radius:16px; background:var(--surface); border:2px solid var(--line); border-inline-start:6px solid var(--tc); box-shadow:0 5px 0 var(--edge); animation:moIn .5s cubic-bezier(.34,1.45,.64,1) both;}
.ds-card header{display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-weight:700;}
.ds-rk{width:28px; height:28px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-weight:800; background:#0A2463; color:#fff; flex:none;}
.ds-card.top .ds-rk{background:var(--gold); color:var(--gold-ink);}
.ds-meter{margin-inline-start:auto; display:inline-flex; align-items:baseline; gap:2px; font-variant-numeric:tabular-nums;}
.ds-meter b{font-size:1.25rem; color:var(--accent);}
.ds-meter small{opacity:.6; font-size:.75rem;}
.ds-card header em{font-style:normal; font-weight:800; color:#B86E00;}
.ds-card::after{content:''; position:absolute; inset-inline:14px; bottom:6px; height:4px; border-radius:4px; background:linear-gradient(90deg,var(--tc),var(--gold)); transform-origin:right; transform:scaleX(var(--p,0)); transition:transform .9s cubic-bezier(.16,1,.3,1); opacity:.85;}
.ds-txt{margin:8px 0 6px; line-height:1.85; font-size:.98rem; color:var(--text); max-height:9.5em; overflow:auto; white-space:pre-wrap; word-break:break-word;}
.ds-txt mark{background:color-mix(in srgb, var(--gold) 38%, transparent); color:inherit; border-radius:5px; padding:0 3px; box-decoration-break:clone; -webkit-box-decoration-break:clone;}
.ds-card.wait .ds-txt,.ds-card.wait .ds-meter{filter:blur(6px); opacity:.5; transition:filter .4s ease, opacity .4s ease;}
.ds-txt,.ds-meter{transition:filter .5s cubic-bezier(.16,1,.3,1), opacity .5s ease;}
.ds-hits{display:flex; flex-wrap:wrap; gap:6px; margin-bottom:4px; animation:moPop .4s cubic-bezier(.34,1.45,.64,1) both;}
.ds-hits span{font-size:.78rem; padding:3px 9px; border-radius:99px; background:color-mix(in srgb, #1FA971 16%, transparent); color:#137A50; font-weight:700;}
[data-theme="navy"] .ds-hits span,[data-theme="blue"] .ds-hits span{color:#BFF5DA;}
.ds-note{margin:4px 0 6px; font-size:.9rem; color:var(--text-2); animation:moPop .4s cubic-bezier(.34,1.45,.64,1) both;}
.ds-note::before{content:'🤖 ';}
.ds-card.win{outline:4px solid var(--gold); outline-offset:3px; box-shadow:0 0 0 9px color-mix(in srgb, var(--gold) 22%, transparent), 0 8px 0 var(--edge); animation:drWin .7s cubic-bezier(.34,1.45,.64,1) both;}
.ds-card.win .dr-crown{top:-26px; left:auto; inset-inline-end:16px; transform:none;}
.ds-card.me{box-shadow:0 0 0 3px var(--accent), 0 5px 0 var(--edge);}
.ds-list .empty{opacity:.7; text-align:center; padding:20px;}
@media (max-width:760px){.ds-rev{grid-template-columns:1fr;} .ds-pic{position:relative; top:0; width:min(100%,360px); margin-inline:auto;}}
.pg-body .ds-rev{grid-template-columns:1fr;}
.pg-body .ds-pic{position:relative; top:0; width:min(80%,300px); margin-inline:auto;}
@media (prefers-reduced-motion: reduce){.ds-card,.ds-card.win,.ds-hits,.ds-note{animation:none !important;} .ds-card::after{transition:none;}}
.ds-hits{align-items:center;}
.ds-hits b{font-size:.85rem; color:#137A50; margin-inline-end:2px;}
[data-theme="navy"] .ds-hits b,[data-theme="blue"] .ds-hits b{color:#BFF5DA;}
.ds-hits b:only-child{color:#C0392B;}
[data-theme="navy"] .ds-hits b:only-child,[data-theme="blue"] .ds-hits b:only-child{color:#FFB4AB;}
.ds-note:empty{display:none;}

/* ---------- ثبّت الدبوس: صورة المعلم والتلميح والكشف بالتشويق ---------- */
.pin-q{display:flex; align-items:center; justify-content:center; gap:16px; width:100%; max-width:820px;}
.pin-qt{display:flex; flex-direction:column; align-items:center; gap:8px; min-width:0;}
.pin-pic{margin:0; width:min(34%,220px); flex:none; transform:rotate(-2deg);}
.pin-pic img{display:block; width:100%; max-height:200px; object-fit:cover; border-radius:10px;}
.pin-hint{margin:0; padding:6px 14px; border-radius:99px; background:color-mix(in srgb, var(--gold) 20%, transparent); border:1.5px dashed var(--gold); font-weight:700; color:var(--text); animation:moPop .45s cubic-bezier(.34,1.45,.64,1) both;}
.pin-hint i{font-style:normal;}
.pg-body .pin-q{gap:10px;}
.pg-body .pin-pic{width:34%;}
.pg-body .pin-pic img{max-height:130px;}
.pg-body .pin-q .q-big{font-size:1.15rem;}
.pg-body .pin-hint{font-size:.88rem;}
.pr-rev{display:grid; grid-template-columns:1.6fr 1fr; gap:16px; width:100%; align-items:start;}
.pr-map svg{display:block; width:100%; height:auto;}
.pr-side{display:flex; flex-direction:column; gap:12px; min-width:0;}
.pr-place{display:flex; align-items:center; gap:10px; justify-content:center; font-size:1.35rem;}
.pr-place img{width:64px; height:64px; object-fit:cover; border-radius:12px; border:3px solid #fff; box-shadow:0 4px 0 var(--edge); transform:rotate(-4deg);}
.pr-place i{font-style:normal; font-size:1.6rem;}
.pr-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;}
.pr-row{position:relative; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:14px; background:var(--surface); border:2px solid var(--line); box-shadow:0 4px 0 var(--edge); animation:moIn .45s cubic-bezier(.34,1.45,.64,1) both;}
.pr-rk{width:26px; height:26px; flex:none; border-radius:50%; display:grid; place-items:center; font-style:normal; font-weight:800; background:#0A2463; color:#fff; font-size:.85rem;}
.pr-row.top .pr-rk{background:var(--gold); color:var(--gold-ink);}
.pr-km{margin-inline-start:auto; font-variant-numeric:tabular-nums; white-space:nowrap;}
.pr-km b{font-size:1.15rem;}
.pr-km small{opacity:.7;}
.pr-row strong{font-weight:800; color:#B86E00; min-width:3ch; text-align:left;}
.pr-row .exact{font-style:normal; font-weight:800; font-size:.78rem; padding:2px 8px; border-radius:99px; background:#1FA971; color:#fff; animation:moPop .4s cubic-bezier(.34,1.45,.64,1) both;}
.pr-row.wait .pr-km{filter:blur(4px); opacity:.6;}
.pr-row.wait{animation:moIn .45s cubic-bezier(.34,1.45,.64,1) both, prShake .5s ease-in-out .45s infinite;}
@keyframes prShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-2px)}75%{transform:translateX(2px)}}
.pr-row.win{border-color:var(--gold); background:color-mix(in srgb, var(--gold) 20%, var(--surface)); box-shadow:0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent), 0 5px 0 var(--edge); animation:drWin .7s cubic-bezier(.34,1.45,.64,1) both;}
.pr-crown{position:absolute; top:-20px; inset-inline-end:10px; font-size:1.5rem; animation:drCrown .6s cubic-bezier(.34,1.45,.64,1) both;}
.pr-row.me{outline:3px solid var(--accent); outline-offset:2px;}
.pr-drop{animation:prDrop .5s cubic-bezier(.3,1.6,.5,1) both;}
@keyframes prDrop{0%{transform:translateY(-60px) scale(.6); opacity:0}60%{opacity:1}100%{transform:none; opacity:1}}
.pr-pop{animation:prPop .6s cubic-bezier(.34,1.45,.64,1) both;}
@keyframes prPop{0%{transform:scale(0)}100%{transform:scale(1)}}
.pr-line{stroke-dasharray:8 6; animation:prLine .6s ease-out both;}
@keyframes prLine{0%{opacity:0}100%{opacity:.9}}
.pr-list .empty{opacity:.7; text-align:center; padding:16px;}
@media (max-width:760px){.pr-rev{grid-template-columns:1fr;}}
.pg-body .pr-rev{grid-template-columns:1fr;}
@media (prefers-reduced-motion: reduce){.pr-row,.pr-row.wait,.pr-row.win,.pr-crown,.pr-drop,.pr-pop,.pr-line,.pin-hint{animation:none !important;}}

/* ---------- اقتراحات الفريق (القائد يعتمد) ---------- */
.sg-box{width:100%; max-width:420px; margin:10px auto 0; padding:10px 12px; border-radius:16px; background:var(--surface); border:2px dashed var(--line);}
.sg-box > b{display:block; font-size:.88rem; margin-bottom:8px; color:var(--text-2);}
.sg-list{display:flex; flex-wrap:wrap; gap:8px;}
.sg-list .dim{font-size:.85rem; opacity:.7;}
.sg-chip{display:inline-flex; align-items:center; gap:8px; padding:6px 12px; border-radius:99px; border:2px solid var(--tc); background:color-mix(in srgb, var(--tc) 14%, transparent); color:var(--text); font:inherit; font-weight:700; cursor:pointer; box-shadow:0 3px 0 color-mix(in srgb, var(--tc) 60%, #000); animation:moPop .35s cubic-bezier(.34,1.45,.64,1) both; transition:transform .12s ease, box-shadow .12s ease;}
.sg-chip i{font-style:normal; font-size:.82rem; opacity:.85;}
.sg-chip b{font-variant-numeric:tabular-nums;}
.sg-chip b small{font-weight:500; opacity:.7; font-size:.75rem;}
.sg-chip:not(:disabled):active{transform:translateY(3px); box-shadow:0 0 0 transparent;}
.sg-chip:disabled{cursor:default; opacity:.95;}
.sg-pin circle{stroke:#fff;}
.sg-pin text{font-weight:800; fill:#fff; paint-order:stroke; stroke:#0A2463; stroke-width:4px; stroke-linejoin:round;}
.sg-pin{animation:prPop .4s cubic-bezier(.34,1.45,.64,1) both;}
@media (prefers-reduced-motion: reduce){.sg-chip,.sg-pin{animation:none !important;}}

/* ---------- رتّبها صح: بطاقات مصوّرة وكشف بالتشويق ---------- */
.ocard .oc-e{font-style:normal; font-size:1.5em; line-height:1; flex:none;}
.ocard .oc-t{display:flex; flex-direction:column; gap:2px; text-align:right;}
.ocard .oc-f{font-size:.72em; font-weight:600; color:var(--text-2); line-height:1.35;}
.sorter .ocard .oc-t{flex:1;}
.cards-row .ocard{flex-direction:column; text-align:center; min-width:130px; max-width:200px; padding:14px 12px;}
.cards-row .ocard .oc-e{font-size:2.3em;}
.cards-row .ocard .oc-t{text-align:center;}
.or-rev{display:flex; flex-direction:column; align-items:center; gap:16px; width:100%;}
.or-slots{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; width:100%; max-width:960px; perspective:900px;}
.or-slot{min-height:150px;}
.or-in{position:relative; width:100%; height:100%; min-height:150px; transform-style:preserve-3d; transition:transform .6s cubic-bezier(.34,1.3,.64,1);}
.or-slot.flip .or-in{transform:rotateY(180deg);}
.or-back,.or-front{position:absolute; inset:0; backface-visibility:hidden; -webkit-backface-visibility:hidden; border-radius:16px;}
.or-back{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; background:linear-gradient(145deg,#1E6FE0,#0A2463); color:#fff; border:3px solid rgba(255,255,255,.25); box-shadow:0 6px 0 var(--edge);}
.or-back b{font-size:.95rem; opacity:.8;} .or-back span{font-size:2.4rem; font-weight:800;}
.or-front{transform:rotateY(180deg); flex-direction:column; justify-content:center; text-align:center; padding:10px; border-color:var(--ok) !important;}
.or-front .oc-e{font-size:2.2em;}
.or-front .oc-t{text-align:center; align-items:center;}
.or-front > i{position:absolute; top:-10px; inset-inline-start:-8px;}
.or-slot.shake .or-in{animation:orShake .5s ease-in-out infinite;}
@keyframes orShake{0%,100%{transform:rotate(0)}25%{transform:rotate(-2.5deg)}75%{transform:rotate(2.5deg)}}
.or-board{display:flex; flex-direction:column; gap:8px; width:100%; max-width:640px;}
.or-row{position:relative; display:flex; align-items:center; gap:8px; padding:8px 12px; border-radius:14px; background:var(--surface); border:2px solid var(--line); border-inline-start:6px solid var(--tc);}
.or-row.me{outline:3px solid var(--accent); outline-offset:2px;}
.or-cells{display:flex; gap:6px; margin-inline-start:auto;}
.or-cells i{width:22px; height:22px; border-radius:7px; background:var(--line); display:grid; place-items:center; font-style:normal; font-size:.75rem; color:#fff; transition:background .25s ease, transform .3s cubic-bezier(.34,1.6,.64,1);}
.or-cells i.ok{background:#1FA971; transform:scale(1.12);} .or-cells i.ok::after{content:'✓';}
.or-cells i.no{background:#D9483B;} .or-cells i.no::after{content:'✗';}
.or-pts{min-width:5.5ch; text-align:left; font-weight:800; color:#B86E00;}
.or-row.perfect{border-color:#1FA971; background:color-mix(in srgb, #1FA971 14%, var(--surface));}
.or-row.zero{opacity:.75;}
.or-row.reord{animation:moIn .45s cubic-bezier(.34,1.45,.64,1) both;}
.or-row.win{border-color:var(--gold); box-shadow:0 0 0 6px color-mix(in srgb, var(--gold) 22%, transparent);}
@media (max-width:760px){.or-slots{grid-template-columns:repeat(2,minmax(0,1fr));} .or-slot,.or-in{min-height:120px;}}
.pg-body .or-slots{grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px;}
.pg-body .or-slot,.pg-body .or-in{min-height:118px;}
.pg-body .or-front{font-size:.9rem;}
@media (prefers-reduced-motion: reduce){.or-in{transition:none;} .or-slot.shake .or-in,.or-row.reord{animation:none !important;}}

/* ---------- الكلمة الدخيلة: بطاقات وصور وكشف بالإقصاء ---------- */
.od-grid{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; width:100%; max-width:760px; margin:0 auto;}
.od-grid.n6{grid-template-columns:repeat(3,minmax(0,1fr));}
.od-tile{position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:92px; padding:14px 10px; border-radius:18px; background:var(--solid); border:2px solid var(--line); box-shadow:0 6px 0 var(--edge); font-weight:800; font-size:clamp(1.05rem,2.6vw,1.6rem); text-align:center; transition:transform .35s cubic-bezier(.34,1.45,.64,1), opacity .35s ease, filter .35s ease, border-color .25s ease, box-shadow .25s ease; user-select:none;}
.od-grid.pics .od-tile{min-height:130px;}
.od-e{font-style:normal; font-size:2.6em; line-height:1;}
.od-grid.n6 .od-e{font-size:2em;}
.od-t{line-height:1.3;}
.od-grid.pics .od-t{font-size:.72em; opacity:.85;}
.od-tile.tactile{cursor:pointer;}
.od-tile.tactile:not(.off):active{transform:translateY(5px); box-shadow:0 1px 0 var(--edge);}
.od-tile.off{cursor:default;}
.od-tile.off:not(.picked){opacity:.55;}
.od-tile.picked{border-color:var(--accent); box-shadow:0 0 0 4px color-mix(in srgb, var(--accent) 35%, transparent), 0 6px 0 var(--edge);}
.od-n{position:absolute; top:-10px; inset-inline-start:-8px; min-width:30px; padding:2px 8px; border-radius:99px; background:#0A2463; color:#fff; font-size:.8rem; opacity:0; transform:scale(.4); transition:opacity .25s ease, transform .35s cubic-bezier(.34,1.6,.64,1);}
.od-n.on{opacity:1; transform:none;}
.od-tile.peek{transform:scale(1.06); border-color:var(--gold); animation:orShake .45s ease-in-out infinite;}
.od-tile.out{opacity:.28; filter:grayscale(1); transform:scale(.92);}
.od-tile.out .od-t{text-decoration:line-through; text-decoration-thickness:3px;}
.od-tile.is-odd{transform:scale(1.1); border-color:var(--gold); background:color-mix(in srgb, var(--gold) 24%, var(--solid)); box-shadow:0 0 0 8px color-mix(in srgb, var(--gold) 25%, transparent), 0 8px 0 var(--edge); z-index:1;}
.od-tile.mine::after{content:'اختيارك'; position:absolute; bottom:-10px; padding:1px 8px; border-radius:99px; background:var(--accent); color:var(--on-accent,#fff); font-size:.7rem; font-weight:700;}
.od-rev{display:flex; flex-direction:column; align-items:center; gap:14px; width:100%;}
.od-why{margin:0; padding:8px 16px; border-radius:14px; background:color-mix(in srgb, var(--gold) 16%, transparent); border:1.5px dashed var(--gold); font-weight:700; font-size:1.05rem; animation:moPop .45s cubic-bezier(.34,1.45,.64,1) both;}
.od-why i{font-style:normal;}
.pg-body .od-grid{gap:10px;}
.pg-body .od-grid.n6{grid-template-columns:repeat(2,minmax(0,1fr));}
.pg-body .od-tile{min-height:78px; font-size:1.1rem;}
.pg-body .od-grid.pics .od-tile{min-height:104px;}
@media (max-width:560px){.od-grid.n6{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (prefers-reduced-motion: reduce){.od-tile{transition:none;} .od-tile.peek{animation:none;}}

/* ---------- أكمل المثل: كشف بالإقصاء وكتابة التكملة ---------- */
.pv-rev{display:flex; flex-direction:column; align-items:center; gap:14px; width:100%;}
.pv-opts .od-tile{min-height:70px;}
.verse .pv-fill{display:inline-block; min-width:2.5ch; padding:0 6px; border-radius:8px; background:transparent; color:var(--gold); border-bottom:3px dashed var(--gold);}
.verse .pv-fill:empty::before{content:'……'; opacity:.5;}
.verse .pv-fill.writing{border-inline-end:3px solid var(--gold); animation:pvCaret .5s steps(2) infinite;}
.verse .pv-fill.done{background:color-mix(in srgb, var(--gold) 22%, transparent); border-bottom-style:solid; animation:moPop .45s cubic-bezier(.34,1.45,.64,1) both;}
@keyframes pvCaret{50%{border-inline-end-color:transparent;}}
.pv-res .pv-chip{opacity:0; transform:translateY(10px) scale(.9);}
.pv-res.show .pv-chip{opacity:1; transform:none; transition:opacity .35s ease, transform .45s cubic-bezier(.34,1.45,.64,1); transition-delay:calc(var(--d) * 90ms);}
.pv-chip.me{outline:3px solid var(--accent); outline-offset:2px;}
@media (prefers-reduced-motion: reduce){.pv-res .pv-chip{opacity:1; transform:none;} .verse .pv-fill.writing{animation:none;}}

/* ---------- الألغام: عرض أوضح ومؤثرات انفجار ---------- */
.mines-host.v2{display:flex; flex-direction:column; gap:16px; align-items:stretch;}
.mx-top{display:flex; justify-content:center;}
.mx-main{display:grid; grid-template-columns:minmax(280px,560px) minmax(240px,1fr); gap:22px; align-items:start;}
.mines-host.v2 .mines{width:min(100%,560px);}
.m-turn.big{flex-direction:row; gap:14px; font-size:clamp(1.4rem,3.4vw,2.2rem); padding:10px 26px; background:color-mix(in srgb, var(--tc) 18%, transparent); animation:popIn .35s ease both;}
.m-turn.big small{display:block;}
.m-turn.end{font-size:clamp(1.2rem,3vw,1.8rem);}
.m-turn.pick{background:color-mix(in srgb, var(--tc, var(--gold)) 18%, transparent); animation:beat .45s ease-in-out infinite alternate;}
.mx-av{width:54px; height:54px; border-radius:50%; display:grid; place-items:center; background:var(--tc); color:#fff; font-weight:800; font-size:1.5rem; box-shadow:0 0 0 5px color-mix(in srgb, var(--tc) 30%, transparent); animation:beat .8s ease-in-out infinite alternate;}
.mx-side{display:flex; flex-direction:column; gap:12px;}
.mx-stat{display:flex; flex-wrap:wrap; gap:8px;}
.mx-stat span{padding:6px 12px; border-radius:99px; background:var(--surface); border:1px solid var(--line); font-weight:700;}
.mx-stat b{color:var(--gold);}
.mx-list{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px;}
.mx-row{display:grid; grid-template-columns:14px 1fr auto auto; gap:10px; align-items:center; padding:9px 14px; border-radius:14px; background:var(--surface); border:2px solid var(--line); border-inline-start:6px solid var(--tc); font-size:1.1rem; transition:transform .3s ease, background .3s ease;}
.mx-dot{width:12px; height:12px; border-radius:50%; background:var(--tc);}
.mx-row span{font-size:.9rem; color:var(--text-2);}
.mx-row em{font-style:normal; font-weight:800; color:var(--gold); min-width:3ch; text-align:left; font-size:1.25rem;}
.mx-row.now{background:color-mix(in srgb, var(--tc) 22%, var(--surface)); transform:scale(1.03); border-color:var(--tc);}
.mx-row.out{opacity:.5;} .mx-row.out b{text-decoration:line-through;}
.mx-row.won{border-color:var(--ok);}
.mx-row.me{outline:3px solid var(--accent); outline-offset:2px;}
.mx-list.end .mx-row{opacity:0; transform:translateY(10px);}
.mx-list.end.show .mx-row{opacity:1; transform:none; transition:opacity .35s ease, transform .45s cubic-bezier(.34,1.45,.64,1); transition-delay:calc(var(--d) * 110ms);}
.mx-list.end.show .mx-row.out{opacity:.55;}
.mx-mini{display:flex; flex-wrap:wrap; gap:6px; justify-content:center; margin-top:10px;}
.mx-chip{display:inline-flex; gap:6px; align-items:center; padding:4px 10px; border-radius:99px; border:2px solid var(--tc); font-size:.85rem; font-weight:700;}
.mx-chip b{color:var(--gold);}
.mx-chip.now{background:var(--tc); color:#fff;} .mx-chip.now b{color:#fff;}
.mx-chip.out{opacity:.45; text-decoration:line-through;}
.mx-chip.me{outline:2px solid var(--accent); outline-offset:1px;}
.mcell{position:relative; overflow:visible;}
.mcell.picking{border-color:var(--gold); background:color-mix(in srgb, var(--gold) 30%, var(--solid)); animation:mxPulse .42s ease-in-out infinite alternate; z-index:2;}
@keyframes mxPulse{from{transform:scale(1); box-shadow:0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent);} to{transform:scale(1.12); box-shadow:0 0 0 10px transparent;}}
.mcell.pop-bomb{animation:mxBombIn .45s cubic-bezier(.34,1.6,.64,1) both;}
@keyframes mxBombIn{0%{transform:scale(.3) rotate(-20deg);} 100%{transform:none;}}
.mines.shake-hard{animation:mxShake .6s cubic-bezier(.36,.07,.19,.97) both;}
@keyframes mxShake{10%,90%{transform:translate(-2px,1px)}20%,80%{transform:translate(5px,-3px)}30%,50%,70%{transform:translate(-8px,4px)}40%,60%{transform:translate(8px,-4px)}}
.mx-fx{position:absolute; inset:0; pointer-events:none; z-index:5;}
.mx-fx i,.mx-fx b{position:absolute; left:50%; top:50%;}
.fx-flash{width:30px; height:30px; margin:-15px; border-radius:50%; background:radial-gradient(circle,#fff,#FFD34D 40%,#FF7A1A 70%,transparent 72%); animation:fxFlash .5s ease-out both;}
@keyframes fxFlash{0%{transform:scale(.2); opacity:1;} 100%{transform:scale(5); opacity:0;}}
.fx-ring{width:40px; height:40px; margin:-20px; border-radius:50%; border:4px solid #FF8A1F; animation:fxRing .7s ease-out both;}
.fx-ring.r2{border-color:#FFD34D; animation-delay:.12s;}
.fx-ring.ok{border-color:var(--ok);}
@keyframes fxRing{0%{transform:scale(.3); opacity:1;} 100%{transform:scale(4); opacity:0;}}
.fx-shard{width:8px; height:8px; margin:-4px; border-radius:2px; background:linear-gradient(135deg,#FFD34D,#E8554E); transform:rotate(var(--a)) translateX(0) scale(var(--s)); animation:fxShard .8s cubic-bezier(.15,.7,.3,1) both;}
@keyframes fxShard{0%{transform:rotate(var(--a)) translateX(0) scale(var(--s)); opacity:1;} 100%{transform:rotate(var(--a)) translateX(var(--d)) scale(.2) rotate(240deg); opacity:0;}}
.fx-smoke{width:60px; height:60px; margin:-30px; border-radius:50%; background:radial-gradient(circle,rgba(90,90,90,.65),rgba(60,60,60,0) 70%); animation:fxSmoke 1.6s ease-out .15s both;}
@keyframes fxSmoke{0%{transform:scale(.4); opacity:0;} 30%{opacity:.9;} 100%{transform:scale(3.2) translateY(-30px); opacity:0;}}
.fx-emo{transform:translate(-50%,-50%); font-size:2rem; animation:fxEmo .9s cubic-bezier(.34,1.6,.64,1) both;}
@keyframes fxEmo{0%{transform:translate(-50%,-50%) scale(.2);} 40%{transform:translate(-50%,-50%) scale(1.8);} 100%{transform:translate(-50%,-50%) scale(1); opacity:.0;}}
.fx-plus{transform:translate(-50%,-50%); font-weight:800; color:var(--ok); font-size:1.3rem; text-shadow:0 2px 0 rgba(0,0,0,.25); animation:fxPlus 1.1s ease-out both;}
@keyframes fxPlus{0%{transform:translate(-50%,-50%) scale(.6); opacity:0;} 25%{opacity:1; transform:translate(-50%,-90%) scale(1.2);} 100%{transform:translate(-50%,-220%) scale(1); opacity:0;}}
.mx-fx.big .fx-shard{width:11px; height:11px;}
.mx-screen-flash{position:fixed; inset:0; background:radial-gradient(circle,rgba(255,235,180,.85),rgba(255,120,40,.35) 60%,transparent); pointer-events:none; z-index:999; animation:fxScreen .65s ease-out both;}
@keyframes fxScreen{0%{opacity:0;} 15%{opacity:1;} 100%{opacity:0;}}
.pg-body .m-turn.pick{font-size:1.15rem;}
@media (max-width:860px){.mx-main{grid-template-columns:1fr;} .mines-host.v2 .mines{margin:0 auto;}}
@media (prefers-reduced-motion: reduce){.mcell.picking,.mx-av,.m-turn.pick,.mines.shake-hard,.mx-fx *{animation:none !important;}}

/* ---------- الحفل الختامي ---------- */
.cer{position:relative; display:none;}
.board.end.cer-on .cer{display:block;}
.board.end.cer-on > .crown,.board.end.cer-on > #winTitle{display:none;}
.board.end.cer-on .podium-list,.board.end.cer-on .players-top,.board.end.cer-on .board-actions{opacity:0; transform:translateY(16px); transition:opacity .6s ease, transform .6s ease; pointer-events:none;}
.board.end.cer-done .podium-list,.board.end.cer-done .players-top,.board.end.cer-done .board-actions{opacity:1; transform:none; pointer-events:auto;}
.cer-title{font-size:clamp(1.8rem,4.5vw,2.8rem); margin:0 0 10px; animation:signIn .8s cubic-bezier(.2,1.4,.4,1) both;}
.cer-stage{position:relative; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:14px; height:min(52vh,420px); max-width:760px; margin:0 auto 18px; padding-top:20px;}
.cer-spot{position:absolute; inset:-40px 18% 0; background:radial-gradient(ellipse at 50% 0%,rgba(255,226,140,.55),transparent 65%); opacity:0; transition:opacity .9s ease; pointer-events:none;}
.cer-stage.lit .cer-spot{opacity:1;}
.cer-col{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%;}
.cer-who{display:flex; flex-direction:column; align-items:center; gap:2px; margin-bottom:8px; opacity:0; transform:translateY(20px) scale(.8); transition:opacity .5s ease .35s, transform .6s cubic-bezier(.34,1.5,.64,1) .35s;}
.cer-medal{font-size:2.6rem;}
.cer-who b{font-size:clamp(1.1rem,2.6vw,1.6rem); color:var(--tc); text-shadow:0 2px 0 rgba(0,0,0,.25);}
.cer-who em{font-style:normal; font-weight:800; color:var(--gold); font-size:1.2rem;}
.cer-block{width:100%; height:0; border-radius:16px 16px 0 0; background:linear-gradient(180deg,color-mix(in srgb, var(--tc) 85%, #fff),var(--tc)); box-shadow:inset 0 -10px 0 rgba(0,0,0,.18), 0 8px 0 var(--edge); display:flex; justify-content:center; align-items:flex-start; padding-top:10px; overflow:hidden; transition:height .9s cubic-bezier(.2,1.2,.4,1);}
.cer-block span{font-size:2.4rem; font-weight:900; color:#fff; text-shadow:0 3px 0 rgba(0,0,0,.25);}
.cer-col.p1 .cer-block{--h:78%;} .cer-col.p2 .cer-block{--h:56%;} .cer-col.p3 .cer-block{--h:40%;}
.cer-col.up .cer-block{height:var(--h);}
.cer-col.up .cer-who{opacity:1; transform:none;}
.cer-col.p1.up .cer-medal{animation:beat .6s ease-in-out 1s infinite alternate;}
.cer-stats{display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:10px; max-width:900px; margin:0 auto 20px;}
.cer-card{display:flex; flex-direction:column; align-items:center; gap:2px; padding:12px; border-radius:16px; background:var(--booth); border:2px solid var(--line); box-shadow:0 5px 0 var(--edge); opacity:0; transform:rotateX(70deg) translateY(10px);}
.cer-stats.show .cer-card{opacity:1; transform:none; transition:opacity .4s ease, transform .55s cubic-bezier(.34,1.45,.64,1); transition-delay:calc(var(--d) * 140ms);}
.cer-card i{font-style:normal; font-size:1.8rem;} .cer-card small{color:var(--text-2);} .cer-card b{font-size:1.15rem; color:var(--gold);} .cer-card span{font-size:.85rem;}
.cer-fw{position:absolute; width:0; height:0; z-index:5; pointer-events:none;}
.cer-fw i{position:absolute; width:7px; height:7px; margin:-3.5px; border-radius:50%; box-shadow:0 0 8px currentColor; transform:rotate(var(--a)) translateX(0); animation:cerFw 1.4s cubic-bezier(.1,.7,.3,1) both;}
@keyframes cerFw{0%{transform:rotate(var(--a)) translateX(0) scale(1); opacity:1;} 70%{opacity:1;} 100%{transform:rotate(var(--a)) translateX(var(--d)) translateY(30px) scale(.3); opacity:0;}}
.cer-mini{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; gap:8px; height:190px; width:100%; max-width:340px; margin:10px auto 14px; align-self:stretch;}
.cm-col{display:flex; flex-direction:column; align-items:center; justify-content:flex-end; height:100%; animation:moIn .5s cubic-bezier(.34,1.45,.64,1) both; animation-delay:calc(var(--d) * 350ms);}
.cm-col span{font-size:1.6rem;} .cm-col b{font-size:.9rem; color:var(--tc); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;} .cm-col em{font-style:normal; color:var(--gold); font-weight:800; font-size:.85rem;}
.cm-block{width:100%; border-radius:12px 12px 0 0; background:var(--tc); color:#fff; font-weight:900; font-size:1.3rem; display:flex; justify-content:center; padding-top:6px; box-shadow:inset 0 -6px 0 rgba(0,0,0,.18);}
.cm-col.p1 .cm-block{height:90px;} .cm-col.p2 .cm-block{height:64px;} .cm-col.p3 .cm-block{height:46px;}
.cm-col.mine .cm-block{outline:3px solid var(--gold); outline-offset:2px;}
@media (prefers-reduced-motion: reduce){.cer-block{transition:none;} .cer-fw{display:none;}}
