/* Page around the app: the app itself draws everything inside #app (it is the Android app's own UI). */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { --lb1: #0A2019; --lb2: #0B241D; --lb3: #061511; --ltitle: #FBE3A6; --lgold: #E6BE6A; --lmuted: rgba(206, 214, 200, .72); --ldim: rgba(206, 214, 200, .45); }
html, body { height: 100%; overflow: hidden; background: var(--lb2); overscroll-behavior: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
body { font-family: Vazir, Tahoma, sans-serif; color: #F8F0DC; direction: rtl;
  background: var(--lb2); }
#app { position: fixed; inset: 0; overflow: hidden; background: var(--lb2); }
#screen { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; user-select: none; -webkit-user-select: none; outline: none; }
/* Desktop browsers: the app in a framed column. The Windows app (html.app-window) always fills its whole, wide window. */
@media (min-width: 640px) and (min-height: 560px) {
  html:not(.app-window) #app { inset: 24px auto 24px 50%; width: min(460px, 100vw - 48px); transform: translateX(-50%); border-radius: 34px;
    box-shadow: 0 0 0 1px rgba(230, 190, 106, .55), 0 0 0 7px #0A1530, 0 0 0 8px rgba(230, 190, 106, .45), 0 40px 90px rgba(0, 0, 0, .6), 0 0 80px rgba(230, 190, 106, .18); }
}
.field { position: absolute; z-index: 5; border: 0; outline: 0; background: transparent; padding: 0; margin: 0; resize: none; overflow: hidden; -webkit-appearance: none; appearance: none; white-space: pre; }
textarea.field { white-space: pre-wrap; overflow-y: auto; }
.field::placeholder { color: var(--hint, rgba(179, 195, 221, .7)); opacity: 1; }
.video { position: absolute; z-index: 4; object-fit: cover; background: #000; pointer-events: none; display: none; }
.toast { position: absolute; z-index: 9; left: 50%; bottom: 72px; transform: translate(-50%, 20px); max-width: calc(100% - 48px); padding: 10px 18px; border-radius: 999px;
  background: rgba(10, 21, 48, .94); color: #F8F0DC; font: 14px/1.7 Vazir, Tahoma, sans-serif; text-align: center; box-shadow: 0 0 0 1px rgba(230, 190, 106, .5), 0 12px 30px rgba(0, 0, 0, .45);
  opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#loading { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; transition: opacity .5s;
  background: radial-gradient(520px 420px at 50% 42%, rgba(240, 197, 101, .07), transparent 70%), linear-gradient(180deg, var(--lb1), var(--lb2) 50%, var(--lb3)); }
#loading.done { opacity: 0; pointer-events: none; }
#loading .splash { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 16px; }
#loading .fan { width: min(280px, 74vw); height: auto; aspect-ratio: 300 / 230; overflow: visible; }
#loading .fan .card, #loading .fan .crown, #loading .fan .glow, #loading .fan .spark { transform-box: view-box; }
#loading .fan .card { transform-origin: 150px 212px; transform: translateY(46px) scale(.35); opacity: 0; animation: fan-deal .76s cubic-bezier(.3, 1.55, .5, 1) forwards; }
#loading .fan .c1 { animation-delay: .06s; } #loading .fan .c2 { animation-delay: .17s; } #loading .fan .c3 { animation-delay: .28s; } #loading .fan .c4 { animation-delay: .39s; }
#loading .fan .crown { transform-origin: 150px 52px; transform: translateY(-70px) scale(.55); opacity: 0; animation: fan-crown .7s cubic-bezier(.3, 1.6, .5, 1) .64s forwards; }
#loading .fan .glow { opacity: 0; animation: fan-fade .9s ease-out forwards; }
#loading .fan .spark { transform-origin: center; transform: scale(0); animation: fan-spark 1.6s ease-in-out 1s infinite; }
#loading .fan .k1 { transform-origin: 96px 44px; } #loading .fan .k2 { transform-origin: 206px 34px; animation-delay: 1.35s; }
#loading .t1, #loading .t2, #loading .t3, #loading .t4, #loading .t5 { opacity: 0; transform: translateY(18px); animation: fan-rise .52s cubic-bezier(.3, 1.45, .5, 1) forwards; }
.launch-light #loading .t1 { text-shadow: none; }
#loading .t1 { margin-top: 6px; font: 700 34px/1.5 Vazir, Tahoma, sans-serif; color: var(--ltitle); text-shadow: 0 2px 14px rgba(240, 197, 101, .25); animation-delay: .88s; }
#loading .t2 { font: 15px/1.8 Vazir, Tahoma, sans-serif; color: var(--lmuted); animation-delay: 1s; }
#loading .t3 { display: block; position: relative; width: 220px; height: 18px; margin-top: 10px; animation-delay: 1.09s;
  background: linear-gradient(90deg, transparent, var(--lgold) 30%, transparent 46%, transparent 54%, var(--lgold) 70%, transparent) center / 100% 1px no-repeat; }
#loading .t3::after { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -4px 0 0 -4px; transform: rotate(45deg); background: var(--lgold); border-radius: 1px; }
#loading .t4 { font: 700 14px/2 Vazir, Tahoma, sans-serif; color: var(--lgold); white-space: pre-wrap; animation-delay: 1.18s; }
#loading .t5 { position: absolute; bottom: calc(28px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font: 12px Vazir, Tahoma, sans-serif; color: var(--ldim); animation-delay: 1.28s; }
@keyframes fan-deal { 0% { opacity: 0; transform: translateY(46px) scale(.35) rotate(0); } 18% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(var(--a)); } }
@keyframes fan-crown { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes fan-fade { to { opacity: 1; } }
@keyframes fan-rise { 0% { opacity: 0; transform: translateY(18px); } 55% { opacity: 1; } 100% { opacity: 1; transform: translateY(0); } }
@keyframes fan-spark { 0%, 100% { transform: scale(.45); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { #loading * { animation-duration: 1ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; } }
#crash { position: fixed; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center; background: rgba(5, 11, 26, .92); padding: 16px; }
#crash.on { display: flex; }
#crash .box { max-width: 380px; padding: 24px; border-radius: 24px; text-align: center; background: linear-gradient(165deg, #1D3B7C, #0B1937); box-shadow: 0 0 0 1px rgba(230, 190, 106, .5); font: 15px/1.9 Vazir, Tahoma, sans-serif; }
#crash b { display: block; color: #F5868C; font-size: 18px; margin-bottom: 6px; }
#crash .msg { color: #7487AE; font-size: 12px; direction: ltr; word-break: break-word; }
#crash button { margin-top: 14px; padding: 12px 28px; border: 0; border-radius: 999px; font: 700 15px Vazir, Tahoma, sans-serif; color: #1A1206; background: linear-gradient(100deg, #FBE3A6, #E6BE6A 45%, #B1832F); cursor: pointer; }
