
.logo {
    width: 150px;
    margin-bottom: 20px;
}

.icon {
    width: 60px;
    margin-bottom: 20px;
}

.input {
    display: block;
    width: 250px;
    margin: 10px auto;
    padding: 10px;
    border-radius: 10px;
    border: none;
    background-color: #4b306a;
    color: white;
    font-size: 16px;
}

.button {
    background-color: #7a44e8;
    border: none;
    border-radius: 12px;
    color: white;
    padding: 12px 24px;
    margin: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .button:hover {
        background-color: #9b5dfc;
    }

.social-icons img {
    width: 30px;
    margin: 10px;
}

.splash-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* App title can stay white for now */
.app-title {
    color: white;
    font-size: 2em;
    margin-bottom: 30px;
}


/* Utility */
.hidden {
    display: none !important;
}


/* === 2. Canvas + touch behavior from index.html === */

canvas {
    touch-action: none; /* disables default browser gestures */
    -ms-touch-action: none; /* IE/Edge compatibility */
}


/* === 3. Component CSS from index.html (compass, avatar, settings, profile) === */

/* (From cb-compass-v1, without its extra :root block) */
#alert-container {
    pointer-events: none;
}

    #alert-container .alert-civic {
        pointer-events: auto;
    }

#compass-widget {
    position: fixed;
    top: calc(env(safe-area-inset-top,0px) + 16px);
    right: calc(env(safe-area-inset-right,0px) + 14px);
    z-index: 5000;
    pointer-events: none; /* only the button will enable events */
}

    /* Wrap stacks: ring (with needle) on top, button below */
    #compass-widget .compass-wrap {
        position: relative;
        width: 68px;
        height: auto; /* <= auto so button sits below */
        display: flex;
        flex-direction: column; /* <= vertical stack */
        align-items: center;
        justify-content: center;
        gap: 10px; /* space between ring and button */
    }

    /* The circular face */
    #compass-widget .ring {
        position: relative; /* <= anchor for absolute needle */
        width: 68px;
        height: 68px;
        border-radius: 9999px;
        border: 2px solid rgba(255,255,255,.75);
        box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
        background: radial-gradient(transparent 55%, rgba(255,255,255,.03));
        backdrop-filter: blur(2px);
    }

    /* Diamond needle centered over the ring */
    #compass-widget .needle {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 40px;
        height: 40px;
        transform-origin: 50% 50%;
        transform: translate(-50%, -50%);
        transition: transform .18s ease;
        filter: drop-shadow(0 2px 6px rgba(0,0,0,.35));
        will-change: transform;
        pointer-events: none;
    }

    #compass-widget .tip-n {
        fill: #FF3B30;
    }

    #compass-widget .tip-s {
        fill: #ffffff;
    }

    /* North label (relative to the ring) */
    #compass-widget .north-label {
        position: absolute;
        top: -9px;
        font: 700 10px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
        color: #ff3b30;
        text-shadow: 0 1px 2px rgba(0,0,0,.35);
        user-select: none;
        pointer-events: none;
    }

    /* Figma-style recenter button (below, not overlapping) */
    #compass-widget .recenter {
        position: static;
        width: 36px;
        height: 36px;
        border-radius: 9999px;
        border: 1px solid rgba(255,255,255,.22);
        background: radial-gradient(circle at 50% 50%, rgba(255,255,255,.06), rgba(255,255,255,.02)), linear-gradient(180deg, rgba(20,24,33,.92), rgba(20,24,33,.98));
        box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.05);
        display: grid;
        place-items: center;
        cursor: pointer;
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

        #compass-widget .recenter:active {
            transform: scale(0.98);
            box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08);
        }

        #compass-widget .recenter:focus-visible {
            outline: 2px solid var(--cb-accent,#5CE65C);
            outline-offset: 2px;
        }

        #compass-widget .recenter svg {
            display: block;
            width: 16px;
            height: 16px;
            stroke: #fff;
            opacity: .9;
        }

