/* ==========================================================================
   RememberMe — phone-only app-style bottom tab bar + "Download App" pill.
   Everything here is inert above 768px, so the desktop/tablet header is
   untouched. Uses the tokens from landing.css (cream / gold / brown).
   ========================================================================== */
.tabbar, .tab-sheet, .tab-backdrop, .nav-app { display: none; }

@media (max-width: 768px) {
    /* The hamburger + dropdown are replaced by the tab bar. */
    .nav-toggle, .mobile-menu { display: none !important; }
    .nav-inner { justify-content: space-between; }

    /* ---- Download App pill (top right) ---- */
    .nav-app {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        height: 40px;
        padding: 0 16px;
        border: 1.5px solid var(--gold);
        border-radius: 999px;
        background: var(--paper);
        color: var(--brown);
        font-size: 13.5px;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: var(--shadow-sm);
        -webkit-tap-highlight-color: transparent;
    }
    .nav-app i { color: var(--gold-dark); font-size: 13px; }
    .nav-app:active { background: var(--gold); color: #3a2f1c; }
    .nav-app:active i { color: #3a2f1c; }

    /* ---- Keep content/footer clear of the floating bar ---- */
    .site-footer { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }

    /* ---- Bottom tab bar ---- */
    .tabbar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
        position: fixed;
        left: 12px; right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 60;
        padding: 6px;
        background: rgba(255, 253, 248, .96);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border: 1px solid var(--line);
        border-radius: 24px;
        box-shadow: 0 10px 30px rgba(74, 63, 47, .20);
    }
    .tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-height: 52px;
        padding: 6px 2px;
        border: 0;
        border-radius: 18px;
        background: transparent;
        color: var(--brown-soft);
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.1;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        transition: background .18s ease, color .18s ease;
    }
    .tab i { font-size: 18px; }
    .tab.is-active {
        background: linear-gradient(180deg, var(--gold-2), var(--gold));
        color: #fff;
        box-shadow: 0 4px 12px rgba(194, 166, 97, .45);
    }

    /* ---- Account sheet ---- */
    .tab-backdrop {
        display: block;
        position: fixed; inset: 0;
        z-index: 55;
        background: rgba(51, 41, 28, .38);
    }
    .tab-backdrop[hidden] { display: none; }

    .tab-sheet {
        display: block;
        position: fixed;
        left: 12px; right: 12px;
        bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        z-index: 70;
        padding: 18px;
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(14px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .tab-sheet.is-open { opacity: 1; visibility: visible; transform: none; }

    .tab-sheet-user { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
    .tab-sheet-avatar {
        display: grid; place-items: center;
        flex: 0 0 44px; width: 44px; height: 44px;
        border-radius: 50%;
        background: var(--cream-2);
        border: 2px solid var(--gold);
        color: var(--gold-dark);
    }
    .tab-sheet-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
    .tab-sheet-text small { color: var(--brown-soft); font-size: 12px; }
    .tab-sheet-text strong {
        color: var(--brown); font-size: 15px;
        overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    }
    .tab-sheet-actions { display: flex; flex-direction: column; gap: 10px; }
    .tab-sheet-actions .btn, .tab-sheet-actions form { width: 100%; }
    .tab-sheet-actions .btn { display: flex; justify-content: center; }
}

@media (max-width: 360px) {
    .nav-app { padding: 0 12px; font-size: 12.5px; }
    .tab span { font-size: 10.5px; }
}
