/*
 * Messages, the group radio and group links (/messages, /radio, /g): the conversation, its list and the message box's
 * own parts (PageStylesheets.cs, #303).
 */

/* ==========================================================================
   Direct messages (DECISIONS #133; Figma "Messages · Inbox", "· Mobile") */
.dm__list {
    min-height: 0;
    /* Only up and down: a wide badge used to open a second, sideways bar under the list. */
    overflow: hidden auto;
    border-inline-end: 1px solid var(--aq-border);
}

/* The box's own scrollbars: thin, navy, and always there to drag when a list is long. The grey
   Windows bars looked foreign on the dark panel. Firefox and Chromium read the standard properties;
   Safari takes the pseudo-elements. */
.dm__list,
.dm__messages,
.dm-details,
.dm-share__results {
    scrollbar-width: thin;
    scrollbar-color: rgb(142 163 214 / 55%) transparent;
}

.dm__list::-webkit-scrollbar,
.dm__messages::-webkit-scrollbar,
.dm-details::-webkit-scrollbar,
.dm-share__results::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dm__list::-webkit-scrollbar-track,
.dm__messages::-webkit-scrollbar-track,
.dm-details::-webkit-scrollbar-track,
.dm-share__results::-webkit-scrollbar-track {
    background: transparent;
}

.dm__list::-webkit-scrollbar-thumb,
.dm__messages::-webkit-scrollbar-thumb,
.dm-details::-webkit-scrollbar-thumb,
.dm-share__results::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: var(--aq-radius-pill);
    background: rgb(142 163 214 / 55%);
    background-clip: padding-box;
}

.dm__list::-webkit-scrollbar-thumb:hover,
.dm__messages::-webkit-scrollbar-thumb:hover,
.dm-details::-webkit-scrollbar-thumb:hover,
.dm-share__results::-webkit-scrollbar-thumb:hover {
    background-color: rgb(142 163 214 / 78%);
}

.dm__title {
    margin: 0;
    padding: var(--aq-space-5) var(--aq-space-5) var(--aq-space-2);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
}

.dm__tabs {
    display: flex;
    gap: var(--aq-space-4);
    padding: 0 var(--aq-space-5) var(--aq-space-3);
}

.dm__conversations {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-row__text {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

.dm-row__name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
    min-width: 0;
    font-weight: 600;
}

/* A role badge longer than the column ("Visual Content Producer") trims with an ellipsis instead of
   running under the time and widening the list. */
.dm-row__name .member-badge {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.dm-row.is-unread .dm-row__last {
    color: var(--aq-text-100);
    font-weight: 600;
}

.dm__thread {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
}

.dm__head {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-3) var(--aq-space-5);
    border-bottom: 1px solid var(--aq-border);
}

.dm__who {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
}

/* "Mute on the phone" in a direct conversation's head (DECISIONS #332, Figma F4): a bell, and its short menu. */
.dm-mute {
    position: relative;
}

.dm-mute > summary {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: var(--aq-radius-pill);
    cursor: pointer;
    list-style: none;
    opacity: 0.75;
}

.dm-mute > summary::-webkit-details-marker {
    display: none;
}

.dm-mute > summary.is-muted,
.dm-mute[open] > summary {
    background: var(--aq-bg-200, rgba(255, 255, 255, 0.08));
    opacity: 1;
}

.dm-mute__menu {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    min-width: 13rem;
    gap: 2px;
    padding: var(--aq-space-2);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius);
    background: var(--aq-bg-100);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

/* A group's head, slim (Carlos, 04/11/2026): one short row - picture, name and members, translate, details as an icon. */
.dm__head--group {
    gap: var(--aq-space-2);
    padding-top: var(--aq-space-1-5);
    padding-bottom: var(--aq-space-1-5);
}

.dm__head--group .dm__who {
    row-gap: 0;
    line-height: 1.25;
}

.dm__head--group .dm__sub {
    font-size: 11px;
}

.dm__head--group .dm-translate__switch {
    padding: 3px var(--aq-space-1) 3px var(--aq-space-2);
}

.dm__icon-link:hover,
.dm__icon-link:focus-visible {
    background: var(--aq-bg-300);
    color: var(--aq-accent-light);
}

@media (max-width: 767.98px) {
    .dm__icon-link {
        width: 44px;
        height: 44px;
    }
}

.dm__messages {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--aq-space-2);
    min-height: 0;
    margin: 0;
    padding: var(--aq-space-4) var(--aq-space-5);
    overflow-y: auto;
    list-style: none;
}

/*
 * On a touch screen a long press on a message opens its menu (js/messages.js), which has "Copiar": the phone's own
 * text selection (Android's bar with Google, Copy and Select all) would take the press first on the words.
 */
@media (hover: none) {
    .dm-msg__bubble,
    .dm-pictures,
    .dm-music-card,
    .dm-share-card {
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }

    .dm-msg__bubble :is(input, textarea, [contenteditable]) {
        user-select: text;
        -webkit-user-select: text;
    }
}

.dm-msg__bubble {
    padding: var(--aq-space-2) var(--aq-space-4);
    border-radius: var(--aq-radius-xl);
    background: var(--aq-bg-300);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.dm-msg--mine .dm-msg__bubble {
    background: var(--aq-primary);
    color: var(--aq-primary-foreground);
}

/* In the bubble (S3-S6): the line under the words, the original under the line. */
.dm-msg__bubble:has(> .dm-msg__text) {
    white-space: normal;
}

.dm-msg__text,
.dm-tr__text {
    white-space: pre-wrap;
}

.dm-tr {
    margin-top: var(--aq-space-1);
}

.dm-tr__line::-webkit-details-marker {
    display: none;
}

.dm-tr__original {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1-5);
    margin-top: var(--aq-space-2);
    padding-top: var(--aq-space-2);
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.dm-msg__bubble--deleted {
    background: transparent !important;
    border: 1px dashed var(--aq-border);
    color: var(--aq-text-300) !important;
    font-style: italic;
}

/* "edited" by the time (docs/chat-message-menu-edit-plan.md, R8; Figma D4). */
.dm-msg__edited {
    font-style: italic;
}

.dm-composer__previews {
    flex-basis: 100%;
}

.dm-pictures {
    display: grid;
    gap: 3px;
    /* A fixed width, not min(…, 100%): a percentage counts as "auto" while the message works out its own width, so
       the card's long title or the picture's 1600px made .dm-msg__body (where ⌄ and ☺ sit) far wider than it. */
    width: 320px;
    max-width: 100%;
    overflow: hidden;
    border-radius: var(--aq-radius-xl);
}

.dm-pictures--2,
.dm-pictures--4 {
    grid-template-columns: 1fr 1fr;
}

.dm-pictures--3 {
    grid-template-columns: 2fr 1fr;
}

.dm-pictures--3 a:first-child {
    grid-row: span 2;
}

.dm-pictures:not(.dm-pictures--1) img {
    aspect-ratio: 1;
}

.dm-pictures + .dm-msg__bubble {
    margin-top: 3px;
}

/* Music and video (DECISIONS #199; Figma M3, M4). */
.dm-music {
    padding: 0 var(--aq-space-5);
    border-top: 1px solid var(--aq-border);
}

.dm-music__body {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    padding: var(--aq-space-3) 0;
}

.dm-music-card {
    /* A fixed width, not min(…, 100%): a percentage counts as "auto" while the message works out its own width, so
       the card's long title or the picture's 1600px made .dm-msg__body (where ⌄ and ☺ sit) far wider than it. */
    width: 360px;
    max-width: 100%;
}

.dm-music-card + .dm-msg__bubble,
.dm-pictures + .dm-music-card {
    margin-top: 3px;
}

/* Link previews in the chat (docs/chat-link-previews-and-app-updates-plan.md; Figma page 38, "Link preview"). The card is a
   link with a fixed width (not min(…, 100%), see .dm-music-card) and its picture's box reserved by aspect-ratio, so a card
   filled in later or a slow picture never moves the conversation. Long words end in "…", never past the card. */
.dm-link-card {
    width: 360px;
    max-width: 100%;
    margin-top: 3px;
}

.dm-link:hover,
.dm-link:focus-visible {
    border-color: var(--aq-accent);
    color: var(--aq-text-100);
}

.dm-link--compact,
.dm-link--fallback {
    align-items: center;
    gap: 10px;
    padding: 10px;
}

.dm-link__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--aq-bg-200);
}

.dm-link__media img,
.dm-link__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dm-link__thumb {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: var(--aq-radius);
    background: var(--aq-bg-200);
}

.dm-link__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.dm-link--video .dm-link__body,
.dm-link--image .dm-link__body {
    padding: 10px var(--aq-space-3) var(--aq-space-3);
}

.dm-link__title,
.dm-link__text {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow-wrap: anywhere;
}

