/* Shared finishing rules: keep names, avatars and compact navigation consistent. */
.social-page-title, .social-page-subtitle { text-shadow: none; filter: none; }
.network-finder .bdx-section-title { text-shadow: none; }
.social-switch--cards { position: relative; display: flex; align-items: center; gap: var(--space-1); width: fit-content; max-width: 100%; margin: 0 auto var(--space-4); padding: var(--space-1); box-sizing: border-box; background: #ffffff80; backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); border: 1px solid #ffffffcc; border-radius: 24px; }
.social-switch--cards a { position: relative; z-index: 1; flex: 1 1 0; min-width: 132px; display: flex; align-items: center; justify-content: center; height: 38px; border-radius: 20px; text-decoration: none; color: #3f3f3f; font-weight: 600; font-size: .8rem; transition: color .2s; }
.social-switch--cards a.active { background: var(--dex-red); color: #fff; }
.social-switch--cards .nav-pill { position: absolute; z-index: 0; top: 50%; left: 0; width: calc(50% - 8px); height: 34px; border-radius: 20px; background: var(--dex-red); transform: translate(0, -50%); transition: transform .34s cubic-bezier(.34, 1.4, .5, 1); pointer-events: none; opacity: 0; }
.social-switch--cards.nav-pill-ready .nav-pill { opacity: 1; }
.social-switch--cards.nav-pill-ready a.active { background: transparent; }
@media (prefers-reduced-motion: reduce) { .social-switch--cards .nav-pill { transition: none; } }
@media (max-width: 768px) { html:not(.bdx-desktop-nav) body:has(.social-switch--cards) { padding-bottom: calc(140px + env(safe-area-inset-bottom)); } }
@media (max-width: 768px) {
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) { display: flex; align-items: center; position: fixed; bottom: max(73px, calc(58px + env(safe-area-inset-bottom))); left: 50%; transform: translateX(-50%); width: min(280px, calc(100% - 48px)); max-width: 280px; margin: 0; box-sizing: border-box; height: 47px; padding: 4px; gap: 0; z-index: 999; border: 1px solid #ffffffcc; border-bottom: none; border-radius: 22px 22px 0 0; background: #ffffff73; backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) a { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; height: 36px; display: flex; align-items: center; justify-content: center; gap: 0; color: #3f3f3f; text-decoration: none; font-weight: 600; font-size: .8rem; border-radius: 22px; }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) a svg { flex: 0 0 16px; }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) a.active { background: var(--dex-red); color: #fff; }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) .nav-pill { position: absolute; z-index: 0; top: 22px; left: 0; height: 34px; width: calc(33.333% - 8px); border-radius: 20px; background: var(--dex-red); transform: translate(0, -50%); transition: transform .34s cubic-bezier(.34, 1.4, .5, 1); pointer-events: none; opacity: 0; }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin).nav-pill-ready .nav-pill { opacity: 1; }
    html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin).nav-pill-ready a.active { background: transparent; }
    @media (prefers-reduced-motion: reduce) { html:not(.bdx-desktop-nav) .social-switch:is(.social-switch--people, .social-switch--cards, .social-switch--admin) .nav-pill { transition: none; } }
}
@media (min-width: 769px) { .social-switch:is(.social-switch--people, .social-switch--admin) { display: none; } }
html.bdx-desktop-nav .social-switch:is(.social-switch--people, .social-switch--admin) { display: none; }
html .bdx-popup .bdx-back, .bdx-back.bdx-back { box-sizing: border-box; width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; flex: 0 0 44px; padding: 0 !important; border: 1px solid var(--border-subtle) !important; border-radius: 50% !important; background: #fff !important; color: var(--action-primary) !important; box-shadow: var(--shadow-soft) !important; align-items: center; justify-content: center; text-decoration: none; }
.bdx-back:not([hidden]) { display: inline-flex; }
.bdx-back svg { flex: 0 0 20px; width: 20px !important; height: 20px !important; margin: 0 !important; }
.bdx-back:focus-visible { outline: 3px solid var(--action-primary); outline-offset: 3px; }
/* Page back buttons pin to the top left while scrolling (static/back-sticky.js).
   The placeholder keeps the button's original space in the layout. */
.bdx-back-placeholder { display: none; }
.bdx-back-placeholder.is-active { display: inline-block; box-sizing: border-box; pointer-events: none; }
html .bdx-back.is-stuck {
    position: fixed !important;
    top: var(--bdx-back-sticky-top, max(12px, env(safe-area-inset-top))) !important;
    left: var(--bdx-back-left, max(12px, env(safe-area-inset-left))) !important;
    right: auto !important;
    bottom: auto !important;
    z-index: 990;
    margin: 0 !important;
    box-shadow: var(--shadow-card) !important;
}
.home-hero .home-hero__id { --hero-avatar-size: 120px; }
.home-hero .home-hero__avatar-wrap { width: var(--hero-avatar-size); height: var(--hero-avatar-size); padding: 4px; box-sizing: border-box; border-radius: 30px; background: #fff; box-shadow: none; }
.home-hero .home-hero__avatar { border-radius: 26px; }
.settings-profile .settings-profile__frame { border-radius: 24px; box-sizing: border-box; }
.settings-profile .settings-profile__avatar, .settings-profile .settings-profile__initial { border-radius: 21px; }
.border-option .border-preview { border-radius: 18px; background: #fff; }
.border-option .border-preview img { border-radius: 14px; }
.home-hero .home-hero__name { flex-wrap: nowrap; min-width: 0; gap: 5px; }
.bdx-fit-name, .name-ellipsis { min-width: 0; white-space: nowrap !important; overflow-wrap: normal !important; word-break: normal !important; text-overflow: clip !important; }
.bdx-fit-name { display: inline-block; max-width: 100%; }
.home-hero__name > .bdx-fit-name { flex: 0 1 auto; }
.gold-username.gold-username { color: #926b0a; background-image: linear-gradient(110deg, #926b0a 15%, #c29320 35%, #ffe392 49%, #c29320 63%, #926b0a 85%); background-size: 220% 100%; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: 0 0 10px #f0bc4433; animation: gold-username-shimmer 4s linear infinite; }
.friends-controls .fr-toolbar { margin: 0; gap: 8px; align-items: center; }
.friends-controls .fr-sort__btn, .friends-controls .fr-requests-btn, .social-tool { box-sizing: border-box; min-height: 40px; padding: 8px 12px !important; margin: 0; border: 1px solid var(--border-subtle); border-radius: 999px; background: #fff; color: var(--action-primary); font-size: .8rem; font-weight: 700; box-shadow: none; }
.social-tool { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); cursor: pointer; }
.social-tool[hidden] { display: none; }
.social-tool svg { flex-shrink: 0; width: 16px; height: 16px; }
.social-tool:disabled { opacity: .6; cursor: not-allowed; }
.social-tool:not(:disabled):hover { background: var(--surface-info); }
.social-tool:not(:disabled):active { background: var(--border-info); }
.social-tool:is(:hover, :active) { transform: none; box-shadow: none; }
.friends-controls .fr-sort__menu { padding: 4px; min-width: 170px; border-radius: 12px; border: 1px solid #dce3eb; box-shadow: 0 8px 24px #1c25301f; }
.friends-controls .fr-sort__opt { border-radius: 8px; padding: 10px 12px; }
.friend-card.friend-card.expanded .friend-header { padding-bottom: 8px; }
.friend-card.friend-card.expanded .friend-details-inner { gap: 8px; padding-top: 8px; border-top: 1px solid #1c253018; }
.friend-card .friend-stat { padding: 4px; border: 0; background: transparent; }
.friend-card .friend-stat__value { font-size: 1.1rem; }
.friend-card .friend-last-log { padding: 8px; border: 0; background: #f5f7fa; }
.friend-card .friend-last-log__value { font-size: .8rem; font-weight: 600; }
.referral-strip.referral-strip { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; box-sizing: border-box; max-width: 100%; padding: 12px 15px; margin: var(--space-4) auto var(--space-6); background: rgba(255,255,255,.72); color: var(--text-strong); }
.referral-strip .referral-strip__text { flex: 1; min-width: 0; margin: 0; font-size: .8rem; color: inherit; }
.referral-strip .referral-strip__btn { flex: 0 0 auto; margin: 0; }
.friends-load-more-wrap { display: flex; justify-content: center; margin-bottom: var(--space-5); }
.friends-load-more-wrap .load-more-btn { margin-inline: auto; width: auto; }


@media (prefers-reduced-motion: reduce) {  }
#fr-add-panel form { align-items: stretch; }
#fr-add-panel input { max-width: none !important; width: 100%; }
#fr-add-panel button { width: 100% !important; }
.settings-app.settings-app .settings-group { margin: 0 0 20px; padding: 0; overflow: hidden; background: #fff; border: 1px solid #dce3eb; border-radius: 16px; box-shadow: var(--shadow-soft); }
.settings-app.settings-app .settings-group-title { position: static; display: block; width: auto; max-width: none; margin: 0; padding: 14px 16px; border: 0; border-bottom: 1px solid #e4e8ef; border-radius: 0; background: #f5f7fa; color: #596879; font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; box-shadow: none; transform: none; }
.settings-app.settings-app .settings-row, .settings-app.settings-app .settings-link-row { min-height: 56px; padding: 14px 16px; border-radius: 0; }
.settings-app.settings-app .settings-list--single > .settings-row { padding: 0; }
.settings-theme-control { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); flex: 0 0 auto; }
.settings-theme-preview { width: 64px; height: 24px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); box-sizing: border-box; }
@media (max-width: 768px) {
    .settings-app .priv-row { flex-direction: column; align-items: stretch; gap: var(--space-2); }
    .settings-app .priv-row .settings-row-text { flex: none; }
    .settings-app .priv-control { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); margin-left: 0; }
}
.settings-app.settings-app .settings-subpage { margin-bottom: 24px; }
.settings-app.settings-app .settings-profile { padding-bottom: 20px; }
.settings-app.settings-app .settings-profile__name { max-width: 100%; color: #fff; text-shadow: none; filter: drop-shadow(0 1px 2px #000c) drop-shadow(0 2px 4px #0008); }
.settings-profile-customise-actions { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); margin-bottom: 90px; text-align: center; }
.settings-profile-customise-actions .bdx-help { margin: 0; }
.widget-order-list { touch-action: pan-y; }
.widget-order-row { min-height: 52px; }
.widget-order-row.is-dragging { position: relative; z-index: 2; background: var(--surface-info); border-radius: var(--radius-md); box-shadow: 0 8px 24px #1c253033; will-change: transform; }
.widget-order-row .widget-order-handle { touch-action: none; cursor: grab; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; color: #596879; background: #edf1f6; font-size: 22px; }
.widget-order-row .widget-order-handle:active { cursor: grabbing; }
.bdx-relative-time { display: inline; padding: 2px 0; margin: 0; min-height: 0; width: auto !important; color: inherit; background: none; border: 0; border-radius: 0; font: inherit; cursor: pointer; text-decoration-line: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
/* Inline history controls never inherit the global raised button treatment. */
button.attribute-history-trigger,
.bdx-relative-time { appearance: none; box-shadow: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .gold-username.gold-username { animation: none; } }
@media (max-width: 420px) {
    .home-hero .home-hero__id { --hero-avatar-size: 84px; --hero-avatar-gap: 10px; }
    .home-hero .home-hero__avatar-wrap { border-radius: 21px; }
    .home-hero .home-hero__avatar { border-radius: 17px; }
}

.settings-app.settings-app .settings-group > .settings-link-row { border-radius: 0 !important; }

#fr-manage-popup .fr-manage-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#fr-manage-popup .guest-preview-fields { min-width: 0; margin: 0; padding: 0; border: 0; }
.friend-card .friend-toggle { border-radius: 50% !important; border-color: transparent !important; background: #f3f6fa !important; }

/* Expanded stats must remain readable over every selectable profile gradient. */
.friend-card .friend-stats-container { padding: 12px 8px; background: var(--surface-muted); border-radius: 12px; }
.friend-card .friend-stat__label { color: var(--text-muted); }
.customise-other { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; padding: 14px 16px; min-height: 44px; box-sizing: border-box; border: 1px dashed #c6ced9; border-radius: 12px; background: #eaf0f6; color: var(--text-strong); text-decoration: none; }
.customise-other strong { display: block; font-size: .9rem; }
.customise-other small { display: block; margin-top: 4px; font-size: .75rem; color: var(--text-muted); }
.customise-other svg { flex: 0 0 20px; color: var(--text-muted); }
.customise-other:hover { background: #dfe8f1; }
.bdx-time-pill { position: fixed; z-index: 10000; max-width: calc(100vw - 24px); box-sizing: border-box; padding: 6px 10px; border: 1px solid #dce3eb; border-radius: 999px; background: #fff; color: #334155; box-shadow: 0 3px 12px #172d4520; font: 600 .75rem/1.4 var(--font-ui); text-align: center; pointer-events: none; }
.bdx-time-pill[hidden] { display: none; }
.bdx-popup > .bdx-time-pill { position: absolute; }
.bdx-description-trigger { appearance:none; display:inline-flex; align-items:center; justify-content:center; flex:0 0 28px; width:28px; height:28px; padding:var(--space-1); margin:0; border:0; border-radius:var(--radius-pill); background:none; box-shadow:none; transform:none; color:var(--text-muted); font:inherit; text-decoration:none; cursor:pointer; }
.bdx-description-trigger:is(:hover,:active) { background:none; color:var(--action-primary); box-shadow:none; transform:none; }
.bdx-description-pill { position:fixed; z-index:10000; width:max-content; max-width:min(320px, calc(100vw - 32px)); box-sizing:border-box; padding:var(--space-3) var(--space-4); border:1px solid var(--border-subtle); border-radius:var(--radius-lg); background:#fff; color:var(--text-strong); box-shadow:var(--shadow-card); font:400 var(--text-sm)/1.5 var(--font-ui); text-align:center; overflow-wrap:anywhere; }
.bdx-description-pill[hidden] { display:none; }

.referral-strip__avatar { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 14px; background: #ffffff80; color: var(--text-muted); font-size: 28px; }
.profile-picture-preview { width: min(320px, 100%); aspect-ratio: 1; margin: auto; padding: 8px; box-sizing: border-box; border-radius: 25%; background: #fff; }
.profile-picture-preview img { width: 100%; height: 100%; display: block; object-fit: cover; border-radius: calc(25% - 8px); }
.global-bus-search-result { display: flex; flex-direction: column; gap: var(--space-1); color: var(--text-strong); text-decoration: none; overflow-wrap: anywhere; }
/* Shared interaction language: feedback changes tone, never target position. */
html .nav-links a,
html :is(.bdx-back, .settings-link-row, .global-bus-search-result),
html a.bdx-card,
html :is(.dex-sort__btn, .inv-sort__btn, .fr-sort__btn, .dex-sort__opt, .inv-sort__opt, .fr-sort__opt),
html .bdx-popup :is(.bdx-popup__close, .bdx-popup__icon-action) {
    cursor: pointer;
    transition: background-color var(--motion-feedback) var(--ease-ui), color var(--motion-feedback) var(--ease-ui), border-color var(--motion-feedback) var(--ease-ui);
}
html .nav-links a:hover { transform: none; box-shadow: var(--shadow-soft); }
html :is(.dex-sort__btn, .inv-sort__btn, .fr-sort__btn, .dex-sort__opt, .inv-sort__opt, .fr-sort__opt):is(:hover, :active) { transform: none; box-shadow: none; }
html .nav-links a:active { transform: none; background: var(--border-info); }
html :is(.dex-sort__btn, .inv-sort__btn, .fr-sort__btn)[aria-expanded="true"] { background: var(--surface-info); color: var(--action-primary); }
html :is(.dex-sort__opt, .inv-sort__opt, .fr-sort__opt):active { background: var(--border-info); }
html :is(.bdx-back, .settings-link-row, .global-bus-search-result):not(:disabled, [aria-disabled="true"]):active,
html a.bdx-card:active { background: var(--surface-info); }
html .bdx-popup :is(.bdx-popup__close, .bdx-popup__icon-action):not(:disabled):active { background: var(--border-info) !important; color: var(--text-strong) !important; }
html :is(.bdx-back, .settings-link-row)[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
/* Avoid sticky hover feedback on touch devices. Selection remains persistent. */
@media (hover: hover) {
    html .nav-links a:hover { background: var(--surface-info); }
    html :is(.bdx-back, .settings-link-row, .global-bus-search-result):not(:disabled, [aria-disabled="true"]):hover,
    html a.bdx-card:hover { background: var(--surface-info); }
    html :is(.dex-sort__btn, .inv-sort__btn, .fr-sort__btn):hover { background: var(--surface-info); }
    html .bdx-popup :is(.bdx-popup__close, .bdx-popup__icon-action):not(:disabled):hover { background: var(--border-info) !important; color: var(--text-strong) !important; }
}
@media (prefers-reduced-motion: reduce) {
    html .nav-links a,
    html :is(.bdx-back, .settings-link-row, .global-bus-search-result),
    html a.bdx-card,
    html :is(.dex-sort__btn, .inv-sort__btn, .fr-sort__btn, .dex-sort__opt, .inv-sort__opt, .fr-sort__opt),
    html .bdx-popup :is(.bdx-popup__close, .bdx-popup__icon-action) { transition: none; }
}
#global-bus-search { margin-bottom: var(--space-4); }
.logres-friends .route-step__body { overflow-wrap: anywhere; }
.logres-friends .route-step::before { left: 18px; top: 36px; }
.logres-friends .route-step__marker { width: 36px; height: 36px; }
.logres-friend__avatar { display: block; width: 36px; height: 36px; box-sizing: border-box; padding: 1px; border-radius: 10px; background: #fff; }
.logres-friend__avatar img { display: block; width: 100%; height: 100%; border-radius: 9px; object-fit: cover; background: #cfd8dc; }
.logres-friends .route-step__title { text-decoration: underline; }
.logres-friends .logres-panel__title { margin: 0 0 var(--space-3); text-align: center; }
.logres-friends > :is(.bdx-help, .logres-sub) { text-align: center; }
/* Tinted glass navigation: a readable UI surface with restrained reflections. */
:root {
    --nav-glass-tint: rgba(255, 255, 255, .55);
    --nav-glass-blur: 8px;
    --nav-glass-rim: rgba(28, 37, 48, .20);
    --nav-glass-shadow: 0 6px 20px #14243326, 0 1px 4px #14243318, inset 0 1px 1px #ffffffbf, inset 0 -1px 1px #ffffff40;
}
@media (max-width: 768px) {
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) {
        isolation: isolate;
        background: var(--nav-glass-tint);
        backdrop-filter: blur(var(--nav-glass-blur)) saturate(125%);
        -webkit-backdrop-filter: blur(var(--nav-glass-blur)) saturate(125%);
        border-color: var(--nav-glass-rim);
        box-shadow: var(--nav-glass-shadow);
    }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch)::before {
        content: '';
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: inherit;
        background: linear-gradient(165deg, #ffffff18, transparent 32%, transparent 68%, #ffffff0c);
        pointer-events: none;
    }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) > a {
        position: relative;
        z-index: 1;
        color: var(--text-strong);
        text-shadow: none;
    }
    html:not(.bdx-desktop-nav) .mobile-nav a svg { filter: none; }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) a.active { text-shadow: none; }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) .nav-pill {
        z-index: 0;
        box-shadow: inset 0 1px 1px #ffffff99, inset 0 -1px 2px #14243326, 0 2px 6px #14243326;
        transition: transform .34s cubic-bezier(.22, 1, .36, 1);
    }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) .nav-pill::before {
        content: '';
        position: absolute;
        inset: 0;
        border-radius: inherit;
        background-color: inherit;
        background-image: linear-gradient(160deg, #ffffff26, transparent 55%, #ffffff08);
        box-shadow: inherit;
        pointer-events: none;
    }
    html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) .nav-pill.is-travelling::before { animation: bdx-glass-flow .34s cubic-bezier(.22, 1, .36, 1); }
    @keyframes bdx-glass-flow {
        0%, 100% { transform: scale(1); }
        35% { transform: scale(1.12, .96); }
        70% { transform: scale(.99, 1.01); }
    }
    @supports not ((backdrop-filter: blur(3px)) or (-webkit-backdrop-filter: blur(3px))) {
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) { background: var(--nav-glass-solid, #edf7ff); }
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) > a:not(.active) { color: var(--text-strong); text-shadow: none; }
    }
    @media (prefers-contrast: more), (prefers-reduced-transparency: reduce) {
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) { background: var(--nav-glass-solid, #edf7ff); backdrop-filter: none; -webkit-backdrop-filter: none; }
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) > a:not(.active) { color: var(--text-strong); text-shadow: none; }
    }
    @media (prefers-reduced-motion: reduce) {
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) .nav-pill { transition: none; }
        html:not(.bdx-desktop-nav) :is(.mobile-nav, .social-switch.social-switch) .nav-pill::before { animation: none; }
    }
}

/* Desktop chrome reserves space for sticky page tools and anchor/focus targets. */
@media (min-width: 769px) {
    html { --bdx-topbar-clearance: 64px; scroll-padding-top: calc(80px + env(safe-area-inset-top)); }
}
html.bdx-desktop-nav { --bdx-topbar-clearance: 64px; scroll-padding-top: calc(80px + env(safe-area-inset-top)); }

/* Deep brand-red chrome aligned with the shared page containers. */
:root { --nav-top-solid: #a60826; --nav-top-surface: #a60826cc; --nav-top-line: #fff; --nav-top-glow: #ffffff70; --nav-top-text: #f6f7fa; }
/* Admin retains its navigation structure while sharing the site's chrome. */
html .bdx-brand-chrome {
    background: var(--nav-top-surface); color: var(--nav-top-text);
    border: 1px solid #ffffff1f; box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
html .nav-links, html.bdx-desktop-nav .nav-links {
    justify-content: flex-start;
    align-items: flex-end;
    padding-top: calc(4px + env(safe-area-inset-top));
    padding-bottom: 4px;
    padding-left: max(20px, calc((100% - 1120px) / 2 + 20px), env(safe-area-inset-left));
    padding-right: max(20px, calc((100% - 1120px) / 2 + 20px), env(safe-area-inset-right));
    background: var(--nav-top-surface);
    border-bottom: 1px solid #ffffff1f;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    gap: 4px;
}
html .nav-links a, html.bdx-desktop-nav .nav-links a { color: var(--nav-top-text); text-decoration: none; }
html .nav-links a:hover, html.bdx-desktop-nav .nav-links a:hover { background: transparent; box-shadow: none; }
html .nav-links > a, html.bdx-desktop-nav .nav-links > a { position: relative; min-height: 48px; border-radius: 0; }
html .nav-links > a.active, html.bdx-desktop-nav .nav-links > a.active { color: #fff; background: transparent; }
html .nav-links > a:not(.desktop-nav-brand)::after, html .desktop-nav-account::after {
    content: ''; position: absolute; inset: auto 8px 0; height: 3px; pointer-events: none;
    background: var(--nav-top-line); box-shadow: 0 -2px 12px var(--nav-top-glow), 0 -8px 20px #ffffff26;
    transform: scaleX(0); transform-origin: center; opacity: 0;
    transition: transform 260ms cubic-bezier(.2, 0, 0, 1), opacity 150ms ease;
}
html .nav-links > a:not(.desktop-nav-brand):is(.active, :hover, :focus-visible)::after,
html .desktop-nav-account:is(:hover, :focus-within)::after,
html .desktop-nav-account:has(:is(.desktop-nav-profile, .desktop-nav-social__link).active, [aria-expanded="true"])::after { transform: scaleX(1); opacity: 1; }
html .nav-links > a.active::after,
html .desktop-nav-account:has(:is(.desktop-nav-profile, .desktop-nav-social__link).active)::after { animation: bdx-nav-line-reveal 280ms cubic-bezier(.2, 0, 0, 1); }
@keyframes bdx-nav-line-reveal { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    html .nav-links > a:not(.desktop-nav-brand)::after,
    html .desktop-nav-account::after, html .desktop-nav-account:has(:is(.desktop-nav-profile, .desktop-nav-social__link).active)::after { animation: none; transition: none; }
}
html .nav-links > a.active { text-shadow: 0 0 12px var(--nav-top-glow); }
html .nav-links .desktop-nav-brand, html.bdx-desktop-nav .nav-links .desktop-nav-brand { margin: 0 12px 0 0; padding: 8px; gap: 8px; text-decoration: none; }
html .nav-links .desktop-nav-brand img, html.bdx-desktop-nav .nav-links .desktop-nav-brand img { background: transparent; border-radius: 0; }
html .nav-links > .nav-account-start { margin-left: auto; }
html .desktop-nav-account { position: relative; display: flex; flex: 0 0 auto; align-self: flex-end; }
html .nav-links :is(.desktop-nav-profile, .desktop-nav-social__link) {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-sizing: border-box; height: 48px; min-height: 44px; padding: 8px;
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    color: var(--nav-top-text); font: 700 14px/1.5 var(--font-ui); white-space: nowrap; cursor: pointer;
}
html :is(.desktop-nav-profile, .desktop-nav-social__link):is(:hover, :active, :focus) { background: transparent; box-shadow: none; transform: none; }
html .desktop-nav-account__toggle {
    display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px;
    width: 44px; height: 48px; min-height: 44px; padding: 0; margin: 0;
    border: 0; border-radius: 0; background: transparent; color: var(--nav-top-text); box-shadow: none; cursor: pointer;
}
html .desktop-nav-account__toggle:is(:hover, :active) { background: transparent; box-shadow: none; transform: none; }
.desktop-nav-account__chevron { flex: 0 0 16px; }
html .desktop-nav-avatar { display: block; flex: 0 0 36px; width: 36px; height: 36px; box-sizing: border-box; border-radius: 24%; }
html .desktop-nav-avatar--bordered { padding: 3px; }
html .nav-links .desktop-nav-profile .desktop-nav-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 24%; }
html .nav-links .desktop-nav-profile .nav-text { max-width: 136px; overflow: hidden; text-overflow: ellipsis; }
html .nav-links .gold-username, html .adm-main .gold-username { background-image: linear-gradient(110deg, #ebc967 15%, #fff0b5 49%, #ebc967 85%); color: #ebc967; }
@media (min-width: 769px) {
    html .nav-links a { padding-inline: 8px; }
    html .home-brand.bdx-page-header { display: none; }
}
html.bdx-desktop-nav .home-brand.bdx-page-header { display: none; }
@media (max-width: 768px) {
    html:not(.bdx-desktop-nav, .busdex-page) body:has(.guest-navigation) { padding-top: calc(88px + env(safe-area-inset-top)); }
    html:not(.bdx-desktop-nav) .guest-navigation { display: flex; flex-direction: row; margin: 0; position: fixed; inset: 0 0 auto; width: 100%; height: calc(64px + env(safe-area-inset-top)); padding: calc(8px + env(safe-area-inset-top)) 16px 0; box-sizing: border-box; align-items: flex-end; gap: 8px; z-index: 1000; }
    html:not(.bdx-desktop-nav) .guest-navigation > a { display: none; }
    html:not(.bdx-desktop-nav) .guest-navigation > a:is(.desktop-nav-brand, .nav-account-start, [data-register-link]) { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px; border-radius: var(--radius-md); color: var(--nav-top-text); font-size: 14px; width: auto; }
    html:not(.bdx-desktop-nav) .guest-navigation .desktop-nav-brand { margin-right: 0; font-weight: 900; }
    html:not(.bdx-desktop-nav) .guest-navigation > .nav-account-start { margin-left: 0; }
    html:not(.bdx-desktop-nav) .guest-navigation .desktop-nav-brand img { width: 32px; height: 32px; }
    html:not(.bdx-desktop-nav) .guest-navigation > a svg { display: none; }
}
@media (min-width: 769px) and (max-width: 1199px) { html .nav-links a svg { display: none; } }
/* Desktop navigation uses opaque brand red in both bar and map-pill layouts. */
html.bdx-desktop-nav .nav-links { background: var(--nav-top-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
@media(min-width:769px) {
    html .nav-links { background: var(--nav-top-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    html .nav-links, html.bdx-desktop-nav .nav-links, html .bdx-brand-chrome { background: var(--nav-top-solid); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
    html .nav-links, html.bdx-desktop-nav .nav-links, html .bdx-brand-chrome { background: var(--nav-top-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (forced-colors: active) { html .nav-links, html.bdx-desktop-nav .nav-links, html .bdx-brand-chrome { background: Canvas; border-bottom-color: CanvasText; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; } html .nav-links a { color: LinkText; } }

/* Social shares account dropdown geometry; the phone navigation stays unchanged. */
@media (max-width: 768px) {
    html:not(.bdx-desktop-nav) .guest-navigation > .desktop-nav-social { display: none; }
}

/* Catalogue guests use the mobile bottom navigation. */
@media (max-width: 768px) {
    html.busdex-page:not(.bdx-desktop-nav) .guest-navigation,
    html.busdex-page:not(.bdx-desktop-nav) .guest-explore { display: none; }
}

@media(max-width:768px) { html:not(.bdx-desktop-nav) .nav-links > .desktop-nav-map { display: none; } }
