:root { --spd: 1; --ink: #0f4c55; --pri: #0b7a85; --bg: #fff7e8; --card: #fffdf8; }
* { box-sizing: border-box; }
html, body { margin: 0; background: #e3f4f2; color: var(--ink); font-family: "Noto Naskh Arabic","Noto Sans Arabic","Segoe UI",Tahoma,Arial,sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; }
.app-card { max-width: 520px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding: 16px 14px 28px; }
.app-closing { text-align: center; font-size: 15px; color: #567; margin: 18px 0 0; }
.am-home { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.am-title { margin: 0; font-size: 64px; line-height: 1.2; color: var(--pri); }
.am-title-en { margin: -14px 0 0; font-size: 26px; font-weight: 700; letter-spacing: 3px; color: #f08a00; font-family: "Trebuchet MS", Arial, sans-serif; }
.am-sub { margin: 0; font-size: 17px; color: #4a6670; text-align: center; }
.am-hero { width: 100%; max-width: 380px; border-radius: 24px; display: block; box-shadow: 0 6px 18px rgba(11,122,133,.18); }
.am-sec { width: 100%; background: #fff; border-radius: 22px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.am-sec h2 { margin: 0 0 10px; font-size: 21px; color: var(--pri); }
.am-heroes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.am-pick { border: 3px solid #d7ebe9; border-radius: 18px; background: #fff; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.am-pick img { height: 96px; max-width: 100%; object-fit: contain; }
.am-pick span { font-size: 17px; font-weight: 700; }
.am-pick.is-on { border-color: var(--pri); background: #e6f6f4; }
.am-big { border: 0; border-radius: 999px; background: #ffb400; color: #3a2800; font-size: 24px; font-weight: 800; padding: 14px 40px; cursor: pointer; box-shadow: 0 4px 0 #cf8f00; min-height: 56px; }
.am-big:active { transform: translateY(2px); box-shadow: 0 2px 0 #cf8f00; }
.am-small { border: 2px solid #cfe6e3; background: #fff; border-radius: 999px; padding: 10px 18px; font-size: 17px; cursor: pointer; min-height: 44px; }
.am-small.is-on { background: #e6f6f4; border-color: var(--pri); }
.am-row { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.am-menu { display: flex; align-items: center; gap: 14px; text-align: right; width: 100%; margin: 8px 0; padding: 10px 14px; border: 2px solid #d7ebe9; border-radius: 18px; background: #fff; cursor: pointer; }
.am-menu img { height: 52px; width: 60px; object-fit: contain; flex: none; }
.am-menu span { display: block; font-size: 19px; font-weight: 700; }
.am-menu small { display: block; font-size: 14px; color: #5b7580; margin-top: 2px; }
.am-toggle { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; font-size: 16px; line-height: 1.6; }
.am-toggle input { width: 26px; height: 26px; flex: none; margin-top: 4px; accent-color: var(--pri); }
.am-note { font-size: 14px; color: #5b7580; margin: 6px 0 0; line-height: 1.7; }
.am-tier h3 { margin: 10px 0 6px; font-size: 17px; } .am-tier small { color: #789; }
.am-levels { display: flex; flex-wrap: wrap; gap: 8px; }
.am-lv { width: 52px; height: 52px; border: 2px solid #cfe6e3; border-radius: 14px; background: #fff; font-size: 19px; font-weight: 700; cursor: pointer; position: relative; padding: 0; }
.am-lv i { position: absolute; bottom: 0; left: 0; right: 0; font-size: 9px; font-style: normal; color: #f5a300; line-height: 1; }
.am-lv.is-done { background: #e6f6f4; border-color: var(--pri); }
/* play */
.am-play { display: flex; flex-direction: column; align-items: center; gap: 10px; position: relative; }
.am-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.am-h { margin: 0; font-size: 20px; color: var(--pri); } .am-tip { margin: 2px 0 0; font-size: 16px; color: #4a6670; }
.am-buddy { height: 84px; width: auto; flex: none; transition: transform calc(.3s * var(--spd)); }
.am-buddy.p-cheer { animation: am-hop calc(.6s * var(--spd)) ease-in-out 2; }
.am-buddy.big { height: 170px; }
@keyframes am-hop { 50% { transform: translateY(-12px); } }
.am-board { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 12px; border-radius: 22px; background: #fbe9c8; border: 4px solid #e9c98a; }
.am-slot { background: rgba(255,255,255,.55); border: 3px dashed rgba(90,70,40,.35); border-radius: 18px; display: flex; align-items: center; justify-content: center; position: relative; padding: 6px; cursor: pointer; }
.sz-xl .am-slot, .sz-xl .am-card { width: 150px; height: 150px; } .sz-l .am-slot, .sz-l .am-card { width: 108px; height: 108px; }
.sz-m .am-slot, .sz-m .am-card { width: 88px; height: 88px; } .sz-s .am-slot, .sz-s .am-card { width: 72px; height: 72px; }
.am-slot img, .am-card img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.am-slot img.shadow { filter: brightness(0) opacity(.28); }
.am-slot img.filled { animation: am-pop calc(.45s * var(--spd)) ease-out; }
@keyframes am-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.am-slot.done { border-style: solid; border-color: #2fa66a; background: #e8f9ee; }
.am-slot.ready { border-color: var(--pri); }
.am-slot.hint { animation: am-glow calc(1.6s * var(--spd)) ease-in-out infinite; border-color: #ffb400; }
@keyframes am-glow { 50% { box-shadow: 0 0 0 6px rgba(255,180,0,.35); } }
.am-check { position: absolute; top: -8px; left: -8px; width: 28px; height: 28px; border-radius: 50%; background: #2fa66a; color: #fff; font-size: 17px; display: flex; align-items: center; justify-content: center; }
.am-svg { width: 100%; height: 100%; }
.am-tray { width: 100%; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; padding: 12px; border-radius: 22px; background: #d9f0ee; border: 4px solid #aee0db; min-height: 100px; }
.am-card { background: #fff; border-radius: 16px; padding: 6px; box-shadow: 0 3px 0 rgba(0,0,0,.15); touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; display: flex; align-items: center; justify-content: center; position: relative; }
.am-card.gap { background: transparent; box-shadow: none; border: 2px dashed rgba(0,0,0,.08); cursor: default; }
.am-card.sel { outline: 4px solid var(--pri); }
.am-card.dragging { z-index: 20; box-shadow: 0 10px 22px rgba(0,0,0,.28); transition: none; }
.shake { animation: am-shake calc(.4s * var(--spd)) ease-in-out; }
@keyframes am-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.am-over { position: fixed; inset: 0; z-index: 50; background: rgba(15,76,85,.9); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; }
.am-over h3 { margin: 0; color: #fff; font-size: 26px; } .am-over > p { color: #fff; }
.am-stars { font-size: 46px; color: #cfd8d6; letter-spacing: 6px; } .am-stars .on { color: #ffc400; }
.am-over .am-small { background: #fff; }
/* collect */
.am-goal { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; padding: 10px; background: #fff; border-radius: 18px; width: 100%; border: 3px solid #cfe6e3; }
.am-goal-i { display: flex; align-items: center; gap: 6px; font-size: 22px; font-weight: 800; background: #f1faf9; border-radius: 14px; padding: 4px 12px; }
.am-goal-i.ok { background: #e8f9ee; color: #2fa66a; }
.am-gicon { width: 38px; height: 38px; display: inline-block; }
.am-field { width: 100%; display: grid; gap: 8px; padding: 12px; border-radius: 22px; background: #e6f4d9; border: 4px solid #bfe0a2; }
.am-item { aspect-ratio: 1; background: transparent; border: 0; padding: 8%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform calc(.35s * var(--spd)), opacity calc(.35s * var(--spd)); }
.am-item.gone { opacity: 0; transform: scale(.2) translateY(-90px); pointer-events: none; }
.am-block { display: block; width: 100%; height: 100%; border-radius: 16%; position: relative; box-shadow: inset 0 -7px 0 rgba(0,0,0,.2), inset 0 6px 0 rgba(255,255,255,.3), 0 3px 0 rgba(0,0,0,.2); }
.am-block i { position: absolute; inset: 22% 22% 30% 22%; border-radius: 10%; border: 3px solid rgba(255,255,255,.35); }
.am-gicon .am-block { width: 38px; height: 38px; }
/* magic / gift / plan (shared, mg-) */
.mg-ar { font-family: inherit; }
.mg-play { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.mg-top { display: flex; align-items: center; gap: 10px; width: 100%; }
.mg-buddy { height: 84px; width: auto; flex: none; } .mg-buddy.p-cheer { animation: mg-hop calc(.6s * var(--spd, 1)) ease-in-out 2; }
@keyframes mg-hop { 50% { transform: translateY(-12px); } }
.mg-h { margin: 0; font-size: 21px; color: var(--pri, #0b7a85); } .mg-tip { margin: 2px 0 0; font-size: 16px; color: #4a6670; }
.mg-size { display: flex; gap: 8px; align-items: center; font-size: 16px; } .mg-size button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #cfe6e3; background: #fff; font-size: 19px; font-weight: 700; cursor: pointer; } .mg-size button.on { background: var(--pri, #0b7a85); color: #fff; border-color: var(--pri, #0b7a85); }
.mg-board { width: 100%; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 10px; border-radius: 22px; background: #fbe9c8; border: 4px solid #e9c98a; }
.mg-slot { width: 84px; height: 84px; border: 3px dashed rgba(90,70,40,.35); border-radius: 16px; background: rgba(255,255,255,.55); padding: 6px; display: flex; align-items: center; justify-content: center; position: relative; cursor: pointer; }
.sz9 .mg-slot { width: 76px; height: 76px; }
.mg-slot img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; }
.mg-slot img.shadow { filter: brightness(0) opacity(.28); } .mg-slot img.on { animation: mg-pop calc(.45s * var(--spd, 1)) ease-out; }
@keyframes mg-pop { 0% { transform: scale(.6); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
.mg-slot.done { border-style: solid; border-color: #2fa66a; background: #e8f9ee; }
.mg-slot.hint { animation: mg-glow calc(1.6s * var(--spd, 1)) ease-in-out infinite; border-color: #ffb400; } @keyframes mg-glow { 50% { box-shadow: 0 0 0 6px rgba(255,180,0,.35); } }
.mg-check { position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%; background: #2fa66a; color: #fff; display: flex; align-items: center; justify-content: center; }
.mg-stage { width: 100%; display: flex; gap: 12px; align-items: center; justify-content: center; padding: 12px; border-radius: 22px; background: #d9f0ee; border: 4px solid #aee0db; min-height: 150px; }
.mg-box { width: 128px; height: 128px; border: 0; border-radius: 24px; background: #ffb400; box-shadow: 0 5px 0 #cf8f00; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; font-weight: 800; color: #3a2800; flex: none; }
.mg-box-i { font-size: 54px; line-height: 1; } .mg-box.pulse { animation: mg-glow calc(1.8s * var(--spd, 1)) ease-in-out infinite; }
.mg-hand { flex: 1; min-height: 124px; display: flex; align-items: center; justify-content: center; }
.mg-empty { color: #5b7580; font-size: 16px; }
.mg-card { width: 118px; height: 118px; background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 3px 0 rgba(0,0,0,.15); touch-action: none; cursor: grab; display: flex; align-items: center; justify-content: center; animation: mg-pop calc(.45s * var(--spd, 1)) ease-out; user-select: none; -webkit-user-select: none; }
.mg-card img { max-width: 100%; max-height: 100%; object-fit: contain; pointer-events: none; -webkit-user-drag: none; }
.mg-card.sel { outline: 4px solid var(--pri, #0b7a85); } .mg-card.dragging { z-index: 30; position: relative; box-shadow: 0 10px 22px rgba(0,0,0,.28); animation: none; }
.shake { animation: mg-shake calc(.4s * var(--spd, 1)) ease-in-out; } @keyframes mg-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.mg-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.mg-btn { display: inline-block; text-decoration: none; border: 2px solid #cfe6e3; background: #fff; color: inherit; border-radius: 999px; padding: 10px 22px; font-size: 18px; cursor: pointer; min-height: 46px; font-family: inherit; }
.mg-btn.pri { background: #ffb400; border-color: #ffb400; font-weight: 800; color: #3a2800; }
.mg-over { position: fixed; inset: 0; z-index: 80; background: rgba(15,76,85,.92); overflow: auto; display: flex; padding: 16px; }
.mg-gift { margin: auto; width: 100%; max-width: 460px; background: #fffdf8; border-radius: 24px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.mg-won { margin: 0; font-size: 30px; color: #d9480f; } .mg-en { margin: -6px 0 0; font-size: 24px; font-weight: 800; color: #f08a00; font-family: "Trebuchet MS", Arial, sans-serif; }
.mg-line { margin: 0; font-size: 17px; line-height: 1.7; } .mg-note { margin: 0; font-size: 14px; line-height: 1.7; color: #5b7580; }
.mg-link { width: 100%; padding: 12px; font-size: 15px; border: 2px solid #cfe6e3; border-radius: 12px; background: #fff; color: #0f4c55; }
.mg-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mg-plan { width: 100%; max-width: 520px; margin: 14px auto 0; padding: 16px; border-radius: 22px; background: #eef7f6; display: flex; flex-direction: column; gap: 8px; align-items: center; text-align: center; }
.mg-plan h2 { margin: 0; font-size: 21px; color: var(--pri, #0b7a85); } .mg-plan small { font-size: 14px; color: #789; }
.mg-price { margin: 0; font-size: 24px; font-weight: 800; color: #0f4c55; } .mg-price span { font-size: 16px; font-weight: 600; color: #567; }
.mg-cur { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 16px; }
.mg-soon { border: 0; border-radius: 999px; padding: 12px 36px; font-size: 20px; font-weight: 800; background: #c9d6d4; color: #5a6b69; cursor: not-allowed; font-family: inherit; }
.mg-video { width: 100%; max-width: 520px; margin: 14px auto 0; text-align: center; } .mg-video h2 { margin: 0 0 8px; font-size: 21px; color: var(--pri, #0b7a85); }
.mg-vid, .mg-vid-ph { width: 100%; aspect-ratio: 16 / 9; border-radius: 20px; background: #0f4c55; } .mg-vid-ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-size: 18px; } .mg-play { }
.mg-vid-ph .mg-tri { font-size: 48px; line-height: 1; }
.mg-banner { display: flex; gap: 10px; align-items: center; background: #fff1c2; border: 2px solid #ffb400; border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; font-size: 16px; } .mg-banner button { border: 0; background: transparent; font-size: 20px; cursor: pointer; }
.am-magic { background: #fff1c2; border-color: #ffb400; } .am-mi { font-size: 40px; width: 60px; text-align: center; flex: none; }
.mg-en{display:none}