.dm-link__title {
    font-family: var(--aq-font-primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.dm-link--compact .dm-link__text,
.dm-link--compact .dm-link__title {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.dm-link__url,
.dm-link__domain {
    overflow: hidden;
    font-size: 11px;
    line-height: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The strip above the box while writing (Figma A1-A2, E1-E2, F1-F2): one height from "loading" to the card. */
.dm-linkprev {
    /* min-width: 0, or a long address (nowrap) makes the strip wider than the box on a phone. */
    min-width: 0;
    max-width: 100%;
    flex-basis: 100%;
}

.dm-linkprev__card::before {
    position: absolute;
    top: 8px;
    bottom: 8px;
    left: 0;
    width: 3px;
    border-radius: var(--aq-radius-sm);
    background: var(--aq-primary);
    content: "";
}

.dm-linkprev[data-state="fallback"] .dm-linkprev__card::before {
    background: var(--aq-text-300);
}

.dm-linkprev.is-video .dm-linkprev__thumb::after {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgb(0 0 0 / 30%);
    color: #fff;
    content: "▶";
    font-size: 14px;
}

.dm-linkprev[data-state="loading"] .dm-linkprev__thumb {
    animation: dm-linkprev-pulse 1.2s ease-in-out infinite;
}

@keyframes dm-linkprev-pulse {
    50% {
        opacity: 0.5;
    }
}

.dm-linkprev__body {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 1px;
}

.dm-linkprev__label,
.dm-linkprev__title,
.dm-linkprev__domain {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-linkprev__title {
    font-family: var(--aq-font-primary);
    font-size: 13px;
    font-weight: 600;
    line-height: 18px;
}

.dm-linkprev[data-state="fallback"] .dm-linkprev__domain {
    color: var(--aq-text-300);
}

.dm-linkprev__remove::after {
    position: absolute;
    inset: -8px;
    content: "";
}

.dm-linkprev__remove:hover,
.dm-linkprev__remove:focus-visible {
    color: var(--aq-accent);
}

@media (max-width: 575.98px) {
    .dm-link-card {
        width: 260px;
    }
}

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

.dm__empty--center {
    margin: auto;
}

@media (max-width: 767.98px) {
    .dm--open .dm__list {
        display: none;
    }

    .dm__back {
        display: inline;
    }

    .dm__messages {
        max-height: none;
    }

    .dm.dm--open {
        flex: 1 1 auto;
        grid-template-rows: minmax(0, 1fr);
        height: auto;
        min-height: 0;
    }

    .dm--open .dm__messages {
        overscroll-behavior: contain;
    }

    .dm--open .dm__back {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        margin-left: calc(-1 * var(--aq-space-2));
    }
}

/* ---- Group chats inside Messages (DECISIONS #219; Figma page 17, A1-A4, D1-D2) ---- */
.dm__title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--aq-space-3);
    padding-inline-end: var(--aq-space-5);
}

/* All / Direct / Groups as the site's chips; the current one in gold. */
.dm__filters {
    flex-wrap: wrap;
    gap: var(--aq-space-2);
}

.dm-row.is-muted.is-unread .dm-row__last {
    color: var(--aq-text-300);
    font-weight: 400;
}

.dm-msg__sender a:hover,
.dm-msg__sender a:focus-visible {
    text-decoration: underline;
}

.dm__older {
    align-self: center;
    font-size: var(--aq-text-sm);
}

/* "Group details" (Figma A4): a panel over the conversation; the whole screen on a phone. */
.dm-details__scrim {
    position: absolute;
    inset: 0 0 0 360px;
    z-index: 2;
    background: color-mix(in srgb, var(--aq-bg-100) 60%, transparent);
}

.dm-details {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    z-index: 3;
    display: flex;
    width: min(400px, 100%);
    flex-direction: column;
    gap: var(--aq-space-4);
    padding: var(--aq-space-5) var(--aq-space-5) var(--aq-space-6);
    overflow-y: auto;
    border-inline-start: 1px solid var(--aq-border);
    background: color-mix(in srgb, var(--aq-bg-200) 88%, white);
    box-shadow: -12px 0 32px rgb(0 0 0 / 35%);
}

.dm-details__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.dm-details__rules {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-details__notify fieldset {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    border: 0;
}

.dm-details__notify legend {
    margin-bottom: var(--aq-space-2);
}

.dm-details__notify label.is-on,
.dm-details__notify label:has(input:checked) {
    border-color: var(--aq-accent);
    background: color-mix(in srgb, var(--aq-accent) 10%, transparent);
}

.dm-details__hint {
    margin: var(--aq-space-2) 0;
}

.dm-details__member {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
}

@media (max-width: 767.98px) {
    .dm-details__scrim {
        display: none;
    }

    .dm-details {
        position: fixed;
        inset: 0;
        z-index: 1050;
        width: 100%;
        border: 0;
    }

    .dm-msg__sender {
        font-size: 0.6875rem;
    }
}

/* ---- Chat Groups on profiles and in the dashboards (DECISIONS #219; Figma B1-B3, C1-C4) ---- */
.cg-card--big .cg-card__name {
    font-size: var(--aq-text-xl);
}

.cg-link-page {
    max-width: 760px;
    margin: var(--aq-space-8) auto;
    padding: 0 var(--aq-space-4);
}

@media (max-width: 767.98px) {
    .cg-card__action--row {
        flex-basis: auto;
    }
}

/* ---- The band's alerts: "ÁLFAR QUEST · Avisos" (DECISIONS #134) ----------- */
.dm-row--pinned {
    border-bottom: 1px solid var(--aq-border);
}

.dm-row__pin {
    font-size: 0.75em;
}

.dm__announcements {
    gap: var(--aq-space-4);
}

/* ---- "Posting as", band and Fan Club timelines (Bands & Fan Clubs phase 10; Figma S06, S24, S31, M4) ---- */

/* Sharing a band or a person in messages (DECISIONS #202; Figma ProfileShareCard, S1-S12). */
.share-card {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    width: min(380px, 100%);
    padding: var(--aq-space-3) var(--aq-space-4);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
}

.share-card--gone {
    flex-direction: row;
    align-items: center;
    border-style: dashed;
    background: transparent;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

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

.share-card__avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 50%;
    background: var(--aq-bg-300);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    text-decoration: none;
}

.share-card--band .share-card__avatar {
    border: 2px solid var(--aq-accent);
}

.share-card--band .share-card__avatar img {
    object-fit: contain;
    padding: 3px;
}

.share-card__who {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--aq-space-1-5);
}

.share-card__name {
    overflow: hidden;
    color: var(--aq-text-100);
    font-family: var(--aq-font-display);
    font-size: 1.05rem;
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-card__name:hover,
.share-card__name:focus-visible {
    color: var(--aq-accent-light);
}

.share-card__verified {
    color: var(--aq-accent);
    font-size: 0.8rem;
}

.share-card__handle {
    flex-basis: 100%;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.share-card__follow-form {
    flex: none;
    margin: 0;
}

.share-card__follow {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: var(--aq-space-1) 14px;
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-pill);
    background: transparent;
    color: var(--aq-accent);
    font-family: var(--aq-font-ui, inherit);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.share-card__follow.is-on {
    background: var(--aq-accent);
    color: var(--aq-bg-100);
}

.share-card__follow:disabled {
    opacity: 0.7;
    cursor: progress;
}

.share-card__you {
    flex: none;
    padding: 3px 10px;
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.share-card__genre {
    margin: 0;
    color: var(--aq-accent);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.share-card__about {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.share-card__song {
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
    padding: var(--aq-space-2) var(--aq-space-3) var(--aq-space-2) var(--aq-space-2);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-300);
}

.share-card__cover {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: var(--aq-radius);
    object-fit: cover;
}

.share-card__cover--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--aq-bg-200);
    color: var(--aq-text-300);
}

.share-card__play {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--aq-accent);
    color: var(--aq-bg-100);
    font-size: 0.75rem;
    text-decoration: none;
}

.share-card__track {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.share-card__pick {
    color: var(--aq-accent);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.share-card__title,
.share-card__artist {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.share-card__title {
    font-size: var(--aq-text-sm);
    font-weight: 600;
}

.share-card__artist {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.share-card__open {
    flex: none;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
    text-decoration: none;
}

.dm-share-card + .dm-msg__bubble,
.dm-msg__bubble + .dm-share-card {
    margin-top: 3px;
}

/* The "+" menu, the pickers and the card ready to send. */
.dm-plus {
    position: relative;
}

.dm-plus > summary {
    list-style: none;
}

.dm-plus > summary::-webkit-details-marker {
    display: none;
}

.dm-plus__button {
    border: 1px solid var(--aq-border);
}

.dm-plus[open] > .dm-plus__button {
    background: var(--aq-accent);
    color: var(--aq-bg-100);
}

.dm-plus__menu.social-popover {
    top: auto;
    bottom: calc(100% + 8px);
    left: 0;
    width: 300px;
    padding: var(--aq-space-1-5);
}

.dm-plus__item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: var(--aq-space-3);
    padding: 10px;
    border: 0;
    border-radius: var(--aq-radius-md);
    background: transparent;
    color: var(--aq-text-100);
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.dm-plus__item:hover,
.dm-plus__item:focus-visible,
.dm-plus__item:focus-within {
    background: rgb(108 76 214 / 0.22);
}

.dm-plus__icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--aq-bg-100);
    color: var(--aq-accent);
}

.dm-share {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    padding: var(--aq-space-3) var(--aq-space-5);
    border-top: 1px solid var(--aq-border);
}

.dm-share__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dm-share__eyebrow {
    margin: 0;
    color: var(--aq-accent);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.dm-share__close {
    color: var(--aq-text-300);
    text-decoration: none;
}

.dm-share__search {
    display: flex;
    gap: var(--aq-space-2);
}

.dm-share__results {
    display: flex;
    max-height: 280px;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.dm-share__note {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.dm-composer__share {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--aq-space-3);
}

.dm-composer__share-card {
    position: relative;
    max-width: 100%;
}

/* The ✕ on the card ready to send: takes it out of the message. */
.dm-composer__share-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    font-size: 14px;
    line-height: 1;
    text-decoration: none;
}

.dm-composer__share-remove:hover,
.dm-composer__share-remove:focus-visible {
    background: var(--aq-bg-100);
    color: var(--aq-accent);
}

.dm-composer__share-actions {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    color: var(--aq-text-300);
}

@media (width < 768px) {
    .share-card {
        width: 100%;
    }

    /* Narrow cards: "Following ✓" keeps only the tick, so the name fits (Figma S15). */
    .share-card__follow.is-on {
        padding: var(--aq-space-1) 10px;
        font-size: 0;
    }

    .share-card__follow.is-on::after {
        content: "✓";
        font-size: 0.85rem;
    }

}

/*
 * On a phone (DECISIONS #206; Figma S15b, S15c): the "+" menu is a sheet from
 * the bottom over a dimmed page, and the band and profile pickers take the
 * whole screen, with large rows to touch.
 */
@media (width < 768px) {
    /* Above the site header (1030) and the radio playing at the foot of the page (.aq-radio, 1040),
       which otherwise took the taps on the sheet's last rows; under the cookie banner (1050). */
    .dm-plus[open]::before {
        position: fixed;
        z-index: 1041;
        inset: 0;
        background: rgb(0 0 0 / 0.55);
        content: "";
    }

    .dm-plus__menu.social-popover {
        position: fixed;
        z-index: 1042;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 75vh;
        padding: 10px var(--aq-space-4) calc(var(--aq-space-6) + env(safe-area-inset-bottom));
        border-width: 1px 0 0;
        border-radius: var(--aq-radius-xl) var(--aq-radius-xl) 0 0;
    }

    .dm-plus__menu.social-popover::before {
        display: block;
        width: 40px;
        height: 4px;
        margin: 0 auto var(--aq-space-2);
        border-radius: var(--aq-radius-sm);
        background: var(--aq-border);
        content: "";
    }

    .dm-plus__item {
        min-height: 56px;
    }

    .dm-share:not([hidden]) {
        position: fixed;
        z-index: 1042;
        inset: 0;
        padding: calc(var(--aq-space-4) + env(safe-area-inset-top)) var(--aq-space-4) calc(var(--aq-space-4) + env(safe-area-inset-bottom));
        border: 0;
        background: var(--aq-bg-100);
    }

    .dm-share__eyebrow {
        font-size: 0.8rem;
    }

    .dm-share__close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .dm-share__results {
        max-height: none;
        flex: 1;
    }
}

.dm-share-card {
    width: 100%;
}

/* Replies (DECISIONS #209; Figma "Reply quote", R1-R7): the quote above a reply, on its side,
   the one above the box while writing, the jump to the original and the touch sheet. */
.dm-quote {
    display: flex;
    max-width: min(320px, 100%);
    align-items: center;
    gap: var(--aq-space-2);
    margin-bottom: var(--aq-space-1);
    padding: var(--aq-space-1-5) 10px;
    border: 1px solid var(--aq-border);
    border-left: 3px solid var(--aq-primary);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    font-size: var(--aq-text-xs);
    text-decoration: none;
}

.dm-msg--mine .dm-quote {
    border-color: color-mix(in srgb, var(--aq-primary) 60%, transparent);
    border-left-color: var(--aq-accent-light);
    background: color-mix(in srgb, var(--aq-primary) 28%, transparent);
}

.dm-quote--unavailable,
.dm-msg--mine .dm-quote--unavailable {
    border-left-color: var(--aq-text-300);
    color: var(--aq-text-300);
}

.dm-quote__thumb {
    width: 32px;
    height: 32px;
    flex: none;
    border-radius: var(--aq-radius);
    object-fit: cover;
}

.dm-quote__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.dm-quote__who {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
}

.dm-quote__line {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-reply {
    display: flex;
    flex-basis: 100%;
    align-items: center;
    gap: var(--aq-space-3);
    min-width: 0;
    padding: var(--aq-space-2) var(--aq-space-3);
    border-left: 3px solid var(--aq-accent);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-200);
    font-size: var(--aq-text-sm);
}

.dm-reply .dm-quote__thumb {
    width: 40px;
    height: 40px;
}

.dm-reply .dm-quote__text {
    flex: 1;
}

.dm-reply .dm-quote__line {
    color: var(--aq-text-300);
}

.dm-reply__cancel {
    padding: var(--aq-space-1) var(--aq-space-2);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-text-300);
    text-decoration: none;
}

.dm-reply__cancel:hover,
.dm-reply__cancel:focus-visible {
    color: var(--aq-text-100);
    background: var(--aq-bg-100);
}

/* The message being answered, and the original reached from a quote. */
.dm-msg.is-replying > .dm-msg__body > .dm-msg__bubble,
.dm-msg.is-replying > .dm-msg__body > .dm-pictures {
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--aq-accent) 55%, transparent);
}

.dm-msg.is-flash > .dm-msg__body > .dm-msg__bubble,
.dm-msg.is-flash > .dm-msg__body > .dm-pictures,
.dm-msg.is-flash > .dm-msg__body > .dm-music-card,
.dm-msg.is-flash > .dm-msg__body > .dm-share-card {
    animation: dm-flash 2.4s ease-out;
}

.dm-voice__dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--aq-accent, #c9a227);
}

.dm-voice__heard {
    margin-top: 2px;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.dm-voice + .dm-msg__tools {
    margin-top: 2px;
}

/* Recording in the box: the bar takes the textarea's place (Figma M7, V2). */
.dm-mic svg {
    display: block;
}

.dm-rec {
    display: flex;
    flex: 1;
    align-items: center;
    gap: var(--aq-space-2);
    min-width: 0;
}

.dm-rec__send svg {
    display: block;
}

.dm-rec__hint {
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin: 0 0 var(--aq-space-2);
    padding: var(--aq-space-1-5) 14px;
    border: 1px solid var(--aq-primary, #6c4cd6);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-100, #0d0a1a);
    font-size: var(--aq-text-xs);
    transform: translateX(-50%);
    white-space: nowrap;
}

.dm-rec__notice {
    display: flex;
    flex-basis: 100%;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
    padding: var(--aq-space-2) var(--aq-space-3);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-100, #0d0a1a);
    font-size: var(--aq-text-sm);
}

/* ---- Stickers and mentions in Messages (DECISIONS #224; Figma page 18, S1-S5, M1-M3) ---- */
.dm-stickers > summary {
    list-style: none;
}

.dm-stickers > summary::-webkit-details-marker {
    display: none;
}

.dm-stickers[open] > summary {
    border: 1px solid var(--aq-primary);
    background: color-mix(in srgb, var(--aq-primary) 25%, transparent);
    color: var(--aq-text-100);
}

.dm-stickers__tabs {
    display: flex;
    flex: none;
    gap: var(--aq-space-1);
    overflow-x: auto;
    scrollbar-width: none;
}

.dm-stickers__tab.is-on {
    border-color: var(--aq-accent);
    background: var(--aq-accent);
    color: var(--aq-bg-100);
}

.dm-stickers__search,
.dm-stickers__foot {
    flex: none;
}

.dm-stickers__search input {
    width: 100%;
    border-radius: var(--aq-radius-md);
}

.dm-stickers__sections {
    overflow-y: auto;
}

.dm-stickers__label {
    margin: var(--aq-space-2) 0;
    color: var(--aq-text-300);
    font-family: var(--aq-font-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.dm-stickers__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--aq-space-2);
}

.dm-stickers__cell,
.dm-stickers__new {
    position: relative;
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    padding: var(--aq-space-1);
    border: 1px solid transparent;
    border-radius: var(--aq-radius-md);
    background: transparent;
    cursor: pointer;
}

.dm-stickers__cell:hover,
.dm-stickers__cell:focus-visible {
    border-color: var(--aq-primary);
    background: color-mix(in srgb, var(--aq-primary) 18%, transparent);
}

.dm-stickers__gif {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 0 5px;
    border-radius: var(--aq-radius);
    background: color-mix(in srgb, var(--aq-bg-100) 85%, transparent);
    color: var(--aq-accent-light);
    font-size: 9px;
    font-weight: 600;
}

.dm-stickers__new {
    gap: 2px;
    border: 1.5px dashed var(--aq-accent);
    color: var(--aq-accent);
    font-size: 26px;
    text-align: center;
    text-decoration: none;
}

.dm-stickers__mine {
    position: relative;
    display: block;
}

.dm-stickers__mine .dm-stickers__cell {
    width: 100%;
}

.dm-stickers__remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid var(--aq-border);
    border-radius: 50%;
    background: var(--aq-bg-100);
    color: var(--aq-text-300);
    font-size: 11px;
}

.dm-stickers__empty,
.dm-stickers__hint,
.dm-stickers__credit,
.dm-stickers__foot {
    margin: var(--aq-space-2) 0 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

/* Making a sticker (S4): inline without the script, a dialog with it. */
.dm-stickers__create {
    margin-top: var(--aq-space-3);
    padding-top: var(--aq-space-3);
    border-top: 1px solid var(--aq-border);
}

.dm-stickers__create.is-dialog {
    position: fixed;
    z-index: 1050;
    top: 50%;
    left: 50%;
    width: min(520px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    margin: 0;
    padding: var(--aq-space-6);
    overflow-y: auto;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-xl);
    background: var(--aq-bg-200);
    box-shadow: 0 16px 40px rgb(0 0 0 / 0.5);
    transform: translate(-50%, -50%);
}

.dm-stickers__create.is-dialog .dm-stickers__label {
    margin-top: 0;
    color: var(--aq-accent);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
    letter-spacing: 0;
}

.dm-stickers__field {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1-5);
    margin-bottom: var(--aq-space-3);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
    font-weight: 600;
}

.dm-stickers__actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--aq-space-2);
}

.dm-sticker-img--gone {
    display: grid;
    place-items: center;
    border: 1px dashed var(--aq-border);
    border-radius: var(--aq-radius-md);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
    text-align: center;
}

.dm-msg--mine .dm-sticker {
    align-self: flex-end;
}

.dm-msg__tool.is-on {
    color: var(--aq-accent-light);
}

/* Mentions (M2): the words, the reader's row, the inbox mark and the shortcut. */
.dm-mention {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-weight: 600;
    text-decoration: none;
}

.dm-mention--me {
    padding: 0 3px;
    border-radius: var(--aq-radius-sm);
    background: color-mix(in srgb, var(--aq-accent) 22%, transparent);
}

.dm-msg__mentioned {
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xs);
}

.dm-row {
    position: relative;
}

.dm-row__mention {
    position: absolute;
    right: var(--aq-space-5);
    bottom: 12px;
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: var(--aq-accent);
    color: var(--aq-bg-100);
    font-family: var(--aq-font-primary);
    font-size: 12px;
    font-weight: 600;
}

.dm__mention-jump {
    position: sticky;
    bottom: 0;
    align-self: flex-end;
}

.dm__thread {
    position: relative;
}

@media (max-width: 767.98px) {
    .dm-stickers__panel::before {
        display: block;
        width: 36px;
        height: 4px;
        margin: 0 auto;
        border-radius: var(--aq-radius-sm);
        background: var(--aq-text-300);
        content: "";
    }

    .dm-stickers__tab {
        padding: var(--aq-space-1-5) 10px;
    }

    .dm-stickers__create.is-dialog {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 85vh;
        border-radius: var(--aq-radius-xl) var(--aq-radius-xl) 0 0;
        transform: none;
    }
}

/* --- Group chat radio, phase 2 (docs/chat-radio-plan.md; Figma page 22) ------------- */
.radio__back {
    align-self: flex-start;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    text-decoration: none;
}

.radio__notice {
    align-self: flex-start;
}

.radio__fine,
.radio__lede {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.radio-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-6);
    padding: var(--aq-space-6);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: linear-gradient(90deg, var(--aq-bg-300), var(--aq-bg-200));
}