/* From cb-avatar-v1 */
.pf-tabs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pf-tab {
    padding: 8px 12px;
    border-radius: 9999px;
    border: 1px solid var(--cb-border,#3A2F63);
    background: rgba(255,255,255,.06);
    color: #eaf0ff;
    font-weight: 700;
    cursor: pointer;
}

    .pf-tab.active {
        background: linear-gradient(90deg, var(--cb-pin,#7C4DFF), var(--cb-accent,#5CE65C));
        border-color: rgba(124,77,255,.45);
    }

.pf-tab-spacer {
    flex: 1;
}

.primary-btn {
    padding: 8px 12px;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    border: 1px solid var(--cb-border,#3A2F63);
    background: linear-gradient(135deg, var(--cb-primary,#7C4DFF), #9277ff);
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.inv-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0,1fr));
}

@media (min-width: 560px) {
    .inv-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}

@media (min-width: 800px) {
    .inv-grid {
        grid-template-columns: repeat(4, minmax(0,1fr));
    }
}

.inv-item {
    position: relative;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--cb-border,#3A2F63);
    background: rgba(255,255,255,.05);
    color: #eaf0ff;
    display: flex;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: transform .1s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

    .inv-item:hover {
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0,0,0,.25);
    }

.inv-emoji {
    font-size: 22px;
    line-height: 1;
}

.inv-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .2px;
}

.equip-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 9999px;
    background: linear-gradient(90deg, var(--cb-pin,#7C4DFF), var(--cb-accent,#5CE65C));
    color: #0b0e14;
}

.inv-item.equipped {
    border-color: rgba(124,77,255,.5);
    background: linear-gradient(180deg, rgba(124,77,255,.12), rgba(20,24,33,.85));
    box-shadow: 0 10px 28px rgba(0,0,0,.2);
}

.inv-item.locked {
    opacity: .5;
    cursor: not-allowed;
}

    .inv-item.locked::after {
        content: "Locked";
        position: absolute;
        bottom: 8px;
        right: 8px;
        font-size: 11px;
        opacity: .85;
        background: rgba(0,0,0,.35);
        padding: 2px 6px;
        border-radius: 9999px;
        border: 1px solid rgba(255,255,255,.15);
    }

/* From cb-settings-v2 & cb-profile-settings-css */

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,.75);
    display: none;
    align-items: stretch;
    justify-content: flex-start;
}

    .modal-overlay.show {
        display: flex !important;
    }

    .modal-overlay .modal-inner {
        background: linear-gradient(180deg, rgba(20,24,33,.96), rgba(20,24,33,.98));
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
        border: 1px solid var(--cb-border,#3A2F63);
        width: 100%;
        max-width: 720px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        max-height: 100vh;
    }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid var(--cb-border,#3A2F63);
}

    .modal-header h2 {
        margin: 0;
        font-size: 16px;
        letter-spacing: .3px;
        color: #fff;
    }

.back-btn {
    border: 1px solid var(--cb-border,#3A2F63);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 10px;
    padding: 8px 10px;
    cursor: pointer;
}

.modal-content {
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Profile overlay root */
/* ====== Profile Overlay: full-screen green gradient ====== */
#profile-overlay {
    color: #ffffff;
}

    #profile-overlay.tab-overlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 24px 16px 80px; /* leave room above bottom nav */
        box-sizing: border-box;
        /* Same CityBits gradient as splash/login */
        background: linear-gradient( 180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E) );
        box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35);
        backdrop-filter: blur(4px);
        z-index: 8999; /* above bottom nav & canvas overlays */
    }

    /* Inner scrollable card stack */
    #profile-overlay .tab-overlay-inner {
        width: 100%;
        max-width: 480px;
        max-height: 100%;
        overflow-y: auto;
        padding: 20px 16px 24px;
        border-radius: 18px;
        box-sizing: border-box;
        /* Dark glass card to contrast the green background */
        background: linear-gradient(180deg, rgba(10, 16, 24, 0.92), rgba(10, 16, 24, 0.98));
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Close button (top-right) */
    #profile-overlay .profile-close-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 32px;
        height: 32px;
        border-radius: 999px;
        border: none;
        background: rgba(0, 0, 0, 0.35);
        color: #ffffff;
        font-size: 20px;
        line-height: 1;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
    }

        #profile-overlay .profile-close-btn:hover {
            background: rgba(0, 0, 0, 0.55);
            transform: translateY(-1px);
            box-shadow: 0 10px 22px rgba(0, 0, 0, 0.75);
        }

        #profile-overlay .profile-close-btn:active {
            transform: translateY(0);
        }
