@font-face{font-family:"Plex Arabic";font-weight:400;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"Plex Arabic";font-weight:600;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"Plex Arabic";font-weight:700;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2) format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0898-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC}
@font-face{font-family:"Plex Arabic";font-weight:400;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex Arabic";font-weight:600;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Plex Arabic";font-weight:700;font-display:swap;src:url(assets/fonts/ibm-plex-sans-arabic-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root{
  --cy:#00B4C9; --cyd:#00879A; --li:#765CD9; --lid:#5B43B8; --pu:#552470;
  --ch:#333333; --ch2:#2B2B2B; --soft:#F6F6F5; --line:rgba(51,51,51,.12); --muted:rgba(51,51,51,.7);
  --side-w:clamp(180px,16vw,250px);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:"Plex Arabic",system-ui,sans-serif;background:var(--ch2);color:var(--ch);-webkit-tap-highlight-color:transparent;overflow:hidden}
button,input{font-family:inherit}
.hidden{display:none!important}
.cy{color:var(--cyd)}
.muted{color:var(--muted)}
.grow{flex:1}
i[data-i]{display:inline-flex;line-height:0}
i[data-i] svg{width:1.25em;height:1.25em}

/* ---------- الإطار ---------- */
.frame{display:none;height:100vh;height:100dvh}
.frame.active{display:flex}
.side{width:var(--side-w);flex-shrink:0;display:flex;flex-direction:column;align-items:center;gap:12px;padding:clamp(18px,3vh,32px) clamp(12px,1.2vw,20px);color:#fff;border-top:6px solid var(--c);transition:opacity .3s,background .3s;position:relative;overflow:hidden}
.side.a{--c:var(--cy);--ct:var(--cy);--rgb:0,180,201}
.side.b{--c:var(--li);--ct:#9C86F0;--rgb:118,92,217}
.side{background:linear-gradient(180deg,rgba(var(--rgb),.30) 0%,rgba(var(--rgb),.04) 100%)}
.side.dim{opacity:.7}
.side.win{background:linear-gradient(180deg,rgba(var(--rgb),.45) 0%,rgba(var(--rgb),.06) 100%)}
.side-label{font-size:15px;color:rgba(255,255,255,.72)}
.stage{flex:1;min-width:0;background:#fff;margin:clamp(10px,2vh,18px) 0;border-radius:28px;box-shadow:0 20px 60px rgba(0,0,0,.35);display:flex;flex-direction:column;padding:clamp(16px,2.6vh,28px) clamp(18px,2vw,32px);gap:clamp(10px,1.8vh,18px);overflow:hidden}

/* ---------- الأزرار ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:60px;padding:0 28px;border-radius:16px;font-size:18px;font-weight:600;cursor:pointer;transition:transform .12s,box-shadow .2s,opacity .2s;border:0}
.btn:active{transform:scale(.97)}
.btn:disabled{cursor:not-allowed;background:#DBDAD9!important;color:rgba(51,51,51,.5)!important;box-shadow:none!important}
.btn.primary{background:var(--cy);color:#062b30;font-weight:700;box-shadow:0 12px 30px rgba(0,180,201,.35)}
.btn.primary:not(:disabled):hover{box-shadow:0 12px 36px rgba(0,180,201,.55)}
.btn.ghost{background:#fff;color:var(--ch);border:1px solid rgba(51,51,51,.14)}
.btn.ghost:hover{background:var(--soft)}
.btn.xl{height:68px;font-size:22px;padding:0 36px;border-radius:18px}
.btn.sm{height:48px;font-size:16px;padding:0 18px}
.icon-btn{width:44px;height:44px;border-radius:12px;border:1px solid rgba(51,51,51,.14);background:#fff;color:var(--ch);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.icon-btn:hover{background:var(--soft)}
.ibub{width:48px;height:48px;flex-shrink:0;border-radius:50%;background:linear-gradient(135deg,rgba(0,180,201,.18),rgba(118,92,217,.18));display:flex;align-items:center;justify-content:center;color:var(--ch);font-size:20px}
.x2{font-size:17px;direction:ltr}

/* ---------- الرئيسية ---------- */
.side.deco{justify-content:center}
.chev{position:absolute;width:260px;height:260px;top:50%;margin-top:-130px;fill:none;stroke:var(--c);stroke-width:10;opacity:.35}
.side.a .chev{left:-40px}.side.b .chev{right:-40px}
.big-q{position:relative;font-size:64px;font-weight:700;color:var(--c);line-height:1}
.side.deco .side-label{position:relative}
.stage.home{align-items:center;justify-content:center;gap:clamp(14px,3vh,26px);padding:40px 56px}
.home-logo{width:min(440px,75%);margin:0}
.tagline{font-size:clamp(20px,2vw,26px);font-weight:600;text-align:center}
.home-btns{display:flex;flex-direction:column;gap:12px;width:min(380px,100%)}
.home-btns .btn{width:100%}
.steps{display:flex;gap:14px;align-self:stretch;margin-top:10px}
.step{flex:1;display:flex;align-items:center;gap:14px;background:var(--soft);border-radius:18px;padding:16px 18px}
.step div{display:flex;flex-direction:column;gap:2px}
.step b{font-size:17px}.step span{font-size:14px;color:var(--muted)}

/* ---------- الإعداد ---------- */
.name-input{width:100%;height:60px;border-radius:14px;border:2px solid var(--c);background:rgba(0,0,0,.2);color:#fff;font-size:24px;font-weight:700;padding:0 16px;outline:0}
.name-input:focus{box-shadow:0 0 0 4px rgba(var(--rgb),.35)}
.picks-head{align-self:stretch;display:flex;justify-content:space-between;align-items:center;margin-top:10px;font-weight:600}
.count{color:var(--ct);direction:ltr}
.chips{align-self:stretch;display:flex;flex-direction:column;gap:8px}
.chip{display:flex;align-items:center;gap:8px;background:rgba(255,255,255,.08);border:1px solid rgba(var(--rgb),.55);border-radius:12px;padding:8px 12px;font-size:15px;font-weight:600;color:#fff}
.chip i{color:var(--ct)}
.chip.empty{height:38px;border:1px dashed rgba(255,255,255,.22);background:transparent}
.turn-badge{background:var(--c);color:#fff;font-size:15px;font-weight:700;padding:7px 16px;border-radius:99px}
.side.a .turn-badge{color:#062b30}
.stage-head{display:flex;justify-content:space-between;align-items:center}
.titles h1{font-size:clamp(24px,2.2vw,30px)}
.titles p{font-size:16px;color:var(--muted)}
.mini-logo{height:clamp(42px,6vh,56px);margin:-8px -16px}
.toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--soft);border-radius:16px;padding:8px 8px 8px 16px;flex-wrap:wrap}
.seg-wrap{display:flex;align-items:center;gap:12px;font-weight:600;padding-right:8px}
.seg{display:flex;gap:4px;background:#fff;border-radius:14px;padding:4px}
.seg button{height:42px;padding:0 16px;border-radius:11px;border:0;background:transparent;color:var(--ch);font-size:16px;font-weight:600;cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--ch);color:#fff}
.cat-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(0,1fr);gap:clamp(8px,1.4vh,14px)}
.cat{position:relative;border-radius:20px;border:1px solid rgba(51,51,51,.08);background:var(--soft);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--ch);cursor:pointer;padding:10px;transition:transform .15s,border-color .15s}
.cat:hover{transform:translateY(-2px);border-color:rgba(0,180,201,.5)}
.cat .ibub{width:clamp(44px,6vh,60px);height:clamp(44px,6vh,60px);font-size:clamp(22px,3vh,30px)}
.cat .cn{font-size:clamp(15px,1.4vw,18px);font-weight:700}
.cat.pa,.cat.pb{border-width:3px}
.cat.pa{border-color:var(--cy);background:rgba(0,180,201,.08)}
.cat.pb{border-color:var(--li);background:rgba(118,92,217,.08)}
.cat.pa .ibub,.cat.pb .ibub{background:#fff}
.cat .who{position:absolute;top:10px;right:10px;border-radius:99px;font-size:12px;font-weight:700;padding:3px 10px}
.cat.pa .who{background:var(--cy);color:#062b30}.cat.pb .who{background:var(--li);color:#fff}
.cat.locked{opacity:.45;cursor:not-allowed;transform:none}
.stage-foot{display:flex;justify-content:space-between;align-items:center;gap:12px}
.stage-foot b{color:var(--ch)}

/* ---------- اللعب: اللوحات الجانبية ---------- */
.team-name{font-size:clamp(22px,2vw,30px);font-weight:700;text-align:center;line-height:1.3;word-break:break-word}
.score{font-size:clamp(40px,4.2vw,64px);white-space:nowrap;font-weight:700;color:var(--ct);direction:ltr;line-height:1;font-variant-numeric:tabular-nums;transition:transform .3s}
.score.bump{transform:scale(1.15)}
.turn-slot{height:34px;display:flex;align-items:center}
.helps-title{font-size:14px;color:rgba(255,255,255,.65);align-self:stretch;text-align:center}
.helps{align-self:stretch;display:flex;flex-direction:column;gap:8px}
.help{width:100%;height:clamp(42px,6vh,52px);border-radius:14px;border:1px solid rgba(var(--rgb),.55);background:rgba(var(--rgb),.14);color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font-size:16px;font-weight:600;cursor:default}
.help .hi{color:var(--ct);display:inline-flex}
.help .hi .x2{font-weight:700}
.help.usable{cursor:pointer}
.help.usable:hover{background:rgba(var(--rgb),.28)}
.help.on{background:var(--c);border-color:var(--c);color:#fff}
.side.a .help.on{color:#062b30}
.help.on .hi{color:inherit}
.help.used{border-color:rgba(255,255,255,.08);background:transparent;color:rgba(255,255,255,.3);text-decoration:line-through}
.help.used .hi{color:rgba(255,255,255,.3)}
.win-btn{width:100%;height:72px;border-radius:16px;border:0;background:var(--c);color:#fff;font-size:22px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:10px;margin-top:8px;cursor:pointer;animation:pulse 1.4s ease-in-out infinite}
.side.a .win-btn{color:#062b30}
@keyframes pulse{50%{box-shadow:0 0 0 8px rgba(var(--rgb),.25)}}

/* ---------- اللعب: اللوحة ---------- */
.view{flex:1;min-height:0;display:flex;flex-direction:column;gap:clamp(10px,1.6vh,14px)}
.board-top{display:flex;align-items:center;justify-content:space-between}
.tools{display:flex;gap:8px}
.board{flex:1;min-height:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:clamp(10px,1.6vh,14px)}
.blk{background:var(--soft);border-radius:20px;padding:10px;display:flex;gap:8px;min-height:0}
.pcol{width:clamp(50px,4.4vw,64px);display:flex;flex-direction:column;gap:8px}
.pcol.a{--c:var(--cy);--rgb:0,180,201;--ct:var(--cyd);--fg:#062b30}
.pcol.b{--c:var(--li);--rgb:118,92,217;--ct:var(--lid);--fg:#fff}
.pt{flex:1;min-height:0;border-radius:14px;border:2px solid var(--c);background:var(--c);color:var(--fg);font-size:clamp(16px,1.5vw,21px);font-weight:700;cursor:pointer;padding:0;transition:transform .12s,box-shadow .15s}
.pt:hover{transform:scale(1.05);box-shadow:0 6px 16px rgba(var(--rgb),.4)}
.pcol.dim .pt{background:rgba(var(--rgb),.12);color:var(--ct);opacity:.75}
.pcol.dim .pt:hover{transform:none;box-shadow:none}
.pt.done{border:2px dashed rgba(var(--rgb),.3);background:transparent!important;color:var(--c)!important;opacity:1!important;cursor:default;display:flex;align-items:center;justify-content:center;transform:none!important;box-shadow:none!important}
.pt.done.none{color:rgba(51,51,51,.3)!important}
.ccard{flex:1;min-width:0;background:#fff;border-radius:18px;box-shadow:0 6px 18px rgba(0,0,0,.06);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(8px,1.4vh,14px);padding:6px}
.ccard .ibub{width:clamp(48px,7.4vh,68px);height:clamp(48px,7.4vh,68px);font-size:clamp(24px,3.6vh,34px)}
.ccard .cn{font-size:clamp(15px,1.3vw,18px);font-weight:700;text-align:center;line-height:1.3}
.legend{display:flex;justify-content:center;gap:26px;font-size:14px;color:var(--muted);flex-wrap:wrap}
.legend span{display:flex;align-items:center;gap:8px}
.sw{width:14px;height:14px;border-radius:4px;display:inline-block}
.sw.a{background:var(--cy)}.sw.b{background:var(--li)}

/* ---------- اللعب: السؤال ---------- */
#v-question{align-items:center;text-align:center}
.q-top{align-self:stretch;display:flex;align-items:center;justify-content:space-between;gap:12px}
.q-cat{display:flex;align-items:center;gap:10px;font-size:20px;font-weight:600;background:var(--soft);border-radius:99px;padding:8px 18px}
.q-cat i{color:var(--cyd)}
.q-owner{font-size:16px;color:var(--muted)}
.q-owner b.a{color:var(--cyd)}.q-owner b.b{color:var(--lid)}
.q-pts{font-size:30px;font-weight:700;background:var(--soft);color:var(--ch);border-radius:14px;padding:6px 20px;direction:ltr}
.q-pts.double{background:var(--li);color:#fff}
.timer{position:relative;width:clamp(100px,15vh,140px);height:clamp(100px,15vh,140px);flex-shrink:0}
.timer svg{width:100%;height:100%;transform:rotate(-90deg)}
.timer circle{fill:none;stroke-width:7}
.timer .trk{stroke:#EEEEED}
.timer .bar{stroke:var(--cy);stroke-linecap:round;stroke-dasharray:276.46;transition:stroke-dashoffset 1s linear,stroke .3s}
.timer span{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:clamp(34px,5vh,48px);font-weight:700;font-variant-numeric:tabular-nums}
.timer.warn .bar{stroke:#E5484D}.timer.warn span{color:#D13438}
.timer.paused{opacity:.45}
.timer.over span{font-size:clamp(18px,2.4vh,22px)}
.q-text{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;font-size:clamp(30px,4.2vw,60px);font-weight:700;line-height:1.4;max-width:1000px}
.q-answer{font-size:clamp(28px,3vw,44px);font-weight:700;color:#062b30;background:var(--cy);border-radius:22px;padding:12px 48px;box-shadow:0 12px 30px rgba(0,180,201,.35);animation:pop .35s cubic-bezier(.2,1.4,.4,1)}
@keyframes pop{from{transform:scale(.8);opacity:0}}
.q-actions{display:flex;gap:12px;align-items:center;justify-content:center}
.q-actions.col{flex-direction:column}

/* ---------- الفائز ---------- */
.side .crown{color:var(--c);display:flex}
.side .crown svg{width:44px;height:44px}
.side .pts-label{font-size:15px;color:rgba(255,255,255,.7)}
.stage.end{align-items:center;text-align:center;padding:clamp(24px,4vh,40px) clamp(24px,4vw,64px)}
.crown-bub{width:96px;height:96px;border-radius:50%;background:rgba(0,180,201,.14);color:var(--cyd);display:flex;align-items:center;justify-content:center;font-size:44px}
.crown-bub.b{background:rgba(118,92,217,.14);color:var(--lid)}
.crown-bub.tie{background:var(--soft);color:var(--ch)}
.end-label{font-size:22px;font-weight:600;color:var(--muted)}
.end-name{font-size:clamp(56px,6vw,88px);font-weight:700;line-height:1.1}
.end-diff{font-size:18px;background:var(--soft);border-radius:99px;padding:8px 20px}
.stats{width:100%;max-width:640px;margin-top:8px}
.srow{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:12px 0;border-bottom:1px solid rgba(51,51,51,.08)}
.srow b{font-size:26px}
.srow .l{font-size:16px;color:var(--muted);min-width:200px}
.srow .va{color:var(--cyd);text-align:right}.srow .vb{color:var(--lid);text-align:left}
.srow.head{border:0;padding-bottom:4px}
.srow.head b{font-size:15px}
.end-btns{display:flex;gap:12px;flex-wrap:wrap;justify-content:center}

/* ---------- نافذة وطريقة اللعب ---------- */
.modal{position:fixed;inset:0;background:rgba(20,20,20,.7);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50}
.modal-card{background:#fff;border-radius:28px;max-width:820px;width:100%;max-height:100%;overflow:auto;padding:clamp(22px,3vw,40px);box-shadow:0 30px 80px rgba(0,0,0,.4)}
.modal-card h2{font-size:30px;margin-bottom:14px}
.modal-card h3{font-size:20px;margin:20px 0 12px}
.modal-card ol{padding-inline-start:22px;line-height:2;font-size:17px}
.help-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:22px}
.help-cards>div{background:var(--soft);border-radius:18px;padding:16px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.help-cards p{font-size:14px;color:var(--muted)}

.toast{position:fixed;top:24px;left:50%;transform:translate(-50%,-120px);opacity:0;background:var(--ch);color:#fff;padding:12px 24px;border-radius:14px;font-weight:600;transition:all .3s;z-index:100;pointer-events:none}
.toast.show{transform:translate(-50%,0);opacity:1}

/* ---------- شاشات أصغر (جوال/عمودي) ---------- */
@media (max-width:900px),(max-aspect-ratio:1/1){
  body{overflow:auto}
  .frame.active{flex-direction:column;height:auto;min-height:100dvh}
  .side{width:auto;flex-direction:row;flex-wrap:wrap;justify-content:center;padding:12px 14px;gap:8px 12px}
  .side.deco{display:none}
  .side .grow,.side .helps-title,.side .pts-label{display:none}
  .side .score{font-size:40px}
  .helps{flex-direction:row}
  .help{font-size:13px;height:40px;gap:6px}
  .chips{flex-direction:row;flex-wrap:wrap}
  .chip.empty{display:none}
  .stage{margin:10px;border-radius:22px;overflow:visible}
  .stage.home{padding:28px 18px}
  .steps{flex-direction:column}
  .cat-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:110px}
  .board{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:240px}
  .stage-foot{flex-wrap:wrap}
  .help-cards{grid-template-columns:1fr}
  .q-text{min-height:160px}
  .view{min-height:70vh}
}
@media (max-width:520px){
  .cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .board{grid-template-columns:1fr}
  .btn.xl{font-size:19px;padding:0 22px}
}
.hi svg{width:20px;height:20px}
.win-btn svg{width:26px;height:26px;flex-shrink:0}
.pt svg{width:24px;height:24px}
.chip svg,.q-cat svg{width:18px;height:18px}
.ibub svg{width:1em;height:1em}
.revealed .timer{display:none}

.score.long{font-size:clamp(32px,3.3vw,52px)}

/* ===== أغلفة الفئات ===== */
.cover-box{position:relative;overflow:hidden;border-radius:18px;background:#E9E9E8}
.cover-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.cover-box::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,0) 42%,rgba(20,20,20,.8) 100%)}
.cover-box .cn{position:absolute;right:0;left:0;bottom:0;padding:10px 8px;color:#fff;font-weight:700;text-align:center;z-index:1;text-shadow:0 2px 6px rgba(0,0,0,.45);line-height:1.3}
.cat{padding:0;border:0;background:transparent;display:flex;flex-direction:row;align-items:stretch;min-height:0}
.cat.pa,.cat.pb{background:transparent}
.cat .cover-box{flex:1;border-radius:20px}
.cat .cn{font-size:clamp(14px,1.3vw,18px)}
.cat.pa,.cat.pb{border:0}
.cat.pa .cover-box{box-shadow:0 0 0 4px var(--cy)}
.cat.pb .cover-box{box-shadow:0 0 0 4px var(--li)}
.cat .who{z-index:2}
.cat:hover{transform:translateY(-2px)}
.cat.locked{opacity:.4}
.ccard{padding:0;overflow:hidden;position:relative;background:#E9E9E8}
.ccard .cover-box{position:absolute;inset:0;border-radius:18px}
.ccard .cn{font-size:clamp(14px,1.3vw,19px)}
.board{grid-template-columns:repeat(var(--cols,3),minmax(0,1fr))}

/* ===== صورة وتلميح السؤال ===== */
.q-img{max-height:min(32vh,300px);max-width:100%;border-radius:18px;object-fit:contain;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.q-hint{display:flex;align-items:center;gap:10px;background:#F7F5FD;color:var(--lid);border-radius:14px;padding:10px 18px;font-size:clamp(16px,1.6vw,20px);font-weight:600;animation:pop .3s}
.help:disabled.usable{cursor:default}

/* ===== السوشل والمشاركة ===== */
.socials{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.socials a{width:44px;height:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;transition:transform .15s}
.socials a:hover{transform:translateY(-2px)}
.socials img{width:22px;height:22px}
.share-row{display:flex;flex-direction:column;align-items:center;gap:12px}
.share-card{max-width:440px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:14px}
.share-card img#shareImg{width:min(240px,60vw);border-radius:18px;box-shadow:0 12px 30px rgba(0,0,0,.25)}
.share-btns{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.share-btns a,.share-btns button{white-space:nowrap;height:48px;padding:0 16px;border-radius:14px;border:1px solid rgba(51,51,51,.14);background:#fff;display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:15px;cursor:pointer;text-decoration:none;color:var(--ch)}
.share-btns svg{width:20px;height:20px}
.share-btns .bimg{width:26px;height:26px;border-radius:8px;display:inline-flex;align-items:center;justify-content:center}
.share-btns .bimg img{width:15px;height:15px}
@media (max-width:900px),(max-aspect-ratio:1/1){.cat-grid{grid-auto-rows:120px}.board{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media (max-width:520px){.cat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.board{grid-template-columns:1fr!important}}
.q-hint svg{width:24px;height:24px;flex-shrink:0}
/* ولا كلمة */
.q-charade{display:flex;align-items:center;gap:22px;background:#F7F5FD;border:2px dashed var(--li);border-radius:20px;padding:16px 22px;animation:pop .3s;max-width:640px}
.q-charade .qr{width:clamp(150px,19vw,230px);aspect-ratio:1;flex-shrink:0;background:#fff;border-radius:14px;padding:6px;box-shadow:0 4px 18px rgba(0,0,0,.08)}
.q-charade .qr svg{width:100%;height:100%;display:block}
.qc-tx{display:flex;flex-direction:column;gap:6px;text-align:right}
.qc-tx b{font-size:clamp(22px,2.4vw,32px);color:var(--lid)}
.qc-tx span{font-weight:700;font-size:clamp(15px,1.4vw,19px);color:var(--ch)}
.qc-tx small{font-size:clamp(13px,1.2vw,16px);color:#666;line-height:1.7}
#v-question.charade .q-text{font-size:clamp(20px,2.2vw,30px);color:var(--lid)}
#v-question.revealed .q-charade{opacity:.35}
@media (max-width:640px){.q-charade{flex-direction:column;text-align:center}.qc-tx{text-align:center}}
/* حساب اللاعب */
.auth-card{max-width:460px;text-align:center;display:flex;flex-direction:column;gap:14px;position:relative}
.auth-logo{height:46px;margin:0 auto 4px}
.auth-step{display:flex;flex-direction:column;gap:14px}
.auth-step h2{font-size:clamp(22px,2.4vw,28px);margin:0}
.auth-sub{margin:0;color:var(--muted);font-size:16px}
.auth-field{display:flex;flex-direction:column;gap:8px;text-align:right;font-weight:600}
.phone-in{display:flex;align-items:stretch;border:2px solid var(--line);border-radius:16px;overflow:hidden;background:#fff;transition:border-color .2s}
.phone-in:focus-within{border-color:var(--cy)}
.phone-in .cc{background:var(--soft);padding:0 16px;display:flex;align-items:center;font-weight:700;color:var(--ch);font-size:19px}
.phone-in input{flex:1;min-width:0;border:0;outline:0;padding:14px 16px;font:700 22px/1 inherit;letter-spacing:1px;font-family:inherit}
.code-in{border:2px solid var(--line);border-radius:16px;padding:14px;text-align:center;font:700 34px/1 inherit;font-family:inherit;letter-spacing:12px;outline:0}
.code-in:focus,.auth-text:focus{border-color:var(--cy)}
.auth-text{border:2px solid var(--line);border-radius:16px;padding:14px 16px;font:600 20px inherit;font-family:inherit;outline:0;text-align:right}
.auth-err{margin:0;background:#FDECEC;color:#B42318;border-radius:12px;padding:10px 14px;font-weight:600}
.auth-note{margin:0;background:#FFF7E0;color:#8A6100;border-radius:12px;padding:10px 14px;font-size:14px;line-height:1.7}
.auth-links{display:flex;justify-content:space-between;gap:10px}
.linkbtn{background:none;border:0;color:var(--cyd);font:600 15px inherit;font-family:inherit;cursor:pointer;padding:6px}
.linkbtn:disabled{color:var(--muted);cursor:default}
.auth-close{align-self:center}
.wa-ic{width:24px;height:24px;filter:invert(1)}
.player-chip{display:flex;align-items:center;gap:8px;background:var(--soft);border-radius:999px;padding:6px 8px 6px 16px;font-weight:600;color:var(--ch);margin-top:8px}
.phone-in select.cc{border:0;outline:0;font:700 18px/1 inherit;font-family:inherit;cursor:pointer;appearance:none;-webkit-appearance:none;padding:0 14px;background:var(--soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='2' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center;padding-right:30px;color:var(--ch)}
#authTo{unicode-bidi:isolate;white-space:nowrap;display:inline-block}

/* ===== v6: توازن الشاشة الكاملة (تلفزيون/لابتوب) ===== */
/* اللوحة: تمتد على كامل الارتفاع، والوسيلة الإيضاحية داخل الشريط العلوي */
.board-mid{display:flex;align-items:center;gap:clamp(14px,2vw,34px)}
.board-mid .leg{display:flex;align-items:center;gap:8px;font-size:clamp(13px,1.5vh,17px);color:var(--muted);font-weight:600}
.board-mid .leg b{color:var(--ch)}
.board-mid .sw{width:14px;height:14px;border-radius:4px;display:inline-block}
.board-mid .sw.a{background:var(--cy)}.board-mid .sw.b{background:var(--li)}
#v-board{gap:clamp(8px,1.4vh,14px)}
.board{gap:clamp(10px,1.8vh,22px) clamp(10px,1.4vw,24px)}
.pt{font-size:clamp(16px,2.9vh,34px);border-radius:clamp(10px,1.4vh,16px)}
.cover-box .cn{font-size:clamp(14px,2.3vh,26px);padding:clamp(8px,1.2vh,14px) 8px}

/* السؤال: المؤقت والصورة والنص في وسط مساحة متوازنة */
#v-question{display:flex;flex-direction:column}
.q-top{flex-shrink:0}
.q-top-end{display:flex;align-items:center;gap:10px}
.q-flag{color:#B42318}
.q-flag:hover{background:#FDECEC}
.q-body{flex:1;min-height:0;width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(12px,2.6vh,30px);padding:clamp(4px,1vh,12px) 0}
.q-body .timer{width:clamp(110px,19vh,210px);height:clamp(110px,19vh,210px)}
.q-body .timer span{font-size:clamp(38px,7vh,76px)}
.q-body .q-text{flex:0 1 auto;font-size:clamp(30px,5.6vh,68px);max-width:min(1200px,92%)}
.q-body.has-img .q-text{font-size:clamp(26px,4.4vh,52px)}
.q-body .q-img{max-height:min(38vh,420px);max-width:80%}
.q-body.has-img .timer{width:clamp(90px,13vh,150px);height:clamp(90px,13vh,150px)}
.q-body.has-img .timer span{font-size:clamp(30px,5vh,56px)}
.q-body .q-answer{font-size:clamp(30px,5.4vh,64px);padding:clamp(10px,1.6vh,20px) clamp(36px,4vw,72px)}
.revealed .q-body .q-text{font-size:clamp(24px,4vh,46px);opacity:.75}
.q-actions .btn.xl{font-size:clamp(18px,2.4vh,26px);padding:clamp(12px,1.8vh,20px) clamp(26px,3vw,46px)}

/* شريط «لمين النقاط؟» */
.judge{flex-shrink:0;width:100%;display:flex;flex-direction:column;align-items:center;gap:clamp(8px,1.4vh,14px);animation:pop .3s}
.judge-title{font-size:clamp(18px,2.6vh,28px);font-weight:700;color:var(--ch)}
.judge-row{display:grid;grid-template-columns:1fr minmax(160px,.7fr) 1fr;gap:clamp(10px,1.2vw,18px);width:min(1100px,100%)}
.jbtn{border:0;border-radius:clamp(16px,2vh,24px);min-height:clamp(84px,13vh,140px);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;font-family:inherit;padding:10px 12px;transition:transform .12s,box-shadow .15s,opacity .2s}
.jbtn .jn{font-size:clamp(17px,2.4vh,28px);font-weight:700;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jbtn b{font-size:clamp(24px,4vh,46px);line-height:1.1}
.jbtn small{font-size:clamp(12px,1.5vh,16px);opacity:.8}
.jbtn.a{background:var(--cy);color:#062b30;box-shadow:0 10px 28px rgba(0,180,201,.35)}
.jbtn.b{background:var(--li);color:#fff;box-shadow:0 10px 28px rgba(118,92,217,.35)}
.jbtn.none{background:#F1F1F0;color:var(--ch);border:2px solid #E2E2E0}
.jbtn.none svg{width:clamp(26px,3.6vh,40px);height:clamp(26px,3.6vh,40px)}
.jbtn:not(:disabled):hover{transform:translateY(-3px)}
.jbtn:not(:disabled):active{transform:scale(.97)}
.jbtn:disabled{opacity:.3;cursor:not-allowed;box-shadow:none}
#btn-back{color:var(--muted)}
#btn-back svg{width:18px;height:18px}

/* نافذة البلاغ */
.rep-card{max-width:560px;display:flex;flex-direction:column;gap:14px;text-align:center}
.rep-card h2{margin:0;font-size:clamp(22px,2.6vh,28px)}
.rep-reasons{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.rep-reasons button{border:2px solid var(--line);background:#fff;border-radius:999px;padding:10px 18px;font-family:inherit;font-weight:600;font-size:16px;cursor:pointer;color:var(--ch)}
.rep-reasons button.on{border-color:#E5484D;background:#FDECEC;color:#B42318}
.rep-note{resize:none;font-size:16px}
.rep-actions{display:flex;gap:10px;justify-content:center}

@media (max-width:900px){
  .board-mid .leg{display:none}
  .judge-row{grid-template-columns:1fr 1fr;}
  .jbtn.none{grid-column:1 / -1;order:3;min-height:64px;flex-direction:row;gap:10px}
}

/* ===== v8: شاشة إعداد المواجهة ===== */
.stage.prep{overflow:auto}
.prep-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:clamp(14px,2.4vh,24px)}
.prep-teams{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:14px}
.tcard{border-radius:20px;padding:12px 16px;display:flex;flex-direction:column;gap:6px;border:2px solid var(--c);background:rgba(var(--rgb),.08)}
.tcard.a{--c:var(--cy);--rgb:0,180,201;--ct:var(--cyd)}.tcard.b{--c:var(--li);--rgb:118,92,217;--ct:var(--lid)}
.tcard>span{font-size:14px;font-weight:600;color:var(--ct)}
.tcard input{border:0;background:transparent;font-family:inherit;font-weight:700;font-size:clamp(22px,3.4vh,40px);color:var(--ch);width:100%;outline:none;padding:0}
.tcard:focus-within{box-shadow:0 0 0 4px rgba(var(--rgb),.25)}
.vs{font-size:22px;font-weight:700;color:var(--muted)}
.prep-grid{display:grid;grid-template-columns:1fr 1fr;gap:clamp(12px,2vh,18px)}
.prep-sec{background:var(--soft);border-radius:20px;padding:14px 16px;display:flex;flex-direction:column;gap:10px;min-width:0}
.prep-sec.wide{grid-column:1/-1}
.prep-sec h3{font-size:17px;display:flex;align-items:center;gap:8px;margin:0}
.prep-sec h3 svg{width:20px;height:20px;color:var(--cyd)}
.prep-sec h3 small{font-weight:500;font-size:13px}
.prep-sec .seg{flex-wrap:wrap}
.prep-sec .seg button{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.toggles{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.tog{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#fff;border:0;border-radius:16px;padding:12px 14px;text-align:right;font-family:inherit;cursor:pointer;color:var(--ch)}
.tg-tx{display:flex;flex-direction:column;gap:2px;min-width:0}
.tg-tx b{font-size:16px}.tg-tx small{font-size:12.5px;color:var(--muted);line-height:1.5}
.tg-sw{flex-shrink:0;width:48px;height:28px;border-radius:99px;background:#D6D6D4;position:relative;transition:background .2s}
.tg-sw::after{content:"";position:absolute;top:3px;right:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 2px 4px rgba(0,0,0,.2);transition:transform .2s}
.tog[aria-checked="true"] .tg-sw{background:var(--cy)}
.tog[aria-checked="true"] .tg-sw::after{transform:translateX(-20px)}
.help-pick{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.hp{display:flex;align-items:center;gap:10px;background:#fff;border:2px solid transparent;border-radius:16px;padding:10px 12px;text-align:right;font-family:inherit;cursor:pointer;color:var(--ch);opacity:.55;transition:all .15s}
.hp.on{border-color:var(--cy);opacity:1;box-shadow:0 6px 16px rgba(0,180,201,.15)}
.hp .ibub{flex-shrink:0;width:40px;height:40px;font-size:18px}
.hp b{display:block;font-size:15px}.hp small{display:block;font-size:12px;color:var(--muted);line-height:1.5}

/* ===== الجملة التشويقية ===== */
.intro{position:fixed;inset:0;z-index:80;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(16px,3vh,30px);padding:24px;text-align:center;color:#fff;cursor:pointer;
  background:radial-gradient(ellipse at 20% 10%,rgba(0,180,201,.35),transparent 55%),radial-gradient(ellipse at 80% 90%,rgba(118,92,217,.4),transparent 55%),#2B2B2B;transition:opacity .45s}
.intro.go{opacity:0}
.intro-logo{height:clamp(60px,11vh,110px);opacity:0}
.intro-vs{display:flex;align-items:center;gap:clamp(12px,3vw,40px);font-weight:700;font-size:clamp(28px,6vh,64px);flex-wrap:wrap;justify-content:center}
.intro-vs .ia{color:var(--cy);opacity:0}.intro-vs .ib{color:#9C86F0;opacity:0}
.intro-vs b{font-size:.8em;opacity:0}
.intro-line{font-size:clamp(20px,4vh,40px);font-weight:600;max-width:900px;line-height:1.6;opacity:0}
.intro-count{font-size:clamp(60px,14vh,150px);font-weight:700;line-height:1;min-height:1em;color:#fff}
.intro-count.pop{animation:cnt .8s ease-out}
.intro-skip{position:absolute;bottom:20px;color:rgba(255,255,255,.45);font-size:13px}
.intro.play .intro-logo{animation:fadeUp .6s .05s forwards}
.intro.play .ia{animation:slideIn .6s .35s forwards;--dx:60px}
.intro.play .ib{animation:slideIn .6s .35s forwards;--dx:-60px}
.intro.play .intro-vs b{animation:fadeUp .4s .7s forwards}
.intro.play .intro-line{animation:fadeUp .7s 1s forwards}
@keyframes fadeUp{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes slideIn{from{opacity:0;transform:translateX(var(--dx))}to{opacity:1;transform:none}}
@keyframes cnt{0%{transform:scale(1.8);opacity:0}30%{transform:scale(1);opacity:1}100%{transform:scale(.9);opacity:.85}}

/* ===== تذييل السؤال: رجوع للسؤال + الإبلاغ ===== */
.q-foot{flex-shrink:0;align-self:stretch;width:100%;position:relative;display:flex;align-items:center;justify-content:center;min-height:40px}
.q-foot>span:first-child{display:none}
.q-report{position:absolute;left:0;top:50%;transform:translateY(-50%);display:inline-flex;align-items:center;gap:6px;color:var(--muted)!important;font-size:14px!important;font-weight:600;white-space:nowrap}
.q-report:hover{color:#B42318!important}
.q-report svg{width:16px;height:16px}
.judge{gap:clamp(6px,1vh,10px)}

/* ===================================================================
   الجوال — عمودي (وكذلك الشاشات الضيقة)
   =================================================================== */
@media (max-width:900px),(max-aspect-ratio:1/1){
  /* الفريقان معًا في الأعلى بشريط مضغوط */
  #s-game.active,#s-setup.active{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto minmax(0,1fr)}
  #s-game.active{height:100dvh;min-height:0;overflow:hidden}
  #s-setup.active{height:auto;min-height:100dvh}
  #s-game .side,#s-setup .side{grid-row:1;width:auto;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 8px;padding:8px 8px 10px;border-top-width:4px;align-content:center}
  #s-game .side.a,#s-setup .side.a{grid-column:1}
  #s-game .side.b,#s-setup .side.b{grid-column:2}
  #s-game .stage,#s-setup .stage{grid-column:1/-1;grid-row:2;margin:6px 8px 8px;border-radius:20px;padding:12px;gap:10px;min-height:0}
  #s-game .side-label,#s-setup .side-label{display:none}
  #s-game .team-name,#s-setup .team-name{font-size:16px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #s-game .score{font-size:28px}
  #s-game .turn-slot{flex-basis:100%;display:flex;justify-content:center;min-height:0}
  #s-game .turn-slot:empty{display:none}
  .turn-badge{font-size:12px;padding:3px 10px}
  #s-game .helps{flex-basis:100%;flex-direction:row;flex-wrap:wrap;justify-content:center;gap:4px}
  #s-game .help{width:auto;flex:1 1 0;min-width:0;height:40px;padding:2px 2px;font-size:10.5px;gap:1px;border-radius:10px;flex-direction:column;line-height:1.15}
  #s-game .help>span:last-child{white-space:nowrap}
  #s-game .help small{display:none}
  .hi svg{width:15px;height:15px}
  #s-setup .chips{display:none}
  #s-setup .picks-head{gap:6px;font-size:13px}

  /* اللوحة: عمودان يملآن الشاشة بدون تمرير طويل */
  #s-game .view{min-height:0}
  .board-top{gap:6px}
  .board-top .mini-logo{height:30px;margin:0}
  .board-top .icon-btn{width:38px;height:38px}
  .board{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:none!important;grid-auto-rows:minmax(130px,1fr)!important;gap:8px!important;overflow:auto}
  .blk{padding:5px;gap:4px;border-radius:14px}
  .pcol{width:clamp(34px,10vw,46px);gap:4px}
  .pt{font-size:clamp(12px,3.6vw,16px)!important;border-radius:9px!important;border-width:1.5px}
  .pt svg{width:16px;height:16px}
  .ccard,.ccard .cover-box{border-radius:11px}
  .ccard .cn,.cover-box .cn{font-size:12px!important;padding:6px 4px}

  /* السؤال */
  .q-top{gap:6px}
  .q-cat,.q-owner{font-size:13px}
  .q-pts{font-size:18px}
  .q-body{gap:12px;justify-content:center}
  .q-body .timer,.q-body.has-img .timer{width:88px;height:88px}
  .q-body .timer span,.q-body.has-img .timer span{font-size:32px}
  .q-body .q-text{font-size:clamp(20px,6vw,28px);min-height:0;max-width:100%}
  .q-body.has-img .q-text{font-size:clamp(18px,5vw,24px)}
  .revealed .q-body .q-text{font-size:clamp(16px,4.6vw,20px)}
  .q-body .q-img{max-height:30vh;max-width:90%}
  .q-body .q-answer{font-size:clamp(22px,7vw,32px);padding:10px 22px}
  .q-actions{gap:8px;width:100%}
  .q-actions .btn,.q-actions .btn.xl{flex:1;height:52px;font-size:16px;padding:0 10px;white-space:nowrap;border-radius:14px}
  .q-actions #btn-reveal{flex:1.4}
  .judge-title{font-size:17px}
  .judge-row{grid-template-columns:1fr 1fr;gap:8px}
  .jbtn{min-height:76px;border-radius:16px;padding:6px 8px}
  .jbtn .jn{font-size:15px}.jbtn b{font-size:24px}.jbtn small{font-size:11px}
  .jbtn.none{grid-column:1/-1;order:3;min-height:52px;flex-direction:row;gap:10px}
  .jbtn.none svg{width:22px;height:22px}
  .q-foot{min-height:30px}
  .q-report{font-size:13px!important}

  /* الإعداد */
  .stage-head .titles h1{font-size:22px}
  .stage-head .titles p{font-size:13.5px}
  .stage-head .mini-logo{height:34px;margin:0}
  .toolbar{flex-wrap:wrap;gap:8px}
  .stage-foot{position:sticky;bottom:0;background:#fff;padding:10px 0 2px;margin-top:auto;z-index:5;flex-wrap:nowrap}
  .stage-foot .btn{height:52px;font-size:16px;padding:0 14px;white-space:nowrap}
  .stage-foot .btn.xl{flex:1}
  .stage-foot .muted{display:none}
  #s-prep .stage{margin:8px;padding:16px 14px}
  .prep-teams{grid-template-columns:1fr;gap:8px}
  .vs{text-align:center;font-size:16px;margin:-4px 0}
  .tcard{padding:10px 14px}
  .tcard input{font-size:22px}
  .prep-grid{grid-template-columns:1fr}
  .toggles{grid-template-columns:1fr}
  .help-pick{grid-template-columns:1fr}
  .seg button{height:40px;padding:0 6px;font-size:14px}
  .prep-sec .seg button{text-overflow:clip}
  .q-report{white-space:nowrap}
  .q-foot{justify-content:space-between}
  .q-foot #btn-back{height:40px}
  .q-foot .q-report{position:static;transform:none;margin-inline-start:auto}
  .intro-vs{flex-direction:column;gap:6px}
}
@media (max-width:380px){
  .q-actions .btn,.q-actions .btn.xl{font-size:14.5px}
  #s-game .help{font-size:9.5px}
}

/* ===================================================================
   الجوال — أفقي (ارتفاع قصير): الفريقان على الجانبين بعرض ضيق
   =================================================================== */
@media (max-height:520px) and (orientation:landscape){
  #s-game.active{display:flex;flex-direction:row;height:100dvh;overflow:hidden}
  #s-game .side{width:clamp(110px,15vw,150px);flex-direction:column;flex-wrap:nowrap;justify-content:flex-start;padding:8px 6px;gap:6px;border-top-width:4px}
  #s-game .stage{margin:6px 0;padding:8px 10px;gap:6px;border-radius:16px}
  #s-game .score{font-size:30px}
  #s-game .team-name{font-size:15px}
  #s-game .helps{flex-direction:column;flex-wrap:nowrap;margin-top:auto;flex-basis:auto}
  #s-game .turn-slot{flex-basis:auto}
  #s-game .team-name{white-space:normal;line-height:1.3}
  #s-game .help{flex:none;width:100%;height:30px;flex-direction:row;font-size:11.5px;gap:4px}
  .board{grid-template-columns:repeat(var(--cols,3),minmax(0,1fr))!important;grid-auto-rows:minmax(0,1fr)!important;overflow:hidden}
  .board-top{min-height:0}
  .board-top .mini-logo{height:24px}
  .board-top .icon-btn{width:32px;height:32px}
  .q-body{gap:6px}
  .q-body .timer,.q-body.has-img .timer{width:60px;height:60px}
  .q-body .timer span,.q-body.has-img .timer span{font-size:22px}
  .q-body .q-text{font-size:clamp(18px,5.4vh,26px)}
  .q-body .q-img{max-height:34vh}
  .q-actions .btn,.q-actions .btn.xl{height:42px;flex:0 1 220px}
  .judge-title{display:none}
  .judge-row{grid-template-columns:1fr minmax(110px,.7fr) 1fr}
  .jbtn{min-height:58px}.jbtn b{font-size:20px}
  .jbtn.none{grid-column:auto;order:0;min-height:58px;flex-direction:column;gap:2px}
  .q-body .q-answer{font-size:22px;padding:6px 18px}
}

/* إعداد المواجهة على الشاشات الكبيرة */
@media (min-width:901px) and (min-aspect-ratio:1/1){
  .prep-body{justify-content:center;max-width:1300px;width:100%;margin:0 auto}
  .tcard{padding:clamp(12px,1.8vh,20px) clamp(16px,1.6vw,24px)}
  .tcard>span{font-size:clamp(14px,1.7vh,18px)}
  .prep-sec{padding:clamp(14px,2vh,22px) clamp(16px,1.6vw,24px);gap:clamp(10px,1.4vh,16px)}
  .prep-sec h3{font-size:clamp(17px,2.2vh,24px)}
  .prep-sec h3 small{font-size:clamp(13px,1.5vh,16px)}
  .prep-sec .seg button{height:clamp(42px,5.4vh,60px);font-size:clamp(16px,2vh,21px)}
  .tog{padding:clamp(12px,1.8vh,18px) clamp(14px,1.4vw,20px)}
  .tg-tx b{font-size:clamp(16px,2vh,21px)}.tg-tx small{font-size:clamp(12.5px,1.5vh,15px)}
  .help-pick{grid-template-columns:repeat(auto-fill,minmax(clamp(200px,16vw,280px),1fr))}
  .hp{padding:clamp(10px,1.5vh,16px) clamp(12px,1.2vw,16px)}
  .hp .ibub{width:clamp(40px,5vh,52px);height:clamp(40px,5vh,52px)}
  .hp b{font-size:clamp(15px,1.9vh,20px)}.hp small{font-size:clamp(12px,1.4vh,15px)}
  .q-report{font-size:clamp(14px,1.6vh,17px)!important}
}

/* ===== v10: بحث عن الإجابة + الدبل من اللوحة ===== */
.q-search{display:flex;align-items:center;gap:12px;background:#FFF4D6;color:#7A4B00;border:2px solid #F5B82E;border-radius:18px;padding:clamp(8px,1.2vh,14px) clamp(16px,1.6vw,26px);font-weight:700;font-size:clamp(16px,2.2vh,24px);animation:pop .3s}
.q-search svg{width:1.3em;height:1.3em;flex-shrink:0}
.q-search b{font-size:1.7em;min-width:1.6em;text-align:center;direction:ltr;font-variant-numeric:tabular-nums}
.board.armed .pcol:not(.dim) .pt:not(.done){animation:armedGlow 1.2s ease-in-out infinite}
@keyframes armedGlow{0%,100%{box-shadow:0 0 0 0 rgba(245,184,46,0)}50%{box-shadow:0 0 0 4px rgba(245,184,46,.85)}}
.help.on{position:relative}
@media (max-width:900px),(max-aspect-ratio:1/1){.q-search{font-size:14px;padding:8px 14px;gap:8px}.q-search b{font-size:22px}}
.help.armed,.side.a .help.armed{background:#F5B82E;border-color:#F5B82E;color:#3A2600;box-shadow:0 0 0 3px rgba(245,184,46,.35)}
.help.armed .hi{color:#3A2600}
@media (max-width:900px),(max-aspect-ratio:1/1){
  #s-game .help>span:last-child{overflow:hidden;text-overflow:ellipsis;max-width:100%}
  #s-game .helps:has(> .help:nth-child(4)) .help{flex:1 1 calc(50% - 4px);flex-direction:row;height:30px;gap:4px;font-size:11px;padding:0 4px}
}
@media (max-height:520px) and (orientation:landscape){
  #s-game .helps:has(> .help:nth-child(4)) .help{flex:none;width:100%;height:28px}
}
@media (max-width:900px),(max-aspect-ratio:1/1){
  #s-game .helps:has(> .help:nth-child(4)) .help .hi:not(:has(.x2)){display:none}
  #s-game .helps:has(> .help:nth-child(4)) .help{font-size:10.5px}
}
.help.cancel{border-style:dashed}

/* ===== v12: فئة «صورة مشوّشة» (خمّن السيارة) ===== */
.q-imgbox{display:flex;justify-content:center;max-width:100%;min-height:0}
.q-imgbox.mystery{overflow:hidden;border-radius:18px;box-shadow:0 10px 28px rgba(0,0,0,.18);background:#222;max-width:min(92%,900px)}
.q-imgin{position:relative;display:flex;justify-content:center;max-width:100%}
.q-imgbox.mystery .q-imgin{display:block;transform-origin:var(--ox,50%) var(--oy,50%);transition:filter 1s ease,transform 1s cubic-bezier(.2,.8,.2,1)}
.q-imgbox.mystery .q-img{border-radius:0;box-shadow:none;max-width:100%;display:block}
.q-body .q-imgbox.mystery .q-img{max-height:min(46vh,520px);max-width:100%}
/* 200: السيارة كاملة وواضحة والشعار مخفي — 400: جزء من الجهة البعيدة عن المقدمة — 600: لقطة أقرب */
.q-imgbox.m400 .q-imgin{transform:scale(1.8)}
.q-imgbox.m600 .q-imgin{transform:scale(2.6)}
.q-imgbox.nomask.m200 .q-imgin{filter:blur(7px)}
.q-imgbox.nomask.m400 .q-imgin,.q-imgbox.nomask.m600 .q-imgin{filter:blur(2px)}
.q-imgbox.mystery.clear .q-imgin{transform:none;filter:none}
.q-mask{position:absolute;border-radius:50%;background:rgba(140,140,140,.35);-webkit-backdrop-filter:blur(10px) saturate(.5);backdrop-filter:blur(10px) saturate(.5);box-shadow:0 0 12px 6px rgba(140,140,140,.25);transition:opacity .6s ease;pointer-events:none}
@supports not ((backdrop-filter:blur(2px)) or (-webkit-backdrop-filter:blur(2px))){.q-mask{background:rgba(110,110,110,.92)}}
.q-imgbox.clear .q-mask{opacity:0}
@media (max-width:900px),(max-aspect-ratio:1/1){.q-body .q-imgbox.mystery .q-img{max-height:32vh}}
@media (max-height:520px) and (orientation:landscape){.q-body .q-imgbox.mystery .q-img{max-height:38vh}}

/* ===== فئة «آية ناقصة»: خط مصحف المدينة (KFGQPC Uthmanic Script HAFS) ===== */
@font-face{font-family:'Hafs';src:url(assets/fonts/kfgqpc-uthmanic-hafs.otf) format('opentype');font-display:swap}
.q-imgbox.after:not(.clear){display:none}
.q-imgbox.after .q-img{border-radius:18px;box-shadow:0 10px 28px rgba(0,0,0,.14);background:transparent}
.q-body .q-imgbox.after .q-img{max-height:min(44vh,560px)}
.q-vwrap{display:flex;flex-direction:column;align-items:center;gap:.3em}
.q-vlabel{font-size:.42em;font-weight:600;color:var(--lid,#5a6b6d);letter-spacing:0}
.q-verse{font-family:'Hafs','IBM Plex Sans Arabic',serif;font-weight:400;line-height:1.9;color:#1d2b2c;word-spacing:.08em}
.q-blank{display:inline-block;width:3.2em;height:.95em;margin:0 .15em;vertical-align:-.12em;border-radius:.25em;background:rgba(0,180,201,.12);border:3px dashed #00B4C9}
.q-answer.quran{font-family:'Hafs','IBM Plex Sans Arabic',serif;font-weight:400}
.q-body.verse-q .q-text{max-width:min(1300px,94%)}
.revealed .q-body.verse-q .q-text{display:none}
@media (max-width:900px),(max-aspect-ratio:1/1){.q-body.verse-q .q-text .q-verse{font-size:1.35em}.q-vlabel{font-size:.6em}}

/* ===================== إعلان فترة التجربة والروابط ===================== */
.trial-banner{display:inline-flex;align-items:center;gap:10px;background:linear-gradient(90deg,rgba(0,180,201,.14),rgba(118,92,217,.14));border:1.5px dashed rgba(0,135,154,.55);color:#06464f;border-radius:999px;padding:8px 20px;font-weight:700;font-size:clamp(15px,1.4vw,18px);text-align:center;margin:-4px 0 0}
.trial-banner .tb-ic{font-size:1.25em}
.home-links{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:2px 6px;font-size:14px;color:var(--muted)}
.home-links button{background:none;border:0;font:600 14px inherit;font-family:inherit;color:var(--muted);cursor:pointer;padding:4px 6px;border-radius:8px}
.home-links button:hover{color:var(--cyd);background:var(--soft)}
.acc-btn{display:inline-flex;align-items:center;gap:6px;background:#fff;border:1px solid var(--line);border-radius:999px;height:34px;padding:0 12px;font:700 14px inherit;font-family:inherit;color:var(--ch);cursor:pointer;position:relative}
.acc-btn svg{width:17px;height:17px}
.dot{width:9px;height:9px;border-radius:50%;background:#E5484D;display:inline-block}
.acc-btn .dot{position:absolute;top:-2px;left:-2px}

/* ===================== حسابي ===================== */
.stage.account{gap:clamp(10px,1.6vh,16px)}
.acc-who{display:flex;align-items:center;gap:14px;min-width:0}
.acc-av{width:52px;height:52px;border-radius:50%;flex-shrink:0;background:linear-gradient(135deg,var(--cy),var(--li));color:#fff;font-size:24px;font-weight:700;display:flex;align-items:center;justify-content:center}
.ltr-num{direction:ltr;unicode-bidi:isolate}
.acc-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;border-bottom:1px solid var(--line);flex-shrink:0}
.acc-tabs::-webkit-scrollbar{display:none}
.acc-tabs button{display:inline-flex;align-items:center;gap:8px;height:48px;padding:0 16px;background:none;border:0;font:600 16px inherit;font-family:inherit;color:var(--muted);cursor:pointer;white-space:nowrap;position:relative}
.acc-tabs button svg{width:19px;height:19px}
.acc-tabs button.on{color:var(--ch);font-weight:700;box-shadow:inset 0 -3px 0 var(--cy)}
.acc-tabs .dot{margin-inline-start:2px}
.acc-body{flex:1;min-height:0;overflow:auto;padding:2px 2px 8px}
.acc-actions{display:flex;gap:8px}
.acc-loading{color:var(--muted);padding:30px;text-align:center}
.acc-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:clamp(24px,6vh,60px) 16px;color:var(--muted)}
.acc-empty b{color:var(--ch);font-size:19px}
.acc-empty .btn{margin-top:8px}
.st{display:inline-block;font-size:13px;font-weight:700;border-radius:999px;padding:3px 10px;white-space:nowrap}
.st.ok{background:#E3F6EA;color:#1B7A3D}.st.warn{background:#FFF3DC;color:#9A6200}.st.bad{background:#FDE8E8;color:#B42318}.st.mut{background:#F1F1F0;color:var(--muted)}
.acc-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:14px}
.acc-stat{background:var(--soft);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column}
.acc-stat b{font-size:28px;line-height:1.2}.acc-stat span{font-size:14px;color:var(--muted)}
.acc-resume{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:rgba(0,180,201,.1);border-radius:16px;padding:10px 14px;margin-bottom:14px;font-weight:600}
.acc-resume svg,.acc-empty .btn svg,.sup-form .btn svg{width:18px;height:18px}
.acc-games{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:12px}
.acc-game{border:1px solid var(--line);border-radius:18px;padding:12px 14px;display:flex;flex-direction:column;gap:8px}
.acc-game.unf{background:#FBFBFA}
.ag-top{display:flex;justify-content:space-between;align-items:center;gap:8px}.ag-top small{color:var(--muted)}
.ag-score{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:10px;font-weight:700}
.ag-score span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ag-score .a{color:var(--cyd)}.ag-score .b{color:var(--lid);text-align:left}
.ag-score .w::before{content:'🏆 '}
.ag-score b{font-size:22px}
.ag-cats{display:flex;flex-wrap:wrap;gap:5px}
.gc{font-size:12.5px;border-radius:999px;padding:2px 9px;font-weight:600}
.gc.a{background:rgba(0,180,201,.12);color:#00697A}.gc.b{background:rgba(118,92,217,.12);color:var(--lid)}
.acc-trial{display:flex;gap:14px;align-items:center;background:linear-gradient(90deg,rgba(0,180,201,.14),rgba(118,92,217,.14));border:1.5px dashed rgba(0,135,154,.55);border-radius:18px;padding:14px 18px;margin-bottom:14px}
.acc-trial .tb-ic{font-size:30px}
.acc-trial b{display:block;font-size:18px;color:#06464f}.acc-trial span{color:var(--muted);font-size:14.5px}
.acc-list{display:flex;flex-direction:column;gap:8px}
.acc-row{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px 14px}
.acc-row span{display:block;color:var(--muted);font-size:13.5px}
.acc-amt{text-align:left;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.legal{max-width:860px;margin:0 auto;line-height:1.95;font-size:16px}
.legal h2{font-size:24px;margin-bottom:6px}
.legal h3{font-size:18px;margin:18px 0 4px;color:#00697A}
.legal p{margin:6px 0}.legal ul{margin:4px 0;padding-inline-start:22px}.legal li{margin:3px 0}
.sup-grid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:22px}
.sup-col h2{font-size:20px;margin-bottom:10px}
.sup-h{font-size:17px;margin:18px 0 8px}
.faq{display:flex;flex-direction:column;gap:8px}
.faq details,.ticket{border:1px solid var(--line);border-radius:14px;background:#fff}
.faq summary,.ticket summary{cursor:pointer;padding:12px 14px;font-weight:700;list-style:none;display:flex;align-items:center;gap:8px}
.faq summary::-webkit-details-marker,.ticket summary::-webkit-details-marker{display:none}
.faq summary::after{content:'+';margin-inline-start:auto;font-size:20px;color:var(--cyd);line-height:1}
.faq details[open] summary::after{content:'−'}
.faq p{padding:0 14px 12px;color:#444;line-height:1.85;margin:0}
.acc-contact{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.acc-contact .btn{text-decoration:none}.acc-contact svg{width:18px;height:18px}
.sup-form{display:flex;flex-direction:column;gap:10px}
.sup-form label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14.5px}
.sup-form select,.sup-form textarea,.tk-reply input{font:inherit;font-size:16px;border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;background:#fff;color:var(--ch);outline:0}
.sup-form select:focus,.sup-form textarea:focus,.tk-reply input:focus{border-color:var(--cy)}
.sup-form textarea{resize:vertical;min-height:96px}
.sup-form .btn{align-self:flex-start}
#supList{display:flex;flex-direction:column;gap:8px}
.ticket summary{flex-wrap:wrap;font-weight:600}.ticket summary small{color:var(--muted);margin-inline-start:auto}
.tk-thread{display:flex;flex-direction:column;gap:8px;padding:0 14px 10px}
.tk-msg{max-width:88%;border-radius:14px;padding:8px 12px;background:var(--soft);white-space:pre-wrap;line-height:1.75}
.tk-msg small{display:block;color:var(--muted);font-size:12px}
.tk-msg.admin{align-self:flex-end;background:#E3F6F8}
.tk-reply{display:flex;gap:8px;padding:0 14px 12px}.tk-reply input{flex:1;min-width:0}
@media (max-width:900px),(max-aspect-ratio:1/1){
  .stage.account{min-height:calc(100dvh - 20px)}
  .acc-body{overflow:visible}
  .acc-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sup-grid{grid-template-columns:minmax(0,1fr)}
  .acc-tabs button{height:44px;padding:0 12px;font-size:15px}
  .acc-av{width:42px;height:42px;font-size:20px}
  .stage-foot .acc-actions .btn{height:44px;font-size:14px}
  .trial-banner{border-radius:16px;padding:8px 14px}
  .acc-games{grid-template-columns:1fr}
}
@media (max-width:900px),(max-aspect-ratio:1/1){
  #s-account .stage-foot{gap:6px}
  #s-account .stage-foot .btn{height:44px;padding:0 10px;font-size:14px;gap:6px}
  #s-account .acc-actions{gap:6px}
  .ticket summary small{margin-inline-start:0;flex-basis:100%}
}
.sup-form select,.sup-form textarea{width:100%;max-width:100%;box-sizing:border-box}
.sup-col{min-width:0}

/* ===================== الموافقة والرصيد والباقات ===================== */
.auth-agree{display:flex;align-items:flex-start;gap:10px;font-size:14.5px;line-height:1.7;color:#444;text-align:right;margin:2px 2px 4px;cursor:pointer}
.auth-agree input{width:20px;height:20px;margin-top:3px;accent-color:#00B4C9;flex-shrink:0}
.auth-agree a{color:#00697A;font-weight:700}
.acc-balance{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--soft);border-radius:18px;padding:14px 18px;margin-bottom:14px}
.acc-balance small{display:block;color:var(--muted);font-size:13.5px}.acc-balance b{font-size:24px}
.acc-balance .ibub svg{width:22px;height:22px}.acc-balance .muted{margin-inline-start:auto}
.acc-packs{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:12px}
.acc-pack{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;border:2px solid var(--line);border-radius:20px;background:#fff;padding:20px 14px 16px;font:inherit;cursor:pointer;transition:border-color .2s,transform .2s}
.acc-pack:hover{border-color:var(--cy);transform:translateY(-2px)}
.acc-pack b{font-size:18px}.acc-pack span{color:var(--muted)}.acc-pack strong{font-size:22px;color:#00697A;margin-top:6px}
.acc-pack em{position:absolute;top:-11px;font-style:normal;font-size:12.5px;font-weight:700;background:linear-gradient(90deg,var(--cy),var(--li));color:#fff;border-radius:999px;padding:2px 12px}
.acc-pack.busy{opacity:.6}.acc-pack:disabled{cursor:wait}
.pay-note{margin:10px 2px 0}