.radio-hero__text {
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    gap: var(--aq-space-2);
    min-width: 0;
}

.radio-hero__eyebrow {
    margin: 0;
    color: var(--aq-accent);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.radio-hero__title {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.radio-hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-4);
    margin: 0;
    color: var(--aq-text-100);
    font-size: var(--aq-text-sm);
}

.radio-hero__rule {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.radio-hero__actions {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
}

.radio-tabs {
    display: flex;
    gap: var(--aq-space-6);
    overflow-x: auto;
    border-bottom: 1px solid var(--aq-border);
}

.radio-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
}

.radio-filter__label {
    color: var(--aq-text-300);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
}

.radio-filter__note {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-3);
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.radio-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-border);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    color: var(--aq-text-100);
    font-size: var(--aq-text-sm);
    text-decoration: none;
}

.radio-chip:first-of-type {
    padding-left: var(--aq-space-3);
}

.radio-sort {
    display: flex;
    gap: var(--aq-space-2);
    margin-left: auto;
}

.radio-sort .form-select {
    width: auto;
}

.radio-sort__go {
    padding: var(--aq-space-2) var(--aq-space-4);
}

.radio-list,
.radio-slots,
.radio-results,
.radio-people {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.radio-row,
.radio-slot,
.radio-result {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-4);
    padding: var(--aq-space-2) var(--aq-space-4);
    border-radius: var(--aq-radius-lg);
}