/* ====== Profile content layout ====== */
#profile-root {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Header row */
.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* Avatar wrapper */
.pf-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Avatar + ring */
.pf-avatar {
    width: 84px;
    height: 84px;
    border-radius: 9999px;
    object-fit: cover;
    padding: 3px;
    background: conic-gradient( from 200deg, var(--cb-pin, #7C4DFF), var(--cb-accent, #33FF99), var(--cb-pin, #7C4DFF) );
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06) inset, 0 8px 26px rgba(0, 0, 0, 0.6);
}

/* Identity block */
.pf-identity {
    flex: 1 1 auto;
    min-width: 0; /* REQUIRED for text truncation in flex */
}

.pf-username {
    font-size: clamp(16px, 4.5vw, 20px);
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.pf-contact {
    font-size: clamp(12px, 3.5vw, 13px);
    line-height: 1.3;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 420px) {
    .profile-header {
        gap: 10px;
    }

    .pf-avatar {
        width: 72px;
        height: 72px;
    }

    .pf-settings-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}


/* Settings button */
.pf-settings-btn {
    border: none;
    border-radius: 999px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

    .pf-settings-btn:hover {
        background: rgba(255, 255, 255, 0.16);
        transform: translateY(-1px);
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.55);
    }

    .pf-settings-btn:active {
        transform: translateY(0);
    }

/* Cards */
.pf-card {
    background: linear-gradient(180deg, rgba(20, 24, 33, 0.96), rgba(20, 24, 33, 0.99));
    border: 1px solid var(--cb-border, #2a3040);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

    .pf-card h3 {
        margin: 0 0 8px;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.25px;
        color: #eaf0ff;
        text-transform: uppercase;
        opacity: 0.9;
    }

/* Level + XP */
.pf-level-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--cb-muted, #a9b3c7);
    margin-bottom: 8px;
}

.pf-xpbar {
    width: 100%;
    height: 12px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.pf-xpfill {
    height: 100%;
    background: linear-gradient( 90deg, var(--cb-pin, #7C4DFF), #8b73ff, var(--cb-accent, #33FF99) );
    box-shadow: 0 0 18px rgba(108, 77, 255, 0.35);
    transition: width 0.35s ease;
}

/* CTA buttons (My Avatar, etc.) */
.pf-cta-button {
    width: 100%;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: linear-gradient(180deg, #2F7D2F, #1F5C1F);
    color: #ffffff;
    font-family: "Nunito", system-ui, sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

    .pf-cta-button:hover {
        filter: brightness(1.05);
        transform: translateY(-1px);
        box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
    }

    .pf-cta-button:active {
        transform: translateY(0);
    }


/* Chevron */
.pf-cta-chevron {
    font-size: 16px;
}

/* Favorites chips */
.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-chip {
    padding: 7px 12px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--cb-border, #2a3040);
    font-size: 13px;
    color: #eaf0ff;
    letter-spacing: 0.2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

    .pf-chip:hover {
        transform: translateY(-1px);
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 6px 18px rgba(108, 77, 255, 0.15);
    }

/* Reviews footer */
.pf-reviews-more {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}


.pf-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

    .pf-row .pf-row-title {
        color: #eaf0ff;
        font-weight: 600;
    }

    .pf-row .pf-row-desc {
        color: var(--cb-text-secondary,#C7BFE8);
        font-size: 12px;
    }

    .pf-row .pf-action {
        color: #a98bff;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
    }

/* Toggle switch */
.switch {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 9999px;
    background: #555;
    border: 1px solid var(--cb-border,#3A2F63);
    transition: .2s;
}

    .switch:after {
        content: "";
        position: absolute;
        top: 2px;
        left: 2px;
        width: 22px;
        height: 22px;
        border-radius: 9999px;
        background: #fff;
        transition: .2s;
        box-shadow: 0 2px 8px rgba(0,0,0,.35);
    }

    .switch.on {
        background: linear-gradient(90deg, var(--cb-pin,#7C4DFF), var(--cb-accent,#5CE65C));
        border-color: rgba(124,77,255,.45);
    }

        .switch.on:after {
            left: 22px;
        }

/* Danger */
.danger-btn {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(220,38,38,.45);
    background: rgba(220,38,38,.15);
    color: #fecaca;
    font-weight: 700;
}

/* === 4. CityBits overlay + layout (palette-updated) === */

/* citybits-figma.css — palette updated to style guide. */

:root {
    /* Design tokens from CityBits style guide */
    --cb-primary: #7C4DFF;
    --cb-primary-dark: #4A2FA6;
    --cb-primary-soft: #E6DCFF;
    --cb-bg-gradient-top: #5CE65C;
    --cb-bg: #2E9E2E;
    --cb-surface: #241A3D;
    --cb-surface-alt: #2F2455;
    --cb-border: #3A2F63;
    --cb-text: #FFFFFF;
    --cb-text-secondary: #C7BFE8;
    --cb-text-secondary-alt: #9A92C7;
    --cb-success: #5CE65C;
    --cb-success-dark: #2E9E2E;
    --cb-warning: #FFC857;
    --cb-danger: #FF5A5F;
    --cb-info: #4DA6FF;
    --cb-disabled: #5E558A;
    --cb-overlay-scrim: rgba(27,20,48,0.85);
    /* Legacy aliases used in existing CSS */
    --cb-card: var(--cb-surface);
    --cb-soft: var(--cb-surface-alt);
    --cb-muted: var(--cb-text-secondary);
    /* Map + accent tokens */
    --cb-pin: #7C4DFF; /* default pin / primary accent */
    --cb-accent: #5CE65C; /* civic green for positive / route accents */

    --cb-shadow: 0 10px 30px rgba(0,0,0,.45);
}

/* Global polish */
html, body {
    background: linear-gradient(180deg, var(--cb-bg-gradient-top), var(--cb-bg));
    color: var(--cb-text, #f4f4f4);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol", "Noto Color Emoji";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* Unity loading bar overrides – remove default logo triangle */
#unity-loading-bar {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#unity-logo {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: none !important;
}


#unity-container {
    min-height: 100vh;
}


a {
    color: var(--cb-accent);
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* Unity canvas stacking context */
#unity-container {
    position: relative;
}

#unity-canvas {
    display: block;
    outline: none;
}


/* ====== Splash / permission prompt ====== */
.splash-container {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* CityBits green gradient */
    background: linear-gradient(180deg, #5CE65C 0%, #2E9E2E 100%);
    /* Optional: slight darkening so content pops */
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    color: var(--cb-text, #f9fafb);
    z-index: 99999999;
}





    .splash-container .logo {
        width: 140px;
        height: 140px;
    }

    .splash-container .app-title {
        font-size: 32px;
        font-weight: 700;
        margin: 0;
    }

    .splash-container .start-button {
        max-width: 260px; /* Start-specific */
    }


    .splash-container .logo {
        width: 112px;
        height: 112px;
        border-radius: 50%;
        box-shadow: 0 0 40px rgba(124,77,255,.35);
        margin-bottom: 14px;
    }

    .splash-container .app-title {
        margin: 6px 0 18px;
        font-size: 28px;
        letter-spacing: .2px;
        background: linear-gradient(90deg, #fff, #c9d4ff);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }


/* ====== Bottom Nav Container ====== */
#bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 78px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 10px;
    background: linear-gradient(180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    z-index: 5000;
    pointer-events: auto;
}

    /* Reset any inherited positioning inside nav */
    #bottom-nav * {
        position: static !important;
        pointer-events: auto !important;
    }

    /* ====== Nav Buttons ====== */
    #bottom-nav .nav-btn {
        flex: 1 1 0;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 6px 8px;
        border-radius: 14px;
        font-family: "Nunito", system-ui, sans-serif;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.02em;
        white-space: nowrap;
        text-align: center;
        color: #ffffff;
        background: linear-gradient(180deg, #2F7D2F, #1F5C1F);
        border: none;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.18);
        cursor: pointer;
        transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
    }

        /* Hover */
        #bottom-nav .nav-btn:hover {
            filter: brightness(1.05);
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
        }

        /* Active (current tab) */
        #bottom-nav .nav-btn.active {
            background: linear-gradient(180deg, #245F24, #163F16);
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
            transform: translateY(-1px);
        }

        /* Pressed */
        #bottom-nav .nav-btn:active {
            transform: translateY(0);
            filter: brightness(0.98);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35), inset 0 2px 4px rgba(0, 0, 0, 0.35);
        }

        /* Disabled / Guest */
        #bottom-nav .nav-btn.disabled,
        #bottom-nav .nav-btn[disabled] {
            opacity: 0.45;
            pointer-events: none;
            filter: grayscale(0.2);
        }

    /* Auth visibility rules */
    #bottom-nav.guest .authed-only {
        display: none;
    }

    #bottom-nav.authed .auth-cta {
        display: none;
    }

    /* Nav button icon */
    #bottom-nav .nav-btn-icon {
        width: 36px;
        height: 36px;
        object-fit: contain;
        display: block;
        flex: 0 0 36px;
        margin: 0;
        transform: none;
    }

    #bottom-nav .nav-btn.active .nav-btn-icon {
        filter: brightness(1.15);
    }

.ui-icon-sm {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}

    /* Label under icon */
    #bottom-nav .nav-label {
        display: block;
        text-align: center;
        line-height: 1.05;
        font-size: 12px;
        white-space: nowrap;
    }

    /* Hamburger icon inside nav menu button */
    #bottom-nav .nav-icon-hamburger {
        width: 24px;
        height: 24px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        line-height: 0;
        flex: 0 0 24px;
    }

        #bottom-nav .nav-icon-hamburger span {
            width: 16px;
            height: 2px;
            border-radius: 999px;
            background-color: #ffffff;
            display: block;
        }

    /* Guest CTA can stay more horizontal if needed */
    #bottom-nav .auth-cta {
        font-size: 14px;
        padding: 0 14px;
    }

/* Slightly tighter on narrow screens */
@media (max-width: 420px) {
    #bottom-nav {
        height: 74px;
        gap: 8px;
        padding-left: 8px;
        padding-right: 8px;
    }

        #bottom-nav .nav-btn {
            padding: 6px 4px;
            border-radius: 12px;
        }

        #bottom-nav .nav-label {
            font-size: 11px;
        }
}



