/* PWA floating back button — only visible in standalone display mode */
.kachi-pwa-back-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 41, 59, 0.92);
    color: #fff;
    font-size: 20px;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.15s ease, opacity 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.kachi-pwa-back-btn:active {
    transform: scale(0.9);
    opacity: 0.85;
}
.kachi-pwa-back-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

@media (display-mode: standalone) {
    .kachi-pwa-back-btn {
        display: flex;
    }
    /* Add bottom padding to body so content isn't hidden behind the button */
    body {
        padding-bottom: 80px !important;
    }
}

/* Respect safe areas on notched devices */
@supports (padding: env(safe-area-inset-bottom)) {
    .kachi-pwa-back-btn {
        bottom: calc(24px + env(safe-area-inset-bottom));
        left: calc(24px + env(safe-area-inset-left));
    }
}