.radio-row--mine .radio-by {
    color: var(--aq-accent-light);
}

.radio-cover {
    flex: none;
    border-radius: var(--aq-radius);
    object-fit: cover;
}

.radio-cover--none {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    background: var(--aq-bg-300);
    color: var(--aq-text-300);
}

.radio-row__song {
    display: flex;
    flex: 1 1 220px;
    flex-direction: column;
    min-width: 0;
}

.radio-row__by {
    flex: 0 1 220px;
    min-width: 0;
}

.radio-by {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-2);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    text-decoration: none;
}

.radio-row__when,
.radio-row__time {
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.radio-row__when {
    width: 96px;
}

.radio-row__time {
    width: 48px;
    text-align: right;
}

.radio-row__actions {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    margin-left: auto;
}

.radio-spotify {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-1);
    color: #1ed760;
    font-size: var(--aq-text-xs);
    text-decoration: none;
}

.radio-row__mod {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.radio-confirm {
    display: flex;
    flex-basis: 100%;
    flex-direction: column;
    gap: var(--aq-space-2);
    padding: var(--aq-space-4);
    border: 1px solid color-mix(in srgb, #d4204a 50%, transparent);
    border-radius: var(--aq-radius-lg);
    background: color-mix(in srgb, #d4204a 8%, var(--aq-bg-200));
}

.radio-confirm p {
    margin: 0;
    color: var(--aq-text-200);
}

.radio-confirm__buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--aq-space-2);
}

.radio-mine__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-4);
}

.radio-mine__count {
    margin: 0;
    color: var(--aq-text-300);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
}

.radio-mine__pips {
    display: flex;
    gap: var(--aq-space-1-5);
}

.radio-mine__pips span {
    width: 28px;
    height: 6px;
    border-radius: var(--aq-radius-sm);
    background: var(--aq-border);
}

.radio-mine__text {
    flex: 1 1 280px;
}

.radio-mine__text p {
    margin: 0;
    color: var(--aq-text-100);
    font-size: var(--aq-text-sm);
}

.radio-mine__text .radio-mine__rule {
    color: var(--aq-text-300);
}

.radio-slot {
    border: 1px solid var(--aq-border);
    background: var(--aq-bg-200);
}

.radio-slot--new,
.radio-slot--replacing {
    border-color: var(--aq-accent);
    background: color-mix(in srgb, var(--aq-accent) 10%, var(--aq-bg-200));
}

.radio-slot__n {
    width: 20px;
    color: var(--aq-accent);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-lg);
    text-align: center;
}

.radio-slot__tag {
    margin-left: var(--aq-space-2);
    padding: 1px var(--aq-space-2);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-accent);
    color: var(--aq-bg-100);
    font-size: 0.625rem;
    letter-spacing: 0.1em;
}

.radio-slot__btn {
    padding: var(--aq-space-1) var(--aq-space-3);
    font-size: var(--aq-text-xs);
}

.radio-slot--free {
    border: 0;
    background: none;
    padding-top: 0;
    padding-bottom: 0;
}

.radio-slot__add {
    display: flex;
    flex: 1;
    justify-content: center;
    padding: var(--aq-space-4);
    border: 1.5px dashed color-mix(in srgb, var(--aq-accent) 70%, transparent);
    border-radius: var(--aq-radius-lg);
    background: color-mix(in srgb, var(--aq-bg-200) 50%, transparent);
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.radio-slot--off .radio-slot__add {
    border-color: var(--aq-border);
    color: var(--aq-text-300);
}

.radio-search {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-4);
    padding: var(--aq-space-6);
    border: 1px solid var(--aq-border-strong);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
}

.radio-search__head h2 {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
}

.radio-search__head p {
    margin: var(--aq-space-1) 0 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.radio-search__close {
    position: absolute;
    top: var(--aq-space-4);
    right: var(--aq-space-4);
    color: var(--aq-text-300);
    text-decoration: none;
}

.radio-search__source {
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
    margin: 0;
    color: var(--aq-accent);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.radio-result--there {
    border: 1px solid color-mix(in srgb, #d4204a 45%, transparent);
    background: color-mix(in srgb, #d4204a 8%, transparent);
}

.radio-result__there {
    color: var(--aq-text-100);
    font-size: var(--aq-text-xs);
}

.radio-result__pick {
    padding: var(--aq-space-2) var(--aq-space-4);
    font-size: var(--aq-text-xs);
}

.radio-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--aq-space-4);
}

.radio-person {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    padding: var(--aq-space-4) var(--aq-space-6);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
}

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

.radio-person__who {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.radio-person__songs,
.radio-person__profile {
    color: var(--aq-accent-light);
    font-size: var(--aq-text-sm);
}

.radio-person__profile {
    color: var(--aq-text-300);
}

.radio-person__list {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1);
    margin: 0;
    padding: 0;
    color: var(--aq-text-100);
    font-size: var(--aq-text-sm);
    list-style: none;
}

.radio-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-12) var(--aq-space-6);
    border: 1.5px dashed color-mix(in srgb, var(--aq-accent) 50%, transparent);
    border-radius: var(--aq-radius-lg);
    text-align: center;
}

.radio-empty__icon {
    font-size: 2.5rem;
}

.radio-empty h2 {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-xl);
}