/* === INFO SLIDER OVERLAY === */
/* ====== Info Overlay: full-screen dark glass ====== */
#info-overlay.tab-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2147483150;
    /* ✅ SAME green gradient as Login / Discover / Profile */
    background: linear-gradient( 180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E) );
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    color: #ffffff;
}


/* Inner “card” container */
#info-overlay .info-overlay-inner {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 16px 16px 20px;
    box-sizing: border-box;
    background: linear-gradient( 180deg, rgba(20, 24, 33, 0.94), rgba(20, 24, 33, 0.98) );
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
}

/* Header row: title + close */
#info-overlay .info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}


/* Scrollable content area */
#info-overlay .info-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 4px;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
}

    /* Typography inside info content */
    #info-overlay .info-content h3 {
        margin: 0 0 8px;
        font-size: 18px;
        font-weight: 700;
    }

    #info-overlay .info-content p {
        margin: 6px 0;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.86);
    }

    #info-overlay .info-content a {
        color: #C9B8FF;
        text-decoration: underline;
        word-break: break-all;
    }

    #info-overlay .info-content strong {
        font-weight: 600;
    }


/* ====== Tab overlays  ====== */
.tab-overlay{
  position: fixed; inset: 0; display:flex; align-items:flex-end; justify-content:center;
  padding: 80px 16px 92px; /* leave room for bottom nav */
  z-index: 800; background: linear-gradient(180deg, rgba(5,8,12,.15), rgba(5,8,12,.85));
  backdrop-filter: blur(6px);
}
.tab-overlay.hidden{ display:none; }
.tab-overlay .tab-overlay-inner{
  width: min(100%, 720px);
  background: rgba(20,24,33,.92);
  border: 1px solid var(--cb-border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--cb-shadow);
}
.tab-overlay h1{ font-size: 20px; margin: 6px 0 12px; }

