/* ═══════════════════════════════════════════════════════════════════════
   Glubus — estils de l'app (header, barra de pestanyes, publicacions, notificacions)
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --g-cream: #FDFAF6;
    --g-cream2: #F5F0E8;
    --g-cream3: #EDE6D8;
    --g-white: #FFFFFF;
    --g-red: #FF4D4E; --g-red-ink: #D13A3B;
    --g-red-dark: #B53233;
    --g-red-soft: rgba(255, 77, 78, 0.08);
    --g-text: #2C2420;
    --g-text-2: #6B5E57;
    --g-text-3: #766C64;
    --g-border: rgba(44, 36, 32, 0.09);
    --g-shadow: 0 2px 16px rgba(44, 36, 32, 0.07);
    --g-font: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --g-font-d: 'Oswald', 'Arial Narrow', sans-serif;

    --gx-top-h: 56px;
    --gx-tab-h: 62px;
    --gx-safe-b: env(safe-area-inset-bottom, 0px);
}

/* ── Base ─────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body.gx-app {
    background: var(--g-cream);
    color: var(--g-text);
    font-family: var(--g-font);
    margin: 0;
    overflow-x: clip;               /* res no pot fer lliscar la pàgina de costat */
    -webkit-tap-highlight-color: transparent;
}
body.gx-app a,
body.gx-app button,
body.gx-app [role="tab"] { touch-action: manipulation; }  /* tocs instantanis, sense zoom de doble toc */

/* L'iPhone fa zoom (i mou la pàgina) si un camp té lletra < 16px */
@media (max-width: 768px) {
    body.gx-app input,
    body.gx-app select,
    body.gx-app textarea { font-size: 16px !important; }
}

/* A les pàgines de l'app només hi ha el header de Glubus: qualsevol header d'Elementor o del tema queda amagat */
body.gx-app .elementor-location-header,
body.gx-app [data-elementor-type="header"],
body.gx-app .site-header,
body.gx-app .elementor-location-footer,
body.gx-app [data-elementor-type="footer"],
body.gx-app .site-footer,
body.gx-app #masthead,
body.gx-app #colophon,
body.gx-app .hfe-before-footer-wrap,
body.gx-app .ehf-header #masthead,
body.gx-app header[itemtype="https://schema.org/WPHeader"],
body.gx-app footer[itemtype="https://schema.org/WPFooter"] { display: none !important; }

/* ── Header ───────────────────────────────────────────────────────────── */
.gx-top {
    position: sticky;
    top: 0;
    z-index: 900;
    height: var(--gx-top-h);
    background: rgba(253, 250, 246, 0.96);
    border-bottom: 1px solid var(--g-border);
    padding-top: env(safe-area-inset-top, 0px);
}
.admin-bar .gx-top { top: 32px; }
@media (max-width: 782px) { .admin-bar .gx-top { top: 0; } }

.gx-top-inner {
    max-width: 1100px;
    height: var(--gx-top-h);
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.gx-top a.gx-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--g-text);
    flex-shrink: 0;
}
.gx-top .gx-brand-logo { width: auto; height: 32px; max-width: 160px; object-fit: contain; display: block; }  /* només el logo (ja porta el nom) */
.gx-top .gx-brand-name {
    font-family: var(--g-font-d);
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
}

.gx-topnav { display: flex; gap: 4px; margin: 0 auto; }
.gx-top a.gx-topnav-link {
    padding: 8px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--g-text-2);
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.gx-top a.gx-topnav-link:hover,
.gx-top a.gx-topnav-link.is-hover { background: var(--g-cream3); color: var(--g-red-ink); }
.gx-top a.gx-topnav-link.is-active { background: var(--g-red-soft); color: var(--g-red-ink); }
.gx-top a.gx-topnav-link.is-active:hover,
.gx-top a.gx-topnav-link.is-active.is-hover { background: rgba(255, 77, 78, 0.16); color: var(--g-red-dark); }
.gx-top a.gx-bell.is-hover { background: var(--g-cream2); }
.gx-top a.gx-me.is-hover { border-color: var(--g-red); }
.gx-top a.gx-topnav-link:focus-visible,
.gx-top a.gx-bell:focus-visible,
.gx-top a.gx-me:focus-visible,
.gx-tabbar a.gx-tab:focus-visible { outline: 2px solid var(--g-red); outline-offset: 2px; }
.gx-top a.gx-me:hover { border-color: var(--g-red); }

.gx-top-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.gx-topnav + .gx-top-actions { margin-left: 0; }
.gx-top a.gx-bell {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--g-text);
    text-decoration: none;
}
.gx-top a.gx-bell:hover { background: var(--g-cream2); }
.gx-badge {
    position: absolute;
    top: 5px;
    right: 3px;
    transform: translate(35%, -30%);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--g-red-ink);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 16px;
    text-align: center;
    border: 2px solid var(--g-cream);
    box-sizing: content-box;
}
.gx-top a.gx-me { display: block; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px solid var(--g-cream3); flex-shrink: 0; }
.gx-top a.gx-me img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-top a.gx-login { padding: 9px 18px; border-radius: 50px; background: var(--g-red-ink); color: #fff; font-weight: 800; text-decoration: none; font-size: 0.88rem; }

/* Mòbil: cap header a dalt (ni logo). Tot és a la barra de pestanyes de baix. */
@media (max-width: 768px) {
    .gx-top { display: none; }
    body.gx-app { padding-top: env(safe-area-inset-top, 0px); }
}

/* ── Barra de pestanyes (mòbil) ──────────────────────────────────────────
   Fixa, sense JavaScript i sense animacions: no es mou mai. */
.gx-tabbar { display: none; }
@media (max-width: 768px) {
    body.gx-app { padding-bottom: calc(var(--gx-tab-h) + var(--gx-safe-b)); }
    .gx-tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 950;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        height: calc(var(--gx-tab-h) + var(--gx-safe-b));
        padding-bottom: var(--gx-safe-b);
        background: #fff;
        border-top: 1px solid var(--g-border);
        box-shadow: 0 -4px 20px rgba(44, 36, 32, 0.05);
        transform: translateZ(0);        /* capa pròpia: no tremola en fer scroll */
        contain: layout paint;
        user-select: none;
        -webkit-user-select: none;
    }
    .gx-tabbar a.gx-tab {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        height: var(--gx-tab-h);
        color: var(--g-text-3);
        text-decoration: none;
        font-family: var(--g-font);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.02em;
    }
    .gx-tabbar a.gx-tab:active { background: var(--g-cream); }
    .gx-tabbar a.gx-tab.is-active { color: var(--g-red-ink); }
    .gx-tabbar a.gx-tab.is-active .gx-ico { stroke-width: 2.4; }
    .gx-tab-ico { position: relative; display: block; line-height: 0; }
    .gx-dot {
        position: absolute;
        top: -5px;
        left: 14px;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 8px;
        background: var(--g-red-ink);
        border: 2px solid #fff;
        color: #fff;
        font-size: 0.62rem;
        font-weight: 900;
        line-height: 16px;
        text-align: center;
        box-sizing: content-box;
    }
}

/* ── Contingut ────────────────────────────────────────────────────────── */
.gx-main { max-width: 620px; margin: 0 auto; padding: 20px 16px 40px; box-sizing: border-box; }

.gx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 50px;
    font-family: var(--g-font);
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
    color: var(--g-text-2);
    background: var(--g-cream2);
    border: 1.5px solid var(--g-border);
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}
.gx-btn:hover { background: var(--g-cream3); color: var(--g-text); }
.gx-btn-red { background: var(--g-red-ink); border-color: var(--g-red); color: #fff; }
.gx-btn-red:hover { background: var(--g-red-dark); border-color: var(--g-red-dark); color: #fff; }

.gx-hello { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.gx-hello-title { font-family: var(--g-font-d); font-size: 1.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; margin: 0; line-height: 1.1; color: var(--g-text); }
.gx-hello-sub { margin: 4px 0 0; color: var(--g-text-2); font-weight: 600; font-size: 0.92rem; }
@media (max-width: 420px) {
    .gx-hello { flex-direction: column; align-items: stretch; }
    .gx-hello .gx-btn { width: 100%; }
}

.gx-news {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: var(--g-red-soft);
    border: 1px solid rgba(255, 77, 78, 0.2);
    border-radius: 16px;
    color: var(--g-text);
    text-decoration: none;
    font-weight: 600;
}
.gx-news strong { color: var(--g-red-ink); font-weight: 900; }
.gx-news-ico { font-size: 1.3rem; }
.gx-news-arrow { margin-left: auto; color: var(--g-red-ink); font-weight: 900; }

.gx-posts { display: flex; flex-direction: column; gap: 16px; }
.gx-feed-end { text-align: center; color: var(--g-text-3); font-weight: 700; font-size: 0.85rem; margin: 28px 0 8px; }

.gx-section { margin-top: 26px; }
.gx-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gx-section-title { font-family: var(--g-font-d); font-size: 1.15rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin: 0; color: var(--g-text); }
.gx-section-meta { font-size: 0.8rem; font-weight: 800; color: var(--g-text-3); }

.gx-empty { text-align: center; padding: 48px 22px; background: var(--g-white); border: 1px solid var(--g-border); border-radius: 20px; }
.gx-empty-ico { font-size: 2.8rem; margin-bottom: 10px; }
.gx-empty h2 { font-family: var(--g-font-d); font-size: 1.35rem; text-transform: uppercase; margin: 0 0 8px; color: var(--g-text); }
.gx-empty p { color: var(--g-text-2); font-weight: 600; line-height: 1.6; margin: 0; font-size: 0.93rem; }
.gx-empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }

/* ── Publicació ───────────────────────────────────────────────────────── */
.gx-post {
    background: var(--g-white);
    border: 1px solid var(--g-border);
    border-radius: 20px;
    box-shadow: var(--g-shadow);
    overflow: hidden;
}
.gx-post-head { display: flex; align-items: center; gap: 11px; padding: 14px 16px 6px; }
.gx-post-av { flex-shrink: 0; line-height: 0; }
.gx-post-av img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--g-cream3); background: var(--g-cream2); }
.gx-post-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gx-post-user { font-weight: 800; font-size: 0.93rem; color: var(--g-text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-post-user:hover { color: var(--g-red-ink); }
.gx-post-date { font-size: 0.74rem; color: var(--g-text-3); font-weight: 700; }
.gx-post-badge { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--g-red-ink); background: var(--g-red-soft); padding: 5px 10px; border-radius: 50px; white-space: nowrap; }

.gx-post-mountain {
    display: block;
    padding: 4px 16px 12px;
    font-family: var(--g-font-d);
    font-size: 1.35rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.15;
    color: var(--g-text);
    text-decoration: none;
}
.gx-post-mountain:hover { color: var(--g-red-ink); }

/* La foto té la proporció reservada: no fa saltar la pàgina quan es carrega */
.gx-post-photo { display: block; aspect-ratio: 4 / 3; background: var(--g-cream2); overflow: hidden; }
.gx-post-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gx-post-actions { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--g-border); margin-top: 0; }
.gx-post-photo + .gx-post-actions { border-top: 0; }
.gx-post-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    background: none;
    border: 0;
    border-radius: 0;
    font-family: var(--g-font);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--g-text-2);
    cursor: pointer;
    padding: 0;
}
.gx-post-actions button:hover,
.gx-post-actions button:focus-visible { background: var(--g-cream); color: var(--g-text); }
.gx-post-actions button + button { border-left: 1px solid var(--g-border); }