.radio-empty p {
    margin: 0;
    color: var(--aq-text-300);
}

@media (max-width: 720px) {
    .radio-hero {
        padding: var(--aq-space-4);
    }

    .radio-hero__actions {
        width: 100%;
    }

    .radio-row__when,
    .radio-spotify__label {
        display: none;
    }

    .radio-row__by {
        flex-basis: 100%;
        order: 5;
        padding-left: var(--aq-space-16);
    }

    .radio-sort {
        width: 100%;
        margin-left: 0;
    }

    .radio-slot .radio-row__actions {
        flex-basis: 100%;
        justify-content: flex-end;
    }
}

/* --- Group chat radio, phase 3: the player (docs/chat-radio-plan.md) ---------------------- */
.radio-row.is-playing .radio-row__song strong {
    color: var(--aq-accent-light);
}

/* A chat head's radio button (global radio, phase 5; Figma page 45, M02): idle, this radio playing (gold, moving bars),
   another radio playing (a gold dot). */
.dm-radio-open {
    position: relative;
    border: 1px solid var(--aq-border);
    border-radius: 50%;
}

.dm-radio-open__eq {
    display: none;
    color: var(--aq-accent-light);
}

.dm-radio-open.is-here {
    border-color: var(--aq-accent);
    background: color-mix(in srgb, var(--aq-accent) 16%, transparent);
}

.dm-radio-open.is-other::after {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 9px;
    height: 9px;
    border: 2px solid var(--aq-bg-200);
    border-radius: 50%;
    background: var(--aq-accent);
    content: "";
}

/* --- Group chat albums, phase 4a (docs/chat-albums-plan.md; Figma page 25) ------------- */
.albums--narrow {
    max-width: 760px;
}

.albums__head {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
}

.albums__title {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-2xl);
}

.albums__lede {
    max-width: 70ch;
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

/* The group's own pages: its name, then Chat · Radio · Albums. */
.group-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--aq-space-3);
    padding-bottom: var(--aq-space-3);
    border-bottom: 1px solid var(--aq-border);
}

.group-tabs__who {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--aq-space-2);
    color: var(--aq-text-100);
    text-decoration: none;
}

.group-tabs__back {
    grid-row: span 2;
    align-self: center;
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xl);
}

.group-tabs__who strong {
    font-family: var(--aq-font-primary);
}

.group-tabs__who span:last-child {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.group-tabs__nav {
    display: flex;
    gap: var(--aq-space-1);
}

.group-tabs__nav a {
    padding: var(--aq-space-2) var(--aq-space-4);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-text-200);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
    text-decoration: none;
}

/* The list of albums. */
.albums-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-12) var(--aq-space-6);
    border: 1px dashed var(--aq-border);
    border-radius: var(--aq-radius-lg);
    text-align: center;
}

.albums-empty__icon {
    font-size: 2.5rem;
}

.albums-empty h2 {
    margin: 0;
    font-size: var(--aq-text-lg);
}

.albums-empty p {
    max-width: 52ch;
    margin: 0;
    color: var(--aq-text-300);
}

.albums-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--aq-space-4);
    margin: 0;
    padding: 0;
    list-style: none;
}

.album-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.album-card:hover,
.album-card:focus-visible {
    border-color: var(--aq-accent);
    transform: translateY(-2px);
}

.album-card__cover {
    display: block;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--aq-bg-300), var(--aq-bg-100));
}

.album-card__cover img,
.album-hero__cover img,
.album-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1);
    padding: var(--aq-space-3) var(--aq-space-4) var(--aq-space-4);
}

.album-card__body strong {
    font-family: var(--aq-font-primary);
}

.album-card__body span {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.album-card__body .album-card__event {
    color: var(--aq-accent-light);
}

/* One album. */
.album-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-6);
    padding: var(--aq-space-6);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: linear-gradient(90deg, var(--aq-bg-300), var(--aq-bg-200));
}

.album-hero__cover {
    flex: 0 0 160px;
    height: 120px;
    overflow: hidden;
    border-radius: var(--aq-radius);
    background: var(--aq-bg-100);
}

.album-hero__text {
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    gap: var(--aq-space-2);
    min-width: 0;
}

.album-hero__title {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-3xl);
    overflow-wrap: anywhere;
}

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

.album-hero__meta {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

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

.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.album-tile {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid transparent;
    border-radius: var(--aq-radius-sm);
    background: var(--aq-bg-300);
}

.album-grid .is-open .album-tile,
.album-tile:focus-visible {
    border-color: var(--aq-accent);
}

.album-tile__video {
    position: absolute;
    inset: 50% auto auto 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgb(0 0 0 / 0.6);
    color: #fff;
    transform: translate(-50%, -50%);
}

.album-tile__likes {
    position: absolute;
    right: var(--aq-space-1);
    bottom: var(--aq-space-1);
    padding: 0 var(--aq-space-2);
    border-radius: var(--aq-radius-pill);
    background: rgb(0 0 0 / 0.6);
    color: #fff;
    font-size: var(--aq-text-xs);
}

/* The viewer opens under the grid at ?item=, the page itself scrolls to it. */
.album-viewer {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: var(--aq-space-6);
    padding: var(--aq-space-4);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    scroll-margin-top: var(--aq-space-16);
}

.album-viewer__media {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
}

.album-viewer__media img {
    display: block;
    width: 100%;
    max-height: 75vh;
    border-radius: var(--aq-radius);
    background: #000;
    object-fit: contain;
}

.album-viewer__media iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--aq-radius);
}

.album-viewer__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--aq-space-2);
}

.album-viewer__nav a {
    color: var(--aq-accent-light);
    font-size: var(--aq-text-sm);
    text-decoration: none;
}

.album-viewer__close {
    font-size: var(--aq-text-lg);
}

.album-viewer__side {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    min-width: 0;
}

.album-viewer__who {
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
    font-size: var(--aq-text-sm);
}

.album-viewer__who small {
    display: block;
    color: var(--aq-text-300);
}

.album-viewer__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
}

.album-viewer__actions form {
    margin: 0;
}

.album-viewer__labels {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-1);
    margin: 0;
}

.album-viewer__remove summary {
    color: #ff8a9a;
    font-size: var(--aq-text-sm);
    cursor: pointer;
}

.album-viewer__remove p {
    margin: var(--aq-space-2) 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.album-like {
    padding: var(--aq-space-1) var(--aq-space-3);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    background: none;
    color: var(--aq-text-200);
    font-size: var(--aq-text-sm);
    cursor: pointer;
}

.album-like.is-on {
    border-color: #ff6b81;
    background: rgb(255 107 129 / 0.12);
    color: #ff8a9a;
}

.album-chip {
    display: inline-block;
    padding: 0 var(--aq-space-2);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xs);
    line-height: 1.8;
    text-decoration: none;
    white-space: nowrap;
}

.album-chip:hover {
    border-color: var(--aq-accent);
}

/* Moderation panel. */
.album-moderate {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    padding: var(--aq-space-6);
    border: 1px solid var(--aq-accent);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    scroll-margin-top: var(--aq-space-16);
}

.album-moderate__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
    margin: 0;
}

.album-moderate__row label {
    flex: 0 0 100%;
    color: var(--aq-text-200);
    font-size: var(--aq-text-sm);
}

.album-moderate__row .form-control,
.album-moderate__row .form-select {
    flex: 1 1 240px;
    width: auto;
}

/* Labelling a message's photos. */
.album-label {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
}

.album-label__from {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.album-label__media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.album-label__media li {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1);
}

.album-label__pick {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 2px solid var(--aq-border);
    border-radius: var(--aq-radius-sm);
    cursor: pointer;
}

.album-label__pick:has(input:checked) {
    border-color: var(--aq-accent);
}

.album-label__pick img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-label__pick input {
    position: absolute;
    top: var(--aq-space-2);
    left: var(--aq-space-2);
    z-index: 1;
    width: 20px;
    height: 20px;
    accent-color: var(--aq-accent);
}

.album-label__video {
    position: absolute;
    right: var(--aq-space-1);
    bottom: var(--aq-space-1);
    padding: 0 var(--aq-space-2);
    border-radius: var(--aq-radius-pill);
    background: rgb(0 0 0 / 0.65);
    color: #fff;
    font-size: var(--aq-text-xs);
}

.album-label__has {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.album-label__name {
    color: var(--aq-text-200);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-sm);
}

.album-label__row {
    display: flex;
    gap: var(--aq-space-2);
}

.album-label__row .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.album-label__or {
    margin: var(--aq-space-2) 0 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.album-label__albums {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.album-label__album {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: var(--aq-space-2) var(--aq-space-3);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    text-align: left;
    cursor: pointer;
}

.album-label__album:hover {
    border-color: var(--aq-accent);
}

.album-label__album span {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

/* In the chat: a message's albums under it, and the label tool. */
.dm-msg__albums {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-1);
    margin: var(--aq-space-1) 0 0;
}

@media (max-width: 767.98px) {
    .group-tabs__nav {
        width: 100%;
        overflow-x: auto;
    }

    .albums-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--aq-space-2);
    }

    .album-hero {
        padding: var(--aq-space-4);
    }

    .album-hero__cover {
        flex-basis: 100%;
        height: 160px;
    }

    .album-hero__title {
        font-size: var(--aq-text-2xl);
    }

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

    .album-viewer {
        grid-template-columns: 1fr;
        padding: var(--aq-space-3);
    }

    .album-label__media {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .album-label__row {
        flex-direction: column;
    }
}

/* --- Group chat polls, phase 5 (docs/chat-polls-plan.md; Figma page 27) ------------------ */

/* A poll in the chat stands for the message's words (Figma P03-P07). */
.dm-poll {
    max-width: min(100%, 380px);
}

.dm-msg--mine .dm-poll {
    margin-left: auto;
}

.poll-card {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    padding: var(--aq-space-3) var(--aq-space-4);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
}

.poll-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
    margin: 0;
}