/* ====== Alerts ====== */
#alert-container{
  position: fixed; right: 16px; top: 16px; z-index: 950;
  display: flex; flex-direction: column; gap: 10px;
}
.alert-box{
  width: min(340px, 90vw);
  background: var(--cb-card);
  border: 1px solid var(--cb-border);
  border-radius: 12px; padding: 12px 14px;
  box-shadow: var(--cb-shadow);
}
.alert-header{ display:flex; justify-content:space-between; font-size:12px; color: var(--cb-muted); margin-bottom: 6px; }
.alert-content h4{ margin: 0 0 4px; font-size: 15px; }
.alert-content p{ margin: 0; color: var(--cb-muted); }
.alert-buttons{ display:flex; gap: 8px; margin-top: 10px; }
.alert-buttons button{
  padding: 8px 12px; border-radius: 9999px; border: 1px solid var(--cb-border);
  background: var(--cb-soft); color: #fff; font-weight:600; letter-spacing:.2px;
}
.alert-buttons .ignore-btn{ color:#adb8d0; }
.alert-civic{ border-color: rgba(255,200,87,.25); box-shadow: 0 8px 22px rgba(255,200,87,.15); }
.alert-sale{  border-color: rgba(51,255,153,.25); box-shadow: 0 8px 22px rgba(51,255,153,.15); }

/* ====== Rewards ====== */
#rewards-list .no-rewards-msg{
  color: var(--cb-muted); background: rgba(255,255,255,.02);
  border: 1px dashed var(--cb-border); padding: 12px; border-radius: 12px;
}
.reward-card{
  background: linear-gradient(180deg, rgba(108,77,255,.15), rgba(20,24,33,.9));
  border: 1px solid var(--cb-border);
  border-radius: 12px; padding: 12px; margin-bottom: 10px;
  box-shadow: 0 8px 20px rgba(108,77,255,.15);
}

/* ====== Loading overlay ====== */
#loading-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Same green gradient as login/splash */
    background: linear-gradient( 180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E) );
    /* optional subtle darkening so spinner & text pop */
    box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    z-index: 8999;
}

    #loading-overlay.hidden {
        display: none;
    }

    /* Centered content stack */
    #loading-overlay .loading-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        text-align: center;
    }

    /* Spinner */
    #loading-overlay .loading-spinner {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        border: 4px solid rgba(255, 255, 255, 0.25);
        border-top-color: #ffffff;
        animation: cb-spin 0.8s linear infinite;
        box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
    }

        /* Optional inner dot for a bit more flair */
        #loading-overlay .loading-spinner::after {
            content: "";
            display: block;
            width: 20px;
            height: 20px;
            margin: auto;
            border-radius: 999px;
            background: radial-gradient(circle at 30% 30%, #ffffff, rgba(255, 255, 255, 0.05));
        }

    /* Loading message */
    #loading-overlay .loading-message {
        font-size: 16px;
        font-weight: 600;
        letter-spacing: 0.03em;
        color: #ffffff;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

/* Spin animation */
@keyframes cb-spin {
    to {
        transform: rotate(360deg);
    }
}


/* ====== Coupon popup ====== */
#coupon-popup{
  position: fixed; pointer-events:none; z-index: 999;
  background: linear-gradient(135deg, rgba(51,255,153,.15), rgba(108,77,255,.1));
  border: 1px solid rgba(51,255,153,.35);
  color: #fff; padding: 8px 12px; border-radius: 10px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  opacity: 0; transition: opacity .25s ease;
}

/* ====== Business list cards (Discover) ====== */

/* ====== Discover Overlay ====== */
#discover-overlay.tab-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    background: linear-gradient( 180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E) );
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    color: #ffffff;
}

#discover-root {
    width: 100%;
    height: 100%;
    padding: 5px;
    margin: 5px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: none;
    box-shadow: none;
    overflow: hidden;
}
.discover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}


#discover-root .business-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    -webkit-overflow-scrolling: touch;
}


@media (min-width: 560px) {
    #discover-root .business-list {
        grid-template-columns: 1fr 1fr;
    }
}


    /* Optional scrollbar styling */
    .business-list::-webkit-scrollbar {
        width: 8px;
    }

    .business-list::-webkit-scrollbar-thumb {
        background-color: rgba(255, 255, 255, 0.3);
        border-radius: 4px;
    }

/* Card styles */
.business-card {
    background: linear-gradient( 180deg, rgba(20,24,33,.92), rgba(20,24,33,.97) );
    border: 1px solid var(--cb-border, #2a3040);
    border-radius: 14px;
    padding: 14px;
    color: #ffffff;
    box-shadow: 0 10px 28px rgba(0,0,0,.35);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .business-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 36px rgba(0,0,0,.45);
    }


    .business-card h3 {
        margin: 0 0 6px;
        font-size: 16px;
        font-weight: 700;
    }

    .business-card p {
        margin: 2px 0;
        font-size: 13px;
        line-height: 1.4;
        color: rgba(255,255,255,.85);
    }

    }

    .business-card a {
        color: #ffd369;
        text-decoration: underline;
        word-break: break-all;
    }

.business-message {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 221, 150, 0.15);
    border-left: 4px solid #ffd369;
    color: #ffd369;
    font-size: 14px;
    font-style: italic;
    border-radius: 6px;
}

.business-list{
  display: grid; gap: 10px; grid-template-columns: 1fr;
}
@media (min-width: 560px){
  .business-list{ grid-template-columns: 1fr 1fr; }
}
.business-list .card{
  background: var(--cb-card); border:1px solid var(--cb-border);
  border-radius: 12px; padding: 12px; box-shadow: var(--cb-shadow);
}
.business-list .card h4{ margin: 0 0 4px; font-size: 16px; }
.business-list .card p{ margin: 0; color: var(--cb-muted); }

.no-businesses-msg {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    opacity: 0.85;
}


