/* الصفحة الرئيسية وشاشة الدولة: كل شي في شاشة وحدة على أي جهاز */
html,body.home-page{height:100%}
body.home-page{height:100dvh;overflow:hidden;display:flex;flex-direction:column;background:radial-gradient(120% 70% at 50% 0%,#FBF4E4 0%,var(--sand) 60%)}
body.home-page>.sadu{flex:none}
.fit-outer{flex:1;min-height:0;overflow:hidden;position:relative}
.fit-outer>:first-child{min-height:100%;flex:none;width:100%}
.fit-box{display:flex;flex-direction:column}

/* ---------- أول شاشة: الدولة واللغة ---------- */
.entry{display:flex}
.entry-box{width:min(620px,100%);margin:auto;flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:clamp(8px,1.8vh,16px);text-align:center;padding:clamp(12px,3vh,28px) 16px}
.entry-logo{width:clamp(56px,11vh,96px);height:auto;animation:rise-in .9s var(--ease) both}
.entry h1{font-size:clamp(36px,7vh,54px);line-height:1;color:var(--palm)}
.entry p{margin:0}
.entry .lang{width:min(280px,100%)}
.countries{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;width:100%}
.country{position:relative;display:grid;justify-items:center;gap:4px;padding:12px 6px 10px;border-radius:16px;background:var(--white);border:1.5px solid var(--line);transition:transform .25s var(--ease),border-color .25s,box-shadow .25s;animation:rise-in .6s var(--ease) both;min-width:0}
.country:hover{transform:translateY(-3px);box-shadow:0 14px 28px -18px rgba(42,33,28,.5)}
.country img,.country .gulf{width:52px;height:39px;border-radius:5px;object-fit:cover;box-shadow:0 2px 6px rgba(42,33,28,.18)}
.country .gulf{background:var(--sadu) center/19px 14px;display:block}
.country b{font-size:15px}
.country small{font-size:11px;color:var(--muted)}
.country.active{border-color:var(--sea);box-shadow:0 0 0 4px var(--sea-soft)}
.country.soon img,.country.soon .gulf{filter:saturate(.5);opacity:.75}
.country .ribbon{position:absolute;top:6px;inset-inline-start:6px;font-size:10px;font-weight:600;padding:1px 7px;border-radius:99px;background:var(--saffron-soft);color:#8a5a0c}
.soon-note{margin:0;padding:10px 14px;border-radius:14px;background:var(--white);border:1px dashed var(--saffron);font-weight:500;animation:fade .35s var(--ease)}

/* ---------- الرئيسية ---------- */
.home2{display:flex;align-items:flex-start}
.home-inner{position:relative;z-index:1;width:100%;display:flex;flex-direction:column;padding-inline:16px;padding-bottom:clamp(40px,9vh,90px)}
.home-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;max-width:1200px;width:100%;margin:0 auto;padding-block:clamp(8px,1.6vh,14px)}
.home-bar .logo{font-size:24px}
.country-chip{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:99px;background:var(--white);border:1.5px solid var(--line);font-size:14px;font-weight:600}
.country-chip img,.country-chip .gulf{width:24px;height:18px;border-radius:3px;object-fit:cover}
.bar-end{display:flex;align-items:center;gap:8px;min-width:0}
a.country-chip{text-decoration:none;color:inherit}
.acc-chip .av{font-size:18px;line-height:1}
.acc-chip.in{border-color:rgba(14,138,140,.35)}

.home-grid{flex:1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr) minmax(0,1fr);grid-template-areas:"how hero modes";gap:clamp(16px,2.5vw,32px);align-items:center;max-width:1200px;width:100%;margin:0 auto}
.hero2{grid-area:hero;display:grid;gap:clamp(8px,1.8vh,16px);justify-items:center;text-align:center;min-width:0}
.how{grid-area:how}.modes{grid-area:modes}
.how,.modes{display:grid;gap:10px;min-width:0}
.how h2,.modes h2{font-size:19px;color:var(--palm)}

/* البيرق يرتفع أول ما تفتح الصفحة ويرفرف */
.hero-flag{position:relative;width:min(240px,60vw);height:clamp(100px,20vh,180px)}
.hero-pole{position:absolute;inset-inline-end:28%;bottom:0;top:0;width:8px;border-radius:5px;background:linear-gradient(90deg,#5b3f22,#9a7446 45%,#8a6538 55%,#4d341b)}
.hero-pole::before{content:'';position:absolute;top:-8px;left:50%;width:16px;height:16px;margin-left:-8px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff1bf,#d4a13a 55%,#7d5410)}
.hero-banner{position:absolute;inset-inline-end:calc(28% + 8px);width:62%;height:46%;top:6%;filter:drop-shadow(0 10px 14px rgba(42,33,28,.2));animation:hoist 1.8s cubic-bezier(.22,1,.36,1) .2s both}
.hero-banner svg{width:100%;height:100%;display:block;overflow:visible}
@keyframes hoist{from{transform:translateY(160%)}}
.hero2 h1{font-size:clamp(44px,9vh,76px);line-height:1;color:var(--palm);animation:rise-in .8s var(--ease) .5s both}
.tagline{margin:0;font-size:clamp(17px,2.6vh,22px);font-family:var(--display);animation:rise-in .8s var(--ease) .65s both}
.tagline span{color:var(--henna)}
.hero2 .choices{display:grid;gap:10px;width:min(440px,100%);animation:rise-in .8s var(--ease) .8s both}
.hero2 .choice{padding:clamp(12px,2vh,18px) 18px}
@keyframes rise-in{from{opacity:0;transform:translateY(16px)}}

/* كيف تلعب */
.steps{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.steps li{display:flex;gap:10px;align-items:center;padding:10px;border-radius:16px;background:rgba(255,255,255,.6);border:1px solid var(--line);animation:rise-in .7s var(--ease) both;min-width:0}
.steps li:nth-child(2){animation-delay:.12s}.steps li:nth-child(3){animation-delay:.24s}
.steps li div{display:grid;min-width:0}.steps small{color:var(--muted);font-size:12.5px;line-height:1.5}
.step-ico{flex:none;width:40px;height:40px;border-radius:12px;background:var(--sea-soft);display:grid;place-items:center}
.step-ico svg{width:26px;height:26px;fill:none;stroke:var(--sea);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;animation:bob 3s ease-in-out infinite}
.steps li:nth-child(2) .step-ico svg{animation-delay:.5s}.steps li:nth-child(3) .step-ico svg{animation-delay:1s}
@keyframes bob{50%{transform:translateY(-3px)}}

/* أوضاع اللعب */
.mode-cards{display:grid;gap:8px}
.mode-card{position:relative;display:grid;gap:2px;padding:11px 12px;padding-inline-end:70px;border-radius:16px;background:rgba(255,255,255,.6);border:1px solid var(--line);transition:transform .25s var(--ease),box-shadow .25s,background .25s;animation:rise-in .7s var(--ease) both;min-width:0}
.mode-card:nth-child(2){animation-delay:.12s}.mode-card:nth-child(3){animation-delay:.24s}
.mode-card:hover{transform:translateY(-3px);background:var(--white);box-shadow:0 14px 26px -18px rgba(42,33,28,.5)}
.mode-card small{color:var(--muted);font-size:12.5px}
.mode-card .badge{position:absolute;inset-inline-end:10px;top:12px;font-size:11px;font-weight:600;padding:2px 9px;border-radius:99px;background:var(--saffron-soft);color:#8a5a0c}
.mode-card .badge.ok{background:var(--sea-soft);color:var(--sea)}
.mode-card.live{border-color:rgba(14,138,140,.3)}

/* المستويات */
.ladder{max-width:1200px;width:100%;margin:clamp(10px,2vh,20px) auto 0;display:flex;justify-content:center}
.levels{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-end;gap:6px}
.levels li{display:flex;align-items:center;font-family:var(--display);font-weight:700;font-size:14px;padding:0 12px;height:32px;border-radius:10px;background:var(--white);border:1px solid var(--line);color:var(--palm);animation:climb .6s var(--ease) both}
.levels li:nth-child(1){animation-delay:.1s}.levels li:nth-child(2){animation-delay:.2s;height:36px}.levels li:nth-child(3){animation-delay:.3s;height:40px}
.levels li:nth-child(4){animation-delay:.4s;height:44px}.levels li:nth-child(5){animation-delay:.5s;height:48px}
.levels li:nth-child(6){animation-delay:.6s;height:52px;background:var(--palm);color:var(--shell);border-color:var(--palm)}
.levels li:not(:last-child)::after{content:'←';margin-inline-start:6px;color:var(--muted);font-family:var(--body);font-weight:400}
@keyframes climb{from{opacity:0;transform:translateY(12px)}}

/* البحر والبوم: زينة ثابتة تحت الصفحة */
.sea{position:absolute;left:0;right:0;bottom:0;height:clamp(50px,11vh,110px);overflow:hidden;pointer-events:none;z-index:0}
.waves{position:absolute;left:0;bottom:0;width:200%;height:60%;animation:drift 16s linear infinite}
.waves path{fill:rgba(14,138,140,.22)}
.waves.w2{height:46%;animation-duration:11s;animation-direction:reverse}
.waves.w2 path{fill:rgba(14,138,140,.35)}
@keyframes drift{to{transform:translateX(-50%)}}
.dhow{position:absolute;bottom:28%;height:62%;width:auto;left:-120px;animation:sail 38s linear infinite,rock 4s ease-in-out infinite}
@keyframes sail{to{left:calc(100% + 20px)}}
@keyframes rock{50%{transform:translateY(-4px) rotate(-2deg)}}

/* الشاشات المتوسطة (آيباد عمودي) */
@media (max-width:980px){
 .home-grid{grid-template-columns:1fr 1fr;grid-template-areas:"hero hero" "how modes";align-content:center}
}
/* التلفون: الأساسيات بس، والباقي مختصر */
@media (max-width:640px){
 .home-grid{grid-template-columns:1fr;grid-template-areas:"hero" "how" "modes";gap:12px;align-content:center}
 .how h2,.modes h2{display:none}
 .steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .steps li{flex-direction:column;text-align:center;padding:8px 4px;gap:4px}
 .steps li b{font-size:12px;line-height:1.35}.steps small{display:none}
 .step-ico{width:34px;height:34px}.step-ico svg{width:22px;height:22px}
 .mode-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 .mode-card{padding:8px 6px 22px;text-align:center;justify-items:center}
 .mode-card b{font-size:12px;line-height:1.35}.mode-card small{display:none}
 .mode-card .badge{position:absolute;inset-inline-end:auto;top:auto;bottom:4px;left:50%;transform:translateX(-50%);font-size:10px;padding:0 7px}
 .levels li{font-size:12px;padding:0 8px}
 .countries{grid-template-columns:repeat(3,minmax(0,1fr))}
 .bar-end{gap:6px}
 .bar-end .lbl,.country-chip>span:not(.gulf):not(.av):not(.lbl):not(.login){display:none}
 .country-chip{padding:6px 9px}
}
@media (prefers-reduced-motion:reduce){.waves,.dhow{animation:none!important}}

a.mode-card{text-decoration:none;color:inherit}
