:root {
    --eco-safe-bottom: env(safe-area-inset-bottom, 0px);
}

#ecoLiteToggle.eco-lite-toggle {
    position: fixed !important;
    top: auto !important;
    right: auto !important;
    left: 18px !important;
    bottom: calc(76px + var(--eco-safe-bottom)) !important;
    z-index: 3200 !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    min-height: 38px !important;
    height: 38px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    margin: 0 !important;
    padding: 7px 10px !important;
    border: 2px solid rgba(255, 216, 107, 0.64) !important;
    border-radius: 999px !important;
    background: linear-gradient(180deg, rgba(6, 28, 18, 0.96), rgba(3, 18, 12, 0.96)) !important;
    color: rgba(255, 244, 208, 0.94) !important;
    box-shadow: 0 6px 0 rgba(112, 57, 11, 0.62), 0 14px 24px rgba(0, 0, 0, 0.28) !important;
    font: 900 10px/1 Poppins, system-ui, sans-serif !important;
    text-transform: none !important;
    letter-spacing: 0.15px !important;
    cursor: pointer !important;
    transform: none !important;
    filter: none !important;
    -webkit-tap-highlight-color: transparent;
}

#ecoLiteToggle.eco-lite-toggle:hover {
    transform: translateY(-2px) !important;
    filter: brightness(1.06) !important;
    box-shadow: 0 8px 0 rgba(112, 57, 11, 0.62), 0 17px 28px rgba(0, 0, 0, 0.30) !important;
}

#ecoLiteToggle.eco-lite-toggle:active {
    transform: translateY(3px) !important;
    box-shadow: 0 3px 0 rgba(112, 57, 11, 0.66), 0 9px 16px rgba(0, 0, 0, 0.24) !important;
}

#ecoLiteToggle.eco-lite-toggle[aria-pressed="true"] {
    background: linear-gradient(180deg, #fff4b8, #ffd86b 55%, #ffad37) !important;
    color: #173321 !important;
    border-color: rgba(255, 255, 255, 0.84) !important;
}

.eco-lite-toggle:focus-visible,
.ar-help-btn:focus-visible,
.eco-update-btn:focus-visible {
    outline: 3px solid #7cffc7;
    outline-offset: 3px;
}

.eco-status-toast {
    position: fixed;
    left: 50%;
    bottom: calc(18px + var(--eco-safe-bottom));
    z-index: 5000;
    width: min(560px, calc(100% - 28px));
    padding: 13px 16px;
    border: 1px solid rgba(255, 216, 107, 0.48);
    border-radius: 18px;
    background: rgba(5, 35, 23, 0.97);
    color: #fff4d0;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
    font: 750 12px/1.55 Poppins, system-ui, sans-serif;
    text-align: center;
    transform: translate(-50%, 24px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.eco-status-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

.eco-status-toast.is-warning {
    border-color: rgba(255, 176, 93, 0.72);
    background: rgba(78, 32, 13, 0.97);
}

.eco-update-banner {
    position: fixed;
    left: 50%;
    top: 16px;
    z-index: 5200;
    width: min(560px, calc(100% - 28px));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(124, 255, 199, 0.54);
    border-radius: 18px;
    background: rgba(5, 35, 23, 0.98);
    color: #fff4d0;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.32);
    transform: translateX(-50%);
    font: 750 12px/1.45 Poppins, system-ui, sans-serif;
}

.eco-update-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border: 0;
    border-radius: 13px;
    background: #ffd86b;
    color: #173321;
    font: 900 11px Poppins, system-ui, sans-serif;
    cursor: pointer;
}

.ar-help-panel {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-top: 1px solid rgba(124, 255, 199, 0.22);
    background: linear-gradient(180deg, rgba(9, 51, 34, 0.98), rgba(5, 32, 21, 0.99));
}

.ar-help-panel.hidden {
    display: none !important;
}

.ar-help-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
    color: rgba(255, 244, 208, 0.87);
    font: 650 11px/1.45 Poppins, system-ui, sans-serif;
}