/* ====== Utility ====== */
.hidden{ display: none !important; }
.text-muted{ color: var(--cb-muted); }

/* Prefer subtle scrollbars on desktop */
@media (pointer: fine){
  *{ scrollbar-width: thin; scrollbar-color: #4b5563 transparent; }
  *::-webkit-scrollbar{ height:10px; width:10px; }
  *::-webkit-scrollbar-thumb{ background:#4b5563; border-radius:10px; }
  *::-webkit-scrollbar-track{ background:transparent; }
}
/* --- Clickability + layout fix --- */



/* Keep overlays below the nav and out of its click area */
.tab-overlay,
.info-overlay {
    z-index: 9000; /* below nav */
}

.tab-overlay {
    bottom: 64px;
    height: auto;
}

.splash-container {
    height: calc(100vh - 64px);
}


/* ====== Profile — Figma-quality polish ====== */
#profile-overlay .tab-overlay-inner {
    gap: 14px;
    padding: 18px;
}

/* Header */
#profile-root {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.pf-avatar {
    width: 84px;
    height: 84px;
    border-radius: 9999px;
    object-fit: cover;
    position: relative;
    z-index: 0;
    box-shadow: 0 10px 26px rgba(0,0,0,.35);
}

    .pf-avatar::after {
        display: none;
    }
/* defensive */

/* Avatar ring (wrap in a ring for the glow) */
.profile-header .pf-avatar {
    padding: 3px;
    background: conic-gradient(from 200deg, var(--cb-pin, #6C4DFF), var(--cb-accent, #33FF99), var(--cb-pin, #6C4DFF));
    box-shadow: 0 0 0 2px rgba(255,255,255,.06) inset, 0 8px 30px rgba(108,77,255,.25);
}

/* Identity */
.pf-username {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.15;
    background: linear-gradient(90deg, #fff, #dbe4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.pf-contact {
    margin-top: 2px;
    font-size: 13px;
    color: var(--cb-muted, #a9b3c7);
}

/* Cards */
.pf-card {
    background: linear-gradient(180deg, rgba(20,24,33,.92), rgba(20,24,33,.97));
    border: 1px solid var(--cb-border, #2a3040);
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
}

    .pf-card h3 {
        margin: 0 0 8px;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: .25px;
        color: #eaf0ff;
        text-transform: uppercase;
        opacity: .9;
    }

/* Level + XP */
.pf-level-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--cb-muted, #a9b3c7);
    margin-bottom: 8px;
}

.pf-xpbar {
    width: 100%;
    height: 12px;
    border-radius: 9999px;
    overflow: hidden;
    background: rgba(255,255,255,.06);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}

.pf-xpfill {
    height: 100%;
    background: linear-gradient(90deg, var(--cb-pin,#6C4DFF), #8b73ff, var(--cb-accent,#33FF99));
    box-shadow: 0 0 18px rgba(108,77,255,.35);
    transition: width .35s ease;
}

/* Grid (Notifications / Favorites / Equipped) */
.pf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 680px) {
    .pf-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Toggles (clean switch style) */
.pf-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #e7ecff;
}

    .pf-toggle input[type="checkbox"] {
        appearance: none;
        width: 42px;
        height: 24px;
        border-radius: 9999px;
        background: rgba(255,255,255,.08);
        position: relative;
        outline: none;
        border: 1px solid var(--cb-border, #2a3040);
        transition: background .2s ease, border-color .2s ease;
    }

        .pf-toggle input[type="checkbox"]::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 3px;
            transform: translateY(-50%);
            width: 18px;
            height: 18px;
            border-radius: 9999px;
            background: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,.4);
            transition: left .2s ease;
        }

        .pf-toggle input[type="checkbox"]:checked {
            background: linear-gradient(90deg, var(--cb-pin,#6C4DFF), var(--cb-accent,#33FF99));
            border-color: rgba(108,77,255,.5);
        }

            .pf-toggle input[type="checkbox"]:checked::after {
                left: 21px;
            }

/* Favorites chips */
.pf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pf-chip {
    padding: 7px 12px;
    border-radius: 9999px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--cb-border, #2a3040);
    font-size: 13px;
    color: #eaf0ff;
    letter-spacing: .2px;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

    .pf-chip:hover {
        transform: translateY(-1px);
        background: rgba(255,255,255,.08);
        box-shadow: 0 6px 18px rgba(108,77,255,.15);
    }

/* Equipped items (emoji + label) */
.pf-equipped {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .pf-equipped .item {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 7px 10px;
        border-radius: 12px;
        border: 1px solid var(--cb-border, #2a3040);
        background: rgba(255,255,255,.04);
        color: #eaf0ff;
        font-size: 14px;
    }

        .pf-equipped .item span:first-child {
            font-size: 18px;
            line-height: 1;
        }


/* Reusable primary CTA button (Figma-ish, purple) */
.cb-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    padding-inline: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Nunito", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    background-image: linear-gradient(180deg, #7C4DFF, #4A2FA6);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    outline: none;
    transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
    max-width: 260px;
}

    .cb-btn-primary:hover {
        opacity: 0.95;
        transform: translateY(-1px);
        box-shadow: 0 14px 24px rgba(0, 0, 0, 0.35), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    }

    .cb-btn-primary:active {
        opacity: 0.98;
        transform: translateY(0);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
    }

    .cb-btn-primary:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #7C4DFF;
    }



/* === Login Overlay: full-screen green gradient === */

/* Make most login text white by default */
#login-overlay {
    color: #ffffff;
}

    /* Keep tagline slightly softer if you like; or set to pure white as well */
    #login-overlay .login-tagline {
        color: #ffffff;
    }

    /* Field labels white as well */
    #login-overlay .cb-field-label {
        color: #ffffff;
    }


    #login-overlay.tab-overlay {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        min-height: 100vh; /* belt and suspenders */
        z-index: 999999999999;
        pointer-events: auto;
        touch-action: auto;
        background: linear-gradient(180deg, var(--cb-bg-gradient-top, #5CE65C), var(--cb-bg, #2E9E2E));
        display: flex;
        align-items: center; /* vertical center */
        justify-content: center; /* horizontal center */

        padding: 24px 16px;
        box-sizing: border-box;
    }


/* Inner login card */
#login-overlay .tab-overlay-inner {
    width: 100%;
    max-width: 420px;
    background: transparent; /* same as rgba(..., 0) but clearer */
    padding: 24px 20px 20px;
    box-shadow: none; /* 🔹 remove card shadow */
    display: flex;
    border: none;
    flex-direction: column;
    gap: 16px;
    box-sizing: border-box;
}


/* Logo + tagline block */
#login-overlay .login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 4px;
}

    #login-overlay .login-logo {
        width: 96px;
        height: 96px;
        border-radius: 50%;
        border: 3px solid #653693; /* ⬅ purple border */
        box-shadow: 0 0 40px rgba(124, 77, 255, 0.4);
        object-fit: cover;
    }


#login-overlay .login-title {
    margin: 6px 0 2px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #ffffff, #dbe4ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#login-overlay .login-tagline {
    margin: 0;
    font-size: 14px;
}

/* Error box reuse of alert-box but stretch full width inside */
#login-overlay #login-error {
    width: 100%;
}

