/*
 * The social feed and its cards, on the Community Feed and every page that shows a feed: profiles, band and fan-club
 * pages, venues, events, Chronicles (PageStylesheets.cs, #303). After community.css.
 */

/* ---- Tabs (Figma "Tabs": chips, the current one filled gold) -------------- */
.profile__tab {
    padding: var(--aq-space-2) var(--aq-space-4);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-text-100);
    font-family: var(--aq-font-primary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    line-height: 18px;
    text-decoration: none;
    transition: border-color var(--aq-transition), background var(--aq-transition);
}

/* ---- Feed and side panel --------------------------------------------------- */
.profile__section-title--muted {
    color: var(--aq-text-300);
}

.profile-card__more {
    display: inline-flex;
    align-items: center;
    min-height: var(--aq-target-link, 32px);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-decoration: none;
    text-transform: uppercase;
}

.profile-activity__row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.profile-activity__thumb--empty {
    color: var(--aq-text-300);
    font-size: 1.5rem;
}

.profile-activity__thumb--place {
    border: 1px solid color-mix(in srgb, var(--aq-accent) 60%, transparent);
    background: color-mix(in srgb, var(--aq-accent) 12%, transparent);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.profile-activity__title {
    color: var(--aq-text-100);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    font-weight: 600;
    letter-spacing: 1.5px;
    line-height: 20px;
    text-decoration: none;
    text-transform: uppercase;
}

.profile-activity__body {
    margin: 0;
    color: var(--aq-text-300);
    line-height: 26px;
    overflow-wrap: anywhere;
}

/* ---- Social timeline (DECISIONS #183; Figma "13 · Social Timeline") ---- */
.social-page {
    max-width: 1128px;
    margin: 0 auto;
    padding: var(--aq-space-12) var(--aq-space-6) var(--aq-space-16);
}

.social-card__head {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
}

.social-card__avatar--badge {
    border-color: var(--aq-accent);
}

.social-card__avatar--empty {
    display: grid;
    place-items: center;
    background: var(--aq-bg-100);
    color: var(--aq-text-200);
    font-family: var(--aq-font-primary);
    font-weight: 600;
}

.social-card__meta {
    margin: 2px 0 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

/* The bands and people a post is "with" (DECISIONS #460): one quiet line under who and when, each name a link. */
.social-card__tags {
    margin: 2px 0 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.social-card__tags a {
    color: var(--aq-feed-link, var(--aq-primary));
}

.social-card__body {
    margin: 0;
    color: var(--aq-text-100);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.social-card__held {
    margin: 0;
    padding: var(--aq-space-2) var(--aq-space-3);
    border-radius: var(--aq-radius);
    background: rgb(201 162 39 / 0.12);
    color: var(--aq-accent-light);
    font-size: var(--aq-text-sm);
}

.social-card__actions {
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
}

.social-card__actions form {
    margin: 0;
}

.social-card__menu {
    position: relative;
}

.social-card__menu > summary::-webkit-details-marker {
    display: none;
}

.social-composer {
    display: flex;
    align-items: flex-start;
    gap: var(--aq-space-3);
    padding: 18px var(--aq-space-5);
    border: 1px solid var(--aq-border-strong);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
}

/* A share's or report's outcome on its own card, drawn in place (DECISIONS #277). */
.social-notice--card {
    margin-bottom: var(--aq-space-2);
    padding: var(--aq-space-2) var(--aq-space-3);
    font-size: var(--aq-text-sm);
}

.social-more {
    align-self: flex-start;
}

/* ---- Recommendations: Spotify and YouTube (DECISIONS #184) ---- */
.social-composer__recommend {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-1-5);
    padding: var(--aq-space-1-5) 14px;
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-pill);
    background: rgb(201 162 39 / 0.14);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    font-weight: 500;
    text-decoration: none;
}

.social-composer__recommend svg {
    width: 16px;
    height: 16px;
}

/* ---- Comments on posts, shares (DECISIONS #186) ---- */
.social-notice--error {
    border-color: rgb(220 90 90 / 0.5);
}

.social-shared__who,
.social-shared__gone {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.social-shared__body {
    margin: 0;
    color: var(--aq-text-200);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.social-shared__link {
    align-self: flex-start;
    color: var(--aq-accent-light);
    font-size: var(--aq-text-sm);
}

.social-page--post {
    max-width: 760px;
    padding-bottom: 0;
}

/* ---- Mentions, emoji, stickers and pictures (DECISIONS #187; Figma D2-D5) ---- */
/* ---- The band's official posts (DECISIONS #189; Figma B6b) ---- */
.social-card__official {
    margin-left: var(--aq-space-2);
    color: var(--aq-accent);
    font-family: var(--aq-font-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.social-card__headline {
    margin: 0;
    font-family: var(--aq-font-display);
    font-size: 1.35rem;
    line-height: 1.25;
}

.social-card__cta {
    align-self: flex-start;
}

/* ---- "Posting as", band and Fan Club timelines (Bands & Fan Clubs phase 10; Figma S06, S24, S31, M4) ---- */
.posting-as__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-2);
    padding: var(--aq-space-1) var(--aq-space-3) var(--aq-space-1) var(--aq-space-1);
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-text-300);
    font-size: 0.85rem;
    cursor: pointer;
    list-style: none;
}

.posting-as__chip::-webkit-details-marker {
    display: none;
}

.posting-as__chip strong {
    color: var(--aq-accent);
}

.posting-as__chip--fixed {
    margin: 0 0 var(--aq-space-3);
    cursor: default;
}

.posting-as__title {
    margin: 0 0 var(--aq-space-3);
    color: var(--aq-accent);
    font-family: var(--aq-font-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.posting-as__name {
    font-weight: 600;
}

.posting-as__note {
    margin: var(--aq-space-2) 0 0;
}

.social-track {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    margin: var(--aq-space-2) 0;
}

.social-track__title {
    margin: 0;
    font-weight: 600;
}

/* ==========================================================================
   Events (docs/events-venues-plan.md, phase 1; Figma page 21, E01–E04): */
.event-card--cancelled .event-card__title {
    text-decoration: line-through;
}

.event-card__date {
    color: var(--aq-accent);
    font-family: var(--aq-font-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
}

.event-card__title {
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
    font-weight: 700;
    line-height: 1.2;
}

.event-card__where,
.event-card__with {
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.event-embed {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    overflow: hidden;
    margin: var(--aq-space-3) 0;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-100);
    color: inherit;
    text-decoration: none;
}

.event-embed:hover,
.event-embed:focus-visible {
    border-color: var(--aq-accent);
}

.event-embed__poster {
    display: block;
    min-height: 140px;
    background: var(--aq-bg-300);
}

@media (max-width: 860px) {
    .event-embed {
        grid-template-columns: minmax(0, 1fr);
    }

    .event-embed__poster {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
}

/* --- Group chat radio, phase 3: the player (docs/chat-radio-plan.md) ---------------------- */
.social-chronicle__kind {
    color: var(--aq-text-300);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.social-chronicle__title {
    font-weight: 600;
}

.social-chronicle__meta:hover .social-chronicle__title,
.social-chronicle__meta:focus-visible .social-chronicle__title {
    color: var(--aq-accent-light);
}

/* ---- The feed on a phone (DECISIONS #278; Figma page 29, M7 and M8) ----
   Only below 768px: the computer keeps its cards. Posts run edge to edge, and a Chronicle fills the screen between
   the header and the radio bar, Reels-style, with its author, words and actions over the video. The radio's room at
   the bottom is html.aq-radio-on body's padding, so nothing hides behind the bar. */
@media (max-width: 767.98px) {
    .social-page {
        padding: var(--aq-space-4) var(--aq-space-4) var(--aq-space-8);
    }

    .social-page {
        --aq-feed-gutter: var(--aq-space-4);
    }

    .feed-shell > .social-card .social-pictures {
        margin-inline: calc(-1 * var(--aq-feed-inset));
        border-radius: 0;
    }

    .feed-shell > .social-card--chronicle.social-card--folded > .social-card__fold {
        display: contents;
    }

    .feed-shell > .social-card--chronicle.social-card--foldable.social-card--folded,
    .feed-shell > .social-card--chronicle.social-card--foldable.social-card--folded:hover {
        cursor: default;
        border-color: transparent;
        background: #000;
    }

    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__head {
        grid-row: 2;
    }

    .social-card--chronicle .social-chronicle__meta {
        grid-row: 4;
        margin-top: 0;
    }

    .social-card--chronicle .social-chronicle__kind {
        color: rgb(255 255 255 / 0.85);
    }

    .social-card--chronicle .social-chronicle__title {
        font-family: var(--aq-font-primary);
        font-size: 1.15rem;
    }

    /* The heart, comments, share and report as a column on the right edge, over the video. */
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__feel,
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__actions {
        position: relative;
        z-index: 2;
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: end;
        margin-right: var(--aq-space-2);
    }

    .social-card--chronicle .social-card__actions {
        flex-direction: column;
        flex-wrap: nowrap;
        gap: var(--aq-space-3);
    }

    .social-card--chronicle .social-share-form[open] > form {
        top: auto;
        right: calc(100% + 8px);
        bottom: 0;
        left: auto;
        width: min(320px, calc(100vw - 96px));
    }

    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__held {
        position: absolute;
        top: 56px;
        right: 64px;
        left: 14px;
        z-index: 2;
    }

    /* The page's top is a resting place too, or the snap would pull it back to the first Chronicle and the header
       would never come back. */
    .social-page:has(.feed-shell > .social-card--chronicle) {
        scroll-snap-align: start;
    }
}

/* ---- The feed on a phone, Instagram-style (docs/mobile-feed-instagram-plan.md, phase 1; Figma page 36, A1-A3) ----
   Only below 768px; the computer keeps its cards as they were, so what is new here is hidden there. A compact header,
   a post with pictures has its words under them (D1), "Reacted by ana and 5 more", one comment of the preview (D6),
   8px between posts, each coming to rest at the top (D2), and the site's header stepping aside while one scrolls down
   (D3, js/feed-phone.js). */
.social-card__reacted,
.social-glimpse__all--phone {
    display: none;
}

@media (max-width: 767.98px) {
    html.aq-header-away:has(.feed-shell > .social-card) {
        scroll-padding-top: 0;
    }

    .feed-shell > .social-card:not(.social-card--chronicle) {
        gap: 10px;
        padding-block: 10px 14px;
    }

    .social-card__head {
        gap: 10px;
    }

    .social-card:not(.social-card--chronicle) .social-card__avatar {
        width: 32px;
        height: 32px;
    }

    .social-card__name {
        gap: var(--aq-space-1-5);
        font-size: 0.875rem;
        letter-spacing: 0;
        text-transform: none;
    }

    .social-card__meta {
        margin-top: 0;
        overflow: hidden;
        font-size: 0.75rem;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* The words under the pictures, after the actions and "Reacted by", as on Instagram (D1). */
    .social-card--media > .social-card__body,
    .social-card--media > .social-card__more {
        order: 4;
    }

    .social-card--media > .social-card__comments {
        order: 5;
    }

    .social-card__reacted {
        display: block;
        margin: -4px 0 0;
        color: var(--aq-text-200);
        font-size: 0.8125rem;
    }

    .social-card--media > .social-card__body.is-clamped {
        -webkit-line-clamp: 2;
    }

    .social-card__more {
        align-self: flex-start;
        margin-top: -6px;
        padding: 0;
        border: 0;
        background: none;
        color: var(--aq-text-300);
        font-family: var(--aq-font-primary);
        font-size: 0.8125rem;
        font-weight: 600;
    }

    .social-glimpse__all--phone {
        display: inline;
    }
}

/* ---- Recommended music and videos on a phone (docs/mobile-feed-instagram-plan.md, phase 5; Figma page 36, E1-E2) ---- */
@media (max-width: 767.98px) {
    .social-filters::-webkit-scrollbar {
        display: none;
    }

    /* A recommended video is the post's media, edge to edge like a picture, inside a folded post's rest as well
       (SocialFeed Fold: a descendant, not a child). */
    .feed-shell > .social-card .social-reco--youtube {
        margin-inline: calc(-1 * var(--aq-feed-inset));
        border-inline: 0;
        border-radius: 0;
    }

    /* What else a post carries - a recommended song with its scores, a shared post, an event - keeps its own card,
       16px in from the screen's edge with 12px corners (Figma E1). */
    .feed-shell > .social-card .social-reco:not(.social-reco--youtube),
    .feed-shell > .social-card .social-shared,
    .feed-shell > .social-card .event-embed {
        margin-inline: 2px;
        border-radius: var(--aq-radius-md);
    }
}

/* ---- A Chronicle's full-screen player on a phone (docs/mobile-feed-instagram-plan.md, phase 2; Figma page 36, B1-B4) ---- */
@media (max-width: 767.98px) {
    html.aq-immersive-open .feed-shell > .social-card--chronicle.is-immersive {
        position: fixed;
        inset: 0;
        z-index: 1100;
        height: 100dvh;
        margin: 0;
        padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
        /* A swipe on the player never scrolls the feed under it. Not overflow: hidden on the page, which would send it
           back to its top and lose the place to come back to. */
        touch-action: none;
        overscroll-behavior: contain;
    }
}

/* ---- A feed card's reactions and comments (DECISIONS #281; Figma page 29, D2, D7, M2, M5–M7b) ----
   The chat's reactions (the .dm-* styles) on a post, and its comments under it, Instagram-style. */
.social-heart__faces {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Each emoji with its own count (Carlos, 05/11/2026; DECISIONS #287). */
.social-heart__face {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-1);
}

.social-heart__emoji {
    font-size: 1.15rem;
    line-height: 1;
}

/* On a phone's full-screen Chronicle the button is a column on the right edge, so its faces stack. */
@media (max-width: 767.98px) {
    .social-card--chronicle .social-heart__faces {
        flex-direction: column;
        gap: var(--aq-space-1-5);
    }
}

.social-react > summary {
    list-style: none;
}

.social-react > summary::-webkit-details-marker {
    display: none;
}

.social-react__open {
    padding-inline: var(--aq-space-2);
    font-size: 0.9rem;
    white-space: nowrap;
}

.social-card__comments[aria-busy="true"] {
    opacity: 0.7;
}

.social-glimpse__line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.social-glimpse__avatar--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--aq-bg-300);
    color: var(--aq-text-200);
    font-size: 0.8rem;
}

.social-glimpse__text {
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--aq-text-100);
    font-size: 0.92rem;
}

.social-glimpse__all,
.social-glimpse__less {
    align-self: flex-start;
    padding: 0;
    border: 0;
    background: none;
    color: var(--aq-text-300);
    font-size: 0.9rem;
    text-decoration: none;
}

.social-glimpse__all:hover,
.social-glimpse__all:focus-visible,
.social-glimpse__less:hover,
.social-glimpse__less:focus-visible {
    color: var(--aq-accent-light);
}

.social-card__thread .comments__column {
    max-width: none;
}

.social-card__thread .section-heading {
    margin-bottom: var(--aq-space-3);
}

@media (max-width: 767.98px) {
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__comments.is-open:not(.is-sheet) {
        position: fixed;
        right: 0;
        bottom: var(--aq-radio-h, 0px);
        left: 0;
        z-index: 1035;
        display: flex;
        max-height: 75svh;
        overflow-y: auto;
        padding: var(--aq-space-3) var(--aq-space-4) var(--aq-space-4);
        border-top: 1px solid var(--aq-border);
        border-radius: var(--aq-radius-xl) var(--aq-radius-xl) 0 0;
        background: var(--aq-bg-200);
        box-shadow: 0 -12px 32px rgb(0 0 0 / 0.5);
        text-shadow: none;
    }

    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__comments.is-open:not(.is-sheet) .social-glimpse__less {
        order: -1;
        align-self: flex-end;
    }
}

/* ---- A post's comments as a sheet on a phone (docs/mobile-feed-instagram-plan.md, phase 3; Figma page 36, C1-C3) ---- */
@media (max-width: 767.98px) {
    .social-card__comments.is-sheet.is-typing {
        height: calc(var(--aq-vvh, 100dvh) - 12px);
    }

    .social-card__comments.is-sheet.is-dragging {
        transition: none;
    }

    .is-sheet > .social-card__thread {
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 14px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

}

@media (prefers-reduced-motion: reduce) {
    .social-card__comments.is-sheet {
        transition: none;
        animation: none;
    }
}

/* ---- A Chronicle's comments on a phone (docs/mobile-feed-instagram-plan.md, phase 4; Figma page 36, D1-D2) ----
   The post's sheet (phase 3), dark, under the Chronicle's own video: js/feed-comments.js shrinks the .aq-video box
   with a transform into the space above the sheet, keeping its shape and playing as it was (D13); its words and
   actions fade, and a tap above the sheet closes it. The veil lets the video show. */
@media (max-width: 767.98px) {
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__comments.is-sheet {
        border-top-color: rgb(255 255 255 / 0.08);
        background: var(--aq-bg-100);
        color: var(--aq-text-100);
        text-shadow: none;
    }

    /* With the keyboard up a smaller video stays above the sheet (Figma D2). */
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__comments.is-sheet.is-typing {
        height: calc(var(--aq-vvh, 100dvh) - 140px);
    }

    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__head,
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__body,
    .social-card--chronicle .social-chronicle__meta,
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__feel,
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__actions,
    .social-card--chronicle::after {
        transition: opacity 0.2s ease;
    }
}

/* ---- A feed card's share sheet (DECISIONS #284; Figma page 29, D3, D4, M3) ----
   Over the card on a computer, as the row's other panels; a sheet from the bottom on a phone. */
.social-share > summary {
    list-style: none;
    cursor: pointer;
}

.social-share > summary::-webkit-details-marker {
    display: none;
}

.social-share__panel {
    display: none;
}

.social-share__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--aq-font-primary);
    font-size: 1.15rem;
}

.social-share__close {
    padding: var(--aq-space-1) var(--aq-space-2);
    border: 0;
    background: none;
    color: var(--aq-text-300);
    font-size: 1rem;
}

.social-share__link small {
    color: var(--aq-accent-light);
}

.social-share__targets {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--aq-space-3) var(--aq-space-2);
}

.social-share__icon--whatsapp { background: #25d366; }

.social-share__icon--telegram { background: #229ed9; }

.social-share__icon--x { background: #000; }

.social-share__icon--facebook { background: #1877f2; font-family: Arial, sans-serif; }

.social-share__icon--chat { background: var(--aq-primary, #6c4cd6); }

.social-share__target:hover .social-share__icon,
.social-share__target:focus-visible .social-share__icon {
    outline: 2px solid var(--aq-accent-light);
    outline-offset: 2px;
}

.social-share__repost {
    border-top: 1px solid var(--aq-border);
    padding-top: var(--aq-space-2);
}

.social-share__repost > summary {
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
    color: var(--aq-text-200);
    cursor: pointer;
}

.social-share__repost > form {
    margin-top: var(--aq-space-2);
}

@media (max-width: 767.98px) {
    .social-share[open] > .social-share__panel {
        position: fixed;
        right: 0;
        bottom: var(--aq-radio-h, 0px);
        left: 0;
        z-index: 1036;
        width: auto;
        max-height: 85svh;
        overflow-y: auto;
        border-radius: var(--aq-radius-xl) var(--aq-radius-xl) 0 0;
        text-shadow: none;
    }
}

/* "Link copied", for a moment, from js/share-sheet.js. */
.aq-toast {
    position: fixed;
    bottom: calc(var(--aq-radio-h, 0px) + 24px);
    left: 50%;
    z-index: 1050;
    margin: 0;
    padding: 10px 18px;
    border-radius: var(--aq-radius-pill);
    background: var(--aq-text-100);
    color: var(--aq-bg-100);
    font-weight: 600;
    opacity: 0;
    transform: translate(-50%, 8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.aq-toast.is-shown {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* ---- Fan Clubs reviewed in the side panel, Chat Groups as cards (docs/band-dashboard-menu-forms-plan.md §4.6; Figma page 33, G1, H1, H2) ---- */
.social-card--foldable.social-card--folded {
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.social-card--foldable.social-card--folded:hover {
    border-color: rgb(201 162 39 / 0.45);
    background: var(--aq-bg-300, var(--aq-bg-200));
}

.social-card__title-line {
    margin: 0;
    font-size: inherit;
}

.social-card__title:hover .social-card__title-text,
.social-card__title:focus-visible .social-card__title-text {
    color: var(--aq-accent-light);
}

.social-card__title:focus-visible {
    outline: 2px solid var(--aq-accent);
    outline-offset: 4px;
    border-radius: var(--aq-radius);
}

.social-card__title-cue--play {
    padding-left: 2px;
    border-color: rgb(201 162 39 / 0.6);
    background: rgb(201 162 39 / 0.12);
    font-size: 0.75rem;
}

.social-card__title[aria-expanded="true"] .social-card__title-cue:not(.social-card__title-cue--play) {
    transform: rotate(180deg);
}

/* Over the page: a dark shade, the card in the middle (the whole screen on a phone), the video as large as fits. */
html.aq-fold-open {
    overflow: hidden;
}

.feed-overlay-shade {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgb(3 5 12 / 0.9);
    backdrop-filter: blur(4px);
    animation: aq-fold-fade 0.2s ease-out;
}

.social-card.social-card--foldable.is-overlay {
    position: fixed;
    inset: 24px 0;
    z-index: 1095;
    width: min(560px, calc(100% - 32px));
    height: fit-content;
    max-height: calc(100dvh - 48px);
    margin: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: rgb(201 162 39 / 0.35);
    box-shadow: 0 24px 64px rgb(0 0 0 / 0.6);
    cursor: auto;
    animation: aq-fold-fade 0.22s ease-out;
}

.social-card__overlay-close:hover,
.social-card__overlay-close:focus-visible {
    border-color: var(--aq-accent);
    color: var(--aq-accent-light);
}

.social-card.social-card--foldable.is-overlay > .social-card__head {
    padding-right: 44px;
}

.social-card.social-card--foldable.is-overlay .social-card__title-cue {
    display: none;
}

@keyframes aq-fold-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 767.98px) {
    .social-card.social-card--foldable.is-overlay {
        inset: 0;
        width: 100%;
        height: 100dvh;
        max-height: none;
        padding: var(--aq-space-3) 14px calc(var(--aq-space-4) + env(safe-area-inset-bottom, 0px));
        border: 0;
        border-radius: 0;
    }

    .social-card.social-card--foldable.is-overlay > .social-card__overlay-close {
        margin: 0 0 -40px;
    }

    /* The words under the pictures (D1), inside a folded post's rest too. */
    .social-card--media > .social-card__fold > .social-card__body,
    .social-card--media > .social-card__fold > .social-card__more {
        order: 4;
    }

    .social-card--media > .social-card__fold > .social-card__comments {
        order: 5;
    }

    .social-card--media > .social-card__fold > .social-card__body.is-clamped {
        -webkit-line-clamp: 2;
    }
}

@media (prefers-reduced-motion: reduce) {
    .feed-overlay-shade,
    .social-card.social-card--foldable.is-overlay {
        animation: none;
    }
}

/* ---- Edge to edge on a phone (05/11/2026) ---- */
@media (max-width: 479.98px) {
    /* The Community Feed's side cards (finding people, the rules), under the feed: edge to edge like its posts. */
    .social-page__side:not(#aq-edge) {
        flex: 1 1 100%;
    }

    .social-page__side > .profile-card:not(#aq-edge) {
        box-sizing: border-box;
        width: calc(100% + 2 * var(--aq-space-4));
        max-width: none;
        margin-inline: calc(-1 * var(--aq-space-4));
        padding-inline: var(--aq-space-3);
        border-inline: 0;
        border-radius: 0;
    }

    /* A post outside the Community Feed (a profile's timeline, a Chronicle's page): what it carries as wide as it is. */
    .social-card:not(.social-page *):not(.feed-shell *) :is(.social-pictures, .social-reco, .social-reco__score, .social-shared,
        .event-embed):not(#aq-edge) {
        margin-inline: -12px;
        border-inline: 0;
        border-radius: 0;
    }
}

/* ---- A Chronicle in the feed as the Figma's M7 and M7b (page 29; Carlos, 05/11/2026; DECISIONS #313) ----
   Over the video, on a phone: "CHRONICLE · 0:52" at the top left and the sound in a dark circle at the top right; at
   the bottom left, over a shade, the author with Follow beside the name, the title, the words and "♪ name · original
   sound"; at the right, a column of react, comment, share and more with the count under each. Comments rise as a sheet
   that says how many, over a light scrim, and the video goes on. The computer keeps its card: Follow and the sound
   line show only here. */
.social-card__follow,
.social-chronicle__sound {
    display: none;
}

@media (max-width: 767.98px) {
    .feed-shell > .social-card--chronicle::before {
        content: "";
        position: absolute;
        inset: 0 0 auto;
        z-index: 1;
        height: 90px;
        background: linear-gradient(to bottom, rgb(0 0 0 / 0.45), rgb(0 0 0 / 0));
        pointer-events: none;
    }

    .social-card--chronicle .social-chronicle__kind {
        position: absolute;
        top: 16px;
        left: 16px;
        z-index: 2;
        margin: 0;
        color: #fff;
        font-family: var(--aq-font-primary);
        font-size: 12px;
        font-weight: 600;
        line-height: 20px;
        letter-spacing: 3px;
        text-transform: uppercase;
        text-shadow: 0 1px 4px rgb(0 0 0 / 0.6);
    }

    html.aq-chronicle-full .feed-shell > .social-card--chronicle .social-chronicle__kind {
        top: calc(16px + env(safe-area-inset-top, 0px));
    }

    /* In the full-screen player the close button holds the top-left corner: the kind and length move beside it,
       centred on it, never under it (DECISIONS #421). */
    .feed-shell > .social-card--chronicle.is-immersive .social-chronicle__kind {
        top: calc(24px + env(safe-area-inset-top, 0px));
        left: 68px;
    }

    .social-card--chronicle .social-chronicle__title,
    .social-card--chronicle .social-chronicle__sound {
        position: relative;
        z-index: 2;
        grid-column: 1;
        max-width: 300px;
        margin: 0 0 0 var(--aq-space-4);
        color: #fff;
        text-shadow: 0 1px 4px rgb(0 0 0 / 0.6);
    }

    /* Figma page 55, A: the title in 18px Cinzel on at most two lines, its words two lines under it (Carlos, 10/11/2026). */
    .social-card--chronicle .social-chronicle__title {
        grid-row: 3;
        display: -webkit-box;
        overflow: hidden;
        font-family: var(--aq-font-display);
        font-size: 18px;
        font-weight: 700;
        line-height: 24px;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    /* The author: the avatar, the name in Poppins and Follow beside it; no badge and no line under it here. */
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__head {
        gap: var(--aq-space-2);
        margin-left: var(--aq-space-4);
    }

    .social-card--chronicle .social-card__name {
        font-size: 14px;
        letter-spacing: 1.5px;
    }

    .social-card--chronicle .social-card__follow button {
        padding: 3px 10px;
        border: 1px solid #fff;
        border-radius: var(--aq-radius);
        background: transparent;
        color: #fff;
        font-family: var(--aq-font-primary);
        font-size: 12px;
        font-weight: 500;
        line-height: 18px;
        letter-spacing: 0.5px;
    }

    .social-card--chronicle .social-card__follow button[aria-pressed="true"] {
        border-color: rgb(255 255 255 / 0.5);
        color: rgb(255 255 255 / 0.85);
    }

    /* The column at the right: react, comment, share and more, 30px each with the count under it. The actions sit in
       the card's .social-card__feel, the column's grid item. */
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__feel {
        margin: 0 var(--aq-space-3) 110px 0;
    }

    .social-card--chronicle .social-card__actions {
        gap: 18px;
    }

    /* Comments (M7b): the sheet raised, "N comments" at the left with ✕, over a light scrim; the video goes on. */
    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold) > .social-card__comments.is-sheet {
        /* Shown: the Chronicle's "no comments in the card" rule (#278) outranks the sheet's own display now that it
           reaches through a folded card's wrapper. */
        display: flex;
        border-top: 0;
        border-radius: var(--aq-radius-xl) var(--aq-radius-xl) 0 0;
        background: var(--aq-bg-300);
    }
}

/* ---- The comment sheet's lines and box, Instagram-style (Figma page 29 M7b and page 36 C1; Carlos, 05/11/2026;
   DECISIONS #316, #317) ----
   On a phone the sheet's comments are compact lines: a 28px avatar, the name and the words on one line, the time
   under them with "Reply" and the rest as small muted words, the reaction button a heart at the right; a band
   member's line like any other, the chip saying only "◆ Bass"; and the box is one line in a pill - the avatar, the
   words, three tools - with Post showing once there is something to post, and the emoji in a card over the list.
   The post's page and the computer keep the section as it is. */
@media (max-width: 767.98px) {
    .social-card__comments.is-sheet > .social-card__thread {
        padding: 0 var(--aq-space-4);
    }
}
/* Every action is a 44px target (#257): the heart, the reactions, the comments and the share sheet, folded card or not. */
.feed-shell > .social-card:not(.social-card--chronicle) .social-card__actions .social-heart {
    justify-content: center;
    min-width: var(--aq-target);
    min-height: var(--aq-target);
}

/* A folded card keeps its actions in view under the first line; its words and comments stay in the fold. */
.social-card--folded > .social-card__feel {
    cursor: auto;
}

.social-card__fold--rest:not(:has(*)) {
    display: none;
}

/* The keyboard's focus shows a ring on every small control of a card: the glimpse's links, the post's menu, the
   comments' links, the sheet's close (kept when the timeline went back to 07/11, DECISIONS #419: it draws nothing
   until the keyboard reaches the control). */
.feed-shell .social-glimpse__all:focus-visible,
.feed-shell .social-glimpse__less:focus-visible,
.feed-shell .social-card__menu > summary:focus-visible,
.feed-shell .social-card__thread .comment__link:focus-visible,
.feed-shell .social-card__thread .comment__reply summary:focus-visible,
.feed-shell .social-card__more:focus-visible {
    outline: 2px solid var(--aq-feed-link);
    outline-offset: 2px;
    border-radius: var(--aq-radius);
}

/* ---- A Chronicle's links (DECISIONS #420; Figma page 56, model A, approved 10/11/2026) ----
   The viewer's streaming platform and the full clip on YouTube lead the action rail, above the heart (rule 1): the
   platform's mark in a dark glass circle with a thin white edge, its word under it on a phone's full-screen Chronicle,
   beside it in a computer's action row. "Compre aqui" (rule 4) is a golden glass card: the photo, "MERCH DA BANDA", the
   name in two lines, the price and a gold pill; on a phone's full-screen Chronicle it has the card's last row, over the
   time bar, the words moving up for it. The clip opens in .aq-yt-modal (js/chronicle-links.js): the whole screen on a
   phone and in the app, a centred window over a dim page on a computer. */
.chronicle-link__disc {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgb(255 255 255 / 35%);
    border-radius: 50%;
    background: rgb(0 0 0 / 35%);
}

.chronicle-link__disc > .platform-icon {
    width: 20px;
    height: 20px;
}

.chronicle-link__label {
    font-size: var(--aq-text-xs);
    font-weight: 600;
}

.chronicle-merch {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-2) var(--aq-space-3) var(--aq-space-2) var(--aq-space-2);
    border: 1px solid color-mix(in srgb, var(--aq-accent) 55%, transparent);
    border-radius: var(--aq-radius-md);
    background: rgb(13 10 26 / 62%);
    box-shadow: 0 0 24px color-mix(in srgb, var(--aq-accent) 28%, transparent);
    color: #fff;
    text-decoration: none;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.social-chronicle > .chronicle-merch {
    margin-top: var(--aq-space-3);
}

.chronicle-merch:hover,
.chronicle-merch:focus-visible {
    border-color: var(--aq-accent);
    color: #fff;
}

.chronicle-merch__photo {
    flex: none;
    width: 60px;
    height: 60px;
    border-radius: var(--aq-radius);
    background: rgb(255 255 255 / 8%);
    object-fit: cover;
}

.chronicle-merch__photo--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--aq-accent-light);
}

.chronicle-merch__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.chronicle-merch__kicker {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: 9px;
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chronicle-merch__name {
    display: -webkit-box;
    overflow: hidden;
    font-family: var(--aq-font-primary);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 17px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.chronicle-merch__price {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 20px;
}

.chronicle-merch__buy {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: var(--aq-space-1-5);
    padding: var(--aq-space-2) var(--aq-space-3);
    border-radius: var(--aq-radius-pill);
    background: linear-gradient(135deg, var(--aq-accent-light), var(--aq-accent));
    box-shadow: var(--aq-accent-glow);
    color: var(--aq-bg-100);
    font-family: var(--aq-font-primary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.chronicle-merch--soldout .chronicle-merch__buy {
    border: 1px solid color-mix(in srgb, var(--aq-accent) 55%, transparent);
    background: transparent;
    box-shadow: none;
    color: var(--aq-accent-light);
}

.chronicle-player__links {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    margin-bottom: var(--aq-space-4);
}

.chronicle-player__rail {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-2);
}

@media (max-width: 767.98px) {
    /* The rail's two marks as the Figma's: 40px, the logo 24px, the word 10px under it. */
    .social-card--chronicle .social-card__actions .chronicle-link {
        gap: var(--aq-space-1);
    }

    .social-card--chronicle .chronicle-link__disc {
        width: 40px;
        height: 40px;
    }

    /* Above the rail's own icon size (community.css: .social-heart svg), the Figma's 24px logo in its 40px disc. */
    .social-card--chronicle .social-card__actions .chronicle-link__disc > .platform-icon {
        width: 24px;
        height: 24px;
    }

    /* The word is as wide as its circle and runs past it either side ("Completo"), so the rail keeps its width and the
       author's line beside it keeps its room. */
    .social-card--chronicle .social-card__actions .chronicle-link__label {
        display: flex;
        justify-content: center;
        width: 40px;
        white-space: nowrap;
        font-size: 10px;
        font-weight: 600;
        line-height: 14px;
        letter-spacing: 0;
    }

    /* "Compre aqui" has a row of its own at the foot, across the card, above the time bar: the words and the rail end
       above it. */
    .feed-shell > .social-card--chronicle:has(.chronicle-merch) {
        grid-template-rows: 1fr auto auto auto auto auto;
    }

    .social-card--chronicle .social-chronicle > .chronicle-merch {
        position: relative;
        z-index: 2;
        grid-column: 1 / -1;
        grid-row: 6;
        /* Clear of the 2px time bar at the video's foot. */
        margin: var(--aq-space-2) var(--aq-space-3);
    }

    :is(.social-card--chronicle, .social-card--chronicle > .social-card__fold):has(.chronicle-merch) > .social-card__feel {
        grid-row: 1 / 6;
    }

    .social-card--chronicle.has-sheet .chronicle-merch {
        opacity: 0;
        pointer-events: none;
    }
}


/* Nothing under the clip's window scrolls: a swipe or the wheel would start the next Chronicle beneath it. */
html.aq-yt-open {
    overflow: hidden;
}
.aq-yt-modal {
    /* As wide as the 16:9 clip can be with its bar and words still on a short screen. */
    width: min(960px, calc(100vw - 2 * var(--aq-space-8)), calc((100dvh - 280px) * 16 / 9));
    min-width: min(480px, calc(100vw - 2 * var(--aq-space-8)));
    max-width: none;
    max-height: calc(100dvh - 2 * var(--aq-space-8));
    padding: 0;
    overflow: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
}

.aq-yt-modal[open] {
    display: flex;
    flex-direction: column;
}

.aq-yt-modal::backdrop {
    background: rgb(0 0 0 / 75%);
}

.aq-yt-modal__bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--aq-space-2);
    padding: var(--aq-space-2) var(--aq-space-3);
}

.aq-yt-modal__back {
    justify-self: start;
    min-height: var(--aq-target);
    padding: 0 var(--aq-space-2);
    border: 0;
    border-radius: var(--aq-radius);
    background: none;
    color: var(--aq-text-100);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    font-weight: 600;
}

.aq-yt-modal__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-2);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    font-weight: 600;
}

.aq-yt-modal__close {
    justify-self: end;
    width: var(--aq-target);
    height: var(--aq-target);
    border: 0;
    border-radius: 50%;
    background: rgb(255 255 255 / 10%);
    color: #fff;
    font-size: 1.1rem;
}

.aq-yt-modal__frame {
    position: relative;
    flex: none;
    aspect-ratio: 16 / 9;
    background: #000;
}

.aq-yt-modal__frame > iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.aq-yt-modal__info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--aq-space-3);
    padding: var(--aq-space-4);
}

.aq-yt-modal__title {
    margin: 0;
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-lg);
    font-weight: 600;
}

.aq-yt-modal__chip {
    margin: 0;
    padding: var(--aq-space-1) var(--aq-space-3);
    border-radius: var(--aq-radius-pill);
    background: color-mix(in srgb, var(--aq-accent) 18%, transparent);
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xs);
    font-weight: 600;
}

.aq-yt-modal__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-3);
}

/* On a phone, and in the app, the clip takes the whole screen. */
@media (max-width: 767.98px) {
    .aq-yt-modal {
        width: 100%;
        height: 100%;
        max-height: none;
        margin: 0;
        padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
        border: 0;
        border-radius: 0;
        background: #000;
    }

    .aq-yt-modal__actions {
        align-self: stretch;
        margin-top: auto;
    }

    .aq-yt-modal__actions > * {
        flex: 1 1 100%;
    }
}

/* ---- A giveaway inside its feed post (docs/giveaways/phase-4-plan.md; Figma page 65, variation A, A9) ----
   Drawn wherever the feed's cards are: the feed itself and the social pages, which both link this file. */

/* The small "GIVEAWAY" pill beside the band's name on its feed post (A9). */
.gw-feed-pill {
    display: inline-flex;
    align-items: center;
    margin-left: var(--aq-space-2);
    padding: 0 var(--aq-space-2);
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-secondary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    vertical-align: middle;
}

/* The giveaway inside the post (A9): the cover, then the title, the prize, the deadline, what to do and the way in. */
.gw-embed {
    display: grid;
    overflow: hidden;
    margin: var(--aq-space-3) 0;
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-100);
}

.gw-embed__cover {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: var(--aq-bg-300);
}

.gw-embed__body {
    display: grid;
    gap: var(--aq-space-2);
    justify-items: start;
    padding: var(--aq-space-4);
}

.gw-embed__title {
    margin: 0;
    color: var(--aq-text-100);
    font-family: var(--aq-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.25;
}

.gw-embed__line,
.gw-embed__lead,
.gw-embed__state {
    margin: 0;
    color: var(--aq-text-200);
    font-size: var(--aq-text-sm);
}

.gw-embed__lead {
    margin-top: var(--aq-space-1);
    color: var(--aq-text-100);
    font-weight: 600;
}

.gw-embed__state {
    color: var(--aq-text-300);
    font-weight: 600;
}

.gw-embed__tasks {
    display: grid;
    gap: var(--aq-space-1);
    margin: 0 0 var(--aq-space-2);
    padding-left: var(--aq-space-5);
    color: var(--aq-text-200);
    font-size: var(--aq-text-sm);
}

.gw-embed--cancelled .gw-embed__cover {
    filter: grayscale(1);
}
