html, body {
    min-height: 100%;
    min-height: 100dvh;
}
.maq-gate-header {
    position: absolute;
    top: 0;
    inset-inline: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    gap: 10px;
    padding: max(10px, calc(env(safe-area-inset-top) + 4px)) 14px 8px;
    background: transparent;
    border: 0;
    pointer-events: none;
}
.maq-gate-header--compact {
    grid-template-columns: 42px;
    justify-content: start;
}
.maq-gate-header--compact .maq-gate-header-logo,
.maq-gate-header--compact .theme-toggle {
    display: none !important;
}
.maq-gate-header .theme-toggle,
.maq-gate-back,
.maq-gate-header-logo {
    pointer-events: auto;
}
.maq-gate-back {
    grid-column: 1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: color-mix(in srgb, var(--glass) 82%, transparent);
    color: var(--text-main);
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.maq-gate-header-logo {
    grid-column: 2;
    justify-self: center;
    display: block;
    height: 50px;
    width: auto;
}
:root:not([data-theme="light"]) .maq-gate-header-logo {
    filter: brightness(0) invert(1);
}
.maq-gate-header .theme-toggle {
    grid-column: 3;
    justify-self: end;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin: 0;
}
.auth-main {
    min-height: 100dvh;
    min-height: 100vh;
    padding-block: max(28px, calc(env(safe-area-inset-top) + 16px)) max(24px, env(safe-area-inset-bottom));
    padding-inline: 16px;
    align-items: center;
}
.auth-card.maq-gate-card {
    width: min(100%, 400px);
    max-width: 400px;
    margin-inline: auto;
    padding: 28px 22px 24px;
    border-radius: 24px;
    overflow: visible;
}
html:not(.is-standalone) body.maq-gate-install-mode {
    overscroll-behavior: none;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-main {
    align-items: stretch;
    justify-content: flex-start;
    /* الترويسة مخفية في وضع التحميل — ارفع الإطار لأعلى بدون فراغ علوي كبير */
    padding-block: max(12px, calc(env(safe-area-inset-top) + 6px)) max(8px, env(safe-area-inset-bottom));
    padding-inline: 10px;
    overscroll-behavior: none;
    touch-action: manipulation;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-main > .container {
    width: 100%;
    max-width: none;
    padding: 0;
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-card.maq-gate-card {
    display: flex;
    flex-direction: column;
    width: min(100%, 390px);
    min-height: calc(100dvh - max(20px, calc(env(safe-area-inset-top) + 14px)) - max(8px, env(safe-area-inset-bottom)));
    max-height: calc(100dvh - max(20px, calc(env(safe-area-inset-top) + 14px)) - max(8px, env(safe-area-inset-bottom)));
    margin: 0;
    padding: 14px 14px 12px;
    border-radius: 22px;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-gate-card .auth-head {
    display: none;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-stage {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    justify-content: flex-start;
    align-items: stretch;
    gap: 12px;
    padding-top: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-card.maq-gate-card {
    border: 1px solid color-mix(in srgb, #ffffff 18%, transparent);
    background:
        linear-gradient(
            165deg,
            color-mix(in srgb, #ffffff 12%, transparent) 0%,
            color-mix(in srgb, var(--bg-card, #1a222c) 88%, transparent) 38%,
            color-mix(in srgb, var(--bg-card, #151b22) 96%, transparent) 100%
        );
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 22%, transparent),
        0 14px 36px color-mix(in srgb, #000000 32%, transparent);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode .auth-card.maq-gate-card {
    border-color: color-mix(in srgb, var(--text-main) 10%, transparent);
    background:
        linear-gradient(
            165deg,
            color-mix(in srgb, #ffffff 86%, transparent) 0%,
            color-mix(in srgb, #ffffff 62%, transparent) 45%,
            color-mix(in srgb, var(--primary) 6%, transparent) 100%
        );
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 90%, transparent),
        0 10px 28px color-mix(in srgb, #000000 8%, transparent);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-offer {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    min-height: 0;
    padding: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-lead {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    margin: -14px -14px 0;
    padding: 14px 14px 12px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 12%, transparent);
    border-radius: 22px 22px 0 0;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 14%, transparent) 0%,
            color-mix(in srgb, #ffffff 3%, transparent) 100%
        );
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 20%, transparent);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode .maq-install-lead {
    border-bottom-color: color-mix(in srgb, var(--text-main) 10%, transparent);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 70%, transparent) 0%,
            color-mix(in srgb, #ffffff 28%, transparent) 100%
        );
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 90%, transparent);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-points {
    flex: 0 0 auto;
    gap: 11px;
    padding: 0;
    border-top: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-promise {
    color: var(--text-sec);
    font-size: 0.84rem;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.01em;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-name {
    font-size: 1.22rem;
    letter-spacing: 0.01em;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-hero {
    align-items: center;
    gap: 12px;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-icon {
    width: 58px;
    height: 58px;
    border-radius: 15px;
    border: 1px solid color-mix(in srgb, #ffffff 24%, transparent);
    box-shadow: 0 6px 14px color-mix(in srgb, #000000 22%, transparent);
    transform: translateX(8px);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-dock {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    padding: 2px 0 0;
    text-align: center;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-dock,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-dock {
    gap: 10px;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-inline: 0;
    border-radius: 999px;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-dock .auth-install-btn {
    width: 100%;
    max-width: none;
    position: relative;
    z-index: 2;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-dock .maq-install-cta-note,
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-dock .maq-open-browser {
    max-width: none;
    width: 100%;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-install-btn.btn-glow,
html:not(.is-standalone) body.maq-gate-install-mode #maq-install-btn.auth-install-btn {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border: 1px solid color-mix(in srgb, #ffffff 22%, var(--primary)) !important;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 22%, var(--primary)) 0%,
            var(--primary) 55%,
            color-mix(in srgb, #000000 12%, var(--primary)) 100%
        ) !important;
    color: #fff !important;
    font-family: "Cairo", "Tajawal", sans-serif !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.3 !important;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 35%, transparent),
        0 8px 20px color-mix(in srgb, var(--primary) 42%, transparent) !important;
    backdrop-filter: blur(14px) saturate(1.25);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    text-shadow: none;
}
html:not(.is-standalone) body.maq-gate-install-mode .auth-install-btn.btn-glow:hover,
html:not(.is-standalone) body.maq-gate-install-mode .auth-install-btn.btn-glow:focus {
    transform: none;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 28%, var(--primary)) 0%,
            color-mix(in srgb, #ffffff 8%, var(--primary)) 55%,
            var(--primary) 100%
        ) !important;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 40%, transparent),
        0 10px 24px color-mix(in srgb, var(--primary) 48%, transparent) !important;
}
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode .auth-install-btn.btn-glow,
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode #maq-install-btn.auth-install-btn {
    border-color: color-mix(in srgb, #ffffff 30%, var(--primary)) !important;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 24%, var(--primary)) 0%,
            var(--primary) 100%
        ) !important;
    color: #fff !important;
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 45%, transparent),
        0 8px 18px color-mix(in srgb, var(--primary) 35%, transparent) !important;
}
/* وحدة واحدة: الزر + حالة التثبيت */
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-cta-pop,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-cta-pop {
    border-radius: 18px;
    border: 0;
    background: color-mix(in srgb, var(--text-main) 5%, transparent);
    box-shadow:
        0 0 0 1px color-mix(in srgb, #ffffff 22%, var(--primary)),
        0 12px 28px color-mix(in srgb, var(--primary) 28%, transparent);
    overflow: visible;
    isolation: isolate;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-cta-pop .auth-install-btn.btn-glow,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-cta-pop #maq-install-btn.auth-install-btn,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-cta-pop .auth-install-btn.btn-glow,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-cta-pop #maq-install-btn.auth-install-btn {
    border: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 28%, transparent) !important;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-cta-pop .maq-gate-timer,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-cta-pop .maq-gate-timer {
    border-radius: 0 0 18px 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-gate-timer {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-gate-timer:not([hidden]) {
    display: block;
    animation: maq-install-pop 0.26s ease-out;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-ios-sheet {
    margin: 0;
    padding: 10px 12px 11px;
    border: 0;
    border-radius: 0;
    border-top: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    background: transparent;
    box-shadow: none;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-ios-sheet-copy strong {
    font-size: 0.84rem;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop #maq-gate-hint {
    font-size: 0.74rem;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-ios-eta {
    min-width: 3.2rem;
    padding: 5px 9px 4px;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-ios-eta #maq-gate-count {
    font-size: 1.08rem;
}
@keyframes maq-install-pop {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@media (prefers-reduced-motion: reduce) {
    html:not(.is-standalone) body.maq-gate-install-mode .maq-install-cta-pop .maq-gate-timer:not([hidden]) {
        animation: none;
    }
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid color-mix(in srgb, #ffffff 12%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, var(--text-main) 5%, transparent);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 10%, transparent);
    overflow: hidden;
}
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide {
    border-color: color-mix(in srgb, var(--text-main) 10%, transparent);
    background: color-mix(in srgb, var(--text-main) 4%, #ffffff);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-head {
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 14px 11px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 12%, transparent);
    border-radius: 16px 16px 0 0;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 14%, transparent) 0%,
            color-mix(in srgb, #ffffff 3%, transparent) 100%
        );
    box-shadow: inset 0 1px 0 color-mix(in srgb, #ffffff 20%, transparent);
}
html[data-theme="light"]:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-head {
    border-bottom-color: color-mix(in srgb, var(--text-main) 10%, transparent);
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 72%, transparent) 0%,
            color-mix(in srgb, #ffffff 30%, transparent) 100%
        );
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-title {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--text-main);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    text-align: right;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 12px 12px;
    min-height: 0;
    overflow: auto;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-block {
    gap: 8px;
    padding: 10px 10px 9px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, var(--text-main) 8%, transparent);
    background: color-mix(in srgb, var(--text-main) 3%, transparent);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-block + .maq-install-guide-block {
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--text-main) 8%, transparent);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-guide-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.5rem;
    padding: 0 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 16%, transparent);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    width: fit-content;
    max-width: 100%;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-gate-timer,
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-subscribe {
    flex: 0 0 auto;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-guide,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-guide {
    flex: 0 1 auto;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-gate-timer[hidden],
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-subscribe[hidden] {
    display: none !important;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-installing .maq-install-cta-note,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .maq-install-cta-note {
    display: none;
}
.maq-gate-card .auth-head { margin-bottom: 22px; }
.maq-gate-card .auth-head h1 { margin-bottom: 4px; }
.maq-gate-card .auth-head p {
    margin: 0;
    color: var(--text-sec);
    font-size: 0.88rem;
    font-weight: 700;
}
.maq-gate-card .auth-logo-img {
    height: 88px;
    margin-bottom: 16px;
}
/* الليلي فقط: الشعار أبيض. النهاري يُبقي لونه الطبيعي حتى داخل التطبيق */
html:not([data-theme="light"]) .maq-gate-card .auth-logo-img {
    filter: brightness(0) invert(1) !important;
}
html[data-theme="light"] .maq-gate-card .auth-logo-img {
    filter: none !important;
}
/* قبل اكتمال السكربت في التطبيق المثبّت: أظهر الترحيب مع اللوجو دون شاشة التثبيت */
html.is-standalone:not(.maq-gate-js-ready) .maq-gate-install {
    display: none !important;
}
html.is-standalone:not(.maq-gate-js-ready) .maq-gate-signin {
    display: none !important;
}
html.is-standalone:not(.maq-gate-js-ready) .maq-gate-welcome {
    display: flex !important;
}
html.is-standalone:not(.maq-gate-js-ready) .maq-welcome-brand {
    display: block !important;
}
html.is-standalone:not(.maq-gate-js-ready) .auth-head h1,
html.is-standalone:not(.maq-gate-js-ready) .auth-head > p {
    display: none !important;
}
.maq-gate-card .form-field { margin-bottom: 14px; }
.maq-gate-card .form-field label {
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.maq-gate-card .input-wrap input {
    min-height: 48px;
    font-size: 16px;
}
.maq-gate-card input[type="tel"],
.maq-gate-card input[type="password"] {
    direction: rtl;
    text-align: right;
}
.maq-install-lead,
.maq-install-body,
.maq-install-top,
.maq-install-mid,
.maq-install-actions,
.maq-install-dock,
.maq-install-subscribe {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.maq-install-spacer {
    flex: 1 1 auto;
    min-height: 0;
}
.maq-install-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}
.maq-install-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.maq-install-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
}
.maq-install-guide-title {
    color: var(--text-main);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
}
.maq-install-guide-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.maq-install-guide-block + .maq-install-guide-block {
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent);
}
.maq-install-guide-label {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.3;
    text-align: right;
}
.maq-install-guide-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.maq-install-guide-steps li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-main);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: right;
}
.maq-install-guide-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3rem;
    height: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    color: var(--primary);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}
.maq-install-name {
    color: var(--text-main);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.25;
}
.maq-install-promise,
.maq-install-publisher,
.maq-install-tag {
    color: var(--text-sec);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.5;
}
.maq-install-tag {
    color: #0a84ff;
    font-weight: 700;
}
[data-theme="light"] .maq-install-tag {
    color: #007aff;
}
.maq-install-features {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, #ffffff 12%, transparent);
    border-radius: 16px;
    background: color-mix(in srgb, #ffffff 4%, transparent);
    overflow: hidden;
}
html[data-theme="light"] .maq-install-features {
    border-color: color-mix(in srgb, var(--text-main) 10%, transparent);
    background: color-mix(in srgb, #ffffff 55%, transparent);
}
.maq-install-features-title {
    margin: 0;
    padding: 8px 12px;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    background: color-mix(in srgb, #ffffff 6%, transparent);
    color: color-mix(in srgb, var(--text-main) 82%, transparent);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.25;
    text-align: right;
}
html[data-theme="light"] .maq-install-features-title {
    border-bottom-color: color-mix(in srgb, var(--text-main) 8%, transparent);
    background: color-mix(in srgb, var(--text-main) 4%, transparent);
}
.maq-install-points {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 0;
    flex: 0 0 auto;
    width: 100%;
    overflow: hidden;
}
.maq-install-points li {
    position: relative;
    display: block;
    min-height: 0;
    margin: 0;
    padding-block: 10px;
    /* مسافة واضحة بين علامة الصح والنص */
    padding-inline: 2.55rem 12px;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    border-radius: 0;
    background: transparent;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html[data-theme="light"] .maq-install-points li {
    border-bottom-color: color-mix(in srgb, var(--text-main) 8%, transparent);
}
.maq-install-points li:last-child {
    border-bottom: 0;
}
.maq-install-points li::before {
    content: "\f00c";
    position: absolute;
    inset-inline-start: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 1.05rem;
    height: 1.05rem;
    margin-top: 0;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    color: var(--primary);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.55rem;
    line-height: 1.05rem;
    text-align: center;
    pointer-events: none;
}
.auth-install-btn {
    display: flex;
    width: 100%;
    min-height: 44px;
    height: 44px;
    padding: 0 14px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 0;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0;
    line-height: 1.2;
}
.maq-browser-trial {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    max-width: none;
    min-height: 58px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, #6dffc0 34%, transparent);
    border-radius: 18px;
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, #14b884 92%, #ffffff) 0%,
            #0a6b58 48%,
            #085445 100%
        );
    color: #f4fff9;
    font-family: "Cairo", "Tajawal", sans-serif;
    text-align: right;
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 12px 28px rgba(10, 107, 88, 0.34);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.maq-browser-trial-ico {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.82rem;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.maq-browser-trial-ico i {
    margin-inline-start: 2px;
}
.maq-browser-trial-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.maq-browser-trial-copy strong {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.2;
}
.maq-browser-trial-copy small {
    color: color-mix(in srgb, #e7ffee 78%, transparent);
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}
.maq-browser-trial:hover,
.maq-browser-trial:focus-visible {
    color: #fff;
    filter: brightness(1.05);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 14px 30px rgba(10, 107, 88, 0.4);
}
.maq-browser-trial.is-live-now {
    border-color: color-mix(in srgb, #e25555 42%, transparent);
    background:
        linear-gradient(
            145deg,
            color-mix(in srgb, #e25555 88%, #ffffff) 0%,
            #b33a3a 52%,
            #8f2c2c 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 12px 28px rgba(226, 85, 85, 0.32);
}
.maq-browser-trial.is-live-now:hover,
.maq-browser-trial.is-live-now:focus-visible {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 14px 30px rgba(226, 85, 85, 0.4);
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-browser-trial {
    display: flex;
    order: -2;
    width: 100%;
    max-width: none;
    min-height: 52px;
    margin-inline: 0;
    box-sizing: border-box;
    border-radius: 16px;
    padding: 8px 14px;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-browser-trial[hidden] {
    display: none !important;
}
.maq-install-cta-note {
    margin: 0;
    color: var(--text-sec);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}
.maq-install-subscribe {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent);
    text-align: center;
    gap: 8px;
}
.maq-install-subscribe-copy {
    margin: 0;
    color: var(--text-sec);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}
.maq-install-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid color-mix(in srgb, #25d366 45%, transparent);
    background: color-mix(in srgb, #25d366 12%, transparent);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}
.maq-install-wa:hover,
.maq-install-wa:focus-visible {
    background: color-mix(in srgb, #25d366 20%, transparent);
    color: var(--text-main);
}
.auth-install-btn:disabled {
    opacity: 0.78;
    cursor: not-allowed;
    pointer-events: none;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-ready .auth-install-btn:disabled {
    opacity: 0.88;
    cursor: default;
    pointer-events: none;
}
.maq-gate-timer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
}
.maq-ios-sheet {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 12px 12px 11px;
    border-radius: 16px;
    border: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent);
    background: color-mix(in srgb, var(--text-main) 5%, transparent);
}
.maq-ios-sheet-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.maq-ios-sheet-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    flex: 1 1 auto;
    text-align: right;
}
.maq-ios-sheet-copy strong {
    color: var(--text-main);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.25;
}
.maq-ios-sheet-copy span,
#maq-gate-hint {
    margin: 0;
    color: var(--text-sec);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
    line-height: 1.45;
}
.maq-ios-eta {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 3px;
    min-width: 3.1rem;
    padding: 6px 10px 5px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--primary) 42%, transparent);
    background:
        linear-gradient(
            165deg,
            color-mix(in srgb, var(--primary) 22%, transparent) 0%,
            color-mix(in srgb, var(--primary) 10%, transparent) 100%
        );
    box-shadow:
        inset 0 1px 0 color-mix(in srgb, #ffffff 14%, transparent),
        0 4px 12px color-mix(in srgb, var(--primary) 18%, transparent);
    color: var(--text-sec);
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
    flex: 0 0 auto;
    align-self: flex-start;
}
.maq-ios-eta #maq-gate-count,
.maq-gate-count {
    color: #6dffc0;
    font-family: "Cairo", "Tajawal", "SF Pro Text", sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.02em;
    direction: ltr;
    unicode-bidi: isolate;
    text-shadow: 0 0 12px color-mix(in srgb, #6dffc0 35%, transparent);
}
.maq-ios-eta small {
    font-size: 0.72rem;
    font-weight: 800;
    color: color-mix(in srgb, #6dffc0 78%, var(--text-sec));
}
.maq-ios-track {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    direction: ltr;
    background: color-mix(in srgb, var(--text-main) 12%, transparent);
    box-shadow: inset 0 1px 2px color-mix(in srgb, #000000 28%, transparent);
}
.maq-ios-bar,
#maq-gate-ring.maq-ios-bar {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b884 0%, #30d158 50%, #6dffc0 100%);
    box-shadow: 0 0 10px color-mix(in srgb, #30d158 45%, transparent);
    transition: width 0.18s linear;
}
body.maq-gate-ready .maq-ios-bar {
    background: #8e8e93;
}
[data-theme="light"] .maq-ios-bar,
[data-theme="light"] #maq-gate-ring.maq-ios-bar {
    background: linear-gradient(90deg, #248a3d 0%, #30d158 50%, #007aff 100%);
}
.maq-gate-hint {
    margin: 0;
    max-width: none;
    color: var(--text-sec);
    font-size: 0.78rem;
    font-weight: 600;
    text-align: right;
    line-height: 1.45;
}
.maq-ios-steps {
    list-style: none;
    margin: 2px 0 0;
    padding: 8px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--text-main) 10%, transparent);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.maq-ios-steps[hidden] {
    display: none !important;
}
.maq-ios-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.4;
}
.maq-ios-steps i {
    width: 1.25rem;
    text-align: center;
    color: #0a84ff;
    font-size: 0.9rem;
}
[data-theme="light"] .maq-ios-steps i {
    color: #007aff;
}
.auth-install-help {
    margin: 12px 0 0;
    color: var(--text-sec);
    font-size: 0.84rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.7;
}
.maq-open-browser {
    display: flex;
    width: 100%;
    justify-content: center;
    min-height: 48px;
    margin-top: 12px;
    text-decoration: none;
    font-weight: 800;
}
html:not(.is-standalone) body.maq-gate-inapp .maq-open-browser:not([hidden]) {
    display: flex !important;
    order: -1;
    background: #0a6b58;
    color: #e7ffee;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(10, 107, 88, 0.35);
}
.maq-open-browser[hidden],
.auth-install-help[hidden],
.maq-gate-signin[hidden],
.maq-gate-welcome[hidden],
.maq-gate-install[hidden],
.maq-gate-timer[hidden],
.maq-signin-back[hidden] {
    display: none !important;
}
html:not(.is-standalone) .maq-gate-signin,
html:not(.is-standalone) .maq-gate-signin[hidden],
html:not(.is-standalone) .maq-gate-welcome,
html:not(.is-standalone) .maq-gate-welcome[hidden] {
    display: none !important;
}
.maq-gate-signin,
.maq-gate-welcome {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}
html.is-standalone .maq-gate-install { display: none !important; }
html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-signin,
html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-signin[hidden] {
    display: none !important;
}
html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-welcome:not([hidden]) {
    display: flex !important;
}
html.is-standalone body.maq-gate-welcome-mode .maq-gate-welcome[hidden],
html.is-standalone body.maq-gate-on-signin .maq-gate-welcome {
    display: none !important;
}
html.is-standalone body.maq-gate-welcome-mode.maq-gate-on-signin .maq-gate-signin:not([hidden]),
html.is-standalone body.maq-gate-on-signin .maq-gate-signin:not([hidden]) {
    display: block !important;
}
html.is-standalone body.maq-gate-on-signin .maq-signin-back:not([hidden]) {
    display: inline-flex !important;
}
html.is-standalone body.maq-gate-on-signin .auth-head > h1,
html.is-standalone body.maq-gate-on-signin .auth-head > p {
    display: block !important;
}
html.is-standalone,
html.is-standalone body {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}
html.is-standalone .auth-main {
    box-sizing: border-box;
    height: 100dvh;
    max-height: 100dvh;
    padding-block: max(14px, calc(env(safe-area-inset-top) + 8px)) max(14px, env(safe-area-inset-bottom));
    overflow: hidden;
}
.maq-gate-welcome {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 0;
    min-height: 0;
}
.maq-welcome-brand {
    display: none;
    margin: 0;
    width: 100%;
    color: var(--text-main);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: clamp(1.02rem, 4.2vw, 1.22rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}
.maq-welcome-copy {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    text-align: center;
    margin-top: 0;
    flex: 0 0 auto;
}
.maq-welcome-course {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 28px 0 0;
    padding: 14px 18px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.78);
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.92) 0%,
            rgba(248, 250, 252, 0.72) 48%,
            rgba(236, 242, 248, 0.58) 100%
        );
    color: var(--primary);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.35;
    letter-spacing: 0.01em;
    white-space: nowrap;
    backdrop-filter: blur(18px) saturate(165%);
    -webkit-backdrop-filter: blur(18px) saturate(165%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(148, 163, 184, 0.12),
        0 10px 24px -16px rgba(15, 23, 42, 0.28);
}
/* الدارك/التطبيق: أبقِ الإطار الأبيض اللؤلؤي حول «دورة المقامات الصوتية» */
html:not([data-theme="light"]) .maq-welcome-course,
html.is-standalone .maq-welcome-course {
    color: #00664d;
    border: 1px solid rgba(255, 255, 255, 0.88);
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.82) 48%,
            rgba(236, 242, 248, 0.68) 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        inset 0 -1px 0 rgba(148, 163, 184, 0.14),
        0 10px 24px -14px rgba(15, 23, 42, 0.35);
}
.maq-welcome-points {
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    flex: 1 1 auto;
    width: 100%;
    max-width: 18rem;
    margin: 22px auto 18px;
    padding: 8px 2px 4px;
}
.maq-welcome-points li {
    position: relative;
    margin: 0;
    padding-inline: 1.7rem 0.2rem;
    color: var(--text-main);
    font-family: "Tajawal", sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.65;
    text-align: start;
}
.maq-welcome-points li::before {
    content: "\f00c";
    position: absolute;
    top: 0.18em;
    inset-inline-start: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid rgba(45, 212, 165, 0.55);
    background: rgba(0, 168, 120, 0.32);
    color: #2dd4a5;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.62rem;
    line-height: 1;
}
html.is-standalone .maq-welcome-points li {
    color: #e7e9ea !important;
}
html.is-standalone .maq-welcome-brand {
    color: #e7e9ea !important;
}
html.is-standalone .maq-welcome-trial {
    background: #00a878 !important;
    color: #fff !important;
}
html.is-standalone .maq-welcome-account {
    color: #e7e9ea !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
}
.maq-welcome-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    margin-top: auto;
    flex: 0 0 auto;
}
.maq-welcome-trial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 0;
    border-radius: 16px;
    background: var(--primary);
    color: #fff;
    font-family: "Tajawal", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--primary) 85%, transparent);
    transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}
.maq-welcome-trial:hover,
.maq-welcome-trial:focus-visible {
    color: #fff;
    filter: brightness(1.05);
    box-shadow: 0 14px 28px -14px color-mix(in srgb, var(--primary) 90%, transparent);
}
.maq-welcome-trial:active {
    transform: translateY(1px);
}
.maq-welcome-account {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid color-mix(in srgb, var(--text-sec) 28%, transparent);
    border-radius: 16px;
    background: transparent;
    color: var(--text-main);
    font-family: "Tajawal", sans-serif;
    font-size: 0.94rem;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.maq-welcome-account:hover,
.maq-welcome-account:focus-visible {
    color: var(--primary);
    border-color: color-mix(in srgb, var(--primary) 45%, transparent);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}
.maq-signin-back {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--text-sec);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    margin: 0 0 12px;
    padding: 0;
    cursor: pointer;
}
.maq-signin-back:hover,
.maq-signin-back:focus-visible {
    color: var(--primary);
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-header .theme-toggle,
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-back {
    box-shadow: 0 6px 16px -10px rgba(0, 0, 0, 0.45);
}
html.is-standalone .maq-gate-back,
html:not(.is-standalone) body.maq-gate-install-mode .maq-gate-back,
.maq-gate-header--compact .maq-gate-back {
    display: none !important;
    visibility: hidden;
    pointer-events: none;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-gate-header {
    display: none !important;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-main {
    box-sizing: border-box;
    align-items: stretch;
    justify-content: flex-start;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    /* الإطار الطويل الأول: مسافة علوية صغيرة بلا ترويسة */
    padding-block: max(14px, calc(env(safe-area-inset-top) + 8px)) max(14px, env(safe-area-inset-bottom));
    overflow: hidden;
}
html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-main {
    padding-block: max(14px, calc(env(safe-area-inset-top) + 8px)) max(14px, env(safe-area-inset-bottom));
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-main > .container {
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    justify-content: center;
    align-items: stretch;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-card.maq-gate-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: min(100%, 400px);
    /* الإطار الطويل: يملأ ارتفاع الشاشة بالكامل داخل الحواف */
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    margin-block: 0;
    padding: 28px 22px 28px;
    overflow: hidden;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 4px;
    padding: 4px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    flex: 0 0 auto;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-welcome {
    flex: 1 1 auto;
    min-height: 0;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
    display: block !important;
    height: 148px;
    margin-bottom: 0;
}
html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
    height: 156px;
}
html.is-standalone:not([data-theme="light"]) body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
    filter: brightness(0) invert(1) !important;
}
html.is-standalone .maq-gate-header-logo {
    display: none !important;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-head h1,
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-head p {
    display: none;
}
body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-welcome-brand:not([hidden]) {
    display: block;
}
body.maq-gate-welcome-mode.maq-gate-on-signin .maq-gate-card .auth-head h1 {
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.4;
}
body.maq-gate-welcome-mode.maq-gate-on-signin .maq-gate-card .auth-head p {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.55;
}
.maq-remember {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 2px 0 16px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}
.maq-remember input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.maq-trial-link {
    display: block;
    margin-bottom: 14px;
    text-align: center;
    font-weight: 800;
    font-size: 0.86rem;
}
@media (max-width: 480px) {
    .auth-card.maq-gate-card {
        width: calc(100% - 8px);
        padding: 24px 18px 20px;
        border-radius: 22px;
    }
    .maq-gate-card .auth-logo-img {
        height: 72px;
        margin-bottom: 12px;
    }
    .maq-gate-card .auth-head h1 { font-size: 1.28rem; }
    .maq-install-name { font-size: 1.16rem; }
    .maq-install-promise { font-size: 0.84rem; }
    .maq-install-points li { font-size: 0.86rem; }
    .maq-ios-eta #maq-gate-count,
    .maq-gate-count { font-size: 1rem; }
    #maq-gate-hint,
    .maq-gate-hint { font-size: 0.72rem; }
    .maq-install-wa { min-height: 42px; font-size: 0.86rem; }
    body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-main {
        height: 100dvh;
        max-height: 100dvh;
        min-height: 100dvh;
        padding-block: max(14px, calc(env(safe-area-inset-top) + 8px)) max(14px, env(safe-area-inset-bottom));
        overflow: hidden;
    }
    body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .auth-card.maq-gate-card {
        height: 100%;
        min-height: 100%;
        max-height: 100%;
        padding: 24px 18px 22px;
        overflow: hidden;
    }
    body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-head {
        margin-bottom: 0;
        padding: 2px 0 0;
    }
    body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
        display: block !important;
        height: 136px;
        margin-bottom: 0;
    }
    html:not([data-theme="light"]) body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
        filter: brightness(0) invert(1) !important;
    }
    html.is-standalone body.maq-gate-welcome-mode:not(.maq-gate-on-signin) .maq-gate-card .auth-logo-img {
        height: 144px;
    }
    .maq-welcome-brand {
        font-size: clamp(0.98rem, 4.4vw, 1.12rem);
    }
    .maq-welcome-course {
        width: 100%;
        margin: 24px 0 0;
        font-size: 0.98rem;
        padding: 13px 14px;
        border-radius: 14px;
    }
    .maq-welcome-points {
        gap: 11px;
        margin: 14px auto 12px;
        max-width: 17rem;
    }
    .maq-welcome-points li {
        font-size: 0.88rem;
        padding-inline: 1.6rem 0.15rem;
    }
    .maq-welcome-points li::before {
        width: 1.05rem;
        height: 1.05rem;
        font-size: 0.58rem;
    }
}

/* —— موشن: مطوي في النافذة، والاستعراض فوقها —— */
.maq-motion-open {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: none;
    margin: 4px 0 8px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, #ffffff 14%, transparent);
    border-radius: 16px;
    background:
        linear-gradient(
            165deg,
            color-mix(in srgb, #00a878 16%, #15202b) 0%,
            color-mix(in srgb, #0b1220 88%, transparent) 100%
        );
    color: #e7e9ea;
    text-align: right;
    cursor: pointer;
    font-family: "Cairo", "Tajawal", sans-serif;
}
.maq-motion-open[hidden] { display: none !important; }
.maq-motion-open-ico {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, #00a878 28%, transparent);
    color: #6dffc0;
    font-size: 1rem;
}
.maq-motion-open-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.maq-motion-open-copy strong {
    font-size: 0.9rem;
    font-weight: 800;
}
.maq-motion-open-copy small {
    color: color-mix(in srgb, #e7e9ea 68%, transparent);
    font-size: 0.72rem;
    font-weight: 600;
}
.maq-motion-open-chev {
    flex: 0 0 auto;
    color: color-mix(in srgb, #e7e9ea 55%, transparent);
    font-size: 0.82rem;
}

.maq-motion-overlay {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding:
        max(10px, env(safe-area-inset-top, 0px))
        max(10px, env(safe-area-inset-right, 0px))
        max(10px, env(safe-area-inset-bottom, 0px))
        max(10px, env(safe-area-inset-left, 0px));
    /* خلفية صلبة بلا backdrop-filter — الفلتر على الطبقة يشوش شاشة هاتف الاستعراض (خصوصًا آيفون/Safari) */
    background: rgba(3, 8, 14, 0.92);
}
.maq-motion-overlay[hidden] { display: none !important; }
.maq-motion-overlay.is-open {
    display: flex !important;
}
.maq-motion-caption {
    flex: 0 0 auto;
    margin: 0;
    padding: 4px 6px;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: color-mix(in srgb, #e7e9ea 78%, transparent);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    min-height: 1.25em;
}
.maq-motion-phones {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.maq-motion-replay {
    appearance: none;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 40;
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 50%;
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.22) 100%
        );
    color: #ffffff;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
    transform: translate(-50%, -50%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset 0 -1px 0 rgba(255, 255, 255, 0.12),
        0 8px 22px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(14px) saturate(1.25);
    -webkit-backdrop-filter: blur(14px) saturate(1.25);
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.maq-motion-replay:hover,
.maq-motion-replay:focus-visible {
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.72) 0%,
            rgba(255, 255, 255, 0.34) 100%
        );
    color: #ffffff;
    outline: none;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 10px 26px rgba(0, 0, 0, 0.32);
}
.maq-motion-replay[hidden] { display: none !important; }
.maq-motion-replay i { font-size: 1.15rem; }
.maq-motion-overlay-panel {
    /* إطار بحجم شاشة هاتف بدل شريط جانبي عريض */
    width: min(100%, 390px);
    height: min(100%, 844px);
    max-height: calc(100dvh - 20px);
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #0b1220;
    border: 1px solid color-mix(in srgb, #ffffff 12%, transparent);
    border-radius: 28px;
    box-shadow:
        0 0 0 1px color-mix(in srgb, #000000 35%, transparent),
        0 22px 56px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}
.maq-motion-overlay-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px 6px;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    background: color-mix(in srgb, #15202b 92%, transparent);
}
.maq-motion-overlay-head strong {
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    color: #f4f7f6;
}
.maq-motion-close {
    appearance: none;
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: color-mix(in srgb, #ffffff 10%, transparent);
    color: #e7e9ea;
    font-size: 0.88rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.maq-motion-close:hover,
.maq-motion-close:focus-visible {
    background: color-mix(in srgb, #ffffff 18%, transparent);
    color: #ffffff;
    outline: none;
}
body.maq-gate-motion-open {
    overflow: hidden;
}

.maq-motion-stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 6px 8px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.maq-motion-overlay .maq-motion-stage {
    padding: 6px 8px 8px;
    gap: 5px;
}
/* الهاتف بنسبة أبعاد حقيقية — عرض يُحسب من الارتفاع حتى لا تُضغط نافذة التحميل */
.maq-motion-overlay .maq-motion-phones .maq-android-motion,
.maq-motion-overlay .maq-motion-phones .maq-ios-motion {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
    container-type: size;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-motion-overlay .maq-am-phone,
html:not(.is-standalone) body.maq-gate-install-mode .maq-motion-overlay .maq-im-phone,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-motion-overlay .maq-am-phone,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-motion-overlay .maq-im-phone,
.maq-motion-overlay .maq-am-phone,
.maq-motion-overlay .maq-im-phone {
    flex: 0 1 auto !important;
    /* مساحة أكبر للهاتف بعد ضغط الشريط العلوي */
    width: min(82%, 292px) !important;
    max-width: min(100%, 300px) !important;
    height: auto !important;
    max-height: 100% !important;
    aspect-ratio: 9 / 19.5 !important;
    margin-inline: auto !important;
    display: flex !important;
    align-items: stretch !important;
    justify-content: center !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    -webkit-font-smoothing: antialiased;
}
@supports (width: 1cqh) {
    .maq-motion-overlay .maq-am-phone,
    .maq-motion-overlay .maq-im-phone {
        width: min(88%, calc(100cqh * 9 / 19.5), 300px) !important;
        max-width: min(100%, 300px) !important;
        height: min(100%, calc(min(88%, 300px) * 19.5 / 9), 100cqh) !important;
    }
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-motion-overlay .maq-am-bezel,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-motion-overlay .maq-im-bezel,
.maq-motion-overlay .maq-am-bezel,
.maq-motion-overlay .maq-im-bezel {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
}
.maq-motion-overlay .maq-am-screen,
.maq-motion-overlay .maq-im-screen {
    height: 100% !important;
    min-height: 0;
    aspect-ratio: auto;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    isolation: isolate;
    transform: translateZ(0);
}
.maq-motion-tabs {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
    width: 100%;
    padding: 0;
    border: 0;
    border-bottom: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}
.maq-motion-tab {
    appearance: none;
    position: relative;
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    margin: 0;
    min-height: 30px;
    padding: 4px 8px 7px;
    border-radius: 0;
    background: transparent;
    color: color-mix(in srgb, #e7e9ea 55%, transparent);
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: color 0.15s ease;
}
.maq-motion-tab::after {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    border-radius: 2px 2px 0 0;
    background: transparent;
    transition: background 0.15s ease;
}
.maq-motion-tab i {
    font-size: 0.82rem;
    line-height: 1;
    opacity: 0.9;
}
.maq-motion-tab.is-active {
    background: transparent;
    color: #f4f7f6;
    font-weight: 700;
    box-shadow: none;
}
.maq-motion-tab.is-active::after {
    background: #00a878;
}
.maq-motion-tab.is-active i {
    opacity: 1;
    color: #6dffc0;
}
.maq-motion-tab:not(.is-active):hover {
    background: transparent;
    color: #e7e9ea;
}
.maq-android-motion,
.maq-ios-motion {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.maq-android-motion[hidden],
.maq-ios-motion[hidden] { display: none !important; }
/* لوحة أندرويد: تملأ الشاشة بلا تمرير، والهاتف يملأ الفراغ بتناسق */
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion {
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .auth-main {
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    padding-block: env(safe-area-inset-top) env(safe-area-inset-bottom);
    padding-inline: 0;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .auth-main > .container {
    height: 100%;
    min-height: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .auth-card.maq-gate-card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    margin: 0;
    padding: 8px 8px 6px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-guide {
    display: none !important;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-cta-note,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-open-browser {
    display: none !important;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-features {
    order: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode .maq-install-dock {
    margin-top: auto;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-points {
    display: flex;
    gap: 0;
    padding: 0;
    margin-top: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-points li {
    font-size: 0.7rem;
    line-height: 1.25;
    font-weight: 600;
    padding-block: 7px;
    padding-inline: 2.45rem 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-stage {
    gap: 6px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-offer {
    gap: 8px;
    flex: 1 1 auto;
    min-height: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-lead {
    margin: -8px -8px 0;
    padding: 12px 10px 8px;
    border-radius: 14px 14px 0 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-name {
    font-size: 1rem;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-promise {
    font-size: 0.72rem;
    line-height: 1.3;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-dock {
    gap: 5px;
    padding-top: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-browser-trial,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-install-cta-pop {
    max-width: none;
    width: 100%;
    margin-inline: 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-browser-trial {
    min-height: 48px;
    height: auto;
    border-radius: 16px;
    font-size: 0.86rem;
    padding: 8px 14px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .auth-install-btn.btn-glow,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion #maq-install-btn.auth-install-btn {
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    font-size: 0.84rem !important;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-motion-stage {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 4px 4px 4px;
    gap: 4px;
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
    border-radius: 16px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-android-motion,
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-ios-motion {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    margin: 0;
    padding: 2px 0 0;
    gap: 4px;
    justify-content: stretch;
    align-items: stretch;
    overflow: hidden;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-head {
    flex: 0 0 auto;
    padding: 0 2px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-title {
    font-size: 0.82rem;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-caption {
    margin-top: 2px;
    font-size: 0.68rem;
    min-height: 0;
    line-height: 1.3;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-phone {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-bezel {
    width: 100%;
    height: 100%;
    max-width: none;
    padding: 2px;
    border-radius: 22px;
    box-sizing: border-box;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-bezel::before {
    border-radius: 20px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-am-screen {
    height: 100%;
    min-height: 0;
    border-radius: 19px;
}
/* إطار آيفون داخل وضع التحميل — نسبة جهاز طولية */
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-phone {
    width: auto;
    max-width: min(100%, 430px);
    height: 100%;
    aspect-ratio: 9 / 19.4;
    margin-inline: auto;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-bezel {
    width: 100%;
    height: 100%;
    padding: 3.5px;
    border-radius: clamp(30px, 11cqw, 44px);
    container-type: inline-size;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-bezel::before {
    inset: 2.5px;
    border-radius: clamp(28px, 10.2cqw, 41px);
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-screen {
    border-radius: clamp(26px, 9.4cqw, 38px);
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-notch {
    top: 9px;
    width: min(72px, 24%);
    height: 19px;
    border-radius: 12px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-notch::before {
    right: 10px;
    width: 6px;
    height: 6px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-im-notch::after {
    right: 21px;
    width: 3px;
    height: 3px;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-ios-motion .maq-am-statusbar {
    height: 38px;
    padding: 12px 22px 0;
}
html:not(.is-standalone) body.maq-gate-install-mode.maq-gate-android-motion .maq-ios-motion .maq-am-home-indicator {
    bottom: 9px;
    width: min(120px, 38%);
    height: 5px;
    margin-left: 0;
    left: 50%;
    transform: translateX(-50%);
}
.maq-am-head { width: 100%; text-align: center; }
.maq-am-title {
    display: block;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 800;
}
.maq-am-caption {
    margin: 5px 0 0;
    color: var(--text-sec);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    min-height: 1.4em;
}
.maq-am-phone { width: min(100%, 268px); }
.maq-am-bezel {
    position: relative;
    padding: 2px;
    border-radius: 18px;
    background: linear-gradient(160deg, #3d4248 0%, #171a1e 45%, #090a0c 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        inset 0 -1px 0 rgba(0,0,0,0.55),
        0 12px 28px rgba(0,0,0,0.4);
}
.maq-am-bezel::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 16px;
    background: #050607;
    pointer-events: none;
}
.maq-am-screen {
    position: relative;
    z-index: 1;
    height: 508px;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    isolation: isolate;
}
.maq-am-punch {
    position: absolute;
    top: 6px;
    left: 50%;
    z-index: 13;
    width: 48px;
    height: 6px;
    margin-left: -24px;
    border-radius: 999px;
    background: #0a0b0d;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
    pointer-events: none;
}
.maq-am-statusbar {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 12;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 22px;
    padding: 0 12px;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    background: linear-gradient(180deg, rgba(0,0,0,0.4), transparent);
    pointer-events: none;
}
.maq-am-bat {
    width: 14px; height: 8px;
    border: 1.5px solid #fff;
    border-radius: 2px;
    position: relative;
    flex-shrink: 0;
    background: linear-gradient(90deg, #fff 0 70%, transparent 70%);
}
.maq-am-bat::after {
    content: "";
    position: absolute;
    left: -3px; top: 1.5px;
    width: 2px; height: 4px;
    border-radius: 1px 0 0 1px;
    background: #fff;
}
.maq-am-home-indicator {
    position: absolute;
    left: 50%; bottom: 5px;
    z-index: 12;
    width: 88px; height: 4px;
    margin-left: -44px;
    border-radius: 999px;
    background: rgba(255,255,255,0.35);
}
.maq-am-layer {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.28s ease;
}
/* طبقات حسب الخطوة */
#maq-am-screen[data-step="0"] .maq-am-layer--wa { opacity: 1; }
#maq-am-screen[data-step="1"] .maq-am-layer--browser,
#maq-am-screen[data-step="2"] .maq-am-layer--browser,
#maq-am-screen[data-step="3"] .maq-am-layer--browser { opacity: 1; }
#maq-am-screen[data-step="4"] .maq-am-layer--browser { opacity: 1; }
#maq-am-screen[data-step="4"] .maq-am-layer--dialog { opacity: 1; }
#maq-am-screen[data-step="5"] .maq-am-layer--browser { opacity: 1; }
#maq-am-screen[data-step="5"] .maq-am-layer--prompt { opacity: 1; }
#maq-am-screen[data-step="6"] .maq-am-layer--home { opacity: 1; }
#maq-am-screen[data-step="7"] .maq-am-layer--app { opacity: 1; }
#maq-am-screen[data-step="8"] .maq-am-layer--trial { opacity: 1; }
#maq-am-screen[data-step="9"] .maq-am-layer--hall { opacity: 1; }

/* آيفون الصحي: واتساب → فتح في Safari → مشاركة → إضافة للشاشة → التطبيق */
#maq-im-screen[data-step="0"] .maq-im-layer--wa { opacity: 1; }
#maq-im-screen[data-step="1"] .maq-im-layer--inapp { opacity: 1; }
#maq-im-screen[data-step="2"] .maq-im-layer--safari,
#maq-im-screen[data-step="3"] .maq-im-layer--safari { opacity: 1; }
#maq-im-screen[data-step="4"] .maq-im-layer--safari { opacity: 1; }
#maq-im-screen[data-step="4"] .maq-im-layer--share { opacity: 1; }
#maq-im-screen[data-step="5"] .maq-im-layer--confirm { opacity: 1; }
#maq-im-screen[data-step="6"] .maq-im-layer--home { opacity: 1; }
#maq-im-screen[data-step="7"] .maq-im-layer--app { opacity: 1; }
#maq-im-screen[data-step="8"] .maq-im-layer--trial { opacity: 1; }
#maq-im-screen[data-step="9"] .maq-im-layer--hall { opacity: 1; }

.maq-am-layer--app,
.maq-am-layer--trial,
.maq-am-layer--hall,
.maq-im-layer--app,
.maq-im-layer--trial,
.maq-im-layer--hall { z-index: 4; }
.maq-im-layer--inapp { z-index: 3; }
.maq-im-layer--share { z-index: 6; }
.maq-im-layer--confirm { z-index: 7; }

/* إطار آيفون: حواف أنعم + Dynamic Island + أزرار جانبية */
.maq-im-phone {
    width: min(100%, 286px);
}
.maq-im-bezel {
    position: relative;
    padding: 3.5px;
    border-radius: 42px;
    background:
        linear-gradient(
            152deg,
            #eceff3 0%,
            #b4bac3 12%,
            #6d747e 32%,
            #2a2e34 58%,
            #0c0d10 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 -1px 0 rgba(0, 0, 0, 0.6),
        0 16px 36px rgba(0, 0, 0, 0.45);
}
.maq-im-bezel::before {
    inset: 2.5px;
    border-radius: 39.5px;
    background: #000;
}
.maq-im-bezel::after {
    content: "";
    position: absolute;
    top: 108px;
    right: -2.5px;
    z-index: 2;
    width: 3px;
    height: 62px;
    border-radius: 2px 1px 1px 2px;
    background: linear-gradient(180deg, #8a9099 0%, #3a4048 48%, #1c2026 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    pointer-events: none;
}
.maq-im-screen {
    border-radius: 37px;
    background: #000;
}
.maq-im-notch {
    top: 10px;
    left: 50%;
    z-index: 14;
    width: 72px;
    height: 19px;
    margin-left: 0;
    transform: translateX(-50%);
    border-radius: 12px;
    background: #050505;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 1px 6px rgba(0, 0, 0, 0.45);
}
.maq-im-notch::before,
.maq-im-notch::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    pointer-events: none;
}
/* الكاميرا الأمامية داخل Dynamic Island */
.maq-im-notch::before {
    right: 10px;
    width: 6px;
    height: 6px;
    background:
        radial-gradient(circle at 35% 35%, #6a8aaa 0%, #1a2a3a 55%, #0a1018 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.maq-im-notch::after {
    right: 21px;
    width: 3px;
    height: 3px;
    background: #12151a;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.maq-ios-motion .maq-am-statusbar {
    height: 38px;
    padding: 12px 22px 0;
    background: transparent;
}
.maq-ios-motion .maq-am-home-indicator {
    bottom: 9px;
    left: 50%;
    width: 120px;
    height: 5px;
    margin-left: 0;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.58);
}
.maq-ios-motion .maq-im-safari-top,
.maq-ios-motion .maq-im-inapp-top,
.maq-ios-motion .maq-im-confirm-bar {
    padding-top: 36px;
}
.maq-ios-motion .maq-am-wa-top {
    padding-top: 38px;
}

/* متصفح واتساب الداخلي */
.maq-im-inapp {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #15202b;
    color: #e7e9ea;
    font-family: "Cairo", "Tajawal", sans-serif;
    position: relative;
}
.maq-im-inapp-top {
    display: grid;
    grid-template-columns: 28px 1fr 28px;
    align-items: center;
    gap: 8px;
    padding: 28px 10px 8px;
    background: #0f171f;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.maq-im-inapp-x,
.maq-im-inapp-more {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    color: #e7e9ea;
    font-size: 0.86rem;
}
#maq-im-screen[data-step="1"] .maq-im-inapp-more {
    color: #25d366;
    transform: scale(1.12);
}
.maq-im-inapp-url {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #d7dde3;
    font-size: 0.6rem;
    font-weight: 700;
}
.maq-im-inapp-page {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 6px;
    display: flex;
    flex-direction: column;
    background: #0f1720;
}
.maq-im-inapp-menu {
    position: absolute;
    top: 58px;
    left: 10px;
    z-index: 3;
    min-width: 168px;
    padding: 6px;
    border-radius: 14px;
    background: #1c252f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.maq-im-inapp-menu.is-open {
    opacity: 1;
    transform: translateY(0);
}
.maq-im-inapp-menu-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    color: #e7e9ea;
    font-size: 0.7rem;
    font-weight: 700;
}
.maq-im-inapp-menu-row i {
    width: 16px;
    text-align: center;
    color: #8ab4f8;
}
#maq-im-open-safari-row {
    background: rgba(0, 122, 255, 0.16);
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.45);
}

.maq-im-safari {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #f2f2f7;
    color: #111;
    font-family: "Cairo", "Tajawal", sans-serif;
}
.maq-im-safari-top {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 10px 8px;
    background: #f8f8fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.maq-im-safari-url {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 12px;
    background: #e5e5ea;
    color: #1c1c1e;
    font-size: 0.62rem;
    font-weight: 700;
}
.maq-im-safari-url i { font-size: 0.52rem; opacity: 0.7; }
.maq-im-safari-reload {
    margin-inline-start: auto;
    color: #8e8e93;
    font-size: 0.62rem !important;
}
.maq-im-safari-page {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    padding: 6px;
    display: flex;
    flex-direction: column;
    background: #0f1720;
}
.maq-im-safari-bar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    min-height: 42px;
    padding: 4px 6px 10px;
    background: #f8f8fa;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: #007aff;
    font-size: 0.92rem;
}
.maq-im-safari-bar > span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
}
.maq-im-share {
    position: relative;
}
#maq-im-screen[data-step="3"] .maq-im-share {
    color: #0056c7;
    transform: scale(1.12);
}
.maq-im-share-sheet {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 8px;
    z-index: 2;
    padding: 10px 8px 8px;
    border-radius: 16px;
    background: #f2f2f7;
    color: #111;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}
.maq-im-share-title {
    display: block;
    margin: 2px 0 8px;
    text-align: center;
    font-size: 0.66rem;
    font-weight: 800;
    color: #3a3a3c;
}
.maq-im-share-apps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    padding: 4px 2px 8px;
}
.maq-im-share-apps > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #3a3a3c;
    font-size: 0.72rem;
}
.maq-im-share-apps i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #007aff;
    font-size: 0.9rem;
}
.maq-im-share-apps small {
    font-size: 0.52rem;
    font-weight: 700;
}
.maq-im-share-actions {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(60, 60, 67, 0.12);
}
.maq-im-share-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 0 12px;
    background: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}
.maq-im-share-row i {
    width: 16px;
    text-align: center;
    color: #3a3a3c;
}
#maq-im-add-home {
    box-shadow: inset 0 0 0 1.5px #007aff;
    color: #007aff;
}
#maq-im-add-home i { color: #007aff; }
.maq-im-share-cancel {
    margin-top: 8px;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: #007aff;
    font-size: 0.74rem;
    font-weight: 800;
}

/* شاشة الإضافة كما في Safari */
.maq-im-confirm {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    background: #f2f2f7;
    color: #111;
    font-family: "Cairo", "Tajawal", sans-serif;
}
.maq-im-confirm-bar {
    display: grid;
    grid-template-columns: 54px 1fr 54px;
    align-items: center;
    gap: 4px;
    padding: 28px 10px 10px;
    background: #f8f8fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.maq-im-confirm-bar strong {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #1c1c1e;
    line-height: 1.25;
}
.maq-im-confirm-cancel,
.maq-im-confirm-ok {
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 800;
    color: #007aff;
}
.maq-im-confirm-ok {
    justify-content: flex-end;
}
#maq-im-screen[data-step="5"] .maq-im-confirm-ok {
    text-decoration: underline;
    text-underline-offset: 2px;
}
.maq-im-confirm-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 28px 16px 16px;
    text-align: center;
}
.maq-im-confirm-body img {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}
.maq-im-confirm-name {
    min-width: 70%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(60, 60, 67, 0.18);
    font-size: 0.78rem;
    font-weight: 800;
    color: #1c1c1e;
}
.maq-im-confirm-hint {
    margin: 0;
    font-size: 0.62rem;
    color: #636366;
    line-height: 1.4;
}
.maq-am-brand--safari {
    background: linear-gradient(160deg, #59c8ff 0%, #1a73e8 55%, #0b5bd3 100%);
    color: #fff;
}
.maq-am-brand--safari i {
    font-size: 1.05rem;
}

/* أيقونات الشاشة الرئيسية للآيفون — شكل iOS */
.maq-ios-motion .maq-am-wallpaper {
    background:
        radial-gradient(circle at 18% 12%, rgba(120, 180, 255, 0.42), transparent 42%),
        radial-gradient(circle at 88% 78%, rgba(255, 120, 180, 0.22), transparent 46%),
        linear-gradient(165deg, #2a3a55 0%, #101820 52%, #1a2433 100%);
}
.maq-ios-motion .maq-am-home-grid--top {
    max-width: 210px;
    margin-top: 46px;
    gap: 16px 14px;
}
.maq-ios-motion .maq-am-home-grid--top.is-installed {
    max-width: 250px;
}
.maq-ios-motion .maq-am-home-app {
    gap: 6px;
}
.maq-ios-motion .maq-am-home-app > i,
.maq-ios-motion .maq-am-home-icon,
.maq-ios-motion .maq-am-brand {
    width: 48px;
    height: 48px;
    border-radius: 12px;
}
.maq-ios-motion .maq-am-home-icon {
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.25) inset,
        0 6px 14px rgba(0, 0, 0, 0.28);
}
.maq-ios-motion .maq-am-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.28) inset,
        0 5px 12px rgba(0, 0, 0, 0.26);
}
.maq-ios-motion .maq-am-brand svg {
    width: 62%;
    height: 62%;
}
.maq-ios-motion .maq-am-brand--wa {
    background: linear-gradient(160deg, #2fe574 0%, #25d366 55%, #1ebe57 100%);
    padding: 0;
}
.maq-ios-motion .maq-am-brand--safari {
    background:
        radial-gradient(circle at 50% 50%, #fff 0 18%, transparent 19%),
        conic-gradient(from 0deg, #1d8fff, #34c759, #ffcc00, #ff3b30, #af52de, #1d8fff);
    color: #fff;
}
.maq-ios-motion .maq-am-brand--safari i {
    font-size: 1.35rem;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.maq-ios-motion .maq-am-brand--phone {
    background: linear-gradient(160deg, #64d2ff 0%, #0a84ff 60%, #0066cc 100%);
    padding: 0;
}
.maq-ios-motion .maq-am-brand--cam {
    background: linear-gradient(160deg, #8e8e93 0%, #636366 55%, #48484a 100%);
    padding: 0;
}
.maq-ios-motion .maq-am-brand--mail {
    background: linear-gradient(160deg, #5ac8fa 0%, #007aff 60%, #0056c7 100%);
    padding: 0;
}
.maq-ios-motion .maq-am-home-app small {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.maq-ios-motion .maq-am-dock {
    left: 14px;
    right: 14px;
    bottom: 26px;
    height: 62px;
    padding: 0 10px;
    border-radius: 24px;
    /* بلا blur داخل الشاشة المصغّرة — كان يسبب تشويشًا على آيفون */
    background: rgba(40, 44, 52, 0.88);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.maq-ios-motion .maq-am-dock .maq-am-brand {
    width: 44px;
    height: 44px;
    border-radius: 11px;
}
.maq-ios-motion .maq-im-share-apps i {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 3px 8px rgba(0, 0, 0, 0.12);
}
.maq-ios-motion .maq-im-share-apps > span:nth-child(1) i {
    background: #25d366;
    color: #fff;
}
.maq-ios-motion .maq-im-share-apps > span:nth-child(2) i {
    background: #34c759;
    color: #fff;
}
.maq-ios-motion .maq-im-share-apps > span:nth-child(3) i {
    background: #007aff;
    color: #fff;
}
.maq-ios-motion .maq-im-share-apps > span:nth-child(4) i {
    background: #8e8e93;
    color: #fff;
}

/* اقتباس من شاشة الترحيب الحقيقية (standalone) */
.maq-am-app {
    --am-primary: #00a878;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: 36px 14px 22px;
    box-sizing: border-box;
    background: #15202b;
    color: #e7e9ea;
    text-align: center;
    font-family: "Tajawal", "Cairo", sans-serif;
}
.maq-am-app-logo {
    width: 54px;
    height: 54px;
    margin-top: 4px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}
.maq-am-app-brand {
    margin-top: 8px;
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    color: #e7e9ea;
    line-height: 1.3;
}
.maq-am-app-course {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    margin: 14px 0 0;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.88);
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(248, 250, 252, 0.82) 48%,
            rgba(236, 242, 248, 0.68) 100%
        );
    color: #00664d;
    font-family: "Cairo", "Tajawal", sans-serif;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}
.maq-am-app-points {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1 1 auto;
    text-align: right;
}
.maq-am-app-points li {
    position: relative;
    margin: 0;
    padding: 0 1.35rem 0 0.1rem;
    font-size: 0.52rem;
    font-weight: 500;
    line-height: 1.45;
    color: #e7e9ea;
}
.maq-am-app-points li::before {
    content: "\f00c";
    position: absolute;
    top: 0.05em;
    right: 0;
    width: 0.95rem;
    height: 0.95rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid rgba(45, 212, 165, 0.55);
    background: rgba(0, 168, 120, 0.32);
    color: #2dd4a5;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.48rem;
    line-height: 1;
}
.maq-am-app-actions {
    width: 100%;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.maq-am-app-trial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    border-radius: 12px;
    background: #00a878;
    color: #fff;
    font-size: 0.64rem;
    font-weight: 700;
    box-shadow: 0 8px 16px -12px rgba(0, 168, 120, 0.85);
}
.maq-am-screen[data-step="7"] .maq-am-app-trial {
    outline: 2px solid rgba(45, 212, 165, 0.85);
    outline-offset: 2px;
}
.maq-am-app-account {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: transparent;
    color: #e7e9ea;
    font-size: 0.56rem;
    font-weight: 500;
}

/* اقتباس مصغّر من maqamat/trial/board.html + board.css */
.maq-am-trial {
    --am-primary: #00a878;
    --am-text: #e7e9ea;
    --am-sec: #8b98a5;
    --am-glass: rgba(255, 255, 255, 0.04);
    --am-border: rgba(255, 255, 255, 0.12);
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    color: var(--am-text);
    font-family: "Tajawal", "Cairo", sans-serif;
    background:
        radial-gradient(120% 70% at 50% -10%, rgba(0, 168, 120, 0.18), transparent 58%),
        #0f1720;
}
.maq-am-trial-header {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    gap: 8px;
    padding: 28px 12px 8px;
    position: relative;
    z-index: 2;
}
.maq-am-trial-back,
.maq-am-trial-theme {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: #e7e9ea;
    font-size: 0.72rem;
    box-sizing: border-box;
}
/* RTL: العمود الأول يمينًا = رجوع · العمود الثالث يسارًا = الثيم */
.maq-am-trial-back {
    grid-column: 1;
    justify-self: start;
}
.maq-am-trial-logo {
    grid-column: 2;
    justify-self: center;
    height: 28px;
    width: auto;
    display: block;
    filter: brightness(0) invert(1);
}
.maq-am-trial-theme {
    grid-column: 3;
    justify-self: end;
}
.maq-am-trial-theme i {
    color: #fbbf24;
}
.maq-am-trial-main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    padding: 0 8px 18px;
    box-sizing: border-box;
}
.maq-am-trial-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 10px 8px 8px;
    border-radius: 18px;
    border: 1px solid var(--am-border);
    background: rgba(255, 255, 255, 0.036);
    box-shadow: 0 12px 28px -18px rgba(0, 0, 0, 0.42);
    overflow: hidden;
}
.maq-am-trial-entry-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 8px;
    padding: 2px 0 2px;
    text-align: center;
}
.maq-am-trial-entry-head h1 {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--am-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maq-am-trial-body {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-rows: max-content minmax(0, 1fr);
    gap: 8px;
    overflow: hidden;
}
.maq-am-trial-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    min-height: 0;
}
.maq-am-trial-section.is-live {
    height: 100%;
}
.maq-am-trial-section-icon.is-live {
    border-color: rgba(226, 85, 85, 0.3);
    background: rgba(226, 85, 85, 0.14);
    color: #e25555;
}
.maq-am-trial-empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 8px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #8b98a5;
    font-size: 0.48rem;
    font-weight: 500;
    text-align: center;
    line-height: 1.35;
}
.maq-am-trial-section-head {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 9px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background:
        linear-gradient(
            165deg,
            rgba(255, 255, 255, 0.14) 0%,
            rgba(255, 255, 255, 0.07) 55%,
            rgba(255, 255, 255, 0.04) 100%
        );
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.18),
        0 8px 16px -14px rgba(0, 0, 0, 0.5);
}
.maq-am-trial-section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    border: 1px solid rgba(0, 168, 120, 0.28);
    background: rgba(0, 168, 120, 0.14);
    color: var(--am-primary);
    flex-shrink: 0;
    font-size: 0.62rem;
}
.maq-am-trial-section-copy {
    min-width: 0;
    flex: 1;
    text-align: right;
}
.maq-am-trial-section-copy h2 {
    margin: 0;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--am-text);
}
.maq-am-trial-section-copy span {
    display: block;
    margin-top: 3px;
    color: var(--am-sec);
    font-size: 0.48rem;
    font-weight: 400;
    line-height: 1.3;
}
.maq-am-trial-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.maq-am-trial-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 9px 8px;
    border-radius: 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}
.maq-am-trial-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}
.maq-am-trial-item-meta {
    min-width: 0;
    flex: 1;
    text-align: right;
}
.maq-am-trial-item-meta strong {
    display: block;
    font-size: 0.58rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--am-text);
}
.maq-am-trial-item-meta span {
    display: block;
    margin-top: 2px;
    color: var(--am-sec);
    font-size: 0.48rem;
    font-weight: 400;
}
.maq-am-trial-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 18px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(0, 168, 120, 0.12);
    color: var(--am-primary);
    font-size: 0.48rem;
    font-weight: 800;
    line-height: 1;
}
.maq-am-trial-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
}
.maq-am-trial-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 10px;
    border: 0;
    font-size: 0.56rem;
    font-weight: 600;
    white-space: nowrap;
}
.maq-am-trial-btn.is-enter {
    background: var(--am-primary);
    color: #fff;
    box-shadow: 0 8px 16px -12px rgba(0, 168, 120, 0.8);
}
.maq-am-screen[data-step="8"] .maq-am-trial-btn.is-enter {
    outline: 2px solid rgba(0, 168, 120, 0.85);
    outline-offset: 2px;
}

/* اقتباس مصغّر من maqamat/trial (مشغّل التسجيل is-playback) */
.maq-am-meet {
    --am-primary: #00a878;
    --am-cyan: #2dd4a5;
    --am-text: #e7e9ea;
    --am-sec: #8b98a5;
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto auto;
    box-sizing: border-box;
    background: #0f1720;
    color: var(--am-text);
    font-family: "Tajawal", "Cairo", sans-serif;
}
.maq-am-meet-stage {
    position: relative;
    min-height: 0;
    display: grid;
    place-items: center;
    padding: 28px 8px 4px;
}
.maq-am-meet-tile {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    background: radial-gradient(ellipse at center, #243746 0%, #1c2c3a 70%);
}
.maq-am-meet-pane {
    position: relative;
    height: 100%;
    display: grid;
    place-items: center;
}
.maq-am-meet-live {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(0, 168, 120, 0.22);
    color: #fff;
    font-size: 0.5rem;
    font-weight: 600;
}
.maq-am-meet-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--am-cyan);
}
.maq-am-meet-face {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
}
.maq-am-meet-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2.5px solid var(--am-primary);
    background: #1a2836;
    padding: 8px;
    box-sizing: border-box;
    display: grid;
    place-items: center;
}
.maq-am-meet-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
    display: block;
}
.maq-am-meet-name {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--am-sec);
    text-align: center;
}
.maq-am-meet-wave {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}
.maq-am-meet-wave i {
    width: 2.5px;
    height: 14px;
    border-radius: 6px;
    background: rgba(0, 168, 120, 0.75);
    display: block;
    transform: scaleY(0.28);
    transform-origin: bottom center;
    animation: maq-am-meet-bar 1.6s ease-in-out infinite;
}
.maq-am-meet-wave i:nth-child(2) { animation-delay: .12s; }
.maq-am-meet-wave i:nth-child(3) { animation-delay: .22s; }
.maq-am-meet-wave i:nth-child(4) { animation-delay: .08s; }
.maq-am-meet-wave i:nth-child(5) { animation-delay: .28s; }
@keyframes maq-am-meet-bar {
    0%, 100% { transform: scaleY(0.28); }
    50% { transform: scaleY(0.72); }
}
.maq-am-meet-chapters {
    padding: 6px 10px 2px;
}
.maq-am-meet-scrub {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--am-sec);
    font-size: 0.48rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}
.maq-am-meet-scrub-track {
    position: relative;
    flex: 1 1 auto;
    height: 4px;
    border-radius: 999px;
    background: #253341;
    overflow: visible;
}
.maq-am-meet-scrub-fill {
    position: absolute;
    inset: 0 0 0 auto;
    width: 8%;
    border-radius: inherit;
    background: var(--am-primary);
}
.maq-am-meet-scrub-head {
    position: absolute;
    top: 50%;
    right: 8%;
    width: 10px;
    height: 10px;
    margin: -5px -5px 0 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(45, 212, 165, 0.45);
}
.maq-am-meet-scrub-marks {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 50%, #5b7a90 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 28% 50%, #5b7a90 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 44% 50%, #5b7a90 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 58% 50%, #5b7a90 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 72% 50%, #5b7a90 0 1.5px, transparent 1.6px),
        radial-gradient(circle at 86% 50%, #5b7a90 0 1.5px, transparent 1.6px);
}
.maq-am-meet-scrub-tip {
    position: absolute;
    right: 2%;
    bottom: calc(100% + 4px);
    padding: 2px 6px;
    border-radius: 6px;
    background: #1a2734;
    color: #e7e9ea;
    font-size: 0.42rem;
    font-weight: 600;
    white-space: nowrap;
}
.maq-am-meet-bar {
    padding: 6px 10px 16px;
    background: #15202b;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.maq-am-meet-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.maq-am-meet-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.maq-am-meet-btn {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a2734;
    color: var(--am-text);
    font-size: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.maq-am-meet-btn.is-play {
    width: 38px;
    height: 38px;
    background: var(--am-primary);
    border-color: transparent;
    color: #fff;
}
.maq-am-meet-btn.is-leave {
    background: #ea4335;
    border-color: transparent;
    color: #fff;
    transform: rotate(135deg);
}
.maq-am-meet-btn.is-wa {
    background: #25d366;
    border-color: transparent;
    color: #fff;
}
.maq-am-screen[data-step="9"] .maq-am-meet-btn.is-play {
    outline: 2px solid rgba(0, 168, 120, 0.85);
    outline-offset: 2px;
}

/* واتساب */
.maq-am-layer--wa {
    display: flex;
    flex-direction: column;
    background: #0b141a;
}
.maq-am-wa-top {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 26px 10px 10px;
    background: #1f2c34;
    color: #e9edef;
}
.maq-am-wa-back {
    width: 10px; height: 10px;
    border-right: 2px solid #e9edef;
    border-bottom: 2px solid #e9edef;
    transform: rotate(-45deg);
}
.maq-am-wa-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: contain;
    object-position: center;
    padding: 3px;
    box-sizing: border-box;
    background: #ffffff;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,0.12);
}
.maq-am-wa-who strong { display: block; font-size: 0.72rem; }
.maq-am-wa-who small { color: #8696a0; font-size: 0.58rem; }
.maq-am-wa-chat {
    flex: 1;
    padding: 14px 10px;
    background:
        radial-gradient(circle at 20% 10%, rgba(0,168,132,0.08), transparent 40%),
        #0b141a;
}
.maq-am-wa-bubble {
    max-width: 92%;
    margin-inline-start: auto;
    padding: 8px 10px 6px;
    border-radius: 10px 10px 2px 10px;
    background: #005c4b;
    color: #e9edef;
    box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
.maq-am-wa-bubble p {
    margin: 0 0 6px;
    font-size: 0.7rem;
    line-height: 1.4;
    font-weight: 600;
}
.maq-am-wa-link {
    display: block;
    color: #53bdeb;
    font-size: 0.66rem;
    font-weight: 700;
    text-decoration: underline;
    word-break: break-all;
    padding: 4px 0;
}
.maq-am-screen[data-step="0"] .maq-am-wa-link {
    background: rgba(83,189,235,0.15);
    border-radius: 4px;
    box-shadow: 0 0 0 2px rgba(83,189,235,0.35);
}
.maq-am-wa-time {
    display: block;
    text-align: left;
    margin-top: 4px;
    color: #8696a0;
    font-size: 0.52rem;
}
.maq-am-wa-input {
    margin: 8px;
    height: 34px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 999px;
    background: #1f2c34;
    color: #8696a0;
    font-size: 0.68rem;
}

/* كروم عربي — مطابق لواجهة أندرويد */
.maq-am-chrome {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #202124;
    font-family: "Tajawal", "Cairo", sans-serif;
}
.maq-am-omnibox-row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 24px 4px 7px;
    background: #202124;
}
.maq-am-omnibox-row .maq-am-omnibox {
    flex: 1 1 auto;
    min-width: 0;
}
.maq-am-home-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #e8eaed;
    font-size: 0.78rem;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 0;
}
.maq-am-omnibox {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #303134;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.maq-am-secure {
    flex: 0 0 auto;
    font-size: 0.58rem;
    color: #9aa0a6;
}
.maq-am-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.66rem;
    font-weight: 600;
    color: #e8eaed;
    direction: ltr;
    text-align: left;
    unicode-bidi: plaintext;
}
.maq-am-plus {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #e8eaed;
    font-size: 0.72rem;
    padding: 0;
    display: inline-grid;
    place-items: center;
}
.maq-am-tabs { display: none !important; }
.maq-am-menu-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}
.maq-am-menu-btn span {
    width: 3.5px;
    height: 3.5px;
    border-radius: 50%;
    background: #e8eaed;
}
.maq-am-screen[data-step="2"] .maq-am-menu-btn {
    background: rgba(138,180,248,0.22);
    box-shadow: 0 0 0 3px rgba(138,180,248,0.28);
}

.maq-am-page {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 6px;
    background: #0f1720;
    display: flex;
    flex-direction: column;
}
/* نافذة التحميل داخل الاستعراض — اقتباس حرفي من الصفحة الحقيقية */
.maq-am-gate {
    container-type: inline-size;
    container-name: am-gate;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 2.8cqw;
    padding: 0 0 2.4cqw;
    border-radius: 5.2cqw;
    border: 1px solid rgba(255,255,255,0.18);
    background:
        linear-gradient(
            165deg,
            rgba(255,255,255,0.12) 0%,
            rgba(26,34,44,0.88) 38%,
            rgba(21,27,34,0.96) 100%
        );
    color: #e7e9ea;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 3cqw 8cqw rgba(0,0,0,0.32);
    box-sizing: border-box;
    overflow: hidden;
}
.maq-am-gate-lead {
    display: flex;
    align-items: center;
    gap: 2.8cqw;
    flex: 0 0 auto;
    margin: 0;
    padding: 3.2cqw 3.4cqw 2.8cqw;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0.03) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}
.maq-am-gate-icon {
    width: 13.5cqw;
    height: 13.5cqw;
    border-radius: 3.4cqw;
    background: #fff;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.24);
    box-shadow: 0 1.4cqw 3.2cqw rgba(0,0,0,0.22);
    flex: 0 0 auto;
    transform: translateX(1.8cqw);
}
.maq-am-gate-copy {
    min-width: 0;
    flex: 1;
    text-align: right;
}
.maq-am-gate-copy strong {
    display: block;
    font-size: 4.6cqw;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0.01em;
}
.maq-am-gate-copy small {
    display: block;
    margin-top: 0.5cqw;
    color: #8b98a5;
    font-size: 3.1cqw;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
}
.maq-am-gate-features {
    flex: 0 0 auto;
    margin: 0 3.2cqw;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 3.8cqw;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
}
.maq-am-gate-features-title {
    flex: 0 0 auto;
    padding: 1.9cqw 2.8cqw;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.06);
    color: rgba(231,233,234,0.82);
    font-size: 2.95cqw;
    font-weight: 600;
    line-height: 1.25;
    text-align: right;
}
.maq-am-gate-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
}
.maq-am-gate-points li {
    position: relative;
    margin: 0;
    padding-block: 2.2cqw;
    padding-inline: 7.6cqw 2.8cqw;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 2.95cqw;
    font-weight: 700;
    line-height: 1.3;
    color: #e7e9ea;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.maq-am-gate-points li:last-child { border-bottom: 0; }
.maq-am-gate-points li::before {
    content: "\f00c";
    position: absolute;
    top: 50%;
    inset-inline-start: 2.4cqw;
    transform: translateY(-50%);
    width: 3.6cqw;
    height: 3.6cqw;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(0, 168, 120, 0.18);
    color: #00a878;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 1.9cqw;
    line-height: 1;
}
.maq-am-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 2cqw;
    flex: 0 0 auto;
    margin: auto 3.2cqw 0;
}
.maq-am-gate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.8cqw;
    width: 100%;
    min-height: 13cqw;
    padding: 2.4cqw 3.2cqw;
    border-radius: 3.8cqw;
    font-size: 3.4cqw;
    font-weight: 700;
    text-align: right;
    box-sizing: border-box;
}
/* دخول التجريبية — نفس .maq-browser-trial */
.maq-am-gate-btn--trial {
    justify-content: flex-start;
    min-height: 13.5cqw;
    padding: 2cqw 3.2cqw;
    border-radius: 3.8cqw;
    border: 1px solid rgba(109, 255, 192, 0.34);
    background: linear-gradient(145deg, #1fc492 0%, #0a6b58 48%, #085445 100%);
    color: #f4fff9;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.22),
        0 2.8cqw 6.5cqw rgba(10, 107, 88, 0.34);
}
.maq-am-gate-btn--trial > i {
    width: 8.5cqw;
    height: 8.5cqw;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    background: rgba(255,255,255,0.16);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18);
    font-size: 2.9cqw;
    flex: 0 0 auto;
}
.maq-am-gate-btn--trial > span,
.maq-am-gate-btn--motion > span {
    display: flex;
    flex-direction: column;
    gap: 0.4cqw;
    min-width: 0;
    flex: 1;
}
.maq-am-gate-btn--trial b,
.maq-am-gate-btn--motion b {
    font-size: 3.6cqw;
    font-weight: 800;
    line-height: 1.2;
}
.maq-am-gate-btn--trial small {
    font-size: 2.55cqw;
    font-weight: 600;
    color: rgba(231, 255, 238, 0.78);
    line-height: 1.25;
}
.maq-am-gate-btn--motion small {
    font-size: 2.55cqw;
    font-weight: 600;
    color: rgba(231,233,234,0.68);
    line-height: 1.25;
}
/* وحدة التحميل الموسّعة — نفس .maq-install-cta-pop أثناء التثبيت */
.maq-am-gate-cta-pop {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    border: 0;
    border-radius: 4.2cqw;
    background: rgba(255,255,255,0.05);
    box-shadow:
        0 0 0 1px color-mix(in srgb, #ffffff 22%, #00a878),
        0 2.8cqw 6.5cqw rgba(0, 168, 120, 0.28);
    overflow: hidden;
    isolation: isolate;
}
.maq-am-gate-cta-pop .maq-am-gate-btn--install {
    min-height: 10.5cqw;
    height: 10.5cqw;
    padding: 0 4cqw;
    border: 0;
    border-radius: 4.2cqw 4.2cqw 0 0;
    background:
        linear-gradient(
            180deg,
            color-mix(in srgb, #ffffff 22%, #00a878) 0%,
            #00a878 55%,
            color-mix(in srgb, #000000 12%, #00a878) 100%
        );
    color: #fff;
    justify-content: center;
    text-align: center;
    font-size: 3.7cqw;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.3;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}
.maq-am-gate-timer {
    width: 100%;
    margin: 0;
    border-radius: 0 0 4.2cqw 4.2cqw;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
}
.maq-am-gate-sheet {
    display: flex;
    flex-direction: column;
    gap: 2.2cqw;
    width: 100%;
    margin: 0;
    padding: 2.4cqw 2.8cqw 2.6cqw;
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    box-sizing: border-box;
}
.maq-am-gate-sheet-row {
    display: flex;
    align-items: flex-start;
    gap: 2.8cqw;
}
.maq-am-gate-sheet-copy {
    display: flex;
    flex-direction: column;
    gap: 0.7cqw;
    min-width: 0;
    flex: 1 1 auto;
    text-align: right;
}
.maq-am-gate-sheet-copy strong {
    color: #e7e9ea;
    font-size: 3.15cqw;
    font-weight: 800;
    line-height: 1.25;
}
.maq-am-gate-sheet-copy span {
    color: #8b98a5;
    font-size: 2.7cqw;
    font-weight: 600;
    line-height: 1.45;
}
.maq-am-gate-eta {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5cqw;
    min-width: 7.5cqw;
    padding: 1.2cqw 2.2cqw 1cqw;
    border-radius: 999px;
    border: 1px solid rgba(0, 168, 120, 0.42);
    background: linear-gradient(165deg, rgba(0,168,120,0.22) 0%, rgba(0,168,120,0.1) 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
    color: #8b98a5;
    font-variant-numeric: tabular-nums;
    flex: 0 0 auto;
    align-self: flex-start;
}
.maq-am-gate-eta > span {
    color: #6dffc0;
    font-size: 3.5cqw;
    font-weight: 800;
    line-height: 1;
    direction: ltr;
    unicode-bidi: isolate;
}
.maq-am-gate-eta small {
    font-size: 2.3cqw;
    font-weight: 800;
    color: rgba(109, 255, 192, 0.82);
}
.maq-am-gate-track {
    width: 100%;
    height: 1.3cqw;
    min-height: 4px;
    border-radius: 999px;
    overflow: hidden;
    direction: ltr;
    background: rgba(255,255,255,0.12);
}
.maq-am-gate-bar {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #14b884 0%, #30d158 50%, #6dffc0 100%);
}
/* طريقة التحميل — نفس .maq-motion-open */
.maq-am-gate-btn--motion {
    justify-content: flex-start;
    gap: 2.8cqw;
    min-height: 13.5cqw;
    padding: 2.6cqw 3.2cqw;
    border-radius: 3.8cqw;
    border: 1px solid rgba(255,255,255,0.14);
    background: linear-gradient(165deg, color-mix(in srgb, #00a878 16%, #15202b) 0%, rgba(11,18,32,0.88) 100%);
    color: #e7e9ea;
    box-shadow: none;
}
.maq-am-gate-btn--motion > i:first-child {
    width: 8.5cqw;
    height: 8.5cqw;
    border-radius: 2.8cqw;
    display: inline-grid;
    place-items: center;
    background: rgba(0,168,120,0.28);
    color: #6dffc0;
    font-size: 3.2cqw;
    flex: 0 0 auto;
}
.maq-am-gate-chev {
    flex: 0 0 auto;
    margin-inline-start: auto;
    color: rgba(231,233,234,0.55);
    font-size: 3cqw;
}

/* قائمة Chrome المنسدلة — أيقونات حقيقية + شكل Material */
.maq-am-menu {
    position: absolute;
    top: 56px;
    left: 6px;
    right: auto;
    width: min(86%, 236px);
    max-height: calc(100% - 68px);
    overflow: auto;
    padding: 6px 0;
    border-radius: 14px;
    background: #292a2d;
    color: #e8eaed;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.28),
        0 16px 40px rgba(0,0,0,0.55);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top left;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 6;
    -webkit-overflow-scrolling: touch;
}
.maq-am-screen[data-step="3"] .maq-am-menu {
    opacity: 1;
    transform: none;
}
.maq-am-menu-row {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 36px;
    padding: 0 16px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #e8eaed;
}
.maq-am-menu-row > span { flex: 1; min-width: 0; }
.maq-am-menu-row > i {
    width: 18px;
    flex: 0 0 auto;
    text-align: center;
    font-size: 0.78rem;
    color: #e8eaed;
    opacity: 0.92;
}
.maq-am-menu-sep {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 5px 0;
}
.maq-am-wa {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #25d366;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    color: #fff;
    font-size: 0.62rem;
}
.maq-am-check {
    width: 16px;
    height: 16px;
    border: 1.5px solid #9aa0a6;
    border-radius: 3px;
    flex: 0 0 auto;
    position: relative;
}
.maq-am-check::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #8ab4f8;
    border-width: 0 1.6px 1.6px 0;
    transform: rotate(45deg);
}
.maq-am-menu-install {
    background: transparent;
    color: #e8eaed;
}
.maq-am-menu-row > .maq-am-menu-install-ico {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-grid;
    place-items: center;
    color: #e8eaed;
    font-size: 0.78rem;
    opacity: 0.92;
    overflow: visible;
}
.maq-am-menu-install-dot {
    position: absolute;
    right: -5px;
    bottom: -5px;
    z-index: 2;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    background: #1a73e8;
    color: #fff;
    line-height: 1;
    box-shadow: 0 0 0 1.5px #292a2d;
}
.maq-am-menu-install-dot > i {
    display: block;
    font-size: 0.45rem;
    color: #fff;
    transform: translateY(0.5px);
}
.maq-am-screen[data-step="3"] .maq-am-menu-install {
    background: rgba(138, 180, 248, 0.14);
}
.maq-am-screen[data-step="3"] .maq-am-menu-install-dot {
    display: inline-flex;
}

/* ورقة تثبيت */
.maq-am-layer--dialog, .maq-am-layer--prompt { z-index: 7; }
.maq-am-dim {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.48);
}
.maq-am-sheet {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 10px 0 20px;
    border-radius: 28px 28px 0 0;
    background: #292a2d;
    color: #e8eaed;
    border-top: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -12px 36px rgba(0,0,0,0.4);
    transform: translateY(16px);
    transition: transform 0.28s ease;
}
.maq-am-screen[data-step="4"] .maq-am-sheet { transform: none; }
.maq-am-sheet-handle {
    width: 36px; height: 4px;
    margin: 0 auto 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
}
.maq-am-sheet-title {
    display: block;
    padding: 0 18px 10px;
    font-size: 0.95rem;
    font-weight: 800;
}
.maq-am-sheet-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: right;
}
.maq-am-sheet-ico {
    position: relative;
    width: 40px; height: 40px;
    flex: 0 0 auto;
}
.maq-am-sheet-ico img {
    width: 40px; height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
}
.maq-am-sheet-badge {
    position: absolute;
    left: -3px;
    bottom: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #292a2d;
    box-sizing: border-box;
}
.maq-am-sheet-badge--dl {
    background: #1a73e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.maq-am-sheet-badge--dl::before {
    content: "";
    width: 0;
    height: 0;
    border-left: 3.5px solid transparent;
    border-right: 3.5px solid transparent;
    border-top: 5px solid #fff;
    margin-top: 1px;
}
.maq-am-sheet-badge--chrome {
    background: conic-gradient(#ea4335 0 25%, #fbbc04 25% 50%, #34a853 50% 75%, #4285f4 75%);
}
.maq-am-sheet-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.maq-am-sheet-text b { font-size: 0.82rem; font-weight: 700; }
.maq-am-sheet-text small { color: #9aa0a6; font-size: 0.64rem; }
.maq-am-chev {
    width: 8px; height: 8px;
    border-left: 2px solid #9aa0a6;
    border-bottom: 2px solid #9aa0a6;
    transform: rotate(45deg);
}
.maq-am-screen[data-step="4"] .maq-am-sheet-row--install {
    background: rgba(138,180,248,0.12);
    box-shadow: inset -3px 0 0 #8ab4f8;
}

/* حوار تثبيت التطبيق */
.maq-am-prompt {
    position: absolute;
    left: 18px; right: 18px;
    top: 50%;
    transform: translateY(-50%) scale(0.96);
    padding: 18px 16px 14px;
    border-radius: 18px;
    background: #2d2e30;
    color: #e8eaed;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    transition: transform 0.25s ease;
}
.maq-am-screen[data-step="5"] .maq-am-prompt { transform: translateY(-50%); }
.maq-am-prompt > strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 14px;
}
.maq-am-prompt-app {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}
.maq-am-prompt-app img {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: #fff;
    object-fit: cover;
}
.maq-am-prompt-app b { display: block; font-size: 0.9rem; }
.maq-am-prompt-app small { color: #9aa0a6; font-size: 0.68rem; }
.maq-am-prompt-actions {
    display: flex;
    justify-content: flex-start;
    gap: 18px;
}
.maq-am-dialog-cancel,
.maq-am-dialog-ok {
    font-size: 0.86rem;
    font-weight: 800;
    padding: 6px 4px;
}
.maq-am-dialog-cancel { color: #e8eaed; }
.maq-am-dialog-ok { color: #8ab4f8; }
.maq-am-screen[data-step="5"] .maq-am-dialog-ok {
    text-shadow: 0 0 12px rgba(138,180,248,0.55);
}

/* الشاشة الرئيسية */
.maq-am-layer--home { z-index: 3; }
.maq-am-wallpaper {
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 15%, rgba(120,160,255,0.35), transparent 40%),
        radial-gradient(circle at 85% 70%, rgba(10,107,88,0.35), transparent 45%),
        linear-gradient(165deg, #1b2738 0%, #0b1018 55%, #15202b 100%);
}
.maq-am-home-search {
    position: relative; z-index: 1;
    margin: 36px 16px 18px;
    height: 34px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.75);
    font-size: 0.7rem; font-weight: 600;
}
.maq-am-home-grid {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px 6px;
    padding: 0 10px;
}
.maq-am-home-grid--top {
    grid-template-columns: repeat(2, 1fr);
    justify-items: center;
    max-width: 168px;
    margin: 8px auto 0;
    gap: 14px 18px;
}
.maq-am-home-app--target[hidden] {
    display: none !important;
}
.maq-am-home-grid--top.is-installed {
    grid-template-columns: repeat(3, 1fr);
    max-width: 220px;
}
.maq-am-home-app {
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    color: #f1f3f4; font-size: 0.58rem; font-weight: 600;
}
.maq-am-home-app > i,
.maq-am-home-icon,
.maq-am-brand {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: block;
}
.maq-am-home-icon {
    object-fit: cover;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.maq-am-brand {
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.28);
}
.maq-am-brand svg {
    width: 100%;
    height: 100%;
    display: block;
}
.maq-am-brand--wa {
    background: #25d366;
    padding: 7px;
    box-sizing: border-box;
}
.maq-am-brand--chrome {
    border-radius: 50%;
    padding: 0;
    box-sizing: border-box;
    background:
        radial-gradient(circle at 50% 50%,
            #1a73e8 0 27%,
            #ffffff 27% 36%,
            transparent 36%),
        conic-gradient(from -90deg,
            #ea4335 0deg 120deg,
            #fbbc04 120deg 240deg,
            #34a853 240deg 360deg);
}
.maq-am-brand--phone {
    background: linear-gradient(160deg, #34a853, #1b7a3a);
    padding: 9px;
    box-sizing: border-box;
}
.maq-am-brand--cam {
    background: linear-gradient(160deg, #6b7280, #374151);
    padding: 8px;
    box-sizing: border-box;
}
.maq-am-brand--play {
    background: #fff;
    padding: 7px;
    box-sizing: border-box;
}
.maq-am-brand--mail {
    background: linear-gradient(160deg, #ea4335, #c5221f);
    padding: 9px;
    box-sizing: border-box;
}
.maq-am-brand--maps {
    background: #e8f5e9;
    padding: 6px;
    box-sizing: border-box;
}
.maq-am-home-app small {
    font-size: 0.52rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.maq-am-dock {
    position: absolute; z-index: 1;
    left: 12px; right: 12px; bottom: 28px;
    display: flex; justify-content: space-around; align-items: center;
    height: 58px; padding: 0 8px;
    border-radius: 22px;
    background: rgba(255,255,255,0.14);
}
.maq-am-dock .maq-am-brand,
.maq-am-dock > i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
}
.maq-am-dock .maq-am-brand--play { padding: 6px; }
.maq-am-dock .maq-am-brand--maps { padding: 5px; }
.maq-am-screen[data-step="6"] .maq-am-home-app--target {
    display: flex !important;
    animation: maq-am-pop 0.65s ease;
}
.maq-am-screen[data-step="6"] .maq-am-home-grid--top {
    grid-template-columns: repeat(3, 1fr);
    max-width: 220px;
}
.maq-am-home-hint {
    position: absolute; z-index: 2;
    left: 16px; right: 16px; bottom: 96px;
    margin: 0; padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.55);
    color: #e7ffee;
    font-size: 0.7rem; font-weight: 800; text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
.maq-am-screen[data-step="6"] .maq-am-home-hint { opacity: 1; }

.maq-am-finger {
    position: absolute;
    width: 34px;
    height: 34px;
    margin: 0;
    opacity: 0;
    z-index: 14;
    /* مركز الدائرة = نقطة الضغط؛ تتحرك بسلاسة دون اختفاء */
    transform: translate(-50%, -50%);
    transition:
        top 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        left 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.22s ease;
    pointer-events: none;
    will-change: top, left;
}
.maq-am-finger.is-on {
    opacity: 1;
}
.maq-am-finger.is-moving .maq-am-cursor-dot {
    animation: none;
}
.maq-am-cursor {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}
.maq-am-cursor-ring {
    position: absolute;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ffd60a;
    background: rgba(255, 214, 10, 0.2);
    box-shadow:
        0 0 0 3px rgba(255, 214, 10, 0.22),
        0 4px 12px rgba(0, 0, 0, 0.4);
}
.maq-am-finger.is-on .maq-am-cursor-ring {
    animation: maq-am-ring-pulse 1.15s ease-out infinite;
}
.maq-am-cursor-dot {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #ff9f0a;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.maq-am-finger.is-on .maq-am-cursor-dot {
    animation: maq-am-dot-tap 1.15s ease-in-out infinite;
}
@keyframes maq-am-ring-pulse {
    0% { transform: scale(0.92); opacity: 1; }
    70% { transform: scale(1.28); opacity: 0.35; }
    100% { transform: scale(1.4); opacity: 0; }
}
@keyframes maq-am-dot-tap {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(0.86); }
    65% { transform: scale(1.06); }
}

.maq-am-legend {
    list-style: none; margin: 0; padding: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}
.maq-am-legend li {
    margin: 0; padding: 8px;
    border-radius: 10px;
    border: 1px solid color-mix(in srgb, #ffffff 10%, transparent);
    color: var(--text-sec);
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
}
.maq-am-legend li.is-active {
    color: #e7ffee;
    border-color: color-mix(in srgb, #0a6b58 55%, transparent);
    background: color-mix(in srgb, #0a6b58 28%, transparent);
}
@keyframes maq-am-pop {
    0% { transform: scale(0.55); opacity: 0.2; }
    55% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .maq-am-layer, .maq-am-menu, .maq-am-finger, .maq-am-sheet, .maq-am-prompt, .maq-am-menu-btn {
        transition: none !important;
    }
    .maq-am-finger.is-on .maq-am-cursor-ring,
    .maq-am-finger.is-on .maq-am-cursor-dot {
        animation: none !important;
    }
    .maq-am-screen[data-step="6"] .maq-am-home-app--target {
        animation: none !important;
    }
}