/* Form layout */
#login-overlay #login-form {
    width: 100%;
    display: grid;
    gap: 12px;
    margin-top: 4px;
}

/* Field block + label */
    #login-overlay .cb-field {
        display: flex;
        justify-content: center;
    }

    /* cb-field-label is no longer used, but leaving this is harmless.
   You can keep or delete it; it has no effect once the spans are removed. */
    #login-overlay .cb-field-label {
        font-size: 13px;
        font-weight: 600;
    }


/* Figma-style input – white with black text */
    #login-overlay .cb-input {
        display: flex;
        width: 90%;
        margin: 0 auto; /* ⬅ center inside the card */
        height: 24px;
        min-width: 0;
        border-radius: 12px;
        border: 1px solid rgba(0, 0, 0, 0.18);
        background-color: #ffffff;
        padding: 10px 14px;
        font-size: 16px;
        line-height: 1.25;
        color: #000000;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        outline: none;
        transition: box-shadow var(--default-transition-duration, 0.15s) var(--default-transition-timing-function, cubic-bezier(.4,0,.2,1)), background-color 0.15s ease, border-color 0.15s ease;
    }

    #login-overlay .cb-input::placeholder {
        color: #6b7280; /* neutral gray placeholder */
    }

    #login-overlay .cb-input:focus-visible {
        border-color: var(--cb-primary, #7C4DFF);
        box-shadow: 0 0 0 1px rgba(124, 77, 255, 0.75), 0 0 0 4px rgba(124, 77, 255, 0.25);
        background-color: #ffffff; /* stay white on focus */
        color: #000000;
    }


/* Primary button is already defined as .cb-btn-primary.
   We just tweak its width/height here for this overlay. */
    #login-overlay #login-submit.cb-btn-primary {
        width: 90%;
        height: 48px;
        margin: 8px auto 0; /* center, with a bit more spacing above */
        font-size: 16px;
    }


/* secondary guest button to match width/centering */
#guest-btn.cb-btn-secondary {
    width: 90%;
    margin: 12px auto 0;
}


/* Secondary (Guest) button: darker purple gradient */
.cb-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 3rem;
    padding-inline: 1rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Nunito", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    background-image: linear-gradient(180deg, #4A2FA6, #2E2156);
    color: #ffffff;
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    outline: none;
    transition: opacity 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}

    .cb-btn-secondary:hover {
        opacity: 0.96;
        transform: translateY(-1px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.4);
    }

    .cb-btn-secondary:active {
        opacity: 0.98;
        transform: translateY(0);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.45);
    }

    .cb-btn-secondary:focus-visible {
        outline: 0;
        box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #4A2FA6;
    }

/* "or" separator + signup link area */
#login-overlay .login-separator {
    opacity: 0.7;
    margin: 12px 0 0;
    font-size: 13px;
}

#login-overlay #signup-link-wrap {
    margin-top: 12px;
    text-align: center;
}

#login-overlay #signup-link {
    color: #C9B8FF;
    text-decoration: underline;
    font-weight: 600;
}

/* Mobile small-screen padding tweak */
@media (max-width: 420px) {
    #login-overlay .tab-overlay-inner {
        padding: 20px 16px 16px;
        border-radius: 16px;
    }
}


/* Avatar Stuff */
.avatar-skin-section {
    margin-top: 16px;
    margin-bottom: 8px;
}