.poll-card__kicker {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.poll-card__kind {
    padding: 2px var(--aq-space-2);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.poll-card__question {
    margin: 0;
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-base);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.poll-card__rules,
.poll-card__note {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.poll-card__note {
    padding: var(--aq-space-2);
    border-radius: var(--aq-radius-sm);
    background: var(--aq-bg-300);
}

.poll-card__options {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* One option: a button (single choice), a box to tick (multiple) or a line (results only). */
.poll-option {
    --poll-pct: 0%;
    --poll-bar: color-mix(in srgb, var(--aq-primary) 40%, transparent);
    display: flex;
    align-items: center;
    gap: var(--aq-space-2);
    width: 100%;
    min-height: 42px;
    padding: var(--aq-space-2) var(--aq-space-3);
    border: 1px solid var(--aq-border-strong);
    border-radius: var(--aq-radius);
    background: var(--aq-bg-300);
    color: var(--aq-text-100);
    font: inherit;
    font-size: var(--aq-text-sm);
    text-align: left;
    cursor: default;
}

button.poll-option:hover,
label.poll-option:hover,
label.poll-option:focus-within,
button.poll-option:focus-visible {
    border-color: var(--aq-accent);
}

.poll-option--result {
    background: linear-gradient(90deg, var(--poll-bar) var(--poll-pct), transparent var(--poll-pct)), var(--aq-bg-300);
}

.poll-option--mine {
    --poll-bar: color-mix(in srgb, var(--aq-accent) 32%, transparent);
    border-color: var(--aq-accent);
}

.poll-option__mark {
    flex: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--aq-text-300);
    border-radius: 50%;
}

.poll-option__mark--box {
    border-radius: var(--aq-radius-sm);
}

.poll-option--mine .poll-option__mark,
label.poll-option:has(input:checked) .poll-option__mark {
    border-color: var(--aq-accent);
    background: var(--aq-accent);
}

.poll-option--result:not(.poll-option--mine) .poll-option__mark {
    visibility: hidden;
}

.poll-option__text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.poll-option__count {
    flex: none;
    color: var(--aq-text-300);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
    font-weight: 600;
}

.poll-option--mine .poll-option__count {
    color: var(--aq-accent-light);
}

.poll-card__save {
    align-self: flex-start;
}

.poll-card__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--aq-space-1) var(--aq-space-3);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.poll-card__hint,
.poll-card__winner {
    color: var(--aq-accent-light);
    font-weight: 600;
}

.poll-card__voters,
.poll-card__manage {
    font-size: var(--aq-text-xs);
}

.poll-card__voters summary,
.poll-card__manage summary {
    color: var(--aq-accent-light);
    font-weight: 600;
    cursor: pointer;
}

.poll-card__voters ul {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    margin: var(--aq-space-2) 0;
    padding: 0;
    list-style: none;
}

.poll-card__voters li {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.poll-card__voters span,
.poll-card__voters small,
.poll-card__manage small,
.poll-card__locked {
    margin: 0;
    color: var(--aq-text-300);
}

.poll-card__manage-body {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    margin-top: var(--aq-space-2);
    padding: var(--aq-space-3);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius);
    background: var(--aq-bg-300);
}

.poll-card__edit {
    color: var(--aq-text-100);
}

.poll-card__deadline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-2);
}

.poll-card__deadline .form-select {
    width: auto;
    min-width: 0;
}

.dm__note--problem {
    border-color: var(--aq-crimson, #d4204a);
    color: var(--aq-text-100);
}

/* "Poll" in the composer's "+" for someone who may not create one here (Figma P11). */
.dm-plus__item--off {
    color: var(--aq-text-300);
    cursor: default;
}

.dm-plus__item--off strong {
    font-style: italic;
}

/* The polls tab (Figma P08, M4). */
.polls__head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--aq-space-4);
}

.polls__section {
    margin: 0;
    color: var(--aq-accent-light);
    font-family: var(--aq-font-display);
    font-size: var(--aq-text-lg);
}

.polls__none {
    margin: 0;
    color: var(--aq-text-300);
    font-size: var(--aq-text-sm);
}

.polls__list {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    margin: 0;
    padding: 0;
    list-style: none;
}

.poll-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--aq-space-3) var(--aq-space-5);
    padding: var(--aq-space-4) var(--aq-space-5);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
}

.poll-line--closed {
    background: var(--aq-bg-100);
}

.poll-line__icon {
    font-size: var(--aq-text-xl);
}

.poll-line__body {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.poll-line__body strong {
    font-family: var(--aq-font-primary);
    overflow-wrap: anywhere;
}

.poll-line__body small,
.poll-line__lead small,
.poll-line__lead span {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.poll-line__lead {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    color: var(--aq-accent-light);
    font-size: var(--aq-text-sm);
    text-align: right;
}

.poll-line__voted {
    padding: var(--aq-space-1) var(--aq-space-3);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xs);
    font-weight: 600;
    text-transform: uppercase;
}

.poll-line__go {
    color: var(--aq-accent-light);
    font-weight: 600;
    white-space: nowrap;
}

/* The new-poll form (Figma P02, M2). */
.polls--new {
    max-width: 760px;
}

.poll-form-card {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-4);
    padding: var(--aq-space-6);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-200);
}

.poll-form__options {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    border: 0;
}

.poll-form__more {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
}

.poll-form__more summary {
    color: var(--aq-accent-light);
    font-weight: 600;
    cursor: pointer;
}

.poll-form__more[open] {
    display: flex;
}

.poll-form__more .poll-form__option + .poll-form__option,
.poll-form__more summary + .poll-form__option {
    margin-top: var(--aq-space-2);
}

.poll-form__switches {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-3);
    padding: var(--aq-space-4) 0;
    border-top: 1px solid var(--aq-border);
    border-bottom: 1px solid var(--aq-border);
}

.poll-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--aq-space-4);
    cursor: pointer;
}

.poll-switch__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.poll-switch__text small {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.poll-switch input {
    flex: none;
    width: 40px;
    height: 22px;
    margin: 0;
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    accent-color: var(--aq-accent);
    appearance: none;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--aq-border-strong);
    transition: background var(--aq-transition);
}

.poll-switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--aq-transition);
}

.poll-switch input:checked {
    background: var(--aq-accent);
}

.poll-switch input:checked::after {
    transform: translateX(18px);
}

.poll-switch input:focus-visible {
    outline: 2px solid var(--aq-accent-light);
    outline-offset: 2px;
}

@media (max-width: 767.98px) {
    .dm-poll {
        max-width: 100%;
    }

    .poll-line {
        padding: var(--aq-space-3) var(--aq-space-4);
    }

    .poll-line__lead {
        align-items: flex-start;
        text-align: left;
    }

    .poll-form-card {
        padding: var(--aq-space-4);
    }
}

/* A Chronicle shared in a chat: its vertical poster, played over the conversation. */
.share-card.share-card--chronicle {
    flex-direction: column;
    align-items: stretch;
    gap: var(--aq-space-2);
    width: 200px;
    padding: var(--aq-space-2);
}

.share-chronicle {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: var(--aq-radius-md);
    background: #000;
    color: #fff;
    text-decoration: none;
}

.share-chronicle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.share-chronicle__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgb(0 0 0 / 55%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.share-chronicle__length {
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 1px var(--aq-space-1-5);
    border-radius: var(--aq-radius-sm);
    background: rgb(0 0 0 / 60%);
    font-size: 0.75rem;
}

.share-chronicle__meta {
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-1);
    min-width: 0;
    font-size: 0.85rem;
}

.share-chronicle__kind {
    color: var(--aq-text-300);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.share-chronicle__open {
    color: var(--aq-accent-light);
}

.chronicle-overlay__frame {
    aspect-ratio: 9 / 16;
    max-height: calc(94vh - 64px);
    margin: 0 auto;
}

.chronicle-overlay__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    display: block;
}

.chronicle-overlay__bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px var(--aq-space-3);
    background: var(--aq-bg-200);
}

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

.chronicle-overlay__title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.chronicle-overlay__owner {
    color: var(--aq-text-300);
}

