/* PWA install card + standalone chrome (OriHost-style) */

.pwa-install-root {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 0.85rem 0.85rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
}

.pwa-install-root:not([hidden]) {
    display: block;
}

@media (min-width: 769px) {
    .pwa-install-root {
        display: none !important;
    }
}

.pwa-install-card {
    pointer-events: auto;
    position: relative;
    max-width: 28rem;
    margin: 0 auto;
    border-radius: 1.15rem;
    padding: 1rem 1rem 0.9rem;
    background: #0b274a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(11, 39, 74, 0.45);
}

.pwa-install-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 0;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.pwa-install-body {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-right: 1.75rem;
}

.pwa-install-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    object-fit: contain;
    background: #fff;
    flex-shrink: 0;
}

.pwa-install-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
}

.pwa-install-text {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.35;
}

.pwa-install-actions {
    margin-top: 0.85rem;
}

.pwa-install-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 0;
    border-radius: 9999px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(to right, #007be4, #00a0ff);
    cursor: pointer;
}

.pwa-install-btn:disabled {
    opacity: 0.75;
    cursor: wait;
}

.pwa-install-hint {
    margin: 0.65rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
}

.pwa-install-hint[hidden] {
    display: none !important;
}

html.pwa-standalone {
    height: auto !important;
    min-height: 100%;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}

html.pwa-standalone body {
    height: auto !important;
    min-height: 100% !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

html.pwa-standalone .pwa-install-root {
    display: none !important;
}

/* Public site header — logo + hamburger same top space */
html.pwa-standalone header {
    padding-top: calc(12px + env(safe-area-inset-top, 20px)) !important;
    box-sizing: border-box;
}

html.pwa-standalone header .wrapIn {
    position: relative;
}

html.pwa-standalone header .wrapIn .logo,
html.pwa-standalone header .menuBtn {
    top: calc(8px + env(safe-area-inset-top, 20px)) !important;
    margin-top: 0 !important;
}

/* Account / dashboard — logo + hamburger same top space */
html.pwa-standalone .lkPage .leftLk {
    padding-top: 0 !important;
    box-sizing: border-box;
    position: relative;
}

html.pwa-standalone .lineTopLk {
    margin-top: calc(52px + env(safe-area-inset-top, 20px)) !important;
}

html.pwa-standalone .lkPage .leftLk .logo {
    position: absolute !important;
    left: 10px !important;
    top: calc(18px + env(safe-area-inset-top, 20px)) !important;
    margin: 0 !important;
    z-index: 11;
}

html.pwa-standalone .lkPage .menuBtn {
    top: calc(18px + env(safe-area-inset-top, 20px)) !important;
    margin-top: 0 !important;
}

html.pwa-standalone .mobileToggle {
    top: calc(110px + env(safe-area-inset-top, 20px)) !important;
}

html.pwa-standalone .authLangWrap {
    padding-top: calc(12px + env(safe-area-inset-top, 20px)) !important;
}