.gx-glubus-ico {
    width: 26px;
    height: 26px;
    background: url('/wp-content/uploads/2024/11/glubus-amb-linia-transparent.png') center / contain no-repeat;
    transition: transform 0.2s;
}
.gx-glubus.is-on { color: var(--g-red-ink); }
.gx-glubus.is-on .gx-glubus-ico { background-image: url('/wp-content/uploads/2024/11/glubus-amb-linia.png'); }
.gx-glubus.gx-pop .gx-glubus-ico { animation: gxPop 0.35s ease; }
@keyframes gxPop { 50% { transform: scale(1.3); } }

.gx-post-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 16px 12px;
    border-top: 1px solid var(--g-border);
}
.gx-post-stats button { background: none; border: 0; padding: 0; cursor: pointer; font-family: var(--g-font); font-weight: 700; font-size: 0.8rem; color: var(--g-text-2); text-align: left; }
.gx-post-stats button:hover { color: var(--g-red-ink); }
.gx-likers { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: 28px; }
.gx-likers-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-likers.is-empty { color: var(--g-text-3); pointer-events: none; }
.gx-likers-avs { display: flex; flex-shrink: 0; }
.gx-likers-avs:empty { display: none; }
.gx-likers-avs img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; margin-left: -7px; background: var(--g-cream2); }
.gx-likers-avs img:first-child { margin-left: 0; }
.gx-comments-count { white-space: nowrap; flex-shrink: 0; }
.gx-comments-count.is-empty { display: none; }