.chronicle-overlay__close {
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

/* --- Group chats, phase 6: one navigation on every page of a group (docs/chat-radio-plan.md) --- */

/* The tabs scroll sideways on a narrow screen instead of wrapping. */
.group-tabs__nav {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.group-tabs__nav::-webkit-scrollbar {
    display: none;
}

.group-tabs__nav a {
    flex: none;
    white-space: nowrap;
}

/* The chat has no row of tabs (Carlos, 05/11/2026): the group's details panel leads to its pages. */
.dm-details__sections {
    display: flex;
    flex-wrap: wrap;
    gap: var(--aq-space-2);
}

.dm-details__sections a {
    display: inline-flex;
    align-items: center;
    gap: var(--aq-space-2);
    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: var(--aq-text-sm);
    text-decoration: none;
}

/* The radio page starts with the group's navigation, like the albums and polls. */
.radio > .group-tabs {
    margin-bottom: var(--aq-space-4);
}

/* ---- A feed card's share sheet (DECISIONS #284; Figma page 29, D3, D4, M3) ---- */

/* A post in a chat (DECISIONS #284). */
.share-post {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: inherit;
    text-decoration: none;
}

.share-post__image {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: var(--aq-radius);
    object-fit: cover;
}

.share-post__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.share-post__kind {
    color: var(--aq-text-300);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.share-post__text {
    color: var(--aq-text-200);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.share-post__open {
    display: inline-block;
    margin-top: var(--aq-space-1-5);
    color: var(--aq-accent-light);
    font-size: 0.85rem;
    text-decoration: none;
}

/* ---- 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) ---- */

/* The message's actions (docs/chat-message-menu-edit-plan.md; Figma 37 D1-D2, M1): what was sent is one block,
   with ⌄ in its corner opening the reactions' bar and the menu, and ☺ beside it opening the bar alone. */
.dm-msg__body {
    position: relative;
    display: flex;
    max-width: 100%;
    flex-direction: column;
    align-items: inherit;
}

.dm-msg__body:has(> .dm-share-card) {
    align-self: stretch;
}

.dm-msg__acts {
    display: contents;
}

/* ☺ outside, at the middle: right of others' messages, left of the reader's. */
.dm-msg__acts > .dm-react {
    position: absolute;
    top: 50%;
    left: calc(100% + 6px);
    margin-top: -15px; /* not a transform: the bar inside is placed fixed on the screen */
}

.dm-msg--mine .dm-msg__acts > .dm-react {
    right: calc(100% + 6px);
    left: auto;
}

.dm-msg__acts .dm-react__button {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--aq-border);
    border-radius: 50%;
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    cursor: pointer;
}

.dm-menu {
    position: absolute;
    z-index: 2;
    top: 4px;
    right: 4px;
}

.dm-menu > summary {
    list-style: none;
}

.dm-menu > summary::-webkit-details-marker {
    display: none;
}

/* ⌄ fades into the bubble under it, as on WhatsApp, so the words beneath stay readable. */
.dm-menu__button {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 50%;
    background: var(--aq-bg-300);
    box-shadow: -10px 0 10px 2px var(--aq-bg-300);
    color: var(--aq-text-100);
    cursor: pointer;
}

.dm-msg--mine .dm-menu__button {
    background: var(--aq-primary);
    box-shadow: -10px 0 10px 2px var(--aq-primary);
    color: var(--aq-primary-foreground);
}

.dm-menu__button:focus-visible {
    outline: 2px solid var(--aq-accent);
}

@media (hover: hover) {
    .dm-menu:not([open]) > .dm-menu__button {
        opacity: 0;
        transition: opacity 0.15s;
    }

    .dm-msg:hover .dm-menu > .dm-menu__button,
    .dm-msg:focus-within .dm-menu > .dm-menu__button {
        opacity: 1;
    }
}

/* Without the script the bar and the menu open under ⌄; js/messages.js places them on the screen (fixed),
   the bar above the message and the menu under ⌄, or both above it when there is no room below (D2). */
.dm-menu__panel {
    position: absolute;
    z-index: 25;
    top: calc(100% + 6px);
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--aq-space-2);
}

.dm-menu__react {
    padding: 5px var(--aq-space-1-5);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-200);
    box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
}

.dm-menu__list {
    display: flex;
    width: 232px;
    flex-direction: column;
    padding: var(--aq-space-1-5) 0;
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-200);
    box-shadow: 0 8px 24px rgb(0 0 0 / 45%);
}

