body {
    flex-direction: column;
}

.pwa-install-button {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 1200;
    width: auto;
    min-height: 46px;
    margin: 0;
    padding: 11px 17px;
    border: 0;
    border-radius: 999px;
    background: #293b91;
    color: #fff;
    font: 700 14px/1.2 system-ui, sans-serif;
    box-shadow: 0 10px 30px rgba(28, 39, 92, .3);
    cursor: pointer;
}

.gm-money-footer {
    flex: 0 0 auto;
    width: 100%;
    padding: 18px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    color: #626b89;
    font: 600 12px/1.5 system-ui, sans-serif;
    text-align: center;
}

.ge-guide {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    z-index: 1100;
    display: flex;
    align-items: flex-end;
    filter: drop-shadow(0 14px 18px rgba(25, 36, 85, .2));
    transition: bottom .25s ease;
    pointer-events: none;
}

.ge-guide[hidden] {
    display: none;
}

body.ge-install-visible .ge-guide {
    bottom: max(76px, calc(env(safe-area-inset-bottom) + 68px));
}

.ge-guide-trigger {
    position: relative;
    z-index: 2;
    display: block;
    width: clamp(104px, 11vw, 144px);
    padding: 0;
    border: 0;
    border-radius: 42% 42% 16px 16px;
    background: transparent;
    transform: translateY(115%);
    animation: ge-arrives .72s cubic-bezier(.2, .8, .25, 1.18) .12s forwards;
    pointer-events: auto;
    cursor: pointer;
}

.ge-guide-mascot {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
}

.ge-guide-message {
    position: relative;
    z-index: 1;
    width: min(270px, calc(100vw - 145px));
    margin: 0 -9px 62px 0;
    padding: 14px 34px 14px 16px;
    border: 1px solid #e0e5f5;
    border-radius: 16px 16px 4px 16px;
    background: #fff;
    color: #424b6b;
    font: 13px/1.42 system-ui, sans-serif;
    box-shadow: 0 12px 34px rgba(25, 36, 85, .18);
    opacity: 0;
    transform: translateY(12px) scale(.96);
    transform-origin: right bottom;
    animation: ge-message-arrives .38s ease-out .68s forwards;
    pointer-events: auto;
}

.ge-guide-message strong,
.ge-guide-message span {
    display: block;
}

.ge-guide-message strong {
    margin-bottom: 3px;
    color: #293b91;
    font-size: 14px;
}

.ge-guide-close {
    position: absolute;
    top: 3px;
    right: 3px;
    display: grid;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #707897;
    font-size: 22px;
    line-height: 1;
    place-items: center;
    cursor: pointer;
}

.ge-guide-close:hover {
    background: #eef1ff;
    color: #293b91;
}

.ge-guide.is-compact .ge-guide-message {
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px) scale(.94);
    transition: visibility 0s linear .22s, opacity .2s ease, transform .2s ease;
    animation: none;
}

.ge-guide:not(.is-compact) .ge-guide-message {
    visibility: visible;
    transition: opacity .22s ease, transform .22s ease;
}

.ge-guide.is-compact .ge-guide-trigger {
    transform: translateY(48%);
    animation: none;
    transition: transform .25s ease;
}

.ge-guide.is-compact .ge-guide-trigger:hover,
.ge-guide.is-compact .ge-guide-trigger:focus-visible {
    transform: translateY(38%);
}

@keyframes ge-arrives {
    0% { transform: translateY(115%) rotate(5deg); }
    70% { transform: translateY(-4%) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0); }
}

@keyframes ge-message-arrives {
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pwa-install-button[hidden] {
    display: none;
}

.pwa-install-button:focus-visible,
.pwa-ios-tip button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.pwa-ios-tip {
    position: fixed;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(14px, env(safe-area-inset-bottom));
    left: max(14px, env(safe-area-inset-left));
    z-index: 1200;
    display: flex;
    max-width: 460px;
    margin-inline: auto;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fff;
    color: #303750;
    box-shadow: 0 14px 42px rgba(28, 39, 92, .28);
    font: 14px/1.45 system-ui, sans-serif;
}

.pwa-ios-tip p {
    margin: 0;
}

.pwa-ios-tip button {
    align-self: flex-start;
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: -8px -10px 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #59617e;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 480px) {
    .pwa-install-button {
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .ge-guide {
        right: max(7px, env(safe-area-inset-right));
    }

    .ge-guide-trigger {
        width: 106px;
    }

    .ge-guide-message {
        width: min(238px, calc(100vw - 104px));
        margin-right: -13px;
        margin-bottom: 70px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ge-guide-mascot,
    .ge-guide-trigger,
    .ge-guide-message,
    .ge-guide.is-compact .ge-guide-trigger {
        animation-duration: .01ms;
        animation-delay: 0s;
        transition-duration: .01ms;
    }
}
