@font-face{font-family:Vazirmatn;src:url(Vazirmatn-Medium.woff) format('woff');font-weight:400 500;font-display:swap}
@font-face{font-family:Vazirmatn;src:url(Vazirmatn-Bold.woff) format('woff');font-weight:600 900;font-display:swap}
:root{--ink:#193e54;--muted:#658090;--green:#16865e;--blue:#277ec2;--line:#d9e8ed;--shadow:0 8px 0 #d8e6ec;--cream:#fffef8}
*{box-sizing:border-box}body{margin:0;font:500 16px/1.8 Vazirmatn,Tahoma,sans-serif;color:var(--ink);background:#eaf8ff}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:default}button:focus-visible,a:focus-visible,canvas:focus-visible,summary:focus-visible{outline:3px solid #167aab;outline-offset:5px}button{color:inherit}button svg,.brand svg,.part-badge svg,.end-note svg,.floating-note svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}[hidden]{display:none!important}.svg-library{position:absolute;width:0;height:0;overflow:hidden}#unity-container{position:fixed;inset:0;background:#111;pointer-events:none}#unity-canvas{width:100%;height:100%;display:block}body.unity-active #unity-container{pointer-events:auto}#loading-experience{position:fixed;inset:0;overflow:hidden;background:linear-gradient(160deg,#edfbff,#e8f5fe 58%,#f0fbf6);isolation:isolate}.sky-decoration{position:absolute;inset:0;overflow:hidden;z-index:-1;pointer-events:none}.cloud{position:absolute;width:130px;height:32px;border-radius:60px;background:white;opacity:.65}.cloud:before,.cloud:after{content:'';position:absolute;background:inherit;border-radius:50%;width:50px;height:50px;top:-24px;left:22px}.cloud:after{width:65px;height:65px;left:53px;top:-35px}.cloud-one{top:19%;right:-45px}.cloud-two{top:43%;left:-65px;transform:scale(1.4)}.sky-star{position:absolute;color:#acd7e1;font-size:38px}.star-one{top:17%;left:8%;transform:rotate(13deg)}.star-two{top:58%;right:2%}.star-three{top:77%;left:5%;font-size:25px;color:#c4dfb7}.hill{position:absolute;bottom:-180px;width:800px;height:300px;border-radius:50%;background:#dcefe8}.hill-one{right:-260px;transform:rotate(-8deg)}.hill-two{left:-350px;background:#dceef4;transform:rotate(15deg)}.site-header{height:100px;max-width:1240px;width:calc(100% - 96px);margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);line-height:1.5}.brand-mark{width:50px;height:54px;border:1.5px solid #bcdfd0;border-radius:18px;background:#d9f1e3;display:grid;place-items:center;box-shadow:0 3px 0 #c7e6d7}.brand-mark svg{width:32px;height:32px;stroke:#21825c}.brand strong{font-size:22px;display:block}.brand small{font-size:12px;color:var(--muted)}.steps{display:flex;gap:15px;align-items:center;font-size:13px;color:#91a8b4}.steps span{display:flex;gap:8px;align-items:center;white-space:nowrap}.steps b{width:25px;height:25px;display:grid;place-items:center;border:1px solid #d0e2eb;border-radius:50%;font-size:12px;background:#eef7fb}.steps i{width:30px;border-top:1px dashed #bbd5e1}.steps .current{color:var(--green);font-weight:700}.steps .current b{background:#16865e;border-color:#16865e;color:#fff}.steps .past b{background:#d7ecdf;color:#23845f}.part-badge{display:flex;align-items:center;gap:8px;border:1px solid #d5e5e6;background:#ffffff90;padding:7px 15px;border-radius:14px;font-size:13px}.part-badge b{font-size:18px}.part-badge svg{color:#daa640;width:19px;height:19px;fill:#ffe5a5}#main-content{height:calc(100% - 234px);overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bfd9df transparent;scroll-padding:20px}.screen{max-width:1120px;margin:0 auto;padding:16px 24px 36px}.hero{display:grid;grid-template-columns:1.12fr 1fr;gap:50px;align-items:center;min-height:360px;padding:12px 10px 38px}.eyebrow{display:inline-flex;align-items:center;gap:9px;color:var(--green);font-size:13px;font-weight:700}.eyebrow i{width:7px;height:7px;background:#35aa78;border-radius:50%;box-shadow:0 0 0 4px #d8eee1}h1,h2,p{margin:0}h1{font-size:clamp(28px,3.5vw,44px);line-height:1.65;letter-spacing:-1.4px;font-weight:800;margin:10px 0 14px}h1 em{color:var(--blue);font-style:normal}.hero-copy p{color:var(--muted);font-size:15px;line-height:2}.primary-button{border:1px solid #13774f;background:#18865c;color:white;border-radius:15px;box-shadow:0 5px 0 #0f6445;display:inline-flex;gap:10px;align-items:center;justify-content:center;padding:12px 21px;font-size:15px;font-weight:700;transition:transform .15s,box-shadow .15s,background .15s;line-height:1.7}.primary-button:hover{background:#0d7950;transform:translateY(-2px);box-shadow:0 7px 0 #0f6445}.primary-button:active{transform:translateY(3px);box-shadow:0 2px 0 #0f6445}.primary-button svg{width:19px;height:19px}.primary-button svg use[href="#i-play"]{fill:currentColor;stroke:none}#featured-surah{margin-top:25px;position:relative;padding-bottom:30px;padding-top:12px}.button-caption{position:absolute;bottom:8px;right:49px;font-size:10px;font-weight:500;color:#cae8d6}.hero-art{position:relative;padding:15px 14px 25px;max-width:450px}.train-ticket{transform:rotate(-4deg);border:2px solid white;border-radius:25px;background:#fffef9;box-shadow:0 12px 0 #d3e5ec,0 18px 35px #557b8a10;overflow:hidden;padding:15px 20px 0}.ticket-label{font-size:12px;font-weight:700;color:#96937f;display:block;text-align:center;letter-spacing:1px}.train-ticket img{display:block;width:100%;height:auto;aspect-ratio:1.95;object-fit:cover;mix-blend-mode:multiply;margin:8px 0}.ticket-bottom{position:relative;border-top:2px dashed #e3e4d9;padding:14px 0;display:flex;align-items:center;gap:9px;font-size:11px;color:#8c968e}.ticket-bottom:before,.ticket-bottom:after{content:'';width:22px;height:22px;border-radius:50%;position:absolute;top:-12px;background:#eaf8ff}.ticket-bottom:before{right:-32px}.ticket-bottom:after{left:-32px}.ticket-bottom strong{font-size:17px;color:#234f52}.ticket-stamp{display:flex;align-items:center;margin-right:auto;color:#208963;gap:5px}.ticket-stamp svg{width:16px;height:16px;fill:#dcebd0;stroke:#3b956a;stroke-width:1.5}.floating-note{position:absolute;bottom:0;left:24px;border:2px solid white;border-radius:13px;background:#fff2ce;box-shadow:0 4px 0 #dce5dc;padding:8px 14px;font-size:12px;display:flex;gap:7px;align-items:center;transform:rotate(3deg);color:#9a7330}.floating-note svg{width:18px;height:18px;fill:#f4cb66;stroke:#e4b54e}.art-spark{position:absolute;color:#f1bc48;font-size:43px;z-index:1}.spark-a{right:-10px;top:-10px}.spark-b{left:-10px;bottom:35px;color:#72bda8;font-size:35px}.section-heading{display:flex;justify-content:space-between;align-items:center;margin:0 0 22px;gap:15px}.section-heading h2{font-size:23px;font-weight:700}.section-heading p{font-size:13px;color:var(--muted);margin-top:3px}.count-badge{font-size:12px;border:1px solid #d6e5ea;border-radius:99px;padding:6px 13px;color:#65808b;white-space:nowrap;background:#ffffff70}.count-badge span{padding:0 6px}.surah-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}.surah-card{position:relative;display:flex;align-items:center;gap:10px;text-align:right;padding:18px 15px;border:1.5px solid #d9e5e9;border-radius:18px;background:#ffffffa8;box-shadow:0 4px 0 #d9e6ec;min-height:91px}.surah-card:is(:disabled,.unavailable){color:#768f9c}.surah-number{font-size:13px;display:grid;place-items:center;width:36px;height:39px;flex:none;border-radius:11px;background:#edf3f6;color:#98aeb9;border:1px solid #e2ebee}.surah-info{display:flex;flex-direction:column;line-height:1.8}.surah-name{font-weight:700;font-size:17px}.surah-ayahs{font-size:11px;color:#9bafb8}.surah-lock{width:14px;height:14px;margin-right:auto;color:#adbec6;stroke-width:1.6}.surah-card.active{border-color:#79bb91;background:#f2fff0;color:#24794e;box-shadow:0 4px 0 #9bceaa;transition:transform .15s}.surah-card.active:hover{transform:translateY(-3px)}.surah-card.active .surah-number{background:#d8edbc;color:#428c4a;border-color:#c0dfae}.surah-card.active .surah-ayahs{color:#72a576}.active-ribbon{position:absolute;left:10px;top:-10px;background:#238b60;color:white;border:2px solid #eaf8ff;border-radius:8px;font-size:10px;padding:0 8px}.surah-card.active .surah-lock{color:#288759;fill:#c9e6b3;stroke-width:1.3}.end-note{display:flex;justify-content:center;align-items:center;gap:7px;font-size:12px;color:#8ca5ae;margin:28px 0 10px}.end-note svg{width:15px;height:15px}.loading-dock{position:absolute;bottom:0;left:0;right:0;min-height:134px;padding:19px 24px calc(14px + env(safe-area-inset-bottom));display:flex;align-items:center;flex-direction:column;background:linear-gradient(0deg,#f4fbfbee 80%,#f0f9fb00);z-index:5;pointer-events:none}.loading-dock>*{pointer-events:auto}.loading-status{width:min(290px,100%);font-size:11px;color:#6f8e97;display:flex;align-items:center;gap:7px;margin-bottom:8px}.loading-status #load-percent{margin-right:auto;color:#288c67;font-weight:700}.loading-dot{width:6px;height:6px;border-radius:50%;background:#36ab79;animation:breathe 2s infinite}.unity-progress{width:min(290px,100%);height:9px;border:2px solid white;box-shadow:0 0 0 1px #cde1db;border-radius:10px;background:#ddece5;overflow:hidden}#unity-progress-fill{height:100%;width:0;background:linear-gradient(270deg,#2ba469,#85c95b);border-radius:10px;transition:width .35s}.loading-dock p{font-size:11px;color:#718893;margin-top:9px}.preview-badge{color:#93a5ac;font-size:10px;position:absolute;left:25px;bottom:23px}.launch-button{font-size:12px;margin-top:9px;padding:5px 14px;box-shadow:0 3px 0 #0f6445;border-radius:10px}body.build-ready #main-content{height:calc(100% - 265px)}body.build-ready .loading-dock{min-height:165px}body.build-ready .loading-dot{animation:none}#error-message{max-width:560px;font-size:12px;color:#b84e37;text-align:center;padding:5px;background:#fff3ed;border:1px solid #f0d3c6;border-radius:10px;margin-top:8px}#error-message .text-button{font-size:12px;padding:0 7px;color:#9d452f}#error-detail{display:block;max-height:65px;overflow:auto;word-break:break-all;text-align:left;font-size:11px}body.load-error #main-content{height:calc(100% - 290px)}body.load-error .loading-dock{min-height:190px}.text-button{border:0;background:transparent;color:#668796;font-size:13px;padding:6px 0;text-decoration:underline;text-decoration-color:#9bb6c366;text-underline-offset:6px}.text-button:hover{color:var(--green)}.page-intro{text-align:center;margin:12px 0 34px}.page-intro h1{font-size:36px;margin-bottom:5px}.page-intro p{font-size:14px;color:var(--muted)}.surah-meta{display:inline-flex;align-items:center;gap:12px;font-size:11px;color:#7e968d;background:#e1f0df;padding:4px 14px;border:1px solid #cee4d1;border-radius:20px;margin-top:14px}.surah-meta i{height:10px;border-right:1px solid #b9d4c1}.game-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px;max-width:970px;margin:0 auto}.game-card{border:2px solid white;border-radius:24px;overflow:hidden;background:#fffefa;text-align:right;padding:0;box-shadow:0 7px 0 #d6e5ec;transition:transform .15s}.game-card.playable:hover{transform:translateY(-5px)}.game-art{height:190px;position:relative;overflow:hidden}.game-tag{position:absolute;top:13px;right:13px;background:#ffffffca;border:1px solid #fff;border-radius:9px;font-size:10px;padding:2px 9px;z-index:1;color:#307d59}.flappy-art{background:#bee9ff}.flappy-art:after{content:'';position:absolute;bottom:-57px;left:-10%;width:120%;height:90px;background:#99d49e;border-radius:50%;z-index:0}.card-bird{position:absolute;width:80px;height:80px;top:63px;right:32%;z-index:1;transform:rotate(-10deg);filter:drop-shadow(0 6px 0 #428aac17)}.bird-body{fill:#ffd35b;stroke:#bd8b36;stroke-width:2}.bird-wing{fill:#f4b943;stroke:#bd8b36;stroke-width:2}.bird-beak{fill:#ee8b3d;stroke:#bd6236;stroke-width:2}.bird-eye-white{fill:#fff}.bird-eye{fill:#254e63}.bird-tuft{stroke:#bd8b36;stroke-width:3;fill:none;stroke-linecap:round}.mini-pipe{position:absolute;width:45px;background:#6bbca1;border:2px solid #4b9b84;border-radius:5px}.mini-pipe:before{content:'';position:absolute;left:-5px;right:-5px;top:-2px;height:17px;background:#7bceb0;border:2px solid #4b9b84;border-radius:4px}.pipe-one{height:70px;left:33px;bottom:-4px}.pipe-two{height:50px;right:25px;top:-5px;transform:rotate(180deg)}.mini-cloud{position:absolute;width:80px;height:25px;border-radius:99px;top:65px;left:20px;background:#ffffffa0}.art-star{position:absolute;right:17px;bottom:20px;font-size:37px;color:#ffedb4}.game-card-copy{padding:20px 23px}.game-category{font-size:10px;color:#819790}.game-card h2{font-size:22px;margin-top:2px}.game-card p{font-size:12px;color:#8a9ba4;margin:6px 0 20px;line-height:1.9}.card-action{display:flex;justify-content:space-between;align-items:center;font-size:13px;font-weight:700;color:#18865c;border-top:1px solid #e4eddf;padding-top:12px}.card-action svg{width:18px;height:18px}.playable .card-action svg{fill:currentColor;stroke:none}.coming-soon{color:#7b8b94;filter:saturate(.65)}.coming-soon .game-tag{color:#8e929e}.coming-soon .card-action{color:#98a8ae}.memory-art{background:#e6dff6;display:flex;align-items:center;justify-content:center}.memory-tile{position:absolute;display:grid;place-items:center;width:70px;height:85px;border:3px solid white;border-radius:14px;font-size:35px;color:#fff;background:#bca4da;box-shadow:0 5px 0 #a998bc}.tile-one{transform:rotate(-18deg);right:21%;top:55px;background:#c4badc}.tile-two{transform:rotate(12deg);right:43%;top:49px;background:#c5b3d7}.tile-three{right:31%;top:73px;transform:rotate(-3deg);font-size:35px;background:#d0c5e3}.puzzle-art{background:#ffe7cb;display:grid;place-items:center}.puzzle-shape{font-family:Tahoma,sans-serif;font-size:125px;line-height:1;color:#dcb58b;transform:rotate(-15deg);text-shadow:0 5px #cfa680}.puzzle-spark{position:absolute;color:#fff6e6;font-size:34px;left:43px;top:46px}.friendly-note{text-align:center;color:#90a6ad;font-size:12px;margin-top:35px}.play-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.icon-button{width:36px;height:36px;border:1px solid #ccdee5;border-radius:11px;background:#ffffffb0;display:grid;place-items:center}.icon-button svg{width:18px;height:18px}.icon-button:disabled{opacity:.4}#play-screen{max-width:980px;padding-top:3px}.surah-progress-panel{max-width:620px;margin:12px auto 10px;text-align:center}.surah-progress-heading{display:flex;justify-content:space-between;font-size:11px;color:#7a94a3;margin-bottom:9px}.surah-progress{height:16px;position:relative;background:#d2e3ed;border:3px solid white;border-radius:20px;box-shadow:0 2px 0 #bcd7e5;margin:0 18px;direction:rtl}.surah-fill{position:absolute;right:0;top:0;bottom:0;background:linear-gradient(270deg,#17bb50,#8fdc53);width:0;border-radius:20px;transition:width .35s}.verse-markers{position:absolute;inset:0}.verse-marker{position:absolute;top:50%;transform:translate(50%,-50%);width:28px;height:28px;display:grid;place-items:center;border:2px solid #5c9d73;border-radius:10px;background:#fff9df;box-shadow:0 2px 0 #82b892;color:#78a383;font-size:11px;z-index:1}.verse-marker:before{content:'';position:absolute;inset:0;border:inherit;border-radius:inherit;background:inherit;transform:rotate(45deg);z-index:-1}.verse-marker.completed{background:#d8efaa;color:#358c39;border-color:#5a9f42}.verse-marker.current{box-shadow:0 0 0 4px #ffd869}.verse-marker:after{content:'';position:absolute;height:8px;border-right:1px dashed #aac3cf;top:27px;left:50%}.current-verse{font-size:24px;font-weight:700;color:#c9972f;line-height:1.8;margin-top:16px;min-height:44px;text-shadow:0 2px #fff8d6;font-family:Vazirmatn,Tahoma,sans-serif}.game-stage{position:relative;height:clamp(220px,38vh,390px);max-height:500px;border:4px solid #fff;border-radius:24px;overflow:hidden;background:#bce9ff;box-shadow:0 7px 0 #c6dfe9;isolation:isolate}.game-stage canvas{display:block;width:100%;height:100%;touch-action:none;outline-offset:-5px}.score{position:absolute;top:13px;left:15px;background:#ffffffc9;border:1px solid #fff;border-radius:10px;padding:2px 12px;font-size:13px;direction:ltr;pointer-events:none}.game-overlay{position:absolute;inset:0;display:grid;place-items:center;text-align:center;background:#e9f8ff6b;backdrop-filter:blur(3px);overflow-y:auto;padding:15px}.overlay-content{background:#fffef8f5;border:2px solid white;border-radius:23px;box-shadow:0 7px 0 #92b4c52e;padding:18px 38px;max-width:95%}.overlay-symbol{display:block;margin:auto auto 3px;width:50px;height:47px}.overlay-symbol svg{width:100%;height:100%}.overlay-symbol.won{font-size:40px;line-height:1;color:#d3a343}.overlay-kicker{font-size:11px;color:#629b7e;display:block}.overlay-content h2{font-size:25px;line-height:1.7;margin:2px 0 6px}.overlay-content p{font-size:12px;color:#81949b;line-height:1.9}.overlay-content .primary-button{margin-top:14px;padding:8px 25px;font-size:13px}.overlay-content .text-button{display:block;margin:10px auto 0;font-size:11px}.game-instruction{font-size:11px;color:#8aa2ae;display:flex;justify-content:center;align-items:center;gap:8px;margin-top:17px}.keycap{font-family:inherit;font-size:10px;border:1px solid #cfdee6;border-bottom-width:3px;border-radius:5px;line-height:1.7;padding:1px 6px;background:#ffffff9c;direction:ltr}.instruction-divider{padding:0 5px}.game-stage.paused .score{opacity:.4}body.playing #main-content{scrollbar-width:none}
@keyframes breathe{50%{box-shadow:0 0 0 4px #3aab7914}}
@media(min-width:1500px){.site-header{height:115px}#main-content{height:calc(100% - 249px)}.screen{padding-top:22px}.hero{min-height:400px;gap:80px}.hero-art{max-width:470px}.game-stage{height:43vh}.game-grid{margin-top:40px}body.build-ready #main-content{height:calc(100% - 280px)}}
@media(max-width:1050px){.site-header{width:calc(100% - 48px)}.steps{gap:9px}.steps i{width:15px}.surah-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.hero{gap:24px}.hero-copy p{font-size:13px}.hero h1{font-size:36px}.ticket-bottom{gap:7px}.ticket-bottom strong{font-size:15px}.ticket-stamp{font-size:9px}.game-grid{gap:16px}.game-card-copy{padding:17px}.game-art{height:170px}}
@media(max-width:760px){.site-header{height:82px;width:calc(100% - 36px)}.brand strong{font-size:19px}.brand small{font-size:10px}.brand-mark{width:43px;height:45px;border-radius:14px}.brand-mark svg{width:28px;height:28px}.steps{display:none}.part-badge{padding:4px 11px}.part-badge svg{display:none}#main-content{height:calc(100% - 210px)}.screen{padding:10px 20px 30px}.hero{gap:10px;min-height:300px;padding:10px 0 30px;grid-template-columns:1fr 1fr}.hero h1{font-size:29px;letter-spacing:-.8px}.hero-copy .eyebrow{font-size:10px}.hero-copy p{font-size:12px}.hero-copy p br{display:none}.hero-art{padding:10px 8px 20px}.train-ticket{padding:10px 12px 0;border-radius:18px}.ticket-label{font-size:9px;letter-spacing:0}.train-ticket img{aspect-ratio:1.5}.ticket-bottom{flex-wrap:wrap;gap:2px 7px;padding:8px 0}.ticket-bottom strong{font-size:14px}.ticket-stamp{width:100%;justify-content:center;font-size:9px}.floating-note{font-size:9px;left:2px;padding:5px 8px;gap:4px}.floating-note svg{width:13px;height:13px}.spark-a{font-size:30px;right:-4px}.spark-b{font-size:26px}.primary-button{font-size:12px;padding:10px 13px;border-radius:12px}#featured-surah{gap:6px;margin-top:18px;padding-bottom:27px;font-size:12px}.button-caption{font-size:9px;right:38px}.section-heading h2{font-size:20px}.section-heading p{font-size:11px}.count-badge{font-size:10px;padding:4px 9px}.surah-grid{gap:12px;grid-template-columns:repeat(3,minmax(0,1fr))}.surah-card{padding:14px 11px;min-height:80px;border-radius:14px;gap:8px}.surah-name{font-size:15px}.surah-number{width:30px;height:34px;font-size:11px;border-radius:9px}.surah-ayahs{font-size:10px}.surah-lock{width:12px;height:12px}.preview-badge{position:static;font-size:9px;margin-top:5px}.loading-dock{min-height:128px;padding:16px 18px 10px}.loading-dock p{font-size:10px}.game-grid{gap:14px}.game-art{height:145px}.game-card-copy{padding:14px}.game-card h2{font-size:18px}.game-card p{font-size:11px}.game-card .card-action{font-size:11px}.card-bird{width:60px;height:60px;right:24%;top:55px}.pipe-one{left:15px;width:30px}.pipe-two{right:8px;width:30px}.memory-tile{width:53px;height:65px;font-size:27px}.tile-one{right:10%;top:45px}.tile-two{right:43%;top:38px}.tile-three{right:27%;top:60px}.puzzle-shape{font-size:105px}.puzzle-spark{left:10px;top:40px}.page-intro h1{font-size:29px}.page-intro p{font-size:12px}.play-heading .text-button{font-size:11px}.current-verse{font-size:22px}.game-stage{height:clamp(220px,38vh,390px);border-radius:19px}.overlay-content{padding:13px 27px}.overlay-symbol{height:36px;width:40px}.overlay-content h2{font-size:22px}.overlay-content p{font-size:11px}.end-note{font-size:10px}body.build-ready #main-content{height:calc(100% - 250px)}body.load-error #main-content{height:calc(100% - 275px)}}
@media(max-width:500px){.hero{grid-template-columns:1.1fr 1fr;gap:10px;min-height:273px}.hero h1{font-size:27px}.hero-copy .eyebrow{font-size:9px;gap:6px}.hero-copy .eyebrow i{width:5px;height:5px}.hero-copy p{font-size:11px;line-height:2}.hero-art{padding:0 0 20px}.train-ticket{padding:8px 8px 0;border-radius:15px}.train-ticket img{aspect-ratio:1.1;object-fit:contain;margin:0}.ticket-bottom{justify-content:center;padding:7px 0;gap:0 4px}.ticket-bottom>span:first-child{display:none}.ticket-label{font-size:8px}.ticket-bottom strong{font-size:13px}.ticket-stamp{font-size:8px}.ticket-stamp svg{width:12px;height:12px}.floating-note{font-size:8px;left:-6px;bottom:0;white-space:nowrap;padding:5px 6px;transform:rotate(2deg)}.spark-a{top:-22px;right:0}.spark-b{left:-13px;bottom:40px}#featured-surah{font-size:11px;padding-left:10px;padding-right:10px;margin-top:15px;gap:5px}#featured-surah svg{width:15px;height:15px}.button-caption{font-size:8px;right:30px;bottom:7px}.section-heading{gap:8px;align-items:flex-start;margin-bottom:17px}.section-heading h2{font-size:18px}.section-heading p{font-size:10px}.count-badge{font-size:9px;padding:4px 7px;margin-top:3px}.count-badge span{padding:0 2px}.surah-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.surah-card{padding:13px;min-height:81px}.surah-name{font-size:17px}.surah-ayahs{font-size:10px}.surah-number{height:36px;width:32px}.surah-lock{width:14px;height:14px}.page-intro{margin:14px 0 23px}.page-intro h1{font-size:28px}.page-intro p{font-size:12px;max-width:260px;margin:auto}.game-grid{grid-template-columns:1fr;gap:18px;max-width:350px}.game-card{display:grid;grid-template-columns:40% 60%;border-radius:19px;min-height:160px}.game-art{height:100%;min-height:160px}.game-card-copy{padding:16px 13px}.game-card h2{font-size:20px}.game-card p{margin-bottom:12px}.card-action{padding-top:9px}.game-tag{top:9px;right:8px;font-size:8px;padding:2px 5px}.card-bird{width:58px;height:58px;right:29%;top:60px}.pipe-one{left:12px;width:25px;height:50px}.pipe-two{right:8px;width:23px}.mini-cloud{left:8px;top:52px;width:45px;height:15px}.art-star{font-size:25px;bottom:18px;right:12px}.memory-tile{width:42px;height:53px;font-size:24px}.tile-one{right:12%;top:57px}.tile-two{right:45%;top:50px}.tile-three{right:29%;top:72px}.puzzle-shape{font-size:97px}.puzzle-spark{font-size:27px;left:8px;top:39px}.friendly-note{font-size:10px;margin-top:23px}.play-heading{gap:5px;flex-wrap:wrap}.play-heading .text-button{font-size:10px}.icon-button{width:31px;height:31px;border-radius:9px}.surah-progress-panel{margin:8px auto}.surah-progress-heading{font-size:10px}.surah-progress{margin:0 17px;height:14px}.verse-marker{width:23px;height:23px;border-radius:8px;font-size:10px}.verse-marker:after{top:24px}.current-verse{font-size:20px;margin-top:16px;min-height:37px}.game-stage{height:max(230px,calc(100dvh - 400px));border-width:3px;border-radius:17px}.game-instruction{font-size:9px;gap:5px;margin-top:12px;flex-wrap:wrap}.keycap{font-size:9px}.overlay-content{padding:15px 21px}.overlay-content h2{font-size:21px}.overlay-symbol{width:39px;height:35px}.overlay-content .primary-button{margin-top:12px;padding:7px 25px}.score{font-size:11px;top:9px;left:10px}.end-note{font-size:9px;line-height:2;gap:5px;align-items:flex-start}.end-note svg{width:12px;height:12px;margin-top:4px}body.build-ready .game-stage{height:max(200px,calc(100dvh - 440px))}}
@media(max-height:650px) and (min-width:600px){.site-header{height:65px}.brand-mark{width:38px;height:40px;border-radius:12px}.brand strong{font-size:17px}.brand small{font-size:9px}.brand-mark svg{width:26px;height:26px}#main-content{height:calc(100% - 172px)}.loading-dock{min-height:107px;padding:10px 20px}.loading-status{margin-bottom:5px}.loading-dock p{margin-top:6px}.hero{min-height:260px}.hero h1{font-size:31px}.hero-art{max-width:330px}.hero-copy p{font-size:12px}.play-heading .text-button{font-size:10px}.surah-progress-panel{max-width:440px;margin:0 auto 5px}.surah-progress-heading{margin-bottom:5px;font-size:9px}.current-verse{font-size:18px;margin-top:12px;min-height:30px}.verse-marker{width:22px;height:22px;font-size:9px;border-radius:8px}.verse-marker:after{display:none}.surah-progress{height:12px}.game-stage{height:max(180px,calc(100dvh - 300px))}.game-instruction{margin-top:8px;font-size:10px}.overlay-content{padding:10px 25px}.overlay-symbol{display:none}.overlay-content h2{font-size:20px;margin:0 0 2px}.overlay-content p{font-size:10px}.overlay-content .primary-button{padding:5px 20px;margin-top:8px}.overlay-content .text-button{font-size:10px;margin-top:7px}.preview-badge{position:absolute;bottom:16px;font-size:8px}.page-intro{margin:6px 0 22px}.page-intro h1{font-size:29px}.game-art{height:140px}body.build-ready #main-content{height:calc(100% - 210px)}body.build-ready .loading-dock{min-height:145px}body.load-error #main-content{height:calc(100% - 245px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The template is a game loading screen. Content fills the space above its
   compact loading strip, including mobile browser chrome and display cutouts. */
html,body{height:100%;overflow:hidden}
#loading-experience{height:100%;height:100dvh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}
body #main-content,body.build-ready #main-content,body.load-error #main-content{height:auto;flex:1;min-height:0;width:100%;padding-right:env(safe-area-inset-right);padding-left:env(safe-area-inset-left);-webkit-overflow-scrolling:touch;touch-action:pan-y}
.screen{padding-top:24px}
#surahs-screen .section-heading{margin-bottom:20px}
#surahs-title{font-size:24px;letter-spacing:0;margin:0;line-height:1.8}
body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{position:relative;inset:auto;flex:none;min-height:0;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));background:#f4fbfbf2;border-top:1px solid #d9e9ed}
.loading-status{margin-bottom:7px}
.loading-dock p{margin-top:7px}
body.load-error .loading-dot{animation:none;background:#c36a4d}
#error-message{width:min(560px,100%);padding:6px 10px;line-height:1.8}
#error-message details{font-size:11px}
#error-message summary{cursor:pointer}
.touch-instruction{display:none}
#play-screen{height:100%;min-height:370px;display:flex;flex-direction:column;padding-top:10px;padding-bottom:12px}
.play-heading{flex:none}
.surah-progress-panel{flex:none;width:min(620px,100%)}
.game-stage{flex:1;min-height:160px;height:auto;max-height:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.game-instruction{flex:none}
.text-button,.icon-button,.primary-button{min-height:44px}
.icon-button{width:44px;height:44px}
.overlay-content .text-button{min-height:44px;margin-top:4px}
.launch-button{min-height:44px}

@media(max-width:600px){
  .screen{padding:16px 14px 24px}
  #surahs-title{font-size:21px}
  #surahs-screen .section-heading{margin-bottom:17px}
  .surah-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
  .surah-card{min-height:82px;padding:13px 11px}
  .surah-name{font-size:17px}
  .surah-number{width:32px;height:36px}
  .surah-lock{width:14px;height:14px}
  body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{padding-top:10px;padding-bottom:calc(10px + env(safe-area-inset-bottom))}
  .loading-status{font-size:10px;width:min(260px,100%);margin-bottom:6px}
  .unity-progress{width:min(260px,100%);height:8px}
  .loading-dock p{font-size:10px;line-height:1.7;margin-top:6px;text-align:center}
  #error-message{font-size:11px;margin-top:6px}
  #error-message .text-button{min-height:44px;padding:6px 12px}
  #error-message summary{min-height:32px;padding:4px 0}
  .page-intro{margin:8px 0 20px}
  .page-intro h1{font-size:26px}
  .game-grid{grid-template-columns:1fr;max-width:420px}
  .game-card{display:grid;grid-template-columns:38% 62%;min-height:154px;border-radius:19px}
  .game-art{height:100%;min-height:154px}
  .game-card-copy{padding:14px}
  .game-card h2{font-size:20px}
  .game-card p{font-size:11px;margin-bottom:12px}
  .card-action{font-size:12px}
  #play-screen{padding:6px 10px 8px;min-height:330px}
  .play-heading{flex-wrap:nowrap;gap:5px;min-height:44px}
  
  
  .play-heading .text-button{font-size:10px;flex:none;min-width:84px;padding:7px 3px}
  .play-heading .icon-button{flex:none}
  .surah-progress-panel{margin:8px auto 5px;max-width:480px}
  .surah-progress-heading{font-size:10px;margin-bottom:8px}
  .surah-progress{height:14px;margin:0 18px}
  .verse-marker{width:23px;height:23px;font-size:10px}
  .current-verse{font-size:20px;min-height:36px;margin-top:14px}
  body .game-stage,body.build-ready .game-stage{height:auto;min-height:150px;border-radius:16px}
  .game-instruction{display:none}
  .touch-instruction{display:block;flex:none;text-align:center;font-size:10px;color:#718f9e;margin-top:8px}
  .game-overlay{padding:8px}
  .overlay-content{padding:12px 20px;max-width:100%}
  .overlay-content .primary-button{margin-top:10px;min-width:160px}
  .overlay-content p{font-size:11px}
  .overlay-content h2{font-size:21px}
}
@media(max-width:360px){
  .screen{padding-right:10px;padding-left:10px}
  .surah-grid{gap:11px}
  .surah-card{padding:12px 9px;gap:6px}
  .surah-name{font-size:16px}
  .surah-number{width:28px;font-size:10px}
  .current-verse{font-size:18px}
}
@media(max-height:520px) and (orientation:landscape){
  .screen{padding-top:10px}
  #surahs-title{font-size:19px}
  #surahs-screen .section-heading{margin-bottom:13px}
  .surah-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}
  .surah-card{min-height:66px;padding:10px}
  .surah-name{font-size:15px}
  body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{padding-top:7px;padding-bottom:calc(7px + env(safe-area-inset-bottom))}
  .loading-status{font-size:9px;margin-bottom:4px}
  .loading-dock p{font-size:9px;margin-top:4px}
  #play-screen{min-height:190px;padding:4px max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));display:grid;grid-template-columns:110px minmax(0,1fr);grid-template-rows:1fr;gap:10px;position:relative}
  .play-heading{grid-column:1;grid-row:1;align-self:center;display:flex;flex-direction:column;justify-content:center;gap:8px}
  
  
  .play-heading .text-button{font-size:10px;min-height:44px}
  .surah-progress-panel{grid-column:2;grid-row:1;align-self:start;z-index:2;margin:5px 0 0;max-width:none;padding:0 18px;pointer-events:none}
  .surah-progress-heading{display:none}
  .surah-progress{height:12px;margin:0 12px}
  .verse-marker{width:21px;height:21px;font-size:9px}
  .verse-marker:after{display:none}
  
  .current-verse{font-size:16px;min-height:28px;margin-top:7px}
  body .game-stage,body.build-ready .game-stage{grid-column:2;grid-row:1;height:auto;min-height:130px;margin-top:51px}
  .game-instruction,.touch-instruction{display:none}
  .overlay-content{padding:8px 16px}
  .overlay-symbol,.overlay-kicker{display:none}
  .overlay-content h2{font-size:18px}
  .overlay-content p{font-size:10px}
  .overlay-content .primary-button{min-height:44px;margin-top:6px}
  .overlay-content .text-button{min-height:44px;margin:2px auto 0}
  #error-message{max-width:90%;font-size:10px;line-height:1.6}
}
@media(pointer:coarse){
  button{touch-action:manipulation}
  .game-instruction{display:none}
  .touch-instruction{display:block;flex:none;text-align:center;font-size:10px;color:#718f9e;margin-top:8px}
}
@media(max-height:520px) and (orientation:landscape){.touch-instruction{display:none}}

/* Four-color material background, shared by every loading screen. */
body{background:#7b4cff}
#loading-experience{background:linear-gradient(67.5deg,#4400ff -25%,#7b4cff 0%,#b197ff 52%,#68fff7 100%)}
#gradient-background{position:absolute;inset:0;width:100%;height:100%;z-index:-1;pointer-events:none}
.surah-card{background:#ffffffeb;border-color:#ffffffd9;box-shadow:0 4px 0 #6656aa3b}
.surah-card:is(:disabled,.unavailable) .surah-name{color:#536580}
.surah-ayahs{color:#79869b}
.surah-lock{color:#96a0b3}
.surah-card.active{background:#f2fff3;border-color:#82cb99;box-shadow:0 4px 0 #447d623b}
.section-heading{width:fit-content;padding:7px 15px;border:1px solid #ffffff9c;border-radius:15px;background:#ffffffd4}
.page-intro{width:fit-content;margin:8px auto 24px;padding:5px 22px;border:1px solid #ffffff9c;border-radius:17px;background:#ffffffd4}
.page-intro h1{margin:0;font-size:28px;letter-spacing:0}
.play-heading{padding:4px 9px;border-radius:14px;background:#ffffffe0}
.surah-progress-heading{color:#273556}
.friendly-note{color:#273556;background:#ffffffc4;border-radius:12px;padding:5px 10px;width:fit-content;margin-right:auto;margin-left:auto}
.touch-instruction,.game-instruction{color:#273556;background:#ffffffbd;border-radius:10px;padding:2px 8px;width:fit-content;margin-right:auto;margin-left:auto}
#games-screen>.text-button{color:#263952;background:#ffffffd9;border-radius:11px;padding:7px 12px;text-decoration:none}
/* The list scrolls through the full viewport instead of ending at a hard edge
   above the loading panel. Measured bottom space lets its last row clear it. */
#loading-experience{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr);--loading-dock-space:150px}
body #main-content,body.build-ready #main-content,body.load-error #main-content{grid-area:1/1;height:100%;min-width:0;position:relative;padding-bottom:calc(var(--loading-dock-space) + 20px);scroll-padding-bottom:calc(var(--loading-dock-space) + 20px);mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - var(--loading-dock-space) - 12px),transparent calc(100% - var(--loading-dock-space) + 12px));-webkit-mask-image:linear-gradient(to bottom,#000 0,#000 calc(100% - var(--loading-dock-space) - 12px),transparent calc(100% - var(--loading-dock-space) + 12px))}
body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{grid-area:1/1;align-self:end;justify-self:center;position:relative;inset:auto;width:min(420px,calc(100% - 24px));margin:0 12px 8px;background:rgba(255,255,255,.55);border:1px solid rgba(255,255,255,.64);border-radius:22px;box-shadow:0 8px 28px #26115d24;z-index:2;overflow:hidden;isolation:auto;contain:none;clip-path:none;backdrop-filter:blur(64px);-webkit-backdrop-filter:blur(64px);transition:background-color .2s,border-color .2s}
.loading-dock::before{content:none}
.loading-dock>*{position:relative;z-index:1}
.loading-status{width:min(340px,100%);font-size:14px}
.unity-progress{width:min(340px,100%);height:12px}
.loading-dock p{font-size:13px}
.loading-status,.loading-dock p{color:#263755;text-shadow:0 1px 4px #ffffffa6}
#error-message{width:auto;padding:0;background:transparent;border:0;margin-top:3px}
@media(max-width:600px){.page-intro h1{font-size:24px}.page-intro{margin-top:8px;margin-bottom:20px}.section-heading{padding:5px 12px}.surah-progress-heading{color:#273556}}
@media(max-width:600px){.loading-status{width:min(310px,100%);font-size:12px}.unity-progress{width:min(310px,100%);height:11px}.loading-dock p{font-size:12px}#surahs-title{font-size:20px}}
@media(max-height:520px) and (orientation:landscape){.loading-status{font-size:11px}.unity-progress{height:10px}.loading-dock p{font-size:11px}}

/* Normal/ready uses green progress. Error colors affect only the loading panel,
   including an empty track, so zero percent still communicates failure. */
.loading-status{color:#31445d;text-shadow:none}
.loading-status #load-percent{color:#18734e}
.loading-dock p{color:#425674;text-shadow:none}
.unity-progress{background:#d4e5df;border-color:#f6fffb;box-shadow:0 0 0 1px #8aafa180}
#unity-progress-fill{background:linear-gradient(270deg,#249860,#73bb4d)}
.loading-dot{background:#279466}
body.load-error .loading-dock{background:rgba(255,228,230,.84);border-color:#fb7185a6;box-shadow:0 8px 28px #6d102329}
body.load-error .loading-status,body.load-error .loading-status #load-percent{color:#9f1239;text-shadow:none}
body.load-error .loading-dock p{color:#b42344;text-shadow:none}
body.load-error .loading-dot{background:#e11d48;box-shadow:0 0 0 3px #fb718533;animation:none}
body.load-error .unity-progress{background:#fecdd3;border-color:#fb7185;box-shadow:0 0 0 1px #be123c33}
body.load-error #unity-progress-fill{background:linear-gradient(270deg,#e11d48,#b91c1c)}
body.load-error #retry-loading{color:#9f1239;background:#ffe4e6;border:1px solid #fda4af;border-radius:10px;padding:6px 12px}
.surah-card:is(:disabled,.unavailable){opacity:.38;background:#ffffffb3;border-color:#ffffff66;box-shadow:none;filter:saturate(.3)}
.game-card.coming-soon:disabled{opacity:.42;filter:saturate(.3);box-shadow:0 3px 0 #6656aa1a}

/* Capsule menu buttons: white face, colored ring only for the available surah. */
.surah-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px}
.surah-card,.surah-card.active,.surah-card:is(:disabled,.unavailable){width:100%;min-width:0;min-height:70px;display:flex;align-items:center;justify-content:flex-start;gap:0;padding:10px 30px;border:4px solid transparent;border-radius:999px;text-align:right;line-height:1.6;filter:none}
.surah-card.active{color:#6352e6;opacity:1;background:linear-gradient(#fff,#fff) padding-box,linear-gradient(120deg,#88FFE3 0%,#4299FF 50%,#E4AEFF 100%) border-box;box-shadow:0 6px 15px #2b0e7938,inset 0 1px 3px #302a7912;transition:transform .15s,box-shadow .15s}
.surah-card.active:hover{transform:translateY(-2px);box-shadow:0 8px 18px #2b0e7945,inset 0 1px 3px #302a7912}
.surah-card.active:active{transform:translateY(1px);box-shadow:0 3px 9px #2b0e7930}
.surah-card .surah-name{font-size:22px;font-weight:700;line-height:1.6}
.surah-card:is(:disabled,.unavailable){opacity:.64;background:linear-gradient(#ededf2,#ededf2) padding-box,linear-gradient(120deg,#d5d8e0 0%,#b4b9c5 36%,#858d9e 70%,#c6cbd6 100%) border-box;box-shadow:0 3px 8px #29263818}
.surah-card:is(:disabled,.unavailable) .surah-name{color:#646d80}
@media(max-width:600px){.surah-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}.surah-card,.surah-card.active,.surah-card:is(:disabled,.unavailable){min-height:58px;padding:8px 9px;border-width:3px}.surah-card .surah-name{font-size:16px}}
@media(max-width:360px){.surah-grid{gap:11px 8px}.surah-card,.surah-card.active,.surah-card:is(:disabled,.unavailable){min-height:54px;padding:8px 6px}.surah-card .surah-name{font-size:15px}}
@media(max-height:520px) and (orientation:landscape){.surah-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px 15px}.surah-card,.surah-card.active,.surah-card:is(:disabled,.unavailable){min-height:60px;padding:8px 16px}.surah-card .surah-name{font-size:18px}}

/* White title faces with the requested gold/orange gradient ring. */
:root{--title-border:linear-gradient(120deg,#ECA718 0%,#D76D01 100%);--button-border:linear-gradient(120deg,#88FFE3 0%,#4299FF 50%,#E4AEFF 100%)}
.section-heading,.page-intro{padding:0;border:0;background:none;border-radius:0}
.play-heading{background:none}
h1,h2{border:3px solid transparent;border-radius:16px;background:linear-gradient(#fff,#fff) padding-box,var(--title-border) border-box;padding:8px 16px}
.game-card h2{padding:5px 10px;border-radius:13px}
.overlay-content h2{padding:6px 12px;border-radius:14px}
.primary-button{border:3px solid transparent;background:linear-gradient(#18865c,#18865c) padding-box,linear-gradient(120deg,#9bf6ac 0%,#4fd77b 50%,#198b4c 100%) border-box}
.primary-button:hover{background:linear-gradient(#0d7950,#0d7950) padding-box,linear-gradient(120deg,#9bf6ac 0%,#4fd77b 50%,#198b4c 100%) border-box}
.game-card.playable{border:3px solid transparent;background:linear-gradient(#fffefa,#fffefa) padding-box,var(--button-border) border-box}
.game-card.coming-soon:disabled{border:3px solid #b7bdc9}
.icon-button:not(:disabled),.text-button:not(:disabled),#games-screen>.text-button{border:2px solid transparent;background:linear-gradient(#fff,#fff) padding-box,var(--button-border) border-box;border-radius:11px;padding:6px 10px}
/* Preserve the red error theme on Retry. */
body.load-error #retry-loading{background:#ffe4e6;border:1px solid #fda4af}
@media(max-width:600px){h1,h2{padding:6px 12px}.section-heading{padding:0}#surahs-title{font-size:19px}.game-card h2{font-size:18px}}

/* Keep the loading area transparent in every state, retaining its blur. */
body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{background:transparent;border:0;box-shadow:none}
.image-back-button{display:grid;place-items:center;width:76px;height:76px;padding:0;border:0;background:transparent;box-shadow:none;border-radius:50%;line-height:0;transition:transform .15s}
.image-back-button img{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none}
.image-back-button:hover{transform:translateY(-2px)}
.image-back-button:active{transform:scale(.94)}
@media(max-width:600px){.image-back-button{width:64px;height:64px}}
@media(max-height:520px) and (orientation:landscape){.image-back-button{width:56px;height:56px}}

.surah-notice{width:min(440px,calc(100vw - 32px));max-height:calc(100dvh - 48px);margin:auto;padding:22px 20px;border:3px solid transparent;border-radius:24px;background:linear-gradient(#fff,#fff) padding-box,var(--button-border) border-box;color:var(--ink);text-align:center;box-shadow:0 18px 60px #20065a4d;overflow-y:auto;overscroll-behavior:contain}
.surah-notice::backdrop{background:#20113d66;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.surah-notice h2{font-size:21px;margin:0 0 17px;padding:7px 12px}
.surah-notice p{font-size:16px;line-height:2.1;margin:0 0 21px;overflow-wrap:break-word}
.surah-notice .primary-button{min-width:145px;min-height:46px}
@media(max-width:360px){.surah-notice{padding:18px 15px}.surah-notice h2{font-size:19px}.surah-notice p{font-size:15px}}

/* Use the supplied bird artwork as the complete card face, without repainting
   its background or placing it inside another dark illustration. */
.minigame-grid{display:grid;grid-template-columns:minmax(0,1fr);justify-items:center;max-width:600px;margin:18px auto 24px;padding:0 8px}
.minigame-tile{position:relative;display:block;width:min(100%,300px);aspect-ratio:405/393;padding:0;border:6px solid transparent;border-radius:38px;background:linear-gradient(135deg,#67FF91 0%,#00E5FF 100%) border-box;box-shadow:0 8px 18px #21124c33;overflow:visible;touch-action:manipulation;transition:transform .15s,box-shadow .15s}
.minigame-cover{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;border-radius:31px;pointer-events:none;user-select:none;-webkit-user-drag:none}
.minigame-tile:hover{transform:translateY(-3px);box-shadow:0 11px 22px #21124c40}
.minigame-tile:active{transform:scale(.97)}
@media(max-width:600px){.minigame-tile{width:min(100%,260px);border-width:5px;border-radius:33px}.minigame-cover{border-radius:27px}}
@media(max-height:520px) and (orientation:landscape){.minigame-tile{width:min(100%,190px);border-width:4px;border-radius:27px}.minigame-cover{border-radius:22px}.minigame-grid{margin-top:12px;margin-bottom:20px}}

#surahs-screen .section-heading{margin-right:auto;margin-left:auto;justify-content:center;text-align:center}
#surahs-title{text-align:center}
.overlay-content>.primary-button{display:flex;width:min(240px,100%);min-height:44px;margin-left:auto;margin-right:auto}
#overlay-back{margin-top:12px;background:linear-gradient(180deg,#409af4,#206acb) padding-box,linear-gradient(120deg,#b3e8ff,#63a3ff,#4c7fe8) border-box;color:#fff;box-shadow:0 5px 0 #17499a;text-decoration:none}
#overlay-back:hover{background:linear-gradient(180deg,#2c87e7,#185ab5) padding-box,linear-gradient(120deg,#b3e8ff,#63a3ff,#4c7fe8) border-box;box-shadow:0 7px 0 #17499a}
#overlay-back:active{box-shadow:0 2px 0 #17499a}
.game-overlay #overlay-title{border:0;background:none;box-shadow:none}
.overlay-symbol.won svg{fill:none;stroke:#248a62;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.play-heading .game-image-button{width:56px;height:56px;min-width:56px;min-height:56px;flex:none}
.image-back-button:disabled{opacity:.45;cursor:default}
.image-back-button:disabled:hover{transform:none}
@media(max-width:600px){.play-heading .game-image-button{width:52px;height:52px;min-width:52px;min-height:52px}}
@media(max-height:520px) and (orientation:landscape){.play-heading .game-image-button{width:44px;height:44px;min-width:44px;min-height:44px}}

/* Touch guidance is the default, including desktop and landscape previews. */
.touch-instruction{display:block;flex:none;text-align:center;font-size:11px;line-height:1.8;margin:8px auto 0}
@media(max-height:520px) and (orientation:landscape){#play-screen{grid-template-rows:minmax(0,1fr) auto}.touch-instruction{display:block;grid-column:2;grid-row:2;margin-top:0;font-size:10px}}

.minigame-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;max-width:680px}
.lives-hud{position:absolute;top:10px;right:12px;display:flex;align-items:center;gap:4px;direction:ltr;z-index:2;pointer-events:none;user-select:none}
.lives-hud img{display:block;width:36px;height:31px;object-fit:contain;filter:drop-shadow(0 2px 2px #4e25382b)}
.lives-hud img.empty{opacity:.9}
.game-overlay{z-index:3}
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@media(max-width:600px){.minigame-grid{gap:16px;padding:0 2px}.lives-hud{top:8px;right:9px;gap:3px}.lives-hud img{width:30px;height:26px}}
@media(max-height:520px) and (orientation:landscape){.minigame-grid{max-width:460px;gap:18px}}

/* Four smaller icons stay in a single row, including narrow phones. */
.minigame-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-width:840px;gap:16px}
.minigame-tile{width:min(100%,180px);border-width:4px;border-radius:25px}
.minigame-cover{border-radius:20px}
.overlay-actions{display:flex;flex-direction:column;gap:12px;width:min(240px,100%);margin:14px auto 0}
#game-overlay .overlay-actions>.primary-button{display:flex;justify-content:center;align-items:center;width:100%;min-width:0;min-height:44px;margin:0}
@media(max-width:600px){.minigame-grid{gap:8px;padding:0;max-width:none;margin:12px auto 20px}.minigame-tile{width:100%;border-width:3px;border-radius:16px}.minigame-cover{border-radius:12px}}

/* Mobile includes portrait phones and short landscape viewports. */
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
  #games-screen{position:relative;padding-top:66px}
  #games-screen .page-intro{display:none}
  #games-screen #back-to-surahs{position:absolute;top:5px;right:max(10px,env(safe-area-inset-right));width:48px;height:48px}
  #play-screen{display:flex;flex-direction:column;gap:0;height:100%;min-height:0;padding:4px 10px 6px}
  body.playing #main-content{overflow-y:hidden}
  .play-heading{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between;align-items:center;direction:rtl;flex:none;width:100%;min-height:48px;gap:8px;padding:0}
  .play-heading #back-to-games{order:0;margin:0}
  .play-heading #pause-button{order:1;margin:0}
  .play-heading .game-image-button{width:48px;height:48px;min-width:48px;min-height:48px}
  .surah-progress-panel{position:static;flex:none;align-self:center;width:100%;max-width:620px;margin:4px auto;padding:0}
  .surah-progress-heading span:first-child{display:none}
  .surah-progress-heading{justify-content:flex-end}
  body .game-stage,body.build-ready .game-stage{flex:1;height:auto;min-height:0;margin-top:0}
  .game-overlay{padding:8px}
  .overlay-content{width:min(360px,100%);max-width:100%;padding:12px}
  .overlay-symbol{display:none}
  .overlay-kicker{font-size:10px;line-height:1.5}
  .overlay-content h2{font-size:20px;line-height:1.5;margin:2px 0 6px;padding:0}
  .overlay-content p{font-size:11px;line-height:1.7}
  .overlay-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin-top:10px}
  #game-overlay .overlay-actions>.primary-button{min-height:46px;padding:6px;font-size:12px;line-height:1.6;gap:5px;white-space:normal}
  .overlay-actions #start-game svg{width:15px;height:15px}
  .touch-instruction{flex:none;font-size:10px;margin-top:6px}
}
@media(max-width:360px){#game-overlay .overlay-actions>.primary-button{font-size:11px}.overlay-actions #start-game svg{display:none}}
@media(max-height:600px) and (orientation:portrait){
  .overlay-content{padding:8px 10px}
  .overlay-kicker{display:none}
  .overlay-content h2{font-size:17px;line-height:1.4;margin:0 0 4px}
  .overlay-content p{font-size:10.5px;line-height:1.5}
  .overlay-actions{margin-top:6px}
}
@media(max-height:520px) and (orientation:landscape){
  .minigame-grid{max-width:740px;gap:12px}
  .play-heading{min-height:44px}
  .play-heading .game-image-button{width:44px;height:44px;min-width:44px;min-height:44px}
  .surah-progress-panel{margin:3px auto}
  .surah-progress-heading{display:none}
  .current-verse{font-size:16px;line-height:1.6;min-height:26px;margin-top:7px}
  .game-overlay{padding:4px}
  .overlay-content{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:center;gap:4px 12px;width:min(650px,100%);padding:8px 10px}
  .overlay-kicker{display:none}
  .overlay-content h2{grid-column:1;grid-row:1;font-size:17px;line-height:1.4;margin:0;padding:0}
  .overlay-content p{grid-column:1;grid-row:2;font-size:10px;line-height:1.6}
  .overlay-actions{grid-column:2;grid-row:1 / span 2;margin:0;gap:7px}
  #game-overlay .overlay-actions>.primary-button{font-size:11px;min-height:44px}
  .overlay-actions #start-game svg{display:none}
  .touch-instruction{font-size:9px;line-height:1.5;margin-top:4px}
}

/* Tizbin uses the provided board artwork and original sprite sheet. */
.game-stage.tizbin-stage{background:#238de6 url(tizbin-background.webp) center/cover no-repeat;border:0;box-shadow:none;border-radius:18px}
.tizbin-board{position:absolute;inset:0;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:12px;padding:8px;direction:ltr;--plate-size:180px}
.tizbin-board.stacked-plates{flex-direction:column}
.tizbin-plate{position:relative;flex:none;width:var(--plate-size);height:var(--plate-size);background:url(tizbin-plate.webp) center/100% 100% no-repeat}
.tizbin-food{position:absolute;display:grid;place-items:center;transform:translate(-50%,-50%);width:27%;height:27%;padding:3%;margin:0;border:0;border-radius:50%;background:transparent;box-shadow:none;isolation:isolate;touch-action:manipulation}
.tizbin-food::before{content:'';position:absolute;inset:3%;border-radius:50%;z-index:0;background:transparent}
.tizbin-food-picture{position:relative;z-index:1;display:block;width:100%;height:100%;overflow:hidden;pointer-events:none;transform:rotate(var(--food-angle,0deg));fill:none;stroke:none;filter:drop-shadow(0 1px 1px #3331)}
.tizbin-food.correct-food::before{background:#59e66ebd;box-shadow:inset 0 0 0 3px #149e38}
.tizbin-food.wrong-food::before{background:#ff4d5fbf;box-shadow:inset 0 0 0 3px #cc1c35}
.tizbin-food:disabled{opacity:1;cursor:default}
.tizbin-food:focus-visible{outline:3px solid #087ab2;outline-offset:0}
.tizbin-feedback{position:absolute;bottom:2px;left:50%;transform:translateX(-50%);width:max-content;max-width:95%;padding:3px 9px;border-radius:10px;font-size:12px;line-height:1.7;text-align:center;direction:rtl;pointer-events:none;z-index:2}
.tizbin-feedback:empty{display:none}
.tizbin-feedback.answer-correct{background:#e8ffefed;color:#13702a}
.tizbin-feedback.answer-wrong{background:#fff0f2ed;color:#a91f39}
.overlay-symbol img{display:block;width:100%;height:100%;object-fit:contain;border-radius:12px}
@media(max-width:600px){.tizbin-feedback{font-size:10px}}

/* Small, local feedback bursts for picking food, without screen flashes. */
.tizbin-food{transition:transform .12s cubic-bezier(.2,.8,.2,1)}
.tizbin-food:not(:disabled):active{transform:translate(-50%,-50%) scale(.88)}
.tizbin-food.correct-food .tizbin-food-picture{animation:tizbin-food-hop .52s cubic-bezier(.2,.8,.3,1) both}
.tizbin-food.wrong-food .tizbin-food-picture{animation:tizbin-food-wobble .4s ease both}
.tizbin-food.correct-food::before,.tizbin-food.wrong-food::before{animation:tizbin-ring-pop .38s cubic-bezier(.2,1.3,.4,1) both}
.tizbin-food.correct-food::after{content:'';position:absolute;left:50%;top:50%;width:7%;height:7%;border-radius:50%;background:#ffdf72;box-shadow:-16px -13px 0 #63ffe4,18px -17px 0 #ffdf72,-12px 15px 0 #7fc4ff,16px 13px 0 #8eefa5;pointer-events:none;z-index:2;animation:tizbin-bubbles .65s ease-out both}
.tizbin-board.answer-miss{animation:tizbin-board-nudge .24s ease}
.tizbin-feedback.answer-correct,.tizbin-feedback.answer-wrong{animation:tizbin-feedback-pop .22s ease-out both}
.lives-hud img.heart-spent{animation:tizbin-heart-spent .4s ease both}
.game-stage.paused .tizbin-board,.game-stage.paused .tizbin-board *,.game-stage.paused .tizbin-board *::before,.game-stage.paused .tizbin-board *::after{animation-play-state:paused}
@keyframes tizbin-food-hop{0%{transform:rotate(var(--food-angle)) scale(.88)}40%{transform:translateY(-13%) rotate(var(--food-angle)) scale(1.19)}70%{transform:translateY(2%) rotate(var(--food-angle)) scale(.97)}100%{transform:rotate(var(--food-angle)) scale(1)}}
@keyframes tizbin-food-wobble{0%,100%{transform:rotate(var(--food-angle))}25%{transform:translateX(-8%) rotate(calc(var(--food-angle) - 9deg))}55%{transform:translateX(7%) rotate(calc(var(--food-angle) + 8deg))}80%{transform:translateX(-3%) rotate(var(--food-angle))}}
@keyframes tizbin-ring-pop{from{transform:scale(.6);opacity:.2}to{transform:scale(1);opacity:1}}
@keyframes tizbin-bubbles{0%{transform:translate(-50%,-50%) scale(.4);opacity:0}25%{opacity:1}100%{transform:translate(-50%,-70%) scale(1.8);opacity:0}}
@keyframes tizbin-board-nudge{0%,100%{transform:translateX(0)}30%{transform:translateX(-3px)}65%{transform:translateX(3px)}}
@keyframes tizbin-feedback-pop{from{transform:translate(-50%,5px) scale(.93);opacity:.2}to{transform:translate(-50%,0) scale(1);opacity:1}}
@keyframes tizbin-heart-spent{0%{transform:scale(1.2)}45%{transform:scale(.8) rotate(-8deg)}100%{transform:scale(1) rotate(0)}}

/* Memory cards keep their DOM order for the complete round. */
.game-stage.memory-stage{background:#d9b469 url(memory-background.webp) center/cover no-repeat;border:0;box-shadow:none;border-radius:18px}
.memory-board{position:absolute;inset:0;display:grid;place-items:center;padding:8px;direction:ltr;perspective:1000px}
.memory-grid{display:grid;grid-template-columns:repeat(var(--memory-columns,4),var(--memory-card-width,60px));grid-auto-rows:var(--memory-card-height,68px);gap:var(--memory-gap,8px);direction:ltr;perspective:1000px}
.memory-card{position:relative;display:block;width:100%;height:100%;min-width:0;padding:0;margin:0;border:0;border-radius:15%;background:transparent;box-shadow:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;appearance:none;-webkit-appearance:none;perspective:700px}
.memory-turn{position:absolute;inset:0;display:block;transform:rotateY(0deg);transform-style:preserve-3d;-webkit-transform-style:preserve-3d;transition:transform .42s cubic-bezier(.2,.7,.25,1);pointer-events:none}
.memory-card.is-revealed .memory-turn{transform:rotateY(-180deg)}
.memory-face{position:absolute;inset:0;display:block;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.memory-front{transform:rotateY(180deg)}
.memory-face>img{display:block;width:100%;height:100%;object-fit:fill;user-select:none;-webkit-user-drag:none}
.memory-food{position:absolute;left:18%;top:13%;display:block;width:64%;height:62%;overflow:hidden;fill:none;stroke:none;pointer-events:none}
.memory-card:disabled{opacity:1;cursor:default}
.memory-card.is-matched::after{content:'';position:absolute;inset:3% 3% 12%;border:2px solid #45d78699;border-radius:16%;pointer-events:none;animation:memory-pair-pop .3s ease-out both}
.memory-card:focus-visible{outline:3px solid #075c9c;outline-offset:1px}
@keyframes memory-pair-pop{0%{transform:scale(.93);box-shadow:0 0 0 0 #67ff9180}65%{transform:scale(1.04);box-shadow:0 0 0 6px #67ff9120}100%{transform:scale(1);box-shadow:0 0 0 0 transparent}}

.game-stage.platformer-stage{background:#80dce8 url(platform-background.jpg) center/cover no-repeat;border:0;box-shadow:none;border-radius:18px}
.platform-canvas{position:absolute;inset:0;width:100%;height:100%;touch-action:none}
.platform-stars-hud{position:absolute;top:8px;left:10px;width:132px;height:46px;background:url(platform-counter.webp) center/contain no-repeat;z-index:2;pointer-events:none;direction:ltr}
#platform-star-count{position:absolute;left:34%;right:5%;top:50%;transform:translateY(-50%);display:block;text-align:center;font-size:22px;font-weight:700;line-height:1.6;color:#805b02}

@keyframes platform-star-pop{0%{transform:translateY(-50%) scale(1.2)}100%{transform:translateY(-50%) scale(1)}}
@media(max-width:600px){.platform-stars-hud{width:132px;height:46px;top:7px;left:8px}#platform-star-count{font-size:20px}}

/* Play controls have no title; victory waits for the full recitation queue. */
.play-heading{direction:rtl;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}
.recitation-wait{position:absolute;bottom:10px;left:50%;transform:translateX(-50%);z-index:3;max-width:calc(100% - 24px);width:max-content;padding:5px 12px;border:0;border-radius:20px;background:#ffffffdf;backdrop-filter:blur(8px);color:#34577c;font-size:12px;line-height:1.8;text-align:center;pointer-events:none}
.game-overlay[data-state="ready"] .overlay-symbol{display:block;width:64px;height:64px;margin-bottom:6px}
@media(max-width:600px){.recitation-wait{font-size:10px}.game-overlay[data-state="ready"] .overlay-symbol{width:52px;height:52px}}
@media(max-height:600px) and (orientation:portrait),(max-height:650px) and (orientation:landscape){.game-overlay[data-state="ready"] .overlay-symbol{display:none}}

/* Keep the percentage beside the meter and put guidance inside the game. */
.loading-meter{display:flex;align-items:center;gap:8px;direction:rtl;width:min(310px,100%)}
.loading-meter .unity-progress{flex:1;min-width:0;width:auto}
.loading-meter #load-percent{flex:none;min-width:34px;text-align:center;direction:ltr;font-size:12px;font-weight:700;color:#18734e;line-height:1.6}
body.load-error .loading-meter #load-percent{color:#9f1239}
.loading-status-mobile,.overlay-description-mobile{display:none}
.touch-instruction{display:block;position:absolute;bottom:10px;right:10px;left:auto;max-width:calc(100% - 20px);padding:4px 8px;margin:0;border-radius:10px;background:#ffffffd9;color:#34577c;font-size:11px;line-height:1.6;text-align:right;z-index:2;pointer-events:none}
.game-stage:not(.guide-live) .touch-instruction{opacity:0;visibility:hidden}
@keyframes mobile-guide-fade{from{opacity:1;visibility:visible}to{opacity:0;visibility:hidden}}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
  #loading-experience{display:flex;flex-direction:column}
  body #main-content,body.build-ready #main-content,body.load-error #main-content{flex:1;height:auto;min-height:0;padding-bottom:0;scroll-padding-bottom:6px;mask-image:none;-webkit-mask-image:none}
  #play-screen{height:100%;min-height:0;gap:0;padding:2px 8px 2px}
  body .game-stage,body.build-ready .game-stage{flex:1;min-height:0;max-height:none;height:auto;margin:0}
  body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{display:flex;grid-area:auto;flex:none;align-self:center;justify-self:auto;width:min(600px,calc(100% - 16px));margin:4px auto 0;padding:4px max(4px,env(safe-area-inset-right)) calc(4px + env(safe-area-inset-bottom)) max(4px,env(safe-area-inset-left));gap:2px}
  .loading-dock .loading-status{display:none}
  .loading-meter{width:min(380px,100%);gap:7px}
  .loading-meter .unity-progress{height:10px}
  .loading-meter #load-percent{font-size:11px;min-width:32px}
  .loading-dock .loading-caption-row{width:100%;font-size:10px;line-height:1.5;margin:0;text-align:center;overflow-wrap:anywhere}
  .loading-status-mobile{display:inline}
  #error-message{margin:0;padding:0;width:100%;text-align:center}
  #error-message .text-button{margin:0;min-height:36px;padding:4px 10px}
  .loading-dock .launch-button{min-height:40px;padding:5px 12px;font-size:12px;margin:2px 0 0}
  .touch-instruction{right:8px;bottom:8px;max-width:calc(100% - 16px);font-size:10px;margin:0}
  .game-stage.guide-live .touch-instruction{animation:mobile-guide-fade .35s ease 4s both}
  .game-stage.paused .touch-instruction{animation-play-state:paused!important}
  .game-overlay{padding:8px;overflow:hidden}
  .game-overlay .overlay-content{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto auto;gap:8px;align-items:center;justify-items:stretch;width:min(340px,calc(100% - 16px));max-width:340px;padding:12px;min-height:0;height:auto}
  .game-overlay .overlay-symbol,.game-overlay[data-state="ready"] .overlay-symbol,.game-overlay .overlay-kicker{display:none}
  .game-overlay .overlay-content h2{grid-column:1;grid-row:1;font-size:18px;line-height:1.5;margin:0;padding:0;white-space:nowrap;letter-spacing:0}
  .game-overlay .overlay-content p{grid-column:1;grid-row:2;font-size:11px;line-height:1.6;margin:0;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .overlay-description-full{display:none}
  .overlay-description-mobile{display:inline}
  .game-overlay .overlay-actions{grid-column:1;grid-row:3;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin:2px 0 0}
  #game-overlay .overlay-actions>.primary-button{min-width:0;min-height:44px;font-size:11px;line-height:1.5;padding:6px;white-space:nowrap}
  .overlay-actions #start-game svg,.overlay-actions #start-label{display:none}
  .overlay-actions #start-game::after{content:attr(data-mobile-label)}
}
@media(max-width:360px){.game-overlay .overlay-content h2{font-size:16px}.game-overlay .overlay-content p{font-size:10px}}
@media(max-height:400px) and (orientation:landscape){.play-heading{min-height:40px}.play-heading .game-image-button{width:40px;height:40px;min-width:40px;min-height:40px}.surah-progress-panel{margin:2px auto}.game-overlay .overlay-content{gap:4px;padding:8px 10px}.game-overlay .overlay-content h2{font-size:16px}.game-overlay .overlay-content p{font-size:10px}.game-overlay .overlay-actions{margin-top:0}}
@media(prefers-reduced-motion:reduce) and (max-width:760px),(prefers-reduced-motion:reduce) and (max-height:520px) and (orientation:landscape){.game-stage.guide-live .touch-instruction{animation:mobile-guide-fade .001s steps(1,end) 4s both!important}}

/* Ayah lettering has a yellow fill and a magenta outline on every screen. */
.current-verse{color:#ffeb3b;-webkit-text-stroke:1.6px #941858;paint-order:stroke fill;text-shadow:none}
@supports not (-webkit-text-stroke:1.6px #941858){.current-verse{text-shadow:-1.6px 0 #941858,1.6px 0 #941858,0 -1.6px #941858,0 1.6px #941858,-1.1px -1.1px #941858,1.1px -1.1px #941858,-1.1px 1.1px #941858,1.1px 1.1px #941858}}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){.surah-progress-panel .surah-progress{width:84%;margin-left:auto;margin-right:auto}}

/* Small control offsets and a restart action that is distinct from Resume. */
.play-heading .game-image-button{position:relative;top:8px}
.surah-progress-panel{position:relative;top:-6px}
#restart-game{background:linear-gradient(180deg,#9a71ee,#6c45c5) padding-box,linear-gradient(120deg,#eadcff,#c2a8ff,#9568e8) border-box;box-shadow:0 5px 0 #55319d;color:#fff}
#restart-game:hover{background:linear-gradient(180deg,#8b60df,#5d36b5) padding-box,linear-gradient(120deg,#eadcff,#c2a8ff,#9568e8) border-box}
#restart-game:active{box-shadow:0 2px 0 #55319d}
body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{width:fit-content;max-width:calc(100% - 16px);padding-left:10px;padding-right:10px}
.loading-dock .loading-meter{width:310px;max-width:100%}
.loading-dock .loading-caption-row{width:fit-content;max-width:340px}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
  .surah-progress-panel{position:relative}
  #game-overlay .overlay-actions>.primary-button{min-height:38px;padding:4px 6px}
  .game-overlay .overlay-actions.has-restart{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  #game-overlay .overlay-actions.has-restart>.primary-button{font-size:11px;padding:4px}
  .overlay-actions.has-restart #start-game::after{content:'ادامه'}
  .overlay-actions.has-restart .overlay-back-label{display:none}
  .overlay-actions.has-restart #overlay-back::after{content:'بازی‌ها'}
  body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{width:fit-content;padding-left:10px;padding-right:10px}
  .loading-dock .loading-meter{width:min(380px,calc(100vw - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-width:100%}
  .loading-dock .loading-caption-row{width:fit-content;max-width:min(380px,calc(100vw - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)))}
}

#orientation-notice {
  background: linear-gradient(#fff, #fff) padding-box, var(--title-border) border-box;
}

#orientation-notice .orientation-icon {
  display: block;
  width: min(100%, 192px);
  height: auto;
  margin: 0 auto 12px;
  color: var(--green);
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#orientation-notice .orientation-icon rect {
  fill: #e7f7ef;
}

#orientation-notice .orientation-phone-portrait {
  opacity: .46;
  filter: blur(1px);
}

#orientation-notice .orientation-arrow {
  stroke: #b9700b;
}

#orientation-notice h2 {
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  background: none;
}

#orientation-notice .primary-button {
  margin-bottom: 6px;
}

/* Acknowledging the orientation tip never freezes the viewport dimensions. */
html,body{width:100%;min-width:0}
#loading-experience{inset:0 auto auto 0;width:var(--app-vw,100vw);height:var(--app-vh,100dvh);min-width:0;max-width:none}
#unity-container{inset:0 auto auto 0;width:var(--app-vw,100vw);height:var(--app-vh,100dvh)}
:root:fullscreen{width:var(--app-vw,100vw)!important;height:var(--app-vh,100dvh)!important}
:root:-webkit-full-screen{width:var(--app-vw,100vw)!important;height:var(--app-vh,100dvh)!important}
.loading-dock .loading-caption-row{font-size:18px;font-weight:800;line-height:1.7;padding:3px 10px;border-radius:10px;background:rgba(255,255,255,.96);color:#182c50;text-shadow:none}
.loading-dock .launch-button{width:min(380px,calc(100vw - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)));max-width:100%;min-height:52px;font-size:18px;margin:2px 0;padding:8px 18px}
body.build-ready .loading-dock .loading-caption-row{color:#145534;background:#f2fff8}
body.load-error .loading-dock .loading-caption-row{color:#991b36;background:#fff1f4}
.loading-meter #load-percent{font-size:17px;min-width:44px;padding:0 4px;border-radius:6px;color:#182c50;background:rgba(255,255,255,.96)}
#main-ready-notice{width:min(560px,calc(100vw - 32px));max-height:calc(var(--app-vh,100dvh) - 32px);padding:clamp(20px,4vw,36px);text-align:center;overflow:auto;background:linear-gradient(#fff,#fff) padding-box,var(--title-border) border-box}
#main-ready-notice h2{padding:0;margin:0 0 12px;border:0;background:none;font-size:28px;line-height:1.6}
#main-ready-notice p{font-size:16px;line-height:1.9;margin:0 0 20px}
#main-ready-notice .primary-button{display:flex;width:100%;min-height:52px;font-size:17px;margin:0}
#main-ready-notice .secondary-red{margin-top:12px;background:linear-gradient(#e4475a,#c92b46) padding-box,linear-gradient(120deg,#ffb1b8,#f77486,#b92240) border-box;box-shadow:0 5px 0 #9c1933}
#main-ready-notice .secondary-red:hover{background:linear-gradient(#d93650,#b91f3d) padding-box,linear-gradient(120deg,#ffb1b8,#f77486,#b92240) border-box;box-shadow:0 7px 0 #9c1933}
#main-ready-notice .secondary-red:active{box-shadow:0 2px 0 #9c1933}
.loading-dock .loading-status{display:none}
.loading-dock .loading-status-mobile{display:inline}
.loading-dock .loading-caption-row{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;overflow-wrap:normal}
.loading-dock .launch-button:disabled{opacity:.7;cursor:wait;transform:none}
button,button:hover,button:focus,button:active,button *,button *:hover,.text-button{text-decoration:none!important}
#main-ready-notice::backdrop{background:rgba(24,12,58,.65);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){.loading-dock .loading-caption-row{font-size:18px;line-height:1.7}#main-ready-notice h2{font-size:24px}}

/* Readable instructions and feedback, with a temporary corner hint everywhere. */
.game-overlay .overlay-content p{font-size:17px;line-height:1.7;color:#23395b}
.game-overlay .overlay-kicker{font-size:15px;color:#344665}
.touch-instruction{font-size:15px;line-height:1.7;padding:5px 10px;background:#fffffff5;color:#23395b}
.game-stage.guide-live .touch-instruction{animation:mobile-guide-fade .35s ease 4s both}
.tizbin-feedback{font-size:19px;font-weight:700;line-height:1.7;padding:6px 12px;bottom:8px}
.tizbin-feedback.answer-correct{background:#f0fff4;color:#145534}
.tizbin-feedback.answer-wrong{background:#fff1f4;color:#991b36}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
  .game-overlay .overlay-content p{font-size:15px;line-height:1.7}
  .touch-instruction{font-size:14px;max-width:calc(100% - 16px)}
  .tizbin-feedback{font-size:17px}
}
@media(prefers-reduced-motion:reduce){.game-stage.guide-live .touch-instruction{animation:mobile-guide-fade .001s steps(1,end) 4s both!important}}
.game-overlay:is([data-state="lost"],[data-state="paused"]) .overlay-content{grid-template-rows:auto auto}
.game-overlay:is([data-state="lost"],[data-state="paused"]) .overlay-actions{grid-row:2}
.friendly-note{font-size:clamp(20px,3vw,28px);font-weight:700;line-height:1.8;color:#243556;background:rgba(255,255,255,.96);padding:10px 18px;max-width:calc(100% - 24px);margin:24px auto 12px}

/* Keep the surah name legible above every minigame's ayah bar, on phones too. */
#games-title{font-size:clamp(32px,4vw,44px);border:0;background:none;box-shadow:none;padding:0;position:relative;top:-4px;color:#fff;text-shadow:0 1px 3px #24135a,0 0 1px #24135a}
.surah-progress-panel .surah-progress-heading{display:flex;align-items:center;justify-content:center;line-height:1.5;margin-bottom:4px}
#surah-progress-label{display:block;font-size:clamp(20px,2.4vw,26px);font-weight:800;line-height:1.4;color:#fff;border:0;background:none;box-shadow:none;padding:0;position:relative;top:-4px;text-shadow:0 1px 3px #24135a,0 0 1px #24135a}


/* Share the available viewport between the ayah panel, game and compact dock. */
#loading-experience{display:flex;flex-direction:column}
body #main-content,body.build-ready #main-content,body.load-error #main-content{
  flex:1;height:auto;min-height:0;padding-bottom:0;scroll-padding-bottom:12px;
  mask-image:none;-webkit-mask-image:none;
}
body.playing #main-content{overflow:hidden}
#play-screen{
  display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr);
  gap:10px;height:100%;min-height:0;padding:8px 12px 10px;
}
.play-heading{
  grid-area:1/1;align-self:start;position:relative;z-index:1;
  min-height:0;padding:0;pointer-events:none;
}
.play-heading .game-image-button{top:0;pointer-events:auto}
.surah-progress-panel{
  grid-area:1/1;align-self:start;position:relative;top:0;
  width:100%;max-width:620px;margin:0 auto;padding:0;
}
.surah-progress-panel .surah-progress-heading{margin:0 56px 8px}
.surah-progress-panel #surah-progress-label{display:block;top:0}
.surah-progress-panel .surah-progress{width:calc(100% - 112px);margin:0 auto}
.current-verse{margin-top:14px}
body .game-stage,body.build-ready .game-stage{
  grid-area:2/1;width:100%;height:auto;min-height:0;max-height:none;margin:0;
}
body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{
  display:grid;grid-area:auto;flex:none;align-self:center;justify-self:auto;
  grid-template-columns:auto minmax(0,310px);align-items:center;justify-content:center;
  gap:6px 12px;width:min(760px,calc(100% - 24px));max-width:calc(100% - 24px);
  margin:0 auto;padding:4px max(6px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px,env(safe-area-inset-left));
}
.loading-dock .loading-caption-row{
  grid-area:1/1;width:auto;max-width:100%;min-width:0;margin:0;
  font-size:clamp(12px,1.8vw,18px);line-height:1.7;padding:3px 8px;
}
.loading-dock .loading-meter{grid-area:1/2;width:100%;min-width:0;max-width:100%}
.loading-dock .launch-button,.loading-dock #error-message{
  grid-column:1/-1;justify-self:center;max-width:100%;
}
@media(max-width:760px),(max-height:520px) and (orientation:landscape){
  #play-screen{gap:8px;padding:6px 8px 8px}
  .surah-progress-panel .surah-progress-heading{margin-bottom:8px}
  .loading-dock .loading-caption-row{font-size:clamp(12px,2.1vw,16px)}
  body .loading-dock,body.build-ready .loading-dock,body.load-error .loading-dock{
    grid-template-columns:auto minmax(0,310px);gap:4px 8px;
  }
}


/* A failed download keeps its message, retry and shorter meter on one row. */
body.load-error .loading-dock{
  grid-template-columns:auto auto minmax(0,min(250px,35vw));
  column-gap:8px;
}
body.load-error .loading-dock .loading-caption-row{grid-area:1/1;justify-self:center}
body.load-error .loading-dock #loading-caption{display:none}
body.load-error .loading-dock .loading-meter{grid-area:1/3;max-width:250px;justify-self:start}
body.load-error .loading-dock #error-message{grid-area:1/2;width:auto;margin:0;padding:0}
body.load-error #retry-loading{
  min-height:44px;margin:0;padding:6px 16px;font-size:14px;line-height:1.7;
  white-space:nowrap;border:3px solid transparent;border-radius:12px;color:#fff;
  background:linear-gradient(#e4475a,#c92b46) padding-box,linear-gradient(120deg,#ffb1b8,#f77486,#b92240) border-box;
  box-shadow:0 5px 0 #9c1933;
}
body.load-error #retry-loading:hover{
  background:linear-gradient(#d93650,#b91f3d) padding-box,linear-gradient(120deg,#ffb1b8,#f77486,#b92240) border-box;
  transform:translateY(-2px);box-shadow:0 7px 0 #9c1933;
}
body.load-error #retry-loading:active{transform:translateY(3px);box-shadow:0 2px 0 #9c1933}

/* Completion lives inside the wider entry button, at its existing height. */
body.build-ready .loading-dock{grid-template-columns:minmax(0,560px)}
body.build-ready .loading-dock .loading-caption-row{display:none}
body.build-ready .loading-dock .launch-button{
  grid-area:1/1;width:100%;min-width:0;white-space:nowrap;
}

/* Fit every part of the orientation tip instead of scrolling the dialog. */
#orientation-notice{
  overflow:hidden;overscroll-behavior:none;
  max-width:calc(var(--app-vw,100vw) - 24px);
  max-height:calc(var(--app-vh,100dvh) - 24px);
}
@media(max-height:520px){
  #orientation-notice{width:min(600px,calc(var(--app-vw,100vw) - 24px));padding:12px 18px}
  #orientation-notice h2{font-size:20px;line-height:1.6;margin-bottom:6px}
  #orientation-notice .orientation-icon{width:128px;margin-bottom:6px}
  #orientation-notice p{font-size:15px;line-height:1.7;margin-bottom:10px}
  #orientation-notice .primary-button{min-height:44px;margin-bottom:0}
}
@media(max-height:320px){
  #orientation-notice{padding:8px 14px}
  #orientation-notice .orientation-icon{display:none}
  #orientation-notice h2{font-size:18px}
  #orientation-notice p{font-size:14px;margin-bottom:8px}
}
@media(max-width:600px){
  body.load-error .loading-dock{column-gap:6px}
  body.load-error #retry-loading{padding:6px 10px;font-size:13px}
  body.load-error .loading-dock .loading-caption-row{padding-inline:4px;font-size:12px}
}
@media(max-width:360px){
  body.build-ready .loading-dock .launch-button{font-size:15px;padding-inline:8px;gap:6px}
}

/* No browser focus ring or tap highlight on template controls and canvases. */
*,*::before,*::after{outline:none!important;-webkit-tap-highlight-color:transparent}
