/* «خمّن العلم» و«خمّن الدولة» — كلّ وحدة بقالبها (٢٠٢٦/١٠/١٦ — المالك: «خمن العلم غير قالبها وخمن الدولة»).
   نفس الكود (places.js) والمعرّفات، والفرق صنف .pl-th-<id> + عنصر زينة .pl-deco. شكل فقط.
   الحركة بـtransform (العلم يرفرف، البوصلة تلفّ) — الخلفيّات ثابتة. */
#stage.xg-pl .pl-wrap:is(.pl-th-flags,.pl-th-places){position:relative;overflow:hidden;border-radius:2.4cqh}
#stage.xg-pl .pl-wrap:is(.pl-th-flags,.pl-th-places) > :not(.pl-deco){position:relative;z-index:1}
.pl-deco{position:absolute;inset:0;z-index:0;pointer-events:none}

/* ═════════ خمّن العلم — ملعب بالليل ═════════ */
#stage.xg-pl .pl-th-flags{
  background:radial-gradient(28% 36% at 8% 0%,rgba(255,250,220,.55),transparent 70%),
             radial-gradient(28% 36% at 92% 0%,rgba(255,250,220,.55),transparent 70%),
             linear-gradient(180deg,#0a1a3a 0%,#0d2550 45%,#0a1530 100%)}
/* المدرّجات: صفوف جمهور منقّطة تحت + عشب */
.pl-th-flags .pl-deco::before{content:'';position:absolute;left:0;right:0;bottom:0;height:24%;
  background:radial-gradient(circle,rgba(255,255,255,.22) 0 28%,transparent 32%) 0 0/1.6cqh 1.6cqh,
             radial-gradient(circle,rgba(255,120,140,.25) 0 26%,transparent 30%) .8cqh .8cqh/1.6cqh 1.6cqh,
             linear-gradient(180deg,#1a2a4a,#0c1626);
  -webkit-mask:linear-gradient(0deg,#000 55%,transparent);mask:linear-gradient(0deg,#000 55%,transparent)}
.pl-th-flags .pl-deco::after{content:'';position:absolute;left:0;right:0;bottom:0;height:5%;background:repeating-linear-gradient(90deg,#1f8a43 0 6cqw,#23994b 6cqw 12cqw)}
#stage.xg-pl .pl-th-flags .pl-head{background:rgba(6,12,28,.82);border-color:rgba(255,255,255,.18)}
#stage.xg-pl .pl-th-flags .pl-time b{color:#ffd23f;text-shadow:0 0 .3em rgba(255,210,63,.6);font-variant-numeric:tabular-nums}
/* العلم على سارية ويرفرف */
#stage.xg-pl .pl-th-flags .pl-photo{background:none!important;border:0!important;box-shadow:none!important;overflow:visible}
#stage.xg-pl .pl-th-flags .pl-photo::before{content:'';position:absolute;z-index:2;left:3%;top:2%;bottom:-2%;width:max(8px,1.4cqh);border-radius:999px;
  background:linear-gradient(90deg,#8a6420,#fff1c1 40%,#b58a2e)}
#stage.xg-pl .pl-th-flags .pl-photo img{padding:7% 9% 9% calc(3% + max(8px,1.4cqh));object-fit:contain;object-position:left top;transform-origin:0 50%;
  filter:drop-shadow(0 2cqh 2cqh rgba(0,0,0,.55));animation:plWave 3.2s ease-in-out infinite alternate,plFade .5s ease}
#stage.xg-pl .pl-th-flags .pl-photo::after{content:'';position:absolute;z-index:3;left:calc(3% - .6cqh);top:0;width:max(14px,2.6cqh);aspect-ratio:1;border-radius:50%;
  background:radial-gradient(circle at 35% 30%,#fff6d2,#f3d27a 50%,#8a6420)}
#stage.xg-pl .pl-th-flags .pl-photo.done::after{box-shadow:none;inset:auto;top:0;left:calc(3% - .6cqh);border-radius:50%}
#stage.xg-pl .pl-th-flags .pl-photo.done img{animation:plWave 1.4s ease-in-out infinite alternate}
@keyframes plWave{0%{transform:perspective(90cqh) rotateY(-7deg) skewY(1.2deg)}100%{transform:perspective(90cqh) rotateY(5deg) skewY(-1deg)}}
#stage.xg-pl .pl-th-flags .pl-hits{background:rgba(6,12,28,.78);border:2px solid rgba(255,255,255,.16)}
#stage.xg-pl .pl-th-flags .pl-hit:first-child{background:linear-gradient(90deg,rgba(255,210,63,.3),rgba(255,210,63,.06));border:1.5px solid #ffd23f}

/* ═════════ خمّن الدولة — بطاقة سفر فوق خريطة ═════════ */
#stage.xg-pl .pl-th-places{
  background:linear-gradient(rgba(170,220,255,.06) 1px,transparent 1px) 0 0/100% 9cqh,
             linear-gradient(90deg,rgba(170,220,255,.06) 1px,transparent 1px) 0 0/9cqh 100%,
             radial-gradient(70% 70% at 40% 40%,#14465a 0%,#0b2a3c 55%,#061623 100%)}
/* طرق سفر منقّطة */
.pl-th-places .pl-deco::before{content:'';position:absolute;inset:8% 6%;border:3px dashed rgba(255,214,120,.22);border-radius:48% 52% 40% 60% / 60% 40% 60% 40%;transform:rotate(-8deg)}
/* البوصلة */
.pl-th-places .pl-deco::after{content:'';position:absolute;left:1.2cqw;top:.6cqh;width:10cqh;aspect-ratio:1;border-radius:50%;opacity:.7;
  background:conic-gradient(from 0deg,#ffd678 0 2%,transparent 2% 23%,#ffd678 23% 27%,transparent 27% 48%,#ffd678 48% 52%,transparent 52% 73%,#ffd678 73% 77%,transparent 77% 98%,#ffd678 98%),
             radial-gradient(circle,#0b2a3c 0 30%,transparent 31%);
  box-shadow:0 0 0 .5cqh rgba(255,214,120,.35);animation:plSpin 40s linear infinite}
@keyframes plSpin{to{transform:rotate(360deg)}}
#stage.xg-pl .pl-th-places .pl-head{background:rgba(5,22,34,.82);border-color:rgba(255,214,120,.35)}
#stage.xg-pl .pl-th-places .pl-ask{color:#fff3d0}
/* الصورة بطاقة بريديّة بإطار أبيض وطابع */
#stage.xg-pl .pl-th-places .pl-photo{background:#fbf6ea!important;padding:1.4cqh;border:0!important;border-radius:1.4cqh!important;transform:rotate(-1.2deg);
  box-shadow:0 2.6cqh 5cqh rgba(0,0,0,.55)!important;overflow:hidden}
#stage.xg-pl .pl-th-places .pl-photo img{border-radius:.8cqh;height:100%}
#stage.xg-pl .pl-th-places .pl-photo::before{content:'✈';position:absolute;z-index:3;top:2.4cqh;inset-inline-start:2.4cqh;width:11cqh;height:12cqh;display:grid;place-items:center;
  font-size:6cqh;color:#c8202c;background:#fff;transform:rotate(6deg);
 outline:.35cqh dashed #c8202c;outline-offset:-1.2cqh;box-shadow:0 .6cqh 1.2cqh rgba(0,0,0,.35)}
#stage.xg-pl .pl-th-places .pl-photo.done::after{border-radius:1.4cqh;box-shadow:inset 0 0 0 .6cqh #34d77b}
#stage.xg-pl .pl-th-places .pl-hits{background:rgba(5,22,34,.78);border:2px solid rgba(255,214,120,.3)}
/* اللي عرفوها أختام جواز */
#stage.xg-pl .pl-th-places .pl-hit{border:2px dashed rgba(255,214,120,.45);background:rgba(255,214,120,.06)}
#stage.xg-pl .pl-th-places .pl-hit:first-child{border-style:solid;border-color:#ffd678;background:linear-gradient(90deg,rgba(255,214,120,.28),rgba(255,214,120,.06))}
@media (prefers-reduced-motion:reduce){#stage.xg-pl .pl-th-flags .pl-photo img,.pl-th-places .pl-deco::after{animation:none}}