.ar-help-copy strong {
    color: #7cffc7;
    font-size: 13px;
    font-weight: 950;
}

.ar-help-copy small {
    color: rgba(255, 244, 208, 0.62);
    font-size: 9.5px;
}

.ar-help-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ar-help-btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 12px;
    border: 1px solid rgba(255, 216, 107, 0.38);
    border-radius: 13px;
    background: rgba(255, 244, 208, 0.09);
    color: #fff4d0;
    font: 900 10px/1.2 Poppins, system-ui, sans-serif;
    cursor: pointer;
}

.ar-help-btn.ar-direct-btn {
    background: linear-gradient(180deg, #fff4b8, #ffd86b 58%, #ffad37);
    color: #173321;
    border-color: rgba(255, 255, 255, 0.82);
}

.ar-loading.is-timeout {
    color: #fff4d0 !important;
    background: rgba(143, 48, 24, 0.42);
    border-bottom-color: rgba(255, 176, 93, 0.48) !important;
}

.ar-loading.is-timeout i {
    animation: none !important;
}

html.eco-ar-active .forest-glow,
html.eco-ar-active .forest-mist,
html.eco-ar-active .forest-floor,
html.eco-ar-active .rini-glow,
html.eco-ar-active .card-ornament,
html.eco-ar-active .bg-dayak-watermark {
    animation-play-state: paused !important;
}

html.eco-ar-active #ecoMusicToggle,
html.eco-ar-active .eco-lite-toggle {
    visibility: hidden !important;
}

html.eco-lite-mode *,
html.eco-lite-mode *::before,
html.eco-lite-mode *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.eco-lite-mode .forest-glow,
html.eco-lite-mode .forest-mist,
html.eco-lite-mode .forest-floor,
html.eco-lite-mode .rini-glow,
html.eco-lite-mode .card-ornament,
html.eco-lite-mode .quest-pin,
html.eco-lite-mode .lp-hero-bg::after {
    display: none !important;
}

html.eco-lite-mode .bg-dayak-watermark {
    opacity: 0.08 !important;
}

html.eco-lite-mode .mission-card,
html.eco-lite-mode .eco-card,
html.eco-lite-mode .quest-board,
html.eco-lite-mode .quest-mini-panel,
html.eco-lite-mode .material-card,
html.eco-lite-mode .ar-modal-box {
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.20) !important;
}

html.eco-lite-mode .mission-badge-img,
html.eco-lite-mode .hasil-badge-img,
html.eco-lite-mode .recap-badge-img,
html.eco-lite-mode .rini-face img {
    filter: none !important;
}

html.eco-lite-mode .needs-click,
html.eco-lite-mode .eco-music-toggle.needs-click,
html.eco-lite-mode .rini-glow,
html.eco-lite-mode .hud-online i {
    animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 760px) {
    #ecoLiteToggle.eco-lite-toggle {
        top: auto !important;
        right: auto !important;
        left: 14px !important;
        bottom: calc(70px + var(--eco-safe-bottom)) !important;
        width: 44px !important;
        min-width: 44px !important;
        max-width: 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        justify-content: center !important;
        margin: 0 !important;
        padding: 8px !important;
        border-radius: 999px !important;
    }

    #ecoLiteToggle.eco-lite-toggle span {
        display: none !important;
    }

    .ar-help-panel {
        grid-template-columns: 1fr;
        padding: 10px;
    }

    .ar-help-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-content: stretch;
    }

    .ar-help-btn.ar-direct-btn {
        grid-column: 1 / -1;
    }

    .ar-help-btn {
        width: 100%;
        min-height: 42px;
        padding: 0 9px;
        font-size: 9.5px;
    }

    .ar-frame-slot {
        min-height: 220px !important;
    }
}

@media (max-height: 620px) and (orientation: landscape) {
    .ar-help-copy small { display: none; }
    .ar-help-panel { padding: 7px 10px; }
    .ar-help-btn { min-height: 34px; }
}