/* Comentaris (v5.6) */
.gx-comment-peek { display: flex; align-items: center; gap: 8px; width: 100%; padding: 0 16px 12px; border: 0; background: none; text-align: left; cursor: pointer; font-family: var(--g-font); color: var(--g-text-2); }
.gx-comment-peek[hidden] { display: none; }
.gx-comment-peek img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--g-cream2); }
.gx-comment-peek-txt { font-size: 0.86rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.gx-comment-peek-txt b { color: var(--g-text); font-weight: 800; }
.gx-comment-peek:hover .gx-comment-peek-txt { color: var(--g-text); }

.gx-comments { border-top: 1px solid var(--g-border); background: linear-gradient(180deg, #FBF7F1, var(--g-cream)); padding: 14px 14px 12px; }
.gx-comments[hidden] { display: none; }
.gx-comments-older { display: block; margin: 0 0 10px 44px; padding: 0; border: 0; background: none; font-family: var(--g-font); font-weight: 800; font-size: 0.8rem; color: var(--g-text-3); cursor: pointer; }
.gx-comments-older:hover { color: var(--g-red-ink); }
.gx-comment-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.gx-comment-list:empty { display: none; }
.gx-comment-list.is-collapsed > .gx-comment:nth-last-child(n+4) { display: none; }
.gx-comment { display: flex; gap: 10px; align-items: flex-start; }
.gx-comment.is-new { animation: gxCommentIn 0.35s cubic-bezier(.2,1.2,.4,1); }
.gx-comment.is-pending { opacity: 0.6; }
.gx-comment.is-leaving { opacity: 0; transform: translateX(10px); transition: opacity 0.2s, transform 0.2s; }
.gx-comment.is-failed .gx-comment-bubble { border-color: rgba(255, 77, 78, 0.5); }
@keyframes gxCommentIn { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
.gx-comment-av { flex-shrink: 0; line-height: 0; }
.gx-comment-av img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--g-cream2); box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(44,36,32,0.12); }
.gx-comment-body { min-width: 0; max-width: calc(100% - 44px); }
.gx-comment-bubble { background: #fff; border: 1px solid var(--g-border); border-radius: 6px 18px 18px 18px; padding: 8px 13px 9px; box-shadow: 0 1px 2px rgba(44,36,32,0.04); }
.gx-comment.is-mine .gx-comment-bubble { background: #FFF6F5; border-color: rgba(255, 77, 78, 0.18); }
.gx-comment-top { display: flex; align-items: center; gap: 6px; }
.gx-comment-author { font-weight: 900; font-size: 0.84rem; color: var(--g-text); text-decoration: none; }
.gx-comment-author:hover { color: var(--g-red-ink); }
.gx-comment-badge { font-size: 0.64rem; font-weight: 900; text-transform: uppercase; letter-spacing: 0.06em; color: var(--g-red-ink); background: var(--g-red-soft); border-radius: 50px; padding: 1px 7px; }
.gx-comment-text { margin: 2px 0 0; font-size: 0.92rem; line-height: 1.5; color: var(--g-text); overflow-wrap: anywhere; white-space: pre-line; }
.gx-comment-text a { color: var(--g-red-ink); font-weight: 700; text-decoration: none; }
.gx-comment-text a:hover { text-decoration: underline; }
.gx-mention { color: var(--g-red-ink); font-weight: 800; }
.gx-comment-foot { display: flex; align-items: center; gap: 12px; margin: 4px 0 0 12px; font-size: 0.74rem; font-weight: 800; color: var(--g-text-3); }
.gx-comment-foot button { padding: 0; border: 0; background: none; font: inherit; color: var(--g-text-3); cursor: pointer; }
.gx-comment-foot button:hover { color: var(--g-red-ink); }
.gx-comment-foot [data-gx-cdel] { opacity: 0; transition: opacity 0.15s; }
.gx-comment:hover .gx-comment-foot [data-gx-cdel], .gx-comment-foot [data-gx-cdel]:focus-visible { opacity: 1; }
@media (hover: none) { .gx-comment-foot [data-gx-cdel] { opacity: 1; } }

.gx-comment-form { margin-top: 12px; }
.gx-comment-list:empty ~ .gx-comment-form { margin-top: 0; }
.gx-replying { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px 40px; padding: 6px 8px 6px 12px; border-radius: 12px; background: var(--g-red-soft); font-size: 0.8rem; font-weight: 700; color: var(--g-text-2); }
.gx-replying[hidden] { display: none; }
.gx-replying b { color: var(--g-red-ink); }
.gx-replying button { border: 0; background: none; color: var(--g-text-3); font-size: 0.85rem; cursor: pointer; padding: 2px 6px; }
.gx-comment-foot .gx-reply-btn { color: var(--g-text-2); }
a.gx-mention { text-decoration: none; }
a.gx-mention:hover { text-decoration: underline; }
.gx-comment-compose { position: relative; display: flex; align-items: flex-end; gap: 8px; }
.gx-comment-me { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; margin-bottom: 6px; background: var(--g-cream2); }
.gx-comment-form textarea {
    flex: 1; min-width: 0; min-height: 44px; max-height: 140px;
    padding: 11px 50px 11px 16px;
    border: 1.5px solid var(--g-border); border-radius: 22px; background: #fff;
    font-family: var(--g-font); font-size: 0.93rem; line-height: 1.4; color: var(--g-text);
    resize: none; outline: none; box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.gx-comment-form textarea:focus { border-color: var(--g-red); box-shadow: 0 0 0 4px rgba(255, 77, 78, 0.1); }
.gx-comment-form .gx-comment-send {
    position: absolute; right: 6px; bottom: 6px;
    width: 34px; height: 34px; min-height: 0; padding: 0;
    display: grid; place-items: center;
    border: 0; border-radius: 50%;
    background: var(--g-cream3); color: #fff; cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}
.gx-comment-form.has-text .gx-comment-send { background: var(--g-red); }
.gx-comment-form.has-text .gx-comment-send:hover { background: var(--g-red-dark); transform: scale(1.06); }
.gx-comment-form .gx-comment-send:disabled { cursor: default; }
.gx-comment-form.is-sending .gx-comment-send svg { animation: gxSendPulse 0.8s ease-in-out infinite; }
@keyframes gxSendPulse { 50% { transform: translateX(3px); opacity: 0.5; } }
.gx-comment-count { position: absolute; right: 48px; bottom: 14px; font-size: 0.7rem; font-weight: 800; color: var(--g-text-3); pointer-events: none; }
.gx-comment-count[hidden] { display: none; }
.gx-comment-count.is-low { color: var(--g-red-ink); }

/* Finestra amb qui ha fet glubus */
.gx-sheet { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: flex-end; justify-content: center; background: rgba(44, 36, 32, 0.45); }
.gx-sheet-box { background: #fff; width: 100%; max-width: 440px; max-height: 75vh; border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + var(--gx-safe-b)); display: flex; flex-direction: column; box-sizing: border-box; }
@media (min-width: 600px) { .gx-sheet { align-items: center; } .gx-sheet-box { border-radius: 22px; } }
.gx-sheet-box h3 { font-family: var(--g-font-d); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1.05rem; margin: 0 0 12px; }
.gx-sheet-list { list-style: none; margin: 0 0 12px; padding: 0; overflow-y: auto; }
.gx-sheet-list a { display: flex; align-items: center; gap: 12px; padding: 8px 4px; color: var(--g-text); text-decoration: none; font-weight: 800; }
.gx-sheet-list img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }

/* ── Notificacions ────────────────────────────────────────────────────── */
.gx-tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--g-red-ink); color: #fff; font-size: 0.68rem; line-height: 18px; text-align: center; vertical-align: 1px; }
.g-inner-tab.active .gx-tab-badge { background: #fff; color: var(--g-red-ink); }

.gx-notifs { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--g-border); border-radius: 20px; overflow: hidden; box-shadow: var(--g-shadow); }
.gx-notif { display: flex; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--g-border); }
.gx-notif:last-child { border-bottom: 0; }
.gx-notif.is-unread { background: rgba(255, 77, 78, 0.05); }
.gx-notif-av { position: relative; display: block; width: 44px; height: 44px; flex-shrink: 0; line-height: 0; }
.gx-notif-av img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--g-cream2); }
.gx-notif-type { position: absolute; right: -4px; bottom: -4px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; background: var(--g-red) center / 15px no-repeat; }
.gx-notif-like { background-color: #fff; background-image: url('/wp-content/uploads/2024/11/glubus-amb-linia.png'); background-size: 18px; }
.gx-notif-comment { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3C/svg%3E"); }
.gx-notif-body { min-width: 0; flex: 1; }
.gx-notif-body p { margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--g-text-2); }
.gx-notif-body strong { color: var(--g-text); font-weight: 800; }
.gx-notif-body p a { color: var(--g-text); font-weight: 800; text-decoration: none; }
.gx-notif-body p a:hover { color: var(--g-red-ink); }
.gx-notif-body blockquote { margin: 6px 0 0; padding: 7px 11px; background: var(--g-cream); border-radius: 4px 12px 12px 12px; font-size: 0.88rem; color: var(--g-text-2); font-style: normal; overflow-wrap: anywhere; }
.gx-notif-date { display: block; margin-top: 4px; font-size: 0.74rem; color: var(--g-text-3); font-weight: 700; }

/* ── Blindatge: CSS o JS de fora (Elementor, plugins, CSS personalitzat) no pot tapar ni moure el header ni les pestanyes ── */
header.gx-top {
    z-index: 10000 !important;
    isolation: isolate;
    transform: none !important;
    pointer-events: auto !important;
}
.gx-top nav.gx-topnav,
nav.gx-tabbar {
    inset: auto;
    width: auto;
    min-width: 0;
    max-width: none;
    background-image: none;
    pointer-events: auto !important;
}
.gx-top nav.gx-topnav {
    position: static !important;
    height: auto !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    transform: none !important;
    flex-wrap: nowrap;
}
.gx-top a.gx-topnav-link {
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: inline-flex !important;
    align-items: center;
    min-height: 40px;
    white-space: nowrap;
    pointer-events: auto !important;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
}
/* El hover no el pot anul·lar cap CSS global d'Elementor (a:hover { … !important }) */
.gx-top a.gx-topnav-link:hover,
.gx-top a.gx-topnav-link.is-hover { background-color: var(--g-cream3) !important; color: var(--g-red-ink) !important; text-decoration: none !important; }
.gx-top a.gx-topnav-link.is-active,
.gx-top a.gx-topnav-link.is-active:hover,
.gx-top a.gx-topnav-link.is-active.is-hover { color: var(--g-red-ink) !important; }
.gx-top a.gx-topnav-link.is-active:hover,
.gx-top a.gx-topnav-link.is-active.is-hover { background-color: rgba(255, 77, 78, 0.16) !important; }
.gx-top a::before, .gx-top a::after,
.gx-tabbar a::before, .gx-tabbar a::after { content: none !important; display: none !important; }
.gx-top a *, .gx-tabbar a * { pointer-events: none; }  /* el clic sempre és de l'enllaç sencer */
@media (max-width: 768px) {
    nav.gx-tabbar { z-index: 10000 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; top: auto !important; position: fixed !important; }
}
/* Pantalles d'escriptori estretes: el menú no es trepitja */
@media (min-width: 769px) and (max-width: 1020px) {
    .gx-top a.gx-topnav-link { padding: 8px 10px; font-size: 0.84rem; }
    .gx-top .gx-brand-name { display: none; }
}
/* El mapa (Leaflet) i altres capes d'Elementor queden per sota del header */
body.gx-app .leaflet-pane, body.gx-app .leaflet-top, body.gx-app .leaflet-bottom { z-index: 400; }

/* ── Temps al cim ─────────────────────────────────────────────────────── */
.gx-weather { background: #fff; border: 1px solid var(--g-border); border-radius: 20px; box-shadow: var(--g-shadow); padding: 18px 18px 12px; margin: 0 0 14px; }
.gx-weather[hidden] { display: none; }
.gx-weather-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.gx-weather-head h2 { margin: 0; font-family: var(--g-font-d); font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text); }
.gx-weather-alt { font-size: 0.8rem; font-weight: 800; color: var(--g-text-3); }
.gx-weather-loading { color: var(--g-text-3); font-weight: 700; font-size: 0.9rem; padding: 18px 0; text-align: center; }
.gx-weather-now { display: flex; align-items: center; gap: 12px; }
.gx-weather-emoji { font-size: 2.6rem; line-height: 1; }
.gx-weather-temp { font-family: var(--g-font-d); font-size: 2.6rem; font-weight: 700; color: var(--g-text); line-height: 1; }
.gx-weather-desc { display: flex; flex-direction: column; min-width: 0; }
.gx-weather-desc strong { font-weight: 800; color: var(--g-text); }
.gx-weather-desc span { font-size: 0.82rem; color: var(--g-text-2); font-weight: 600; }
.gx-weather-alert, .gx-weather-good { margin-top: 12px; padding: 10px 12px; border-radius: 12px; font-size: 0.86rem; font-weight: 700; line-height: 1.4; }
.gx-weather-alert { background: #FFF1E6; color: #9A3B00; }
.gx-weather-good { background: #EAF7EE; color: #1F6B3A; }
.gx-weather-extra { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 4px; font-size: 0.82rem; color: var(--g-text-2); font-weight: 600; }
.gx-weather-extra strong { color: var(--g-text); }
.gx-weather-days { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.gx-weather-days li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 2px; border-radius: 14px; background: var(--g-cream); text-align: center; min-width: 0; }
.gx-wd-day { font-size: 0.72rem; font-weight: 800; color: var(--g-text-2); text-transform: capitalize; white-space: nowrap; }
.gx-wd-ico { font-size: 1.5rem; line-height: 1.2; }
.gx-wd-temp { font-size: 0.8rem; color: var(--g-text-3); font-weight: 700; white-space: nowrap; }
.gx-wd-temp strong { color: var(--g-text); font-weight: 900; }
.gx-wd-rain, .gx-wd-wind { font-size: 0.68rem; font-weight: 700; color: var(--g-text-2); white-space: nowrap; }
.gx-weather-credit { margin: 10px 0 0; font-size: 0.7rem; color: var(--g-text-3); text-align: right; }
.gx-weather-credit a { color: inherit; }

.gx-share-row { margin-top: 14px; }
.gx-share-row .gx-btn { width: 100%; }

/* ── Pop-up de felicitació / compartir ────────────────────────────────── */
.gx-cel { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 22, 34, 0.6); overflow: hidden; animation: gxFade 0.2s ease; }
@keyframes gxFade { from { opacity: 0; } }
.gx-cel-box { position: relative; z-index: 1; width: 100%; max-width: 400px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; background: #fff; border-radius: 26px; padding: 26px 20px 20px; text-align: center; box-shadow: 0 30px 80px rgba(0,0,0,0.3); animation: gxPopIn 0.35s cubic-bezier(.2,1.4,.4,1); box-sizing: border-box; }
@keyframes gxPopIn { from { transform: scale(0.85); opacity: 0; } }
.gx-cel-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--g-cream2); color: var(--g-text-2); font-size: 1rem; cursor: pointer; }
.gx-cel-emoji { font-size: 3.2rem; line-height: 1; margin-bottom: 6px; }
.gx-cel h2 { margin: 0 0 6px; font-family: var(--g-font-d); font-size: 1.7rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--g-text); }
.gx-cel-sub { margin: 0 0 14px; color: var(--g-text-2); font-weight: 600; }
.gx-cel-sub strong { color: var(--g-red-ink); }
.gx-cel-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.gx-cel-stats span { display: flex; flex-direction: column; padding: 10px; border-radius: 14px; background: var(--g-cream); font-size: 0.74rem; font-weight: 800; color: var(--g-text-3); text-transform: uppercase; letter-spacing: 0.05em; }
.gx-cel-stats strong { font-family: var(--g-font-d); font-size: 1.7rem; color: var(--g-red-ink); line-height: 1.1; }
.gx-cel-repte { display: block; text-align: left; padding: 10px 12px; margin-bottom: 8px; border-radius: 14px; background: var(--g-cream); text-decoration: none; color: var(--g-text); }
.gx-cel-repte-top { display: flex; justify-content: space-between; font-size: 0.84rem; font-weight: 800; margin-bottom: 6px; }
.gx-cel-repte-top span { color: var(--g-text-2); }
.gx-cel-bar { display: block; height: 8px; border-radius: 4px; background: var(--g-cream3); overflow: hidden; }
.gx-cel-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--g-red), #FF9A3C); border-radius: 4px; }
.gx-cel-preview { margin: 12px auto; width: 100%; max-width: 280px; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; background: var(--g-cream2); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.gx-cel-preview[hidden] { display: none; }
.gx-cel-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-cel-preview-loading { height: 100%; display: grid; place-items: center; font-size: 0.85rem; font-weight: 700; color: var(--g-text-3); }
.gx-cel-actions { display: flex; flex-direction: column; gap: 8px; }
.gx-cel-actions .gx-btn { width: 100%; }
.gx-cel-actions .gx-btn:disabled { opacity: 0.6; }
.gx-confetti { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; opacity: 0.95; animation-name: gxConfetti; animation-timing-function: cubic-bezier(.3,.6,.6,1); animation-fill-mode: forwards; }
@keyframes gxConfetti { to { top: 105%; transform: translateX(40px) rotate(720deg); opacity: 0.8; } }

/* ── Botó ＋ (registre ràpid) ─────────────────────────────────────────── */
.gx-top button.gx-add {
    display: inline-flex; align-items: center; gap: 4px;
    min-height: 38px; padding: 0 16px; margin-right: 4px;
    border: 0; border-radius: 50px; background: var(--g-red-ink); color: #fff;
    font-family: var(--g-font); font-weight: 800; font-size: 0.86rem; cursor: pointer; white-space: nowrap;
    transition: background-color 0.15s ease;
}
.gx-top button.gx-add:hover { background: var(--g-red-dark); }
.gx-top button.gx-add:focus-visible { outline: 2px solid var(--g-red); outline-offset: 2px; }
@media (min-width: 769px) and (max-width: 1100px) { .gx-top button.gx-add { padding: 0 12px; font-size: 0.8rem; } }
@media (max-width: 768px) {
    .gx-tabbar button.gx-tab-add {
        display: flex; align-items: center; justify-content: center;
        height: var(--gx-tab-h); padding: 0; border: 0; background: none; cursor: pointer;
    }
    .gx-tab-add-circle {
        display: grid; place-items: center;
        width: 48px; height: 48px; border-radius: 50%;
        background: var(--g-red-ink); color: #fff; font-size: 1.6rem; font-weight: 700; line-height: 1;
        box-shadow: 0 4px 14px rgba(255, 77, 78, 0.4);
    }
    .gx-tabbar button.gx-tab-add:active .gx-tab-add-circle { background: var(--g-red-dark); }
}

/* ── Panell de registre ràpid ─────────────────────────────────────────── */
.gx-qa { position: fixed; inset: 0; z-index: 20000; display: flex; align-items: flex-end; justify-content: center; background: rgba(28, 22, 34, 0.5); animation: gxFade 0.15s ease; }
.gx-qa-box { width: 100%; max-width: 520px; height: min(86vh, 680px); height: min(86dvh, 680px); background: #fff; border-radius: 24px 24px 0 0; padding: 8px 16px calc(16px + var(--gx-safe-b)); display: flex; flex-direction: column; box-sizing: border-box; animation: gxSlideUp 0.25s cubic-bezier(.2,.9,.3,1); }
@keyframes gxSlideUp { from { transform: translateY(40px); opacity: 0.4; } }
@media (min-width: 600px) { .gx-qa { align-items: center; } .gx-qa-box { border-radius: 24px; height: min(80vh, 640px); } }
.gx-qa-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--g-cream3); margin: 4px auto 8px; }
.gx-qa-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.gx-qa-head h2 { margin: 0; font-family: var(--g-font-d); font-size: 1.35rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--g-text); }
.gx-qa-head .gx-cel-close { position: static; }
.gx-qa-step { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.gx-qa-step[hidden] { display: none; }
.gx-qa-search { width: 100%; min-height: 50px; padding: 0 16px; border: 1.5px solid var(--g-border); border-radius: 14px; font-family: var(--g-font); font-size: 16px; background: var(--g-cream); box-sizing: border-box; outline: none; }
.gx-qa-search:focus { border-color: var(--g-red); background: #fff; }
.gx-qa-near { margin: 10px 0 4px; min-height: 42px; border: 1.5px dashed var(--g-cream3); border-radius: 12px; background: none; color: var(--g-text-2); font-family: var(--g-font); font-weight: 800; font-size: 0.88rem; cursor: pointer; }
.gx-qa-near[hidden] { display: none; }
.gx-qa-label { margin: 10px 2px 4px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text-3); }
.gx-qa-label[hidden] { display: none; }
.gx-qa-list { list-style: none; margin: 4px 0 0; padding: 0; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.gx-qa-item { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 56px; padding: 10px 70px 10px 12px; border: 0; border-bottom: 1px solid var(--g-border); background: none; text-align: left; cursor: pointer; font-family: var(--g-font); }
.gx-qa-item:hover, .gx-qa-item:focus-visible { background: var(--g-cream); }
.gx-qa-name { font-weight: 800; font-size: 0.98rem; color: var(--g-text); }
.gx-qa-name span { color: #D4A800; }
.gx-qa-meta { font-size: 0.8rem; font-weight: 600; color: var(--g-text-2); }
.gx-qa-done { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 0.75rem; font-weight: 800; color: #1F8A4C; background: #EAF7EE; padding: 4px 10px; border-radius: 50px; }
.gx-qa-item.is-done .gx-qa-name { color: var(--g-text-2); }
.gx-qa-empty { padding: 26px 8px; text-align: center; color: var(--g-text-3); font-weight: 700; }
.gx-qa-back { align-self: flex-start; background: none; border: 0; padding: 6px 0; color: var(--g-text-2); font-family: var(--g-font); font-weight: 800; cursor: pointer; }
.gx-qa-picked { margin: 12px 0 18px; padding: 18px; border-radius: 18px; background: var(--g-cream); display: flex; flex-direction: column; gap: 4px; }
.gx-qa-picked strong { font-family: var(--g-font-d); font-size: 1.6rem; text-transform: uppercase; line-height: 1.1; color: var(--g-text); }
.gx-qa-picked span { font-weight: 700; color: var(--g-text-2); }
.gx-qa-date { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 0.9rem; color: var(--g-text); margin-bottom: 18px; }
.gx-qa-date input { min-height: 48px; padding: 0 14px; border: 1.5px solid var(--g-border); border-radius: 12px; font-family: var(--g-font); font-size: 16px; background: #fff; }
.gx-qa-go { width: 100%; min-height: 52px; font-size: 1rem; margin-top: auto; }

/* ── Sortida: estadístiques estil Strava, nota i companys ─────────────── */
.gx-stats { display: flex; gap: 22px; margin: -2px 16px 12px; padding: 0; }
.gx-stats div { display: flex; flex-direction: column; }
.gx-stats dt { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text-3); }
.gx-stats dd { margin: 0; font-family: var(--g-font-d); font-size: 1.2rem; font-weight: 700; color: var(--g-text); }
.gx-post-note { margin: 0 16px 12px; font-size: 0.93rem; line-height: 1.55; color: var(--g-text-2); overflow-wrap: anywhere; }
.gx-with { display: flex; align-items: center; gap: 8px; margin: 0 16px 12px; font-size: 0.82rem; font-weight: 700; color: var(--g-text-2); }
.gx-with a { color: var(--g-text); text-decoration: none; }
.gx-cel-statsline { margin: -6px 0 12px; font-family: var(--g-font-d); font-size: 1.05rem; color: var(--g-text); letter-spacing: 0.02em; }
.gx-join { margin-top: 8px; min-height: 38px; font-size: 0.82rem; }

/* Formulari de sortida */
form.gx-qa-step { min-height: 0; }
.gx-qa-scroll { flex: 1; overflow-y: auto; min-height: 0; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }
.gx-qa-picked em { font-style: normal; font-size: 0.82rem; font-weight: 700; color: #1F6B3A; margin-top: 4px; }
.gx-qa-more { margin: 0 0 12px; border: 1.5px solid var(--g-border); border-radius: 14px; padding: 0 14px; }
.gx-qa-more summary { min-height: 48px; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 0.92rem; color: var(--g-text); cursor: pointer; list-style: none; }
.gx-qa-more summary::-webkit-details-marker { display: none; }
.gx-qa-more summary span { font-weight: 600; color: var(--g-text-3); }
.gx-qa-more[open] summary { border-bottom: 1px solid var(--g-border); margin-bottom: 12px; }
.gx-qa-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.gx-qa-grid label, .gx-qa-note { display: flex; flex-direction: column; gap: 5px; font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g-text-3); }
.gx-qa-grid input, .gx-qa-note textarea { width: 100%; min-height: 44px; padding: 0 10px; border: 1.5px solid var(--g-border); border-radius: 10px; font-family: var(--g-font); font-size: 16px; color: var(--g-text); background: #fff; box-sizing: border-box; }
.gx-qa-note textarea { padding: 10px; resize: vertical; text-transform: none; letter-spacing: 0; font-weight: 600; }
.gx-qa-time, .gx-qa-unit { display: flex; gap: 4px; align-items: center; }
.gx-qa-unit em { font-style: normal; font-size: 0.8rem; color: var(--g-text-2); text-transform: none; }
.gx-qa-note { margin-bottom: 12px; }
.gx-qa-friends { border: 0; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.gx-qa-friends legend { font-size: 0.74rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g-text-3); margin-bottom: 6px; }
.gx-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 5px; border: 1.5px solid var(--g-border); border-radius: 50px; font-size: 0.85rem; font-weight: 800; color: var(--g-text-2); cursor: pointer; }
.gx-chip img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.gx-chip input { position: absolute; opacity: 0; pointer-events: none; }
.gx-chip:has(input:checked) { border-color: var(--g-red); background: var(--g-red-soft); color: var(--g-red-ink); }
.gx-qa-photo { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-bottom: 14px; border: 1.5px dashed var(--g-cream3); border-radius: 12px; font-weight: 800; color: var(--g-text-2); cursor: pointer; }
.gx-qa-photo input { position: absolute; opacity: 0; width: 1px; height: 1px; }

/* ── Estadístiques de l'any (perfil) ──────────────────────────────────── */
.gx-yr { background: #fff; border: 1px solid var(--g-border); border-radius: 20px; box-shadow: var(--g-shadow); padding: 20px; margin-bottom: 14px; text-align: left; }
.gx-yr-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.gx-yr-head h2 { margin: 0; font-family: var(--g-font-d); font-size: 1.25rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--g-text); }
.gx-streak { font-weight: 900; font-size: 0.85rem; color: #C2410C; background: #FFF1E6; padding: 5px 11px; border-radius: 50px; white-space: nowrap; }
.gx-goal { display: flex; align-items: center; gap: 16px; padding: 14px; margin-bottom: 14px; border-radius: 16px; background: var(--g-cream); }
.gx-ring { --p: 0; flex-shrink: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-content: center; text-align: center;
    background: radial-gradient(closest-side, var(--g-cream) 76%, transparent 77% 100%), conic-gradient(var(--g-red) calc(var(--p) * 1%), var(--g-cream3) 0); }
.gx-ring strong { font-family: var(--g-font-d); font-size: 1.6rem; line-height: 1; color: var(--g-text); }
.gx-ring span { font-size: 0.68rem; font-weight: 800; color: var(--g-text-3); }
.gx-goal-txt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.gx-goal-txt strong { font-weight: 900; color: var(--g-text); }
.gx-goal-txt span { font-size: 0.86rem; font-weight: 700; color: var(--g-text-2); }
.gx-goal-txt .gx-btn { margin-top: 6px; min-height: 40px; }
button.gx-link { background: none; border: 0; padding: 0; margin-top: 2px; font-family: var(--g-font); font-weight: 800; font-size: 0.8rem; color: var(--g-red-ink); cursor: pointer; text-decoration: underline; }
.gx-yr-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.gx-yr-grid div { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--g-cream); min-width: 0; }
.gx-yr-grid dt { font-size: 0.64rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--g-text-3); }
.gx-yr-grid dd { margin: 2px 0 0; font-family: var(--g-font-d); font-size: clamp(1rem, 4.6vw, 1.3rem); font-weight: 700; color: var(--g-text); line-height: 1.15; overflow-wrap: anywhere; }
.gx-yr-grid .gx-yr-wide { grid-column: 1 / -1; }
.gx-yr-grid .gx-yr-wide dd { font-family: var(--g-font); font-size: 0.95rem; font-weight: 800; }
.gx-yr-grid dd a { color: var(--g-red-ink); text-decoration: none; }
@media (max-width: 380px) { .gx-yr-grid { grid-template-columns: repeat(2, 1fr); } }
.gx-heat { overflow-x: auto; }
.gx-heat-months { display: grid; grid-template-columns: repeat(26, 1fr); gap: 3px; font-size: 0.6rem; font-weight: 800; color: var(--g-text-3); margin-bottom: 4px; min-width: 300px; }
.gx-heat-grid { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; min-width: 300px; }
.gx-heat-grid i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--g-cream2); }
.gx-heat-grid i.l1 { background: #FFB4A8; }
.gx-heat-grid i.l2 { background: #FF7F6E; }
.gx-heat-grid i.l3 { background: var(--g-red); }
.gx-heat-grid i.is-future { background: transparent; }
.gx-mymap { margin-bottom: 14px; text-align: left; }
.gx-mymap-map { height: 320px; border-radius: 20px; overflow: hidden; border: 1px solid var(--g-border); background: var(--g-cream2); z-index: 0; }
.gx-mymap-map .leaflet-control-attribution { font-size: 9px; }

/* ── Fitxa: sortides de la comunitat ──────────────────────────────────── */
.gx-comm { background: #fff; border: 1px solid var(--g-border); border-radius: 20px; box-shadow: var(--g-shadow); padding: 18px 18px 16px; margin: 0 0 14px; }
.gx-comm .gx-section-title { font-size: 1rem; }
.gx-comm-avg { margin: 0 0 12px; padding: 12px 14px; background: var(--g-cream); border-radius: 14px; }
.gx-comm-list { list-style: none; margin: 0 0 14px; padding: 0; }
.gx-comm-list li { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--g-border); }
.gx-comm-list li:last-child { border-bottom: 0; }
.gx-comm-av img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--g-cream2); }
.gx-comm-body { min-width: 0; flex: 1; }
.gx-comm-who { margin: 0; font-weight: 800; font-size: 0.9rem; }
.gx-comm-who a { color: var(--g-text); text-decoration: none; }
.gx-comm-who span { margin-left: 6px; font-size: 0.74rem; color: var(--g-text-3); font-weight: 700; }
.gx-comm-stats { margin: 2px 0 0; font-family: var(--g-font-d); font-size: 0.95rem; color: var(--g-text); letter-spacing: 0.02em; }
.gx-comm-note { margin: 6px 0 0; padding: 8px 11px; background: var(--g-cream); border-radius: 4px 12px 12px 12px; font-size: 0.88rem; line-height: 1.5; color: var(--g-text-2); overflow-wrap: anywhere; }
.gx-comm-photo img { display: block; margin-top: 8px; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; }
.gx-comm-empty { margin: 0 0 14px; color: var(--g-text-2); font-weight: 600; font-size: 0.9rem; line-height: 1.5; }
.gx-comm-add { width: 100%; }

/* ── Rutes i Strava ──────────────────────────────────────────────────── */
.gx-route { height: 190px; margin: 0 0 12px; background: var(--g-cream2); z-index: 0; }
.gx-post .gx-route { margin: 0 0 0; border-top: 1px solid var(--g-border); }
.gx-post-src { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 16px 12px; font-size: 0.78rem; font-weight: 700; color: var(--g-text-3); }
.gx-strava-badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 4px; background: #FC5200; color: #fff; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.04em; text-transform: uppercase; }
a.gx-strava-link { color: #FC5200; font-weight: 800; text-decoration: underline; }

/* Panell de registre */
.gx-qa-head { gap: 8px; }
.gx-qa-head h2 { flex: 1; }
.gx-qa-head .gx-qa-back { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--g-cream2); font-size: 1.1rem; cursor: pointer; padding: 0; }
.gx-qa-head .gx-qa-back[hidden] { display: none; }
.gx-qa-view { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; }
.gx-qa-lead { margin: 0 0 10px; font-weight: 800; color: var(--g-text); font-size: 0.95rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gx-qa-hint { margin: 6px 2px 10px; font-size: 0.8rem; font-weight: 600; color: var(--g-text-3); }
.gx-qa-srcs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.gx-qa-src { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border: 1.5px solid var(--g-border); border-radius: 16px; background: #fff; text-align: left; cursor: pointer; text-decoration: none; font-family: var(--g-font); color: var(--g-text); }
.gx-qa-src:hover { border-color: var(--g-red); }
.gx-qa-src strong { font-size: 0.95rem; font-weight: 900; }
.gx-qa-src span:not(.gx-strava-badge) { font-size: 0.76rem; font-weight: 600; color: var(--g-text-2); }
.gx-qa-src-ico { font-size: 1.3rem; }
.gx-qa-src-strava:hover { border-color: #FC5200; }
.gx-qa-or { display: flex; align-items: center; gap: 10px; margin: 2px 0 12px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text-3); }
.gx-qa-or::before, .gx-qa-or::after { content: ''; flex: 1; height: 1px; background: var(--g-border); }
.gx-qa-route { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0 0 12px; border-radius: 14px; background: var(--g-cream); }
.gx-qa-route-ico { flex-shrink: 0; font-weight: 800; font-size: 0.8rem; }
.gx-qa-route-txt { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.gx-qa-route-txt strong { font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-qa-route-txt span { font-size: 0.8rem; font-weight: 700; color: var(--g-text-2); }
.gx-qa-route-x { border: 0; background: none; font-size: 1rem; cursor: pointer; color: var(--g-text-3); padding: 6px; }
.gx-qa-check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 6px; border-bottom: 1px solid var(--g-border); cursor: pointer; }
.gx-qa-check input { width: 22px; height: 22px; accent-color: var(--g-red); margin-top: 2px; flex-shrink: 0; }
.gx-qa-check span { display: flex; flex-direction: column; }
.gx-qa-check strong { font-weight: 900; font-size: 1rem; }
.gx-qa-check em { font-style: normal; font-size: 0.8rem; font-weight: 600; color: var(--g-text-2); }
.gx-qa-next { width: 100%; margin: 14px 0 6px; }
button.gx-qa-link { align-self: center; margin: 8px 0; background: none; border: 0; font-family: var(--g-font); font-weight: 800; color: var(--g-red-ink); cursor: pointer; text-decoration: underline; }
.gx-qa-busy { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; font-weight: 800; color: var(--g-text-2); }
.gx-spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--g-cream3); border-top-color: var(--g-red); animation: gxSpin 0.8s linear infinite; }
@keyframes gxSpin { to { transform: rotate(360deg); } }
.gx-qa-form { display: flex; flex-direction: column; flex: 1; }
.gx-qa-picked { margin: 0 0 12px; padding: 14px 16px; }
.gx-qa-picked > div { display: flex; flex-direction: column; gap: 2px; }
.gx-qa-picked > div + div { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--g-cream3); }
.gx-qa-picked strong { font-size: 1.35rem; }
.gx-qa-friends .gx-qa-hint { width: 100%; margin: 4px 0 0; }
.gx-cel-note { margin: -4px 0 10px; font-size: 0.86rem; font-weight: 700; color: var(--g-text-2); }
.gx-tag-q { display: block; margin-top: 8px; font-size: 0.84rem; font-weight: 800; color: var(--g-text); }
.gx-tag-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.gx-tag-actions .gx-btn { min-height: 38px; font-size: 0.84rem; padding: 0 16px; }
.gx-tag-ok { display: inline-block; margin-top: 6px; font-size: 0.82rem; font-weight: 800; color: #1F8A4C; }
.gx-tag-no { display: inline-block; margin-top: 6px; font-size: 0.82rem; font-weight: 700; color: var(--g-text-3); }

/* ── Perfil v5 ────────────────────────────────────────────────────────── */
.gx-profile { max-width: 640px; }
.gx-card { background: #fff; border: 1px solid var(--g-border); border-radius: 22px; box-shadow: var(--g-shadow); padding: 20px; margin: 0 0 14px; text-align: left; }
.gx-hero { text-align: center; padding: 8px 0 18px; }
.gx-hero-av { position: relative; display: inline-block; }
.gx-hero-av img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 6px 20px rgba(44,36,32,0.15); display: block; background: var(--g-cream2); }
.gx-hero-edit { position: absolute; right: 0; bottom: 2px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: var(--g-red-ink); color: #fff; font-size: 0.8rem; cursor: pointer; padding: 0; }
.gx-hero-name { margin: 12px 0 2px; font-family: var(--g-font-d); font-size: 1.9rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--g-text); line-height: 1.1; }
.gx-hero-since { margin: 0 0 12px; font-size: 0.85rem; font-weight: 700; color: var(--g-text-3); }
.gx-hero-actions { margin: 0 0 14px; }
.gx-hero-totals { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 14px 6px; background: #fff; border: 1px solid var(--g-border); border-radius: 18px; box-shadow: var(--g-shadow); }
.gx-hero-totals div { display: flex; flex-direction: column-reverse; align-items: center; }
.gx-hero-totals div + div { border-left: 1px solid var(--g-border); }
.gx-hero-totals dd { margin: 0; font-family: var(--g-font-d); font-size: 1.6rem; font-weight: 700; color: var(--g-red-ink); line-height: 1.1; }
.gx-hero-totals dt { font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text-3); }
.gx-profile .g-inner-tabs { margin: 0 0 16px; }
.gx-yr { padding: 20px; }
.gx-yr-head { margin-bottom: 10px; }
.gx-years { display: flex; gap: 6px; margin: 0 0 14px; overflow-x: auto; scrollbar-width: none; }
.gx-years a { padding: 6px 12px; border-radius: 50px; background: var(--g-cream); color: var(--g-text-2); font-weight: 800; font-size: 0.8rem; text-decoration: none; }
.gx-years a.is-active { background: var(--g-text); color: #fff; }
.gx-yr-top { margin: -4px 0 6px; font-size: 0.88rem; font-weight: 700; color: var(--g-text-2); }
.gx-yr-top a { color: var(--g-red-ink); font-weight: 800; text-decoration: none; }
.gx-sub { margin: 18px 0 8px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--g-text-3); font-family: var(--g-font); }
.gx-heat { position: relative; }
.gx-heat-grid button, .gx-heat-grid i { display: block; aspect-ratio: 1; border-radius: 3px; background: var(--g-cream2); border: 0; padding: 0; }
.gx-heat-grid button { cursor: pointer; }
.gx-heat-grid button:focus-visible, .gx-heat-grid button.is-on { outline: 2px solid var(--g-text); outline-offset: 1px; }
.gx-heat-grid .l1, .gx-heat-legend .l1 { background: #FFB4A8; }
.gx-heat-grid .l2, .gx-heat-legend .l2 { background: #FF7F6E; }
.gx-heat-grid .l3, .gx-heat-legend .l3 { background: var(--g-red); }
.gx-heat-legend { display: flex; align-items: center; gap: 4px; margin: 8px 0 0; font-size: 0.7rem; font-weight: 700; color: var(--g-text-3); flex-wrap: wrap; }
.gx-heat-legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--g-cream2); display: inline-block; }
.gx-heat-pop { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--g-text); color: #fff; font-size: 0.86rem; font-weight: 700; }
.gx-heat-pop[hidden] { display: none; }
.gx-heat-pop strong { display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.gx-heat-pop a { color: #fff; text-decoration: underline; }
.gx-bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; height: 120px; align-items: end; }
.gx-bar { display: flex; flex-direction: column; align-items: center; height: 100%; gap: 4px; }
.gx-bar-n { font-size: 0.68rem; font-weight: 800; color: var(--g-text-2); min-height: 12px; }
.gx-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; background: var(--g-cream); border-radius: 6px; overflow: hidden; }
.gx-bar-fill { display: block; width: 100%; background: linear-gradient(180deg, #FF7F5C, var(--g-red)); border-radius: 6px; }
.gx-bar-m { font-size: 0.66rem; font-weight: 800; color: var(--g-text-3); }
.gx-bar.is-future .gx-bar-track { background: repeating-linear-gradient(45deg, var(--g-cream), var(--g-cream) 3px, #fff 3px, #fff 6px); }
.gx-mymap { padding: 18px; }
.gx-mymap-map { height: 300px; border-radius: 16px; }
.gx-records ul { list-style: none; margin: 10px 0 0; padding: 0; }
.gx-records li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--g-border); font-size: 0.9rem; }
.gx-records li:last-child { border-bottom: 0; }
.gx-records li span { color: var(--g-text-2); font-weight: 700; flex-shrink: 0; }
.gx-records li a, .gx-records li strong { text-align: right; font-weight: 800; color: var(--g-text); text-decoration: none; }
.gx-records li a { color: var(--g-red-ink); }
.gx-more { display: block; margin-top: 12px; font-weight: 800; color: var(--g-red-ink); text-decoration: none; font-size: 0.9rem; }
.gx-conn-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--g-border); }
.gx-conn-row:last-child { border-bottom: 0; }
.gx-conn-ico { font-size: 1.3rem; width: 52px; text-align: center; }
.gx-conn .gx-strava-badge { width: 52px; justify-content: center; }
.gx-conn-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.gx-conn-txt strong { font-weight: 900; font-size: 0.92rem; }
.gx-conn-txt span { font-size: 0.8rem; font-weight: 600; color: var(--g-text-2); line-height: 1.4; }
.gx-conn .gx-btn { min-height: 38px; font-size: 0.82rem; padding: 0 14px; }
.gx-btn.gx-btn-strava { background: #FC5200; border-color: #FC5200; color: #fff; }
.gx-btn.gx-btn-strava:hover { background: #E34A00; color: #fff; }
.gx-flash { margin: 0 0 14px; padding: 12px 14px; border-radius: 14px; font-weight: 700; font-size: 0.9rem; }
.gx-flash-ok { background: #EAF7EE; color: #1F6B3A; }
.gx-flash-err { background: #FFF1E6; color: #9A3B00; }
.gx-profile .g-logout { margin-top: 18px; }
.gx-qa-src span:not(.gx-strava-badge), .gx-qa-meta, .gx-qa-check em { line-height: 1.35; }
.gx-qa-check strong { line-height: 1.25; }

/* ── Fitxa: el teu progrés ────────────────────────────────────────────── */
.gx-done-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; font-size: 1rem; font-weight: 700; color: var(--g-text); position: relative; }
.gx-done-ok { font-weight: 900; color: #1F8A4C; }
.gx-date-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--g-border); border-radius: 50px; background: var(--g-cream); font-family: var(--g-font); font-weight: 800; font-size: 0.95rem; color: var(--g-text); cursor: pointer; }
.gx-date-btn:hover { border-color: var(--g-red); }
.gx-date-input { position: absolute; left: 0; top: 100%; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.gx-date-input.is-visible { position: static; width: auto; height: 44px; opacity: 1; pointer-events: auto; padding: 0 10px; border: 1.5px solid var(--g-red); border-radius: 12px; font-size: 16px; }
.gx-done-times { margin: 0 0 8px; font-size: 0.86rem; font-weight: 700; color: var(--g-text-2); }
.gx-done-msg { margin: 0 0 8px; font-size: 0.85rem; font-weight: 800; }
.gx-done-msg.is-ok { color: #1F8A4C; }
.gx-done-msg.is-err { color: #9A3B00; }
.gx-done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.gx-done-actions .gx-btn { width: 100%; }
.gx-done-cta { width: 100%; min-height: 52px; font-size: 1rem; margin-top: 4px; }
button.gx-unmark { display: block; margin: 12px auto 0; background: none; border: 0; font-family: var(--g-font); font-size: 0.78rem; font-weight: 700; color: var(--g-text-3); text-decoration: underline; cursor: pointer; }

/* ── Medalles al pop-up ───────────────────────────────────────────────── */
.gx-medals { text-align: left; margin: 4px 0 8px; }
.gx-medals h3 { margin: 0 0 8px; font-family: var(--g-font-d); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--g-text-3); text-align: center; }
.gx-medal { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 8px; border-radius: 16px; background: var(--g-cream); text-decoration: none; color: var(--g-text); border: 1.5px solid transparent; }
.gx-medal.is-unlocked { background: #FFF8E1; border-color: #F5C842; animation: gxPopIn 0.5s 0.3s both cubic-bezier(.2,1.4,.4,1); }
.gx-medal-img { width: 52px; height: 52px; object-fit: contain; flex-shrink: 0; }
.gx-medal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gx-medal-top { display: flex; justify-content: space-between; gap: 8px; font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--g-text-3); }
.gx-medal-count { color: var(--g-text-2); }
.gx-medal-new { color: #B07F00; }
.gx-medal-name { font-size: 0.95rem; font-weight: 800; }
.gx-medal-left { font-size: 0.74rem; font-weight: 700; color: var(--g-text-2); }

/* ── Selector de subseccions (Llista | Mapa, Medalles | Rànquing …) ── */
.gx-seg {
    display: flex; gap: 4px; padding: 4px; margin: 0 auto 16px; max-width: 620px;
    background: #fff; border: 1px solid var(--g-border); border-radius: 14px; box-shadow: var(--g-shadow);
    overflow-x: auto; scrollbar-width: none; box-sizing: border-box;
}
.gx-seg::-webkit-scrollbar { display: none; }
.gx-seg a.gx-seg-item {
    flex: 1 0 auto; display: flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 0 14px; border-radius: 10px;
    font-family: var(--g-font); font-weight: 800; font-size: 0.86rem; white-space: nowrap;
    color: var(--g-text-2); text-decoration: none;
}
.gx-seg a.gx-seg-item:hover { background: var(--g-cream2); color: var(--g-text); }
.gx-seg a.gx-seg-item.is-active { background: var(--g-text); color: #fff; }
body.gx-app .gmd-page > .gx-seg, body.gx-app .gr-wrap > .gx-seg, body.gx-app .gl-wrap > .gx-seg, body.gx-app .glm-wrap > .gx-seg { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Registre ràpid: GPX com a segona opció ───────────────────────────── */
.gx-qa-alt { margin: 12px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.gx-qa-alt-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 14px; border: 1.5px solid var(--g-border); border-radius: 14px; background: #fff; color: var(--g-text); text-align: left; text-decoration: none; font-family: var(--g-font); cursor: pointer; box-sizing: border-box; transition: border-color 0.15s, background 0.15s; }
.gx-qa-alt-row:hover { border-color: var(--g-red); background: var(--g-cream); color: var(--g-text); }
.gx-qa-alt-ico { font-size: 1.35rem; line-height: 1; flex-shrink: 0; }
.gx-qa-alt-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.3; }
.gx-qa-alt-txt strong { font-size: 0.92rem; font-weight: 900; }
.gx-qa-alt-txt span { font-size: 0.76rem; font-weight: 600; color: var(--g-text-2); }
.gx-qa-howto { font-size: 0.8rem; color: var(--g-text-2); }
.gx-qa-howto summary { cursor: pointer; font-weight: 800; color: var(--g-text-3); padding: 2px 4px; list-style: none; }
.gx-qa-howto summary::-webkit-details-marker { display: none; }
.gx-qa-howto summary::before { content: 'ⓘ '; }
.gx-qa-howto[open] summary { color: var(--g-text); }
.gx-qa-howto ul { margin: 6px 0 0; padding: 10px 12px 10px 28px; background: var(--g-cream); border-radius: 12px; line-height: 1.45; }
.gx-qa-howto li + li { margin-top: 4px; }

/* ── Instagram ─────────────────────────────────────────────────────────── */
.gx-ig-ico { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; margin-right: 6px; background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Ccircle cx='17.4' cy='6.6' r='1.1' fill='white' stroke='none'/%3E%3C/svg%3E"); }
.gx-ig-ico-lg { width: 30px; height: 30px; padding: 6px; border-radius: 10px; background-color: #E1306C; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2'%3E%3Crect x='3' y='3' width='18' height='18' rx='5.5'/%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Ccircle cx='17.4' cy='6.6' r='1.1' fill='white' stroke='none'/%3E%3C/svg%3E"), linear-gradient(45deg, #F9CE34, #EE2A7B 50%, #6228D7); background-size: 70%, cover; background-position: center; background-repeat: no-repeat; box-sizing: border-box; vertical-align: -6px; }
.gx-btn.gx-btn-ig, button.gx-btn-ig { display: inline-flex; align-items: center; justify-content: center; border: 0; color: #fff; background: linear-gradient(45deg, #F9CE34 0%, #EE2A7B 45%, #6228D7 100%); }
.gx-btn.gx-btn-ig:hover { color: #fff; filter: brightness(1.06); background: linear-gradient(45deg, #F9CE34 0%, #EE2A7B 45%, #6228D7 100%); }
.gx-story h2 { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.3rem; padding: 0 40px; }
.gx-story-body { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 12px 0 14px; }
.gx-story-preview { width: 100%; max-width: 180px; aspect-ratio: 9 / 16; border-radius: 16px; overflow: hidden; background: var(--g-cream2); box-shadow: 0 8px 24px rgba(0,0,0,0.14); flex-shrink: 0; }
.gx-story-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gx-story-steps { margin: 0; padding: 0; list-style: none; counter-reset: gxs; text-align: left; font-size: 0.86rem; line-height: 1.4; color: var(--g-text-2); display: flex; flex-direction: column; gap: 8px; width: 100%; }
.gx-story-steps li { counter-increment: gxs; position: relative; padding-left: 32px; }
.gx-story-steps li::before { content: counter(gxs); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--g-cream2); color: var(--g-text); font-size: 0.74rem; font-weight: 900; display: grid; place-items: center; }
.gx-story-steps b, .gx-story-steps strong { color: var(--g-text); }
.gx-story-steps li[data-copy-step] strong { display: block; color: #1E9E57; }
.gx-story-url { display: block; font-size: 0.78rem; font-weight: 700; color: var(--g-text-3); word-break: break-all; }
@media (min-width: 560px) {
    .gx-story .gx-cel-box { max-width: 520px; }
    .gx-story-preview { max-width: 190px; }
}

/* ── Instal·la l'app ───────────────────────────────────────────────────── */
.gx-inst-pill { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--gx-tab-h) + var(--gx-safe-b) + 12px); z-index: 9000; display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 50px; background: var(--g-text); box-shadow: 0 10px 30px rgba(28, 22, 34, 0.3); animation: gxInstUp 0.35s cubic-bezier(.2,1.2,.4,1); max-width: calc(100vw - 32px); box-sizing: border-box; }
@keyframes gxInstUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.gx-inst-pill button { border: 0; background: none; color: #fff; font-family: var(--g-font); cursor: pointer; }
.gx-inst-pill-main { padding: 9px 6px 9px 14px; font-weight: 800; font-size: 0.9rem; white-space: nowrap; }
.gx-inst-pill-x { width: 34px; height: 34px; border-radius: 50%; font-size: 0.85rem; color: rgba(255,255,255,0.7) !important; }
.gx-inst-pill-x:hover { background: rgba(255,255,255,0.12) !important; }
.gx-install .gx-cel-box { text-align: left; }
.gx-inst-head { display: flex; gap: 12px; align-items: flex-start; padding-right: 36px; }
.gx-inst-app { font-size: 2rem; line-height: 1; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--g-red-soft); flex-shrink: 0; }
.gx-install h2 { font-size: 1.4rem; margin: 0 0 2px; }
.gx-inst-head p { margin: 0; font-size: 0.84rem; font-weight: 600; color: var(--g-text-2); line-height: 1.4; }
.gx-inst-env { margin: 14px 0 12px; padding: 8px 12px; border-radius: 12px; background: var(--g-cream); font-size: 0.84rem; color: var(--g-text-2); }
.gx-inst-env b { color: var(--g-text); }
.gx-inst-native { width: 100%; margin-bottom: 12px; }
.gx-inst-native[hidden] { display: none; }
.gx-inst-steps { margin: 0 0 14px; padding: 0; list-style: none; counter-reset: gxi; display: flex; flex-direction: column; gap: 12px; font-size: 0.92rem; line-height: 1.5; color: var(--g-text); }
.gx-inst-steps li { counter-increment: gxi; position: relative; padding-left: 36px; }
.gx-inst-steps li::before { content: counter(gxi); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--g-red-ink); color: #fff; font-size: 0.8rem; font-weight: 900; display: grid; place-items: center; }
.gx-inst-steps small { display: block; font-size: 0.78rem; color: var(--g-text-3); font-weight: 600; }
.gx-key { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 8px; background: var(--g-cream2); border: 1px solid var(--g-border); font-weight: 800; white-space: nowrap; }
.gx-inst-svg { flex-shrink: 0; width: 16px; height: 16px; color: #007AFF; }
.gx-install [data-inst-copy] { width: 100%; margin-bottom: 8px; }
.gx-inst-later { display: block; margin: 0 auto; padding: 8px 16px; border: 0; background: none; color: var(--g-text-3); font-family: var(--g-font); font-weight: 800; font-size: 0.85rem; cursor: pointer; }
.gx-install-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px 0 0; padding: 14px 16px; border: 1px solid var(--g-border); border-radius: 18px; background: #fff; box-shadow: var(--g-shadow); color: var(--g-text); font-family: var(--g-font); text-align: left; cursor: pointer; box-sizing: border-box; }
.gx-install-row[hidden] { display: none; }
.gx-install-row > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.gx-install-row strong { font-weight: 900; font-size: 0.95rem; }
.gx-install-row strong + span { font-size: 0.8rem; color: var(--g-text-2); font-weight: 600; }
.gx-install-ico { font-size: 1.5rem; }
.gx-done-actions .gx-btn-ig { gap: 0; }

/* ── Dissenys de les imatges per compartir ─────────────────────────────── */
.gx-designs { display: flex; gap: 6px; overflow-x: auto; padding: 7px 6px 10px; margin: 0 -4px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; justify-content: flex-start; }
.gx-designs::-webkit-scrollbar { display: none; }
.gx-design { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 5px; width: 58px; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--g-font); color: var(--g-text-2); }
.gx-design-sw { display: block; width: 46px; height: 46px; border-radius: 14px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08); transition: transform 0.15s, box-shadow 0.15s; }
.gx-design-name { font-size: 0.68rem; font-weight: 800; line-height: 1.15; text-align: center; }
.gx-design[aria-checked="true"] .gx-design-sw { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g-red); transform: scale(1.04); }
.gx-design[aria-checked="true"] .gx-design-name { color: var(--g-red-ink); }
.gx-design:focus, .gx-design:focus-visible { outline: none; }
.gx-design:focus-visible .gx-design-sw { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--g-text); }
.gx-sw-posta { background: linear-gradient(180deg, #16233F 0%, #5B3F73 40%, #FF7F5C 75%, #2A2236 76%); }
.gx-sw-alpi { background: linear-gradient(180deg, #2F80C8 0%, #9FD0F1 55%, #8AA3C0 56%, #2A3D55 100%); }
.gx-sw-nit { background: radial-gradient(circle at 72% 30%, #F7F1D8 0 7px, transparent 8px), linear-gradient(180deg, #070B1F, #2E2862 65%, #12153A 66%); }
.gx-sw-topo { background: repeating-radial-gradient(ellipse at 65% 35%, #FDFAF6 0 5px, rgba(200,170,150,0.7) 5px 6px); }
.gx-sw-poster { background: linear-gradient(160deg, #FF6A55, #D93A3B); }
.gx-sw-foto { background-color: var(--g-cream2); }
[data-preview] { position: relative; }
[data-preview].is-loading img { opacity: 0.45; transition: opacity 0.15s; }
.gx-cel-actions-row { display: flex; gap: 8px; }
.gx-cel-actions-row .gx-btn { flex: 1; width: auto; font-size: 0.86rem; padding-left: 8px; padding-right: 8px; }
.gx-cel-actions-row .gx-btn[hidden] { display: none; }
.gx-story-steps small { display: block; font-size: 0.76rem; color: var(--g-text-3); font-weight: 600; margin-top: 2px; }
.gx-story-col { flex-shrink: 0; width: 100%; max-width: 180px; }
.gx-story-col .gx-story-preview { max-width: none; }
.gx-story .gx-designs { width: 100%; margin: 0; }
@media (min-width: 560px) { .gx-story-col { max-width: 190px; } }

.gx-cel h2.gx-cel-h-sm { font-size: 1.35rem; padding: 0 40px; }
.gx-design:first-child { margin-left: auto; }
.gx-design:last-child { margin-right: auto; } /* centrats, però sense amagar el primer si no hi caben */

/* ── Instagram: adhesiu petit o imatge sencera ─────────────────────────── */
.gx-mode { display: flex; gap: 4px; padding: 4px; margin: 12px 0 14px; border-radius: 50px; background: var(--g-cream2); }
.gx-mode button { flex: 1; min-height: 40px; border: 0; border-radius: 50px; background: none; font-family: var(--g-font); font-weight: 800; font-size: 0.86rem; color: var(--g-text-2); cursor: pointer; }
.gx-mode button[aria-selected="true"] { background: #fff; color: var(--g-text); box-shadow: 0 1px 6px rgba(44,36,32,0.12); }
.gx-mode button:focus { outline: none; }
.gx-mode button:focus-visible { outline: 2px solid var(--g-red); outline-offset: 1px; }
.gx-mode-panel[hidden] { display: none; }
.gx-sticker-stage { display: grid; place-items: center; min-height: 170px; margin: 0 0 12px; padding: 22px 16px; border-radius: 18px; background: radial-gradient(circle at 75% 20%, rgba(255,220,160,0.9), transparent 45%), linear-gradient(160deg, #5B7FA6 0%, #9C6F8E 55%, #E48B6A 100%); }
.gx-sticker-preview { width: 100%; max-width: 330px; }
.gx-sticker-preview img { display: block; width: 100%; height: auto; }
.gx-sticker-preview .gx-cel-preview-loading { color: #fff; min-height: 110px; }
.gx-stk-clar { background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }
.gx-stk-fosc { background: #1C1622; }
.gx-stk-vidre { background: linear-gradient(160deg, #5B7FA6, #E48B6A); box-shadow: inset 0 0 0 10px rgba(20,14,24,0.5), inset 0 0 0 11px rgba(255,255,255,0.5); }
.gx-stk-glubus { background: linear-gradient(135deg, #FF6A55, #E03D3E); }
.gx-story .gx-stickers { margin: 0 0 10px; }
.gx-ok { color: #1E9E57; }

/* ── Tria de comarca (muntanyes entre dues comarques) ─────────────────── */
.gx-comarca { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0 0 12px; }
.gx-comarca-lab { font-size: 0.78rem; font-weight: 800; color: var(--g-text-3); margin-right: 2px; }
.gx-comarca button { min-height: 34px; padding: 4px 12px; border: 1.5px solid var(--g-border); border-radius: 50px; background: #fff; font-family: var(--g-font); font-weight: 800; font-size: 0.82rem; color: var(--g-text-2); cursor: pointer; }
.gx-comarca button[aria-checked="true"] { border-color: var(--g-red); background: var(--g-red-soft); color: var(--g-red-ink); }
.gx-comarca button:focus { outline: none; }
.gx-comarca button:focus-visible { outline: 2px solid var(--g-red); outline-offset: 1px; }

/* ── Descobreix gent ───────────────────────────────────────────────────── */
.gx-people-hint { margin: 6px 4px 10px; font-size: 0.84rem; font-weight: 700; color: var(--g-text-3); }
.gx-people-hint[hidden] { display: none; }
.gx-people .g-friends-list:empty { display: none; }

/* ── Avís: confirma el correu ─────────────────────────────────────────── */
.gx-verify { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; max-width: 1100px; margin: 10px auto 0; padding: 10px 14px; border-radius: 14px; background: #FFF4E5; border: 1px solid #F5D9A8; color: var(--g-text); font-size: 0.88rem; font-weight: 700; box-sizing: border-box; }
.gx-verify[hidden] { display: none; }
@media (max-width: 1130px) { .gx-verify { margin: 10px 16px 0; } }
.gx-verify b { word-break: break-all; }
.gx-verify button { border: 0; border-radius: 50px; padding: 6px 12px; background: var(--g-text); color: #fff; font-family: var(--g-font); font-weight: 800; font-size: 0.8rem; cursor: pointer; }
.gx-verify button.gx-verify-x { background: none; color: var(--g-text-3); padding: 4px 8px; }
.gx-verify-ok { background: #E8F7EE; border-color: #B8E3C8; }

@media (min-width: 769px) { .gx-seg a.gx-seg-item.gx-seg-mobile { display: none; } }


/* ── Carrega'n més / paginació ─────────────────────────────────────────── */
.gx-more-btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 48px; margin: 12px 0 0; border: 1.5px dashed var(--g-cream3); border-radius: 16px; background: #fff; font-family: var(--g-font); font-weight: 900; font-size: 0.92rem; color: var(--g-text); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.gx-more-btn small { font-weight: 700; color: var(--g-text-3); font-size: 0.8rem; }
.gx-more-btn:hover { border-color: var(--g-red); background: var(--g-cream); }
.gx-more-btn.is-loading span::after { content: '…'; }
.gx-more-btn.is-loading { opacity: 0.7; }
.gx-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 12px 0 4px; font-weight: 800; color: var(--g-text-2); font-size: 0.9rem; }
.gx-pager button { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--g-border); background: #fff; font-size: 1.3rem; line-height: 1; color: var(--g-text); cursor: pointer; }
.gx-pager button:hover:not(:disabled) { border-color: var(--g-red); color: var(--g-red-ink); }
.gx-pager button:disabled { opacity: 0.35; cursor: default; }
.g-friend-card[hidden] { display: none !important; }

/* ── Objectiu anual ────────────────────────────────────────────────────── */
.gx-goal-modal .gx-cel-box { max-width: 380px; }
.gx-goal-emoji { font-size: 2.6rem; line-height: 1; margin-bottom: 4px; }
.gx-goal-modal h2 { font-size: 1.45rem; padding: 0 30px; }
.gx-goal-sub { margin: 0 0 16px; color: var(--g-text-2); font-weight: 600; font-size: 0.92rem; }
.gx-stepper { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 0 0 6px; }
.gx-stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--g-border); background: #fff; font-size: 1.5rem; font-weight: 700; color: var(--g-text); cursor: pointer; transition: transform 0.1s, border-color 0.15s; }
.gx-stepper button:hover { border-color: var(--g-red); color: var(--g-red-ink); }
.gx-stepper button:active { transform: scale(0.92); }
.gx-stepper input { width: 120px; height: 72px; border: 0; border-radius: 18px; background: var(--g-cream); text-align: center; font-family: var(--g-font-d); font-size: 2.8rem !important; font-weight: 700; color: var(--g-red-ink); outline: none; -moz-appearance: textfield; appearance: textfield; }
.gx-stepper input::-webkit-outer-spin-button, .gx-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.gx-stepper input:focus { box-shadow: 0 0 0 3px rgba(255, 77, 78, 0.2); }
.gx-goal-pace { margin: 0 0 16px; font-size: 0.84rem; font-weight: 800; color: var(--g-text-3); }
.gx-goal-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 18px; }
.gx-goal-presets button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border: 1.5px solid var(--g-border); border-radius: 14px; background: #fff; font-family: var(--g-font); cursor: pointer; }
.gx-goal-presets button b { font-family: var(--g-font-d); font-size: 1.3rem; color: var(--g-text); line-height: 1; }
.gx-goal-presets button span { font-size: 0.66rem; font-weight: 800; color: var(--g-text-3); line-height: 1.2; }
.gx-goal-presets button.is-on { border-color: var(--g-red); background: var(--g-red-soft); }
.gx-goal-presets button.is-on b { color: var(--g-red-ink); }
.gx-goal-remove { padding: 8px; border: 0; background: none; font-family: var(--g-font); font-weight: 800; font-size: 0.84rem; color: var(--g-text-3); cursor: pointer; }
.gx-goal-remove:hover { color: var(--g-red-ink); }
body.gx-app .gx-stepper input { font-size: 2.8rem !important; }
.gx-goal-presets button:focus, .gx-stepper button:focus { outline: none; }
.gx-goal-presets button:focus-visible, .gx-stepper button:focus-visible { outline: 2px solid var(--g-red); outline-offset: 2px; }


/* ── Ruta a la fitxa de muntanya ──────────────────────────────────────── */
.gx-done-route { margin: 4px 0 12px; }
.gx-done-route .gx-stats { margin: 0 0 10px; }
.gx-done-route .gx-route { margin: 0 0 10px; border-radius: 14px; overflow: hidden; }
.gx-btn.gx-btn-dark { background: var(--g-text); border-color: var(--g-text); color: #fff; }
.gx-btn.gx-btn-dark:hover { background: #000; color: #fff; }
.gx-ext-link { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 8px 14px; border-radius: 50px; background: var(--g-cream2); color: var(--g-text); font-weight: 800; font-size: 0.86rem; text-decoration: none; }
.gx-post .gx-ext-link { margin: 0 16px 10px; }
.gx-ext-link:hover { background: var(--g-cream3); color: var(--g-text); }
.gx-ext-ico { width: 18px; height: 18px; border-radius: 5px; background: var(--g-text-3); flex-shrink: 0; }
.gx-ext-strava { background: #FC5200; color: #fff; }
.gx-ext-strava:hover { background: #E34A00; color: #fff; }
.gx-ext-strava .gx-ext-ico { background: no-repeat center / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M15.4 17.9l-2.1-4.1h-3.1L15.4 24l5.1-10.2h-3.1zM10.3 0L3.4 13.8h4.1l2.8-5.5 2.8 5.5h4.1z'/%3E%3C/svg%3E"); }
.gx-ext-wikiloc .gx-ext-ico { background: #4C8C2B; }
.gx-ext-garmin .gx-ext-ico { background: #000; }
.gx-ext-komoot .gx-ext-ico { background: #6AA127; }

.gx-route-modal .gx-cel-box { max-width: 440px; text-align: left; }
.gx-route-modal h2 { text-align: center; }
.gx-rf-sub { margin: -2px 0 14px; text-align: center; color: var(--g-text-2); font-weight: 700; font-size: 0.88rem; }
.gx-rf-box { margin: 0 0 12px; padding: 14px; border-radius: 16px; background: var(--g-cream); }
.gx-rf-label { display: block; margin: 0 0 8px; font-weight: 900; font-size: 0.9rem; color: var(--g-text); }
.gx-rf-label small { font-weight: 700; color: var(--g-text-3); }
.gx-rf-linkrow { display: flex; gap: 6px; }
.gx-rf input, .gx-rf textarea { width: 100%; min-width: 0; box-sizing: border-box; border: 1.5px solid var(--g-border); border-radius: 12px; background: #fff; padding: 10px 12px; font-family: var(--g-font); font-size: 16px; color: var(--g-text); outline: none; }
.gx-rf input:focus, .gx-rf textarea:focus { border-color: var(--g-red); box-shadow: 0 0 0 3px rgba(255,77,78,0.1); }
.gx-rf input:disabled { background: var(--g-cream2); color: var(--g-text-3); }
.gx-rf textarea { resize: vertical; min-height: 60px; }
.gx-rf-paste { flex-shrink: 0; padding: 0 14px; border: 0; border-radius: 12px; background: var(--g-text); color: #fff; font-family: var(--g-font); font-weight: 800; font-size: 0.84rem; cursor: pointer; }
.gx-rf-kind { margin: 8px 0 0; font-size: 0.82rem; font-weight: 800; color: #1E8E4E; }
.gx-rf-kind.is-strava b { color: #FC5200; }
.gx-rf-kind[hidden] { display: none; }
.gx-rf-linkbox .gx-qa-howto { margin-top: 8px; }
.gx-rf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gx-rf-field { display: flex; flex-direction: column; gap: 4px; font-size: 0.76rem; font-weight: 800; color: var(--g-text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.gx-rf-time { grid-column: 1 / -1; }
.gx-rf-in { position: relative; display: block; flex: 1; }
.gx-rf-in input { padding-right: 40px; font-weight: 800; }
.gx-rf-in i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 0.8rem; font-weight: 800; color: var(--g-text-3); text-transform: none; pointer-events: none; }
.gx-rf-in2 { display: flex; gap: 10px; }
.gx-rf-gpx { margin-top: 12px; }
.gx-rf-err { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #FFF0F0; color: var(--g-red-dark); font-weight: 700; font-size: 0.86rem; }
.gx-rf-err[hidden] { display: none; }

/* ── Foto + mapa a les publicacions: carrusel ─────────────────────────── */
.gx-media { position: relative; background: var(--g-cream2); }
.gx-media-track { display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; outline: none; }
.gx-media-track::-webkit-scrollbar { display: none; }
.gx-media-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 4 / 3; overflow: hidden; }
.gx-media.is-single .gx-media-slide { aspect-ratio: 4 / 3; }
.gx-media .gx-post-photo { display: block; }
.gx-media-map .gx-route, .gx-post .gx-media-map .gx-route { height: 100%; margin: 0; border: 0; }
.gx-media + .gx-post-actions { border-top: 0; }
.gx-media-count { position: absolute; top: 10px; right: 10px; z-index: 500; padding: 3px 9px; border-radius: 50px; background: rgba(28, 22, 34, 0.62); color: #fff; font-size: 0.74rem; font-weight: 800; pointer-events: none; }
.gx-media-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 500; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.gx-media-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.6); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12); transition: background 0.2s, transform 0.2s; }
.gx-media-dots i.is-on { background: #fff; transform: scale(1.2); }
.gx-media-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 500; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18); color: var(--g-text); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 2px; }
.gx-media-nav[hidden] { display: none; }
.gx-media-prev { left: 10px; }
.gx-media-next { right: 10px; }
@media (hover: none) { .gx-media-nav { display: none; } }

/* ── GPX: arrossegar i deixar anar ─────────────────────────────────────── */
.gx-drop-hint { display: none; font-style: normal; font-weight: 700; color: var(--g-text-3); font-size: 0.82em; }
@media (hover: hover) { .gx-drop-hint { display: inline; } }
label.is-drag { border-color: var(--g-red) !important; border-style: dashed !important; background: var(--g-red-soft) !important; }
label.is-drag * { pointer-events: none; }

/* Publicació: estadístiques i "Veure a Strava" a la mateixa línia */
.gx-post-statsrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin: -2px 16px 12px; }
.gx-post-statsrow .gx-stats { margin: 0; gap: 18px; }
.gx-post .gx-post-statsrow .gx-ext-link { margin: 0 0 0 auto; padding: 7px 12px; font-size: 0.8rem; gap: 6px; }
.gx-post-statsrow .gx-ext-link .gx-ext-ico { width: 16px; height: 16px; }
.gx-post-statsrow { flex-wrap: nowrap; }
.gx-post-statsrow .gx-stats { min-width: 0; }
.gx-post .gx-post-statsrow .gx-ext-link { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 480px) {
    .gx-post-statsrow { gap: 10px; }
    .gx-post-statsrow .gx-stats { gap: 12px; }
    .gx-post-statsrow .gx-stats dd { font-size: 1.05rem; white-space: nowrap; }
    .gx-post-statsrow .gx-ext-pre { display: none; } /* al mòbil: només "Strava ↗" */
}
.gx-ext-pre { margin-right: -3px; }

/* ── Canvis de pàgina ràpids i suaus ───────────────────────────────────── */
/* Transició entre pàgines (Chrome, Edge, Safari 18.2+): el header i la barra de baix queden quiets */
@view-transition { navigation: auto; }
header.gx-top { view-transition-name: gx-top; }
nav.gx-tabbar { view-transition-name: gx-tabbar; }
::view-transition-group(gx-top), ::view-transition-group(gx-tabbar) { animation: none; }
::view-transition-old(root) { animation: 120ms ease-out both gxVtOut; }
::view-transition-new(root) { animation: 160ms ease-out both gxVtIn; }
@keyframes gxVtOut { to { opacity: 0; } }
@keyframes gxVtIn { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
    @view-transition { navigation: none; }
}

/* Barra de progrés en tocar un enllaç */
.gx-navprogress { position: fixed; top: 0; left: 0; z-index: 30000; height: 3px; width: 0; background: linear-gradient(90deg, var(--g-red), #FF9A3C); box-shadow: 0 0 8px rgba(255, 77, 78, 0.5); opacity: 0; pointer-events: none; }
.gx-navprogress.is-on { opacity: 1; animation: gxNav 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes gxNav { 0% { width: 0; } 10% { width: 45%; } 40% { width: 75%; } 100% { width: 92%; } }
@media (max-width: 768px) { .gx-navprogress { top: env(safe-area-inset-top, 0px); } }

/* Accessibilitat: focus visible als elements que fan de botó (targetes de medalla, filtres) */
[role="button"][tabindex]:focus-visible,
.gmd-card:focus-visible,
.gl-stat:focus-visible { outline: 3px solid var(--g-red-ink, #D13A3B); outline-offset: 3px; }

/* Avís de privacitat de les rutes */
.gx-privacy-note { margin: 8px 0 0; font-size: 0.78rem; font-weight: 700; color: var(--g-text-2); line-height: 1.4; }
