/* الانترو (js/intro.js): طبقة فوق الشاشات بنفس ورق اللعبة. الخانات بتطلع واحدة ورا التانية، والقطعة بتنزل على اللي في النص،
   وبعدين الاسم والجملة، و«من استوديو تلاهي» بالشعار تحت (نفس شكلها في ألعاب الاستوديو التانية). الكل حوالي ثانيتين.
   المواعيد (--d و--t-*) بيحطها js/intro.js من جدول مزيكة الانترو (Sfx.INTRO)، والأرقام هنا احتياطي بس */
.apIntro{ position:absolute; inset:0; z-index:40; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:
    repeating-linear-gradient(45deg, #C8102E 0 8px, #F6EBD0 8px 10px, #F2B705 10px 18px, #F6EBD0 18px 20px, #1C4FA0 20px 28px, #F6EBD0 28px 30px, #176B3A 30px 38px, #F6EBD0 38px 40px) top / 100% 7px no-repeat,
    radial-gradient(circle at 50% 38%, rgba(255,255,255,0.6), rgba(255,255,255,0) 60%),
    #F1E3C2;
  cursor:pointer; -webkit-tap-highlight-color:transparent; outline:none; transition:opacity 260ms ease; }
.apIntro.out{ opacity:0; }
.inMid{ display:flex; flex-direction:column; align-items:center; gap:0; margin-top:-36px; }
.inGrid{ display:grid; grid-template-columns:repeat(3, 50px); grid-template-rows:repeat(3, 50px); gap:4px; padding:7px; border-radius:16px;
  background:#FBF3DE; box-shadow:0 0 0 2.5px #0F1437, 0 5px 0 2.5px #0F1437; margin-bottom:22px; }
.inTile{ position:relative; display:block; border-radius:9px; background:var(--c); box-shadow:inset 0 -3px 0 rgba(15,20,55,0.14);
  animation:inPop 300ms cubic-bezier(.3,1.5,.5,1) both; animation-delay:var(--d, 80ms); }
.inPlate{ position:absolute; left:50%; top:50%; width:62px; height:auto; margin:-31px 0 0 -31px; -webkit-user-drag:none; pointer-events:none;
  filter:drop-shadow(0 3px 0 rgba(15,20,55,0.25)); animation:inDrop 420ms cubic-bezier(.3,1.35,.55,1) both; animation-delay:var(--t-plate, 650ms); }
.inName{ margin:0; font-family:'Rakkas', 'Changa', sans-serif; font-weight:400; font-size:46px; line-height:1.3; color:#C8102E;
  text-shadow:0 2px 0 rgba(15,20,55,0.15); animation:inUp 380ms ease-out both; animation-delay:var(--t-name, 850ms); }
.inTag{ margin:2px 0 0; padding:0 24px; text-align:center; font-size:15px; font-weight:700; color:#6B4A2A; animation:inUp 380ms ease-out both; animation-delay:var(--t-tag, 990ms); }
/* «من استوديو تلاهي»: الشعار ٣٠ مربع مدوّر جنب الكلام، ١٣ بوزن ٧٠٠ بلون هادي، في النص، و١٦ فوق حافة الشاشة الآمنة */
.inBy{ position:absolute; left:0; right:0; bottom:calc(16px + env(safe-area-inset-bottom, 0px)); display:flex; align-items:center; justify-content:center; gap:8px;
  font-size:13px; font-weight:700; color:#7D5A3A; animation:inFade 500ms ease-out both; animation-delay:var(--t-by, 380ms); }
.inLogo{ display:block; width:30px; height:30px; border-radius:8px; flex:none; -webkit-user-drag:none; }
@keyframes inPop{ from{ opacity:0; transform:scale(0.3); } to{ opacity:1; transform:none; } }
@keyframes inDrop{ 0%{ opacity:0; transform:translateY(-70px) scale(1.25); } 60%{ opacity:1; } 100%{ opacity:1; transform:none; } }
@keyframes inUp{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes inFade{ from{ opacity:0; } to{ opacity:1; } }
/* شاشة قصيرة (٣٦٠×٦٤٠ وبالعرض): أصغر شوية */
@media (max-height:680px){
  .inGrid{ grid-template-columns:repeat(3, 42px); grid-template-rows:repeat(3, 42px); margin-bottom:16px; }
  .inPlate{ width:54px; margin:-27px 0 0 -27px; }
  .inName{ font-size:40px; }
}
@media (max-height:460px){ .inMid{ margin-top:-30px; } .inGrid{ grid-template-columns:repeat(3, 30px); grid-template-rows:repeat(3, 30px); gap:3px; padding:5px; margin-bottom:8px; } .inPlate{ width:40px; margin:-20px 0 0 -20px; } .inName{ font-size:32px; } .inTag{ font-size:13px; } }
/* prefers-reduced-motion: من غير حركة، الكل بيظهر مع بعض ظهور بس */
.apIntro.calm{ animation:inFade 300ms ease-out backwards; }
.apIntro.calm *{ animation:none !important; }
@media (prefers-reduced-motion: reduce){ .apIntro{ animation:inFade 300ms ease-out backwards; } .apIntro *{ animation:none !important; } }