.dm-menu__item {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 10px var(--aq-space-4);
    border: 0;
    background: none;
    color: var(--aq-text-100);
    font-family: var(--aq-font-primary);
    font-size: 0.9rem;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.dm-menu__item[hidden] {
    display: none;
}

.dm-menu__item::before {
    width: 20px;
    flex: none;
    color: var(--aq-text-300);
    content: attr(data-icon);
    text-align: center;
}

.dm-menu__item:hover,
.dm-menu__item:focus-visible {
    background: var(--aq-bg-300);
}

/* The ring sits inside the item: the menu clips what is drawn outside it. */
.dm-menu__item:focus-visible {
    outline-offset: -2px;
}

.dm-menu__item.is-on::before {
    color: var(--aq-accent-light);
}

.dm-menu__item.is-done {
    color: var(--aq-text-300);
    cursor: default;
}

.dm-menu__item--danger,
.dm-menu__item--danger::before {
    color: #ff8a9a;
}

.dm-menu__line {
    width: 100%;
    margin: var(--aq-space-1-5) 0;
    border: 0;
    border-top: 1px solid var(--aq-border);
}

.dm__messages .dm-msg.is-pressed {
    position: relative;
    z-index: 31;
}

/* Placed by the script: the bar and the menu each fixed on the screen. Copy needs the script. */
.dm-menu__panel.is-placed {
    display: contents;
}

/* Editing one's own message in the box (docs/chat-message-menu-edit-plan.md, R7; Figma 37 D3, M2): a line like
   the reply's says so, with the original and ✕; Send becomes ✓; what only goes with a new message steps aside. */
.dm-edit {
    display: flex;
    flex-basis: 100%;
    align-items: center;
    gap: var(--aq-space-3);
    min-width: 0;
    padding: var(--aq-space-2) var(--aq-space-3);
    border-left: 3px solid var(--aq-accent);
    border-radius: var(--aq-radius-md);
    background: var(--aq-bg-200);
    font-size: var(--aq-text-sm);
}

.dm-edit[hidden],
.dm-edit__problem[hidden] {
    display: none;
}

.dm-edit__text {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.dm-edit__label {
    color: var(--aq-accent-light);
    font-family: var(--aq-font-primary);
    font-size: var(--aq-text-xs);
}

.dm-edit__original {
    overflow: hidden;
    color: var(--aq-text-300);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-edit__hint {
    color: var(--aq-text-300);
    white-space: nowrap;
}

@media (hover: none) {
    .dm-edit__hint {
        display: none;
    }
}

.dm-edit__problem {
    flex-basis: 100%;
    margin: 0;
    color: #ff8a9a;
    font-size: var(--aq-text-sm);
}

/* The message being edited (D3). */
.dm-msg.is-editing > .dm-msg__body > .dm-msg__bubble {
    box-shadow: 0 0 0 2px var(--aq-accent);
}

/* ---- The message bar: Emoji and Stickers in the "+", a wider box (DECISIONS #339; Figma page 42) ---- */
.dm-stickers__panel {
    width: min(420px, calc(100% - 2 * var(--aq-space-3)));
}

/* The sticker panel opens from "Stickers" in the "+"; its own button no longer sits in the bar. */
.dm-stickers > summary {
    display: none;
}

.dm-plus__button {
    width: 36px;
    height: 36px;
}

.dm-send:not([hidden]),
.dm-mic:not([hidden]) {
    display: inline-grid;
    flex: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    place-items: center;
    border-radius: 50%;
}

.dm-send svg {
    display: block;
}

.dm-send__check,
.dm-composer.is-editing .dm-send__plane {
    display: none;
}

.dm-composer.is-editing .dm-send__check {
    display: block;
    font-size: 1.1rem;
}

/* ---- The Rádio Power Metal Realm's page (docs/gallery-grid-plan.md, extra phase 1) --------------------------------
   One column: the radio's name in Cinzel, "Listen" in gold, what the member may still do; then the Top 40, the search
   to put a song forward, their own songs and the others to vote for, each a row with its cover, words, votes and button. */
.realm-radio {
    max-width: 820px;
    margin: 0 auto;
    padding: var(--aq-space-10) var(--aq-space-4) var(--aq-space-16);
}

.realm-radio__head {
    display: grid;
    gap: var(--aq-space-3);
    margin-bottom: var(--aq-space-6);
    text-align: center;
}

.realm-radio__eyebrow {
    margin: 0;
    color: var(--aq-accent);
    font-family: var(--aq-font-primary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.realm-radio__title {
    margin: 0;
    font-family: var(--aq-font-display);
    font-size: clamp(28px, 6vw, 44px);
}

.realm-radio__lead {
    max-width: 620px;
    margin: 0 auto;
    color: var(--aq-feed-text-2);
}

.realm-radio__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--aq-space-3) var(--aq-space-5);
}

.realm-radio__left {
    margin: 0;
    color: var(--aq-feed-muted);
    font-size: 14px;
}

.realm-radio__message {
    margin: 0 auto;
    padding: var(--aq-space-2) 14px;
    border-radius: var(--aq-radius);
    background: var(--aq-feed-card-2);
}

.realm-radio__message.is-error {
    border: 1px solid #c0504d;
}

.realm-radio__block {
    margin-top: var(--aq-space-6);
}

.realm-radio__block > h2 {
    margin-bottom: var(--aq-space-3);
    font-family: var(--aq-font-display);
    font-size: 22px;
}

.realm-radio__empty {
    color: var(--aq-feed-muted);
}

.realm-radio__search {
    display: flex;
    gap: var(--aq-space-2);
    margin-bottom: var(--aq-space-3);
}

.realm-radio__list {
    display: grid;
    gap: var(--aq-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.realm-song {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: 10px var(--aq-space-3);
    border: 1px solid var(--aq-feed-border-soft);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-feed-card);
    scroll-margin-top: calc(var(--aq-header-height) + var(--aq-space-4));
}

.realm-song:target {
    border-color: var(--aq-accent);
}

.realm-song.is-gone .realm-song__text,
.realm-song.is-gone .realm-song__text strong,
.realm-song.is-gone .realm-song__votes {
    color: var(--aq-text-300);
    font-style: italic;
}

.realm-song__rank {
    width: 28px;
    flex: none;
    color: var(--aq-accent);
    font-family: var(--aq-font-display);
    font-size: 18px;
    font-weight: 700;
    text-align: center;
}

.realm-song__cover {
    display: grid;
    width: 48px;
    height: 48px;
    flex: none;
    overflow: hidden;
    place-items: center;
    border-radius: var(--aq-radius);
    background: var(--aq-feed-card-2);
    color: var(--aq-accent);
}

.realm-song__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.realm-song__text {
    display: grid;
    min-width: 0;
    flex: 1 1 auto;
}

.realm-song__text > strong,
.realm-song__text > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.realm-song__text > span {
    color: var(--aq-feed-muted);
    font-size: 13px;
}

.realm-song__votes {
    flex: none;
    color: var(--aq-feed-text-2);
    font-size: 13px;
    white-space: nowrap;
}

.realm-song form {
    flex: none;
    margin: 0;
}

.realm-song__voted {
    border-color: var(--aq-accent);
    color: var(--aq-accent);
}

.realm-song__there {
    flex: none;
    font-size: 13px;
}

@media (max-width: 575.98px) {
    .realm-song {
        flex-wrap: wrap;
    }

    .realm-song__text {
        flex-basis: calc(100% - 100px);
    }

    .realm-song__votes {
        margin-left: auto;
    }
}

/* ---- Touch targets (usability audit A11Y-06, #281) ---------------------------------------------------------------- */
@media (pointer: coarse) {
    /* The ⌄ sits in a bubble's corner: its hit area stops at the bubble's top and right edges (4px away) and
       reaches only left and down, over the words' margin, so it never covers the previous message. */
    .dm-menu__button::after {
        position: absolute;
        inset: -4px -4px -10px -10px;
        content: "";
    }
}

/* Pinned to the top (DECISIONS #510; Figma P1, P3): the newest pin on the bar; its list opens below. */
.dm-pins {
    border-bottom: 1px solid var(--aq-border);
    background: var(--aq-bg-200);
}

.dm-pins__bar {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-2) var(--aq-space-4);
    cursor: pointer;
    list-style: none;
}

.dm-pins__bar::-webkit-details-marker {
    display: none;
}

.dm-pins__text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.dm-pins__kind {
    color: var(--aq-accent);
    font-size: var(--aq-text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.dm-pins__words {
    overflow: hidden;
    color: var(--aq-text-100);
    font-size: var(--aq-text-sm);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dm-pins__more {
    padding: var(--aq-space-1) var(--aq-space-3);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-pill);
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.dm-pins__list {
    margin: 0;
    padding: 0 var(--aq-space-4) var(--aq-space-2);
    list-style: none;
}

.dm-pins__item {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-2) 0;
    border-top: 1px solid var(--aq-border);
}

.dm-pins__item a {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    color: var(--aq-text-100);
    text-decoration: none;
}

.dm-pins__item a span {
    color: var(--aq-text-300);
    font-size: var(--aq-text-xs);
}

.dm-pins__unpin {
    border: 0;
    background: none;
    color: var(--aq-accent-light);
    font-size: var(--aq-text-xs);
    font-weight: 700;
    cursor: pointer;
}

/* ---- What the app shows, on the site too (DECISIONS #541) ------------------------------------------------------- */

/* The day over each day's first message: a small pill in the middle. */
.dm-day {
    display: flex;
    justify-content: center;
    margin: var(--aq-space-2) 0;
}

.dm-day span {
    padding: var(--aq-space-1) var(--aq-space-3);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-bg-300);
    color: var(--aq-text-300);
    font-size: 0.75rem;
    font-weight: 600;
}

/* "3 mensagens não lidas": a band across the list, where the page opens. */
.dm-unread {
    margin: var(--aq-space-2) calc(-1 * var(--aq-space-5));
    padding: var(--aq-space-1) var(--aq-space-5);
    background: color-mix(in srgb, var(--aq-primary) 16%, transparent);
    color: var(--aq-text-100);
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: center;
}

/* One's own message's ticks, after its time: grey sent, blue read by everyone. */
.dm-ticks {
    margin-left: var(--aq-space-1);
    color: var(--aq-text-300);
    font-size: 0.75rem;
    letter-spacing: -0.15em;
}

.dm-ticks--all {
    color: #4fb6ff;
}

/* "… está escrevendo…", under the list. */
.dm-typing {
    margin: 0;
    padding: 0 var(--aq-space-5) var(--aq-space-1);
    color: var(--aq-text-300);
    font-size: 0.8125rem;
    font-style: italic;
}

/* ↓ back to the newest, over the list's bottom right, with how many came meanwhile. */
.dm-jump {
    position: relative;
    z-index: 2;
    align-self: flex-end;
    width: var(--aq-target);
    height: var(--aq-target);
    margin: calc(-1 * var(--aq-target) - var(--aq-space-3)) var(--aq-space-4) var(--aq-space-3) 0;
    border: 1px solid var(--aq-border);
    border-radius: 50%;
    background: var(--aq-bg-200);
    color: var(--aq-text-100);
    font-size: 1.125rem;
    box-shadow: 0 6px 16px rgb(0 0 0 / 35%);
}

/* ↓ and @ (DECISIONS #555) over the list's bottom right, @ above, as WhatsApp stacks them: a box of no height whose
   buttons rise from its bottom. */
.dm-fabs {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: var(--aq-space-2);
    align-items: center;
    align-self: flex-end;
    justify-content: flex-end;
    height: 0;
    margin: 0 var(--aq-space-4) 0 0;
    transform: translateY(calc(-1 * var(--aq-space-3)));
}

.dm-fabs .dm-jump {
    margin: 0;
}

.dm-at-jump {
    position: relative;
    display: grid;
    place-items: center;
    width: var(--aq-target);
    height: var(--aq-target);
    border: 1px solid var(--aq-border);
    border-radius: 50%;
    background: var(--aq-bg-200);
    color: var(--aq-primary);
    font-size: 1.125rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 6px 16px rgb(0 0 0 / 35%);
}

.dm-at-jump[hidden],
.dm-jump[hidden] {
    display: none;
}

.dm-jump__count {
    position: absolute;
    top: calc(-1 * var(--aq-space-2));
    right: calc(-1 * var(--aq-space-1));
    min-width: 20px;
    padding: 0 var(--aq-space-1);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-primary);
    color: var(--aq-primary-foreground);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 20px;
}

/* "Info": who read one's message and when, and who has not yet. */
.dm-info {
    width: min(420px, calc(100vw - 32px));
    max-height: min(560px, calc(100vh - 64px));
    padding: var(--aq-space-5);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-100);
    color: var(--aq-text-100);
}

.dm-info::backdrop {
    background: rgb(0 0 0 / 55%);
}

.dm-info h3 {
    margin: var(--aq-space-3) 0 var(--aq-space-2);
    color: var(--aq-text-300);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dm-info ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dm-info__person {
    display: flex;
    align-items: center;
    gap: var(--aq-space-3);
    padding: var(--aq-space-2) 0;
}

.dm-info__picture {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--aq-bg-300);
    object-fit: cover;
    font-weight: 700;
}

.dm-info__name {
    flex: 1;
}

.dm-info__person small,
.dm-info__none {
    color: var(--aq-text-300);
    font-size: 0.75rem;
}

.dm-info__close {
    float: right;
    width: var(--aq-target);
    height: var(--aq-target);
    border: 0;
    background: transparent;
    color: var(--aq-text-100);
}

/* The inbox's search (DECISIONS #541). */
.dm__search {
    padding: 0 var(--aq-space-4) var(--aq-space-2);
}

/* A video before it goes (DECISIONS #543): the preview, its caption and how much has gone. */
.dm-video-send {
    width: min(460px, calc(100vw - 32px));
    padding: var(--aq-space-5);
    border: 1px solid var(--aq-border);
    border-radius: var(--aq-radius-lg);
    background: var(--aq-bg-100);
    color: var(--aq-text-100);
}

.dm-video-send::backdrop {
    background: rgb(0 0 0 / 60%);
}

.dm-video-send__preview {
    display: block;
    width: 100%;
    max-height: 50vh;
    margin: var(--aq-space-3) 0;
    border-radius: var(--aq-radius-md);
    background: #000;
}

.dm-video-send__progress {
    width: 100%;
    margin-top: var(--aq-space-3);
}

.dm-video-send__buttons {
    display: flex;
    justify-content: flex-end;
    gap: var(--aq-space-2);
    margin-top: var(--aq-space-3);
}

/* How many came unread in a conversation (DECISIONS #543), at the row's end. */
.dm-row__count {
    min-width: 20px;
    padding: 0 var(--aq-space-1-5);
    border-radius: var(--aq-radius-pill);
    background: var(--aq-primary);
    color: var(--aq-primary-foreground);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
}