.avatar-skin-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cb-muted, #a9b3c7);
    margin-bottom: 8px;
}

.avatar-skin-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.skin-swatch {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 2px solid transparent;
    background: var(--swatch-color, #ccc);
    cursor: pointer;
    padding: 0;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.4);
    transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

    .skin-swatch.selected {
        border-color: var(--cb-accent, #33FF99);
        box-shadow: 0 0 0 2px rgba(51, 255, 153, 0.4);
        transform: translateY(-1px);
    }

    .skin-swatch:focus-visible {
        outline: 2px solid var(--cb-pin, #6C4DFF);
        outline-offset: 2px;
    }

.avatar-head-section {
    margin-top: 16px;
    margin-bottom: 8px;
}

.avatar-head-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--cb-muted, #a9b3c7);
    margin-bottom: 8px;
}

.avatar-head-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.head-style-btn {
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(7, 11, 23, 0.8);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
    color: #f6f7fb;
    cursor: pointer;
    white-space: nowrap;
    transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

    .head-style-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.45);
    }

    .head-style-btn.selected {
        border-color: var(--cb-accent, #33FF99);
        background: linear-gradient(135deg, rgba(51,255,153,0.18), rgba(108,77,255,0.25));
    }



/* Early access label above top search */
.ea-corner {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #6C4DFF;
    color: white;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 151;
    white-space: nowrap;
}

/* =========================================
   Bottom Nav Active / Inactive Polish
   Put at bottom of citybits-unified.css
   ========================================= */

#bottom-nav {
    background: linear-gradient(180deg, rgba(92, 230, 92, 0.96), rgba(46, 158, 46, 0.98)) !important;
}

    /* Base inactive nav buttons */
    #bottom-nav .nav-btn[data-tab] {
        position: relative !important;
        isolation: isolate;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.12)) !important;
        color: rgba(255, 255, 255, 0.84) !important;
        border: 1px solid rgba(255, 255, 255, 0.20) !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.20) !important;
        opacity: 0.82;
        transform: none !important;
    }

        /* Inactive icon/label */
        #bottom-nav .nav-btn[data-tab] .nav-btn-icon {
            opacity: 0.72;
            filter: saturate(0.8) brightness(0.96) !important;
            transition: opacity 0.16s ease, filter 0.16s ease, transform 0.16s ease;
        }

        #bottom-nav .nav-btn[data-tab] .nav-label {
            opacity: 0.82;
            font-weight: 750;
            transition: opacity 0.16s ease, color 0.16s ease, transform 0.16s ease;
        }

        /* Hover for inactive tabs */
        #bottom-nav .nav-btn[data-tab]:hover {
            opacity: 0.96;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.16)) !important;
            transform: translateY(-1px) !important;
        }

        /* Active tab */
        #bottom-nav .nav-btn[data-tab].active,
        #bottom-nav .nav-btn[data-tab].is-active {
            opacity: 1;
            color: #FFFFFF !important;
            background: radial-gradient(circle at top left, rgba(92, 230, 92, 0.32), transparent 42%), linear-gradient(180deg, #7C4DFF, #4A2FA6) !important;
            border: 1px solid rgba(255, 255, 255, 0.34) !important;
            box-shadow: 0 10px 24px rgba(74, 47, 166, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.14) inset, inset 0 1px 0 rgba(255, 255, 255, 0.24) !important;
            transform: translateY(-3px) !important;
        }

            /* Active underline/dot */
            #bottom-nav .nav-btn[data-tab].active::after,
            #bottom-nav .nav-btn[data-tab].is-active::after {
                content: "";
                position: absolute;
                left: 50%;
                bottom: 5px;
                width: 22px;
                height: 4px;
                border-radius: 999px;
                transform: translateX(-50%);
                background: #5CE65C;
                box-shadow: 0 0 10px rgba(92, 230, 92, 0.72);
            }

            /* Active icon/label */
            #bottom-nav .nav-btn[data-tab].active .nav-btn-icon,
            #bottom-nav .nav-btn[data-tab].is-active .nav-btn-icon {
                opacity: 1;
                filter: brightness(1.18) saturate(1.15) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.22)) !important;
                transform: translateY(-1px);
            }

            #bottom-nav .nav-btn[data-tab].active .nav-label,
            #bottom-nav .nav-btn[data-tab].is-active .nav-label {
                opacity: 1;
                color: #FFFFFF !important;
                font-weight: 950;
                transform: translateY(-1px);
            }

        /* Pressed state */
        #bottom-nav .nav-btn[data-tab]:active {
            transform: translateY(0) scale(0.985) !important;
            filter: brightness(0.98);
        }

    /* Auth CTA should keep its own button feel */
    #bottom-nav .auth-cta {
        background: linear-gradient(180deg, #7C4DFF, #4A2FA6) !important;
        color: #FFFFFF !important;
        border: 1px solid rgba(255, 255, 255, 0.26) !important;
        opacity: 1;
    }

/* Small phones */
@media (max-width: 420px) {
    #bottom-nav .nav-btn[data-tab].active,
    #bottom-nav .nav-btn[data-tab].is-active {
        transform: translateY(-2px) !important;
    }

        #bottom-nav .nav-btn[data-tab].active::after,
        #bottom-nav .nav-btn[data-tab].is-active::after {
            bottom: 4px;
            width: 18px;
            height: 3px;
        }
}
