/* Content #RADL + chat composer/messages */

#RADL {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-direction: column;
    z-index: 2;
}

#RADL_call_other {
    display: none;
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;
}

#RADL_call_other:not(:empty) {
    min-height: 120px;
    max-height: 160px;
    border-bottom: 1px solid var(--color-null-element-border);
    background: #0a0a0c;
}

html[data-project-audio-channel="1"][data-voice-secondary-open="1"][data-voice-secondary-placement="radl"]:not([data-voice-call-chat-hidden="1"]) #RADL_call_other:not(:empty) {
    display: block;
}

#RADL_content {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-y: auto;
    overflow-x: clip;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

#RADL[data-favorites="1"] #RADL_call_bar,
#RADL[data-favorites="1"] #RADL_voice_call {
    display: none !important;
}

#RADL_call_bar[hidden] {
    display: none !important;
}

#RADL_call_bar {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0px;
    background-color: #43415b;
    box-sizing: border-box;
    cursor: default;
    min-height: 10px;
}

.call_bar-normal {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}

.call_bar-normal[hidden] {
    display: none !important;
}

.call_bar-restricted {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    min-height: 10px;
}

.call_bar-restricted[hidden] {
    display: none !important;
}

.call_bar-restricted-text {
    margin: 0;
    font-size: 90%;
    line-height: 1.35;
    opacity: 0.92;
}

.call_bar-actions {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1px;
}

.call_bar-action {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 15px;
    border: 0 solid var(--color-null-element-border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--color-ui-text);
    font: inherit;
    font-size: 100%;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    box-sizing: border-box;
    height: 100%;
}

.call_bar-action:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
}

.call_bar-action:disabled,
.call_bar-action.is-stub {
    opacity: 0.45;
    cursor: default;
}

.call_bar-action-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: center / contain no-repeat;
}

.call_bar-action-label {
    flex: 0 0 auto;
}

@media (max-width: 1100px) {
    #RADL_call_bar-actions .call_bar-action-label {
        display: none;
    }
}

@media (max-width: 900px) {
    #RADL_call_bar-actions .call_bar-action-label {
        display: revert;
    }
}

@media (max-width: 500px) {
    #RADL_call_bar-actions .call_bar-action-label[data-call-label="video"] {
        display: none;
    }
}

@media (max-width: 350px) {
    #RADL_call_bar-actions .call_bar-action-label {
        display: none;
    }
}

.call_bar-action-icon--audio {
    background-image: url('../../ico/bt/call.svg');
}

.call_bar-action-icon--video {
    background-image: url('../../ico/bt/videocam.svg');
}

/* Оболочка rad_call в личке (не путать с legacy #RADL_call_stage в main.css) */
#RADL_voice_call {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

#RADL_voice_call[hidden] {
    display: none !important;
}

#RADL_voice_call #voice_call.rad_call {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

html[data-dm-voice-call="1"] #RADL_content {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
}

html[data-dm-voice-call="1"] #RADL_voice_call:not([hidden]) {
    flex: 1 1 auto;
    height: calc(50% - 140px);
    min-height: 120px;
    max-height: none;
}

html[data-dm-voice-call="1"] #RADL_messages {
    flex: 1 1 0;
    min-height: 0;
    min-width: 0;
    overflow-y: auto;
}

html[data-dm-voice-call="1"][data-dm-call-chat-hidden="1"] #RADL_voice_call:not([hidden]) {
    flex: 1 1 auto;
}

html[data-dm-voice-call="1"][data-dm-call-chat-hidden="1"] #RADL_messages {
    display: none !important;
}

html[data-dm-voice-call="1"][data-dm-call-chat-hidden="1"] #RADL_inputs_foot {
    display: none !important;
}

html[data-dm-voice-call="1"] #RADL_call_bar {
    display: none !important;
}

.voice_stage-action-icon--hangup {
    background-image: url('../../ico/bt/call-end.svg');
}

#RADL_inputs_foot {
    position: relative;
    flex: 0 0 auto;
    flex-shrink: 0;
    width: 100%;
    min-height: 0;
    box-sizing: border-box;
}

#RADL_inputs {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    /*border-top: 0px solid var(--color-null-element-border); */
    padding: 18px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0px;
    box-sizing: border-box;
}

#RADL_draft_switch {
    position: absolute;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--color-ui-text);
    background: #16161633;
    backdrop-filter: blur(2px);
    cursor: progress;
}

#RADL_draft_switch[hidden] {
    display: none !important;
}

.RADL_draft_switch-spinner {
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: chat_att_upload_spin 0.8s linear infinite;
}

#RADL_inputs-draft {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: -10px 0 8px;
    padding: 6px 10px;
    border-left: 3px solid var(--color-lpd-active-border, #c9a227);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.05);
    box-sizing: border-box;
    font-size: 82%;
}

#RADL_inputs-draft[hidden] {
    display: none !important;
}

.RADL_inputs-draft-label {
    flex: 0 0 auto;
    font-weight: 700;
}

.RADL_inputs-draft-state {
    flex: 1 1 auto;
    min-width: 0;
    opacity: 0.65;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#RADL_inputs-draft_delete {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent url('../../ico/bt/delete.svg') center / 16px no-repeat;
    cursor: pointer;
    opacity: 0.75;
}

#RADL_inputs-draft_delete:hover {
    background-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

#RADL_inputs-progress {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
    box-sizing: border-box;
    justify-content: end;
    backdrop-filter: blur(2px);
    background: #323232e6;
}

#RADL_inputs-progress[hidden] {
    display: none !important;
}

.RADL_inputs-compose {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 10px;
    align-items: flex-end;
    justify-content: center;
    display: flex;
}

.RADL_inputs-editor_limit {
    position: absolute;
    top: 3px;
    right: 11px;
    z-index: 2;
    font-size: 11px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    color: var(--color-null-element-text);
    opacity: 0.55;
    pointer-events: none;
    user-select: none;
}

.RADL_inputs-editor_limit.is-over {
    opacity: 1;
    color: #e05555;
    font-weight: 600;
}

.RADL_inputs-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    align-self: flex-end;
}

#RADL_inputs-upload,
#RADL_inputs-emoji,
#RADL_inputs-send {
    position: relative;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border: 1px solid transparent;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 60%;
    background-size: var(--btn-icon-size);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease;
}

#RADL_inputs-upload_badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--color-lpd-active-border);
    color: #1a1a1a;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
}

#RADL_inputs-upload_badge[hidden] {
    display: none !important;
}

#RADL_inputs[data-edit="1"] #RADL_inputs-text,
#RADL_inputs[data-edit="1"] #RADL_inputs-editor {
    border-color: var(--color-lpd-active-border);
}

#RADL_inputs-upload {
    background-image: url('../../ico/bt/description.svg');
    align-self: flex-end;
}

#RADL_inputs-emoji {
    position: absolute;
    right: 2px;
    bottom: 1px;
    z-index: 2;
    background-image: url('../../ico/bt/emoji-emotions.svg');
}

#RADL_inputs-scroll_end {
    position: absolute;
    right: 20px;
    bottom: 100%;
    margin-bottom: 8px;
    z-index: 50;
    pointer-events: auto;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    border: 0px solid var(--color-null-element-border);
    background-color: #292929b3;
    background-image: url(../../ico/bt/arrow-downward.svg);
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 60%;
    background-size: var(--btn-icon-size);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease, opacity 0.12s ease;
    backdrop-filter: blur(6px);
}

#RADL_inputs-scroll_end[hidden] {
    display: none !important;
}

#RADL_inputs-send {
    background-image: url('../../ico/bt/send.svg');
}

#RADL_inputs-send.is-delete-message {
    background-image: url('../../ico/bt/delete.svg');
}

#RADL_inputs-send.is-delete-message:hover {
    background-color: rgba(224, 85, 85, 0.14);
}

#RADL_inputs-emoji_content,
#IFM_attach_files {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    min-width: 220px;
    max-width: min(320px, 70vw);
    max-height: 320px;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-null-element-bg);
    border: 1px solid var(--color-null-element-border);
    border-radius: 12px;
    box-shadow: 0 0px 30px 2px rgba(0, 0, 0, 0.35);
    cursor: default;
    z-index: 30;
    flex-direction: column;
}

#RADL_inputs-emoji_content {
    right: 0;
    left: auto;
}

#IFM_attach_files {
    left: 0;
}

#RADL_inputs-emoji[open="1"] #RADL_inputs-emoji_content {
    display: flex;
}

#RADL_inputs-emoji_content.RADL_inputs-emoji_content--ported.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 60010;
    min-width: 220px;
    max-width: min(320px, 70vw);
    max-height: 280px;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-null-element-bg);
    border: 1px solid var(--color-null-element-border);
    border-radius: 12px;
    box-shadow: 0 0 30px 2px rgba(0, 0, 0, 0.35);
    cursor: default;
}

#RADL_inputs-upload[open="1"] #IFM_attach_files {
    display: block;
    padding: 15px;
    overflow-x: hidden;
    overflow-y: auto;
}

.RADL_picker_scroll {
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 15px 15px 8px;
    min-height: 0;
}

.RADL_pack_bar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 8px;
    padding: 8px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    touch-action: pan-x;
}

.RADL_pack_chip {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 4px;
    border-radius: 10px;
    border: 2px solid transparent;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.RADL_pack_chip.is-active {
    border-color: var(--color-accent, #6a9cff);
}

.RADL_pack_sep {
    flex: 0 0 auto;
    align-self: center;
    width: 1px;
    height: 28px;
    margin: 0 2px;
    background: rgba(255, 255, 255, 0.14);
}

.RADL_pack_chip img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.RADL_pack_chip span {
    font-size: 11px;
    opacity: 0.85;
}

#IFM_attach_files {
    min-width: 280px;
    max-width: min(360px, 85vw);
    max-height: 360px;
}

.IFM_attach_files-title {
    margin: 0 0 10px;
    font-size: 90%;
    font-weight: 600;
    opacity: 0.85;
}

.IFM_attach_files-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.IFM_attach_files-list.is-sorting {
    gap: 8px;
}

.IFM_attach_files-empty {
    margin: 4px 0 12px;
    opacity: 0.7;
    font-size: 90%;
}

.IFM_attach_files-empty[hidden] {
    display: none !important;
}

.IFM_attach_files-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
}

.IFM_attach_files-item.is-dragging {
    opacity: 1;
    z-index: 2;
    transform: scale(1.03);
    border-color: var(--color-lpd-active-border, #c9a227);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.IFM_attach_files-item.is-drag-over {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.05);
}

.IFM_attach_files-item.is-drop-before::before,
.IFM_attach_files-item.is-drop-after::after {
    content: '';
    position: absolute;
    left: 6px;
    right: 6px;
    height: 3px;
    border-radius: 2px;
    background: var(--color-lpd-active-border, #c9a227);
    box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.25);
    pointer-events: none;
    z-index: 3;
}

.IFM_attach_files-item.is-drop-before::before {
    top: -5px;
}

.IFM_attach_files-item.is-drop-after::after {
    bottom: -5px;
}

.IFM_attach_files-drag {
    flex: 0 0 auto;
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    opacity: 0.55;
    background: transparent url('../../ico/bt/drag-indicator.svg') center / 16px 16px no-repeat;
}

.IFM_attach_files-drag:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
}

.IFM_attach_files-drag:active,
.IFM_attach_files-item.is-dragging .IFM_attach_files-drag {
    cursor: grabbing;
}

#IFM_attach_files.is-sorting {
    user-select: none;
    -webkit-user-select: none;
}

#IFM_attach_files.is-sorting .IFM_attach_files-item {
    cursor: grabbing;
}

.IFM_notify_mode_picker-entity {
    margin: 0 0 6px;
    font-size: 95%;
    opacity: 0.8;
}

.IFM_notify_mode_picker-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.IFM_notify_mode-option {
    display: block;
    width: 100%;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid var(--color-null-element-border, rgba(255, 255, 255, 0.12));
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.IFM_notify_mode-option.is-active {
    border-color: var(--color-accent, #6a9cff);
    background: rgba(106, 156, 255, 0.12);
}

.IFM_notify_mode_picker-loading {
    padding: 16px 0;
    text-align: center;
    opacity: 0.7;
}

.IFM_share_target-sub {
    margin: 0 0 10px;
    font-size: 90%;
    opacity: 0.75;
}

.IFM_share_target-section {
    margin: 14px 0 8px;
    font-size: 80%;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.55;
}

.IFM_share_target-section:first-child {
    margin-top: 0;
}

.IFM_share_target-item {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    padding: 12px 14px;
    text-align: left;
    border: 1px solid var(--color-null-element-border, rgba(255, 255, 255, 0.12));
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    color: inherit;
    font: inherit;
    cursor: pointer;
    box-sizing: border-box;
}

.IFM_share_target-item:active {
    background: rgba(255, 255, 255, 0.08);
}

.IFM_share_target-empty,
.IFM_share_target-loading {
    padding: 16px 0;
    text-align: center;
    opacity: 0.7;
    font-size: 90%;
}

.IFM_share_target-back {
    margin-top: 16px;
    width: 100%;
}

#IFM_attach_files.is-sorting .IFM_attach_files-item:not(.is-dragging) {
    opacity: 0.72;
}

.IFM_attach_files-name {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.IFM_attach_files-status {
    flex: 0 0 auto;
    max-width: 90px;
    font-size: 70%;
    opacity: 0.7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.IFM_attach_files-item.is-uploading {
    border-color: rgba(106, 163, 255, 0.5);
}

.IFM_attach_files-item.is-error {
    border-color: rgba(224, 85, 85, 0.75);
}

.IFM_attach_files-progress {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 2px;
    height: 2px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.IFM_attach_files-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: var(--color-lpd-active-border, #c9a227);
    transition: width 0.1s linear;
}

.IFM_attach_files-retry {
    flex: 0 0 auto;
    border: 0;
    border-radius: 6px;
    padding: 4px 7px;
    color: inherit;
    background: rgba(255, 255, 255, 0.09);
    cursor: pointer;
    font: inherit;
    font-size: 72%;
}

.IFM_attach_files-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    background: transparent url('../../ico/bt/delete.svg') center / 60% no-repeat;
}

.IFM_attach_files-remove:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.IFM_attach_files-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.IFM_attach_files-actions .user_panel-menu-btn {
    flex: 1 1 auto;
    min-width: 0;
}

.IFM_attach_files-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    opacity: 0;
    pointer-events: none;
}

#RADL_inputs-text {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 36px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 8px;
    background-color: var(--color-null-element-bg);
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 115%;
    line-height: 1.35;
    outline: none;
    box-sizing: border-box;
    resize: none;
    overflow: hidden;
    white-space: pre-wrap;
}

#RADL_inputs-text[hidden],
#RADL_inputs-text[aria-hidden="true"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#RADL_inputs-editor {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 36px;
    max-height: calc(20 * 1.35em + 14px);
    margin: 0;
    padding: 6px 44px 6px 12px;
    /* border: 1px solid var(--color-null-element-border); */
    border-radius: 8px;
    background-color: #2d2d2d;
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 115%;
    line-height: 1.35;
    outline: none;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-word;
    cursor: text;
}

#RADL_inputs-editor:focus {
    border-color: var(--color-btn-hover-border);
}

#RADL_inputs-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--color-null-element-text);
    opacity: 0.28;
    pointer-events: none;
}

@media (max-width: 599px) {
    #RADL_inputs-editor {
        max-height: calc(6 * 1.35em + 14px);
    }
}

@media (max-width: 499px) {
    #RADL_inputs {
        padding: 12px 5px 8px 5px;
    }

    .RADL_inputs-compose {
        margin: 0 8px;
    }
}

#RADL_inputs-text:focus {
    border-color: var(--color-btn-hover-border);
}

#RADL_inputs-text::placeholder {
    color: var(--color-null-element-text);
    opacity: 0.28;
}

.RADL_emoji_section-title {
    margin: 4px 0 8px;
    font-size: 75%;
    font-weight: 600;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.RADL_emoji_section-title + .RADL_emoji_grid + .RADL_emoji_section-title {
    margin-top: 12px;
}

.RADL_emoji_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
}

.RADL_emoji_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 4px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.RADL_emoji_btn:hover {
    border-color: var(--color-null-element-border);
    background: rgba(255, 255, 255, 0.06);
}

.RADL_emoji_btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.RADL_emoji_empty {
    font-size: 90%;
    opacity: 0.55;
    padding: 8px 0;
}

#RADL_inputs-emoji_content {
    min-width: 280px;
    max-width: min(400px, 85vw);
    max-height: 360px;
}

.RADL_sticker_section-title {
    margin: 4px 0 8px;
    font-size: 75%;
    font-weight: 600;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.RADL_sticker_section-title + .RADL_sticker_grid + .RADL_sticker_section-title {
    margin-top: 12px;
}

.RADL_sticker_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
}

.RADL_sticker_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    padding: 4px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.RADL_sticker_btn:hover {
    border-color: var(--color-null-element-border);
    background: rgba(255, 255, 255, 0.06);
}

.RADL_sticker_btn img {
    max-width: 64px;
    max-height: 64px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
}

.RADL_sticker_empty {
    font-size: 90%;
    opacity: 0.55;
    padding: 8px 0;
}

.chat_emoji {
    display: inline-block;
    width: 1.25em;
    height: 1.25em;
    margin: 0 0.08em;
    vertical-align: -0.2em;
    object-fit: contain;
}

.chat_sticker {
    display: block;
    max-width: 170px;
    max-height: 170px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.chat_msg.is-sticker .chat_msg-body,
.chat_msg.is-me.is-sticker .chat_msg-body {
    background: transparent;
    border-color: transparent;
    padding: 0;
}

html[page_type="user_contacts"] #RADL[chat_open="0"] #RADL_inputs,
html[page_type="user_contacts"][data-chat-open="0"] #RADL_inputs,
html[page_type="project"] #RADL[chat_open="0"] #RADL_inputs,
html[page_type="project"][data-chat-open="0"] #RADL_inputs,
html[page_type="news"] #RADL[chat_open="0"] #RADL_inputs,
html[page_type="news"][data-chat-open="0"] #RADL_inputs,
html[page_type="project_edit"] #RADL_inputs,
html[page_type="project_roles"] #RADL_inputs,
html[page_type="channel_edit"] #RADL_inputs,
html[page_type="group_edit"] #RADL_inputs,
html[page_type="user_settings"] #RADL_inputs,
html[page_type="user_contacts"] #RADL[chat_open="0"] #RADL_dm_lock,
html[page_type="user_contacts"][data-chat-open="0"] #RADL_dm_lock,
html[page_type="project"] #RADL[chat_open="0"] #RADL_dm_lock,
html[page_type="project"][data-chat-open="0"] #RADL_dm_lock,
html[page_type="news"] #RADL[chat_open="0"] #RADL_dm_lock,
html[page_type="news"][data-chat-open="0"] #RADL_dm_lock,
html[page_type="project_edit"] #RADL_dm_lock,
html[page_type="project_roles"] #RADL_dm_lock,
html[page_type="channel_edit"] #RADL_dm_lock,
html[page_type="group_edit"] #RADL_dm_lock,
html[page_type="user_settings"] #RADL_dm_lock {
    display: none !important;
}

/* Оверлей настроек проекта поверх чата — композер остаётся видимым */
html[data-project-settings-open="1"] #RADL_inputs {
    display: flex !important;
}

html[data-news-settings-open="1"] #RADL_inputs {
    display: flex !important;
}

#RADL_inputs[data-dm-locked="1"], 
#RADL_inputs[data-send-locked="1"] {
    display: none !important;
}

#RADL_dm_lock {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 15px;
    box-sizing: border-box;
    text-align: center;
    background: var(--color-panel-bg);
}

#RADL_dm_lock[hidden] {
    display: none !important;
}

.RADL_dm_lock-text {
    font-size: 90%;
    opacity: 0.9;
    line-height: 1.35;
}

.RADL_dm_lock-friend {
    align-self: flex-start;
    appearance: none;
    border: 1px solid var(--color-null-element-border);
    background: var(--color-null-element-bg);
    color: inherit;
    font: inherit;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.RADL_dm_lock-friend:hover {
    background: var(--color-list-bg);
}

.RADL_dm_lock-friend[hidden],
.RADL_dm_lock-friend.is-static,
.RADL_dm_lock-friend:disabled {
    cursor: default;
}

.RADL_dm_lock-friend.is-static,
.RADL_dm_lock-friend:disabled {
    opacity: 0.85;
}

.RADL_dm_lock-friend.is-static:hover,
.RADL_dm_lock-friend:disabled:hover {
    background: var(--color-null-element-bg);
}

html[page_type="user_contacts"] #RADL[chat_open="0"] #RADL_content,
html[page_type="user_contacts"][data-chat-open="0"] #RADL_content,
html[page_type="project"] #RADL[chat_open="0"] #RADL_content,
html[page_type="project"][data-chat-open="0"] #RADL_content,
html[page_type="news"][data-news-id] #RADL[chat_open="0"] #RADL_content,
html[page_type="news"][data-news-id][data-chat-open="0"] #RADL_content {
    justify-content: center;
    align-items: center;
    padding: 0;
}

html[page_type="channel_edit"] #RADL_content,
html[page_type="project_edit"] #RADL_content,
html[page_type="project_roles"] #RADL_content,
html[page_type="group_edit"] #RADL_content,
html[page_type="user_settings"] #RADL_content {
    overflow-y: auto;
    padding: 0;
    box-sizing: border-box;
}

#RADL[data-edit-bar="1"] #RADL_content {
    padding-bottom: 72px;
}

#RADL_messages {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 0px 0px 0px;
    box-sizing: border-box;
}

/* Прижимает ленту к низу, пока сообщений мало; при переполнении схлопывается. */
#RADL_messages:not(.RADL_messages--channel_edit)::before {
    content: '';
    flex: 1 1 0;
    min-height: 0;
}

.RADL_messages-empty {
    align-self: center;
    max-width: 28em;
    margin: 8px 0 4px;
    padding: 0 12px;
    box-sizing: border-box;
    text-align: center;
    font-size: 90%;
    line-height: 1.4;
    opacity: 0.55;
    color: inherit;
    user-select: none;
    pointer-events: none;
}

.RADL_messages-empty[hidden] {
    display: none !important;
}

/* ——— Поиск проектов ——— */

#projects_search,
#market_search,
#hub_search {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

#inventory_page,
#add_points_page {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 15px;
}

.search_mode_tabs {
    display: flex;
    width: 100%;
    max-width: 900px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 auto;
    padding-top: 72px;
}

.search_mode_tab {
    padding: 10px 16px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background: transparent;
    color: var(--color-ui-text);
    font: inherit;
    font-size: 95%;
    cursor: pointer;
    opacity: 0.72;
}

.search_mode_tab:hover {
    border-color: var(--color-btn-hover-border);
    opacity: 1;
}

.search_mode_tab.is-active {
    background: var(--color-null-element-bg);
    border-color: var(--color-btn-hover-border);
    opacity: 1;
    font-weight: 600;
    cursor: default;
}

.projects_search-bar {
    display: flex;
    width: 100%;
    max-width: 900px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding-top: 12px;
    padding-bottom: 20px;
}

.projects_search-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

#projects_search-input,
#market_search-input,
#hub_search-input {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 40px 0 14px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background-color: var(--color-null-element-bg);
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 100%;
    outline: none;
    box-sizing: border-box;
}

#projects_search-input:focus,
#market_search-input:focus,
#hub_search-input:focus {
    border-color: var(--color-btn-hover-border);
}

#projects_search-input::placeholder,
#market_search-input::placeholder,
#hub_search-input::placeholder {
    color: var(--color-null-element-text);
    opacity: 0.28;
}

#projects_search-input::-webkit-search-decoration,
#projects_search-input::-webkit-search-cancel-button,
#market_search-input::-webkit-search-decoration,
#market_search-input::-webkit-search-cancel-button,
#hub_search-input::-webkit-search-decoration,
#hub_search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

#projects_search-clear,
#market_search-clear,
#hub_search-clear {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: transparent;
    background-image: url(../../ico/bt/close.svg);
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 45%;
    background-size: var(--btn-icon-size);
    transform: translateY(-50%);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease;
}

#projects_search-clear[hidden],
#market_search-clear[hidden],
#hub_search-clear[hidden] {
    display: none !important;
}

#projects_search-bt,
#market_search-bt,
#hub_search-bt {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid transparent;
    background-color: transparent;
    background-image: url(../../ico/bt/search.svg);
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 55%;
    background-size: var(--btn-icon-size);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease;
}

.projects_search-title {
    font-size: 115%;
    font-weight: 700;
    line-height: 1.3;
}

/* Поиск: плитка — слева квадратный аватар, справа текст и кнопки внизу */
.search_results {
    --search-tile-thumb: 150px;
    --search-tile-gap: 12px;
    --search-tile-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

@media (min-width: 720px) {
    #projects_search .projects_search-grid.search_results,
    #users_search .users_search-list.search_results,
    #market_search .market_search-grid.search_results,
    html[page_type="news"] #hub_search-sections .hub_search-news-list.search_results {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
        gap: 10px;
    }
}

.search_result-item {
    position: relative;
    display: grid;
    grid-template-columns: var(--search-tile-thumb) minmax(0, 1fr);
    column-gap: var(--search-tile-gap);
    align-items: stretch;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #00000000;
    border-radius: 14px;
    background-color: var(--color-panel-bg);
    color: var(--color-ui-text);
    font: inherit;
    text-align: left;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

button.search_result-item {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.search_result-item:hover {
    border-color: #ffffff21;
}

.search_result-media {
    position: relative;
    grid-column: 1;
    grid-row: 1;
    width: var(--search-tile-thumb);
    align-self: start;
}

.search_result-pane {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: var(--search-tile-thumb);
}

.search_result-head {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.search_result-foot {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.search_result-foot:empty {
    display: none;
}

.search_result-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.search_result-thumb,
.users_search-list .user_item-avatar.search_result-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: var(--color-null-element-bg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border: 0;
    box-sizing: border-box;
    border-radius: var(--search-tile-radius);
}

.search_result-item[data-kind="user"] .search_result-thumb,
.search_result-item[data-kind="user"] .user_item-avatar.search_result-thumb {
    border-radius: 50%;
}

.search_result-item[data-kind="user"] .user_item-avatar.search_result-thumb[have_img="0"],
.users_search-list .user_item-avatar.search_result-thumb[have_img="0"] {
    background-image: url(../../ico/bt/avatar.svg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 42%;
}

.search_result-thumb[have_img="0"] {
    background-size: 42%;
}

.search_result-thumb[data-kind="project"][have_img="0"] {
    background-image: url(../../ico/bt/people.svg);
}

.search_result-thumb[data-kind="user"][have_img="0"] {
    background-image: url(../../ico/bt/avatar.svg);
}

.search_result-thumb[data-kind="news"][have_img="0"] {
    background-image: url(../../ico/bt/article.svg);
}

.search_result-thumb[data-kind="market"][have_img="0"] {
    background-image: url(../../ico/bt/gift.svg);
}

.search_result-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
}

.search_result-name {
    font-weight: 600;
    font-size: 95%;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search_result-sub {
    opacity: 0.65;
    font-size: 90%;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search_result-meta {
    font-size: 90%;
    opacity: 0.85;
}

.search_result-item.market_tile .market_tile-meta.search_result-meta {
    display: block;
    text-align: left;
}

.search_result-item.market_tile .market_tile-cost {
    display: block;
    margin-left: 0;
    font-size: 115%;
    font-weight: 700;
    line-height: 1.25;
    opacity: 1;
}

.search_result-badge,
.projects_search-tile-karma,
.market_tile-rating,
.hub_search-news-subs {
    display: inline-flex;
    align-items: center;
    margin: 0;
    min-width: 0;
    max-width: 100%;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.55);
    color: #f0f0f0;
    font-size: 75%;
    font-weight: 700;
    line-height: 1.4;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.search_result-badges:empty {
    display: none;
}

.search_result-head .users_search-tile-level.usr_lvl {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    flex: 0 0 auto;
    align-self: flex-start;
    width: 40px;
    height: 20px;
    margin: 0 0 4px;
    padding: 0;
    border-radius: 4px;
    background-color: transparent;
    max-width: none;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
}

.projects_search-tile,
.news_search-tile,
#hub_search-sections .hub_search-row.search_result-item {
    cursor: pointer;
}

.projects_search-tile-name {
    color: var(--color-ui-text);
}

.projects_search-tile-action,
.news_search-tile-action {
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
    padding: 7px 10px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 8px;
    background: var(--color-btn-bg);
    color: var(--color-btn-text);
    font: inherit;
    font-size: 85%;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
}

.projects_search-tile-action:hover:not(:disabled):not(.is-disabled),
.news_search-tile-action:hover {
    background: var(--color-btn-hover-bg);
    border-color: var(--color-btn-hover-border);
}

.projects_search-tile-action:disabled,
.projects_search-tile-action.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.news_search-tile-action.is-subscribed {
    opacity: 0.88;
}

#hub_search-sections .hub_search-news-row .search_result-body,
#hub_search-sections .hub_search-news-row .hub_search-news-body {
    min-width: 0;
    overflow: hidden;
}

.projects_search-status {
    opacity: 0.7;
    font-size: 95%;
}

@media (max-width: 719px) {
    .search_results {
        --search-tile-thumb: 100px;
    }
}

@media (max-width: 480px) {
    .search_result-item {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .search_result-name {
        -webkit-line-clamp: 2;
    }
}

/* ——— Поиск пользователей ——— */

#users_search {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 0 20px;
}

.users_search-bar {
    display: flex;
    width: 100%;
    max-width: 900px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    padding-top: 12px;
    padding-bottom: 20px;
}

.users_search-field {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}

#users_search-input {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 40px 0 14px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background-color: var(--color-null-element-bg);
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 100%;
    outline: none;
    box-sizing: border-box;
}

#users_search-input:focus {
    border-color: var(--color-btn-hover-border);
}

#users_search-input::placeholder {
    color: var(--color-null-element-text);
    opacity: 0.28;
}

#users_search-input::-webkit-search-decoration,
#users_search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

#users_search-clear {
    position: absolute;
    top: 50%;
    right: 4px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background-color: transparent;
    background-image: url(../../ico/bt/close.svg);
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 45%;
    background-size: var(--btn-icon-size);
    transform: translateY(-50%);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease;
}

#users_search-clear[hidden] {
    display: none !important;
}

#users_search-bt {
    position: relative;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid transparent;
    background-color: transparent;
    background-image: url(../../ico/bt/search.svg);
    background-repeat: no-repeat;
    background-position: center;
    --btn-icon-size: 55%;
    background-size: var(--btn-icon-size);
    cursor: pointer;
    box-sizing: border-box;
    transition: background-size 0.06s ease;
}

.users_search-title {
    font-size: 115%;
    font-weight: 700;
    line-height: 1.3;
}

.users_search-list.search_results {
    max-width: none;
}

.users_search-list .users_search-row.search_result-item {
    cursor: pointer;
}

#users_search .user_panel-status-dot,
.users_search-list .user_panel-status-dot {
    display: none !important;
}

.users_search-list .users_search-row .user_item-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0;
    box-sizing: border-box;
}

.users_search-list .user_item-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users_search-list .user_item-login {
    opacity: 0.65;
    font-size: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.users_search-list .user_item-login[hidden],
.users_search-list .user_item-text_status[hidden] {
    display: none !important;
}

.users_search-list .user_item-text_status {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 85%;
    opacity: 0.72;
    line-height: 1.25;
}

.users_search-list .user_item-text_status-inner {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    white-space: nowrap;
}

.users_search-list .user_item-text_status.is-marquee .user_item-text_status-inner {
    max-width: none;
    will-change: transform;
    animation-name: user_item_status_marquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.users_search-row-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.users_search-row-actions .users_search-row-btn {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
}

.users_search-row-actions .users_search-row-btn:only-child {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

.users_search-row-btn {
    margin: 0;
    padding: 6px 10px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 8px;
    background: var(--color-btn-bg);
    color: var(--color-btn-text);
    font: inherit;
    font-size: 85%;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
}

.users_search-row-btn:hover:not(:disabled):not(.is-static) {
    background: var(--color-btn-hover-bg);
    border-color: var(--color-btn-hover-border);
}

.users_search-row-btn:disabled,
.users_search-row-btn.is-static {
    opacity: 0.55;
    cursor: default;
}

.users_search-status {
    opacity: 0.7;
    font-size: 95%;
}

.market_search-grid .market_tile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 10px;
}

#projects_search_tip {
    position: fixed;
    z-index: 10050;
    max-width: min(320px, calc(100vw - 24px));
    max-height: min(240px, 40vh);
    overflow-y: auto;
    padding: 10px 12px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background: var(--color-panel-bg);
    color: var(--color-ui-text);
    font-size: 90%;
    line-height: 1.35;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    white-space: pre-wrap;
    word-break: break-word;
}

#projects_search_tip[hidden] {
    display: none !important;
}

.chat_unread_sep {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin: 4px 0;
    box-sizing: border-box;
    user-select: none;
    pointer-events: none;
}

.chat_unread_sep-line {
    flex: 1 1 auto;
    height: 1px;
    background-color: #d32f2f;
    opacity: 0.85;
}

.chat_unread_sep-text {
    flex: 0 0 auto;
    color: #d32f2f;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.chat_day_sep {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    width: 100%;
    max-width: none;
    margin: 10px 0 6px;
    box-sizing: border-box;
    user-select: none;
    pointer-events: none;
}

.chat_day_sep-line {
    flex: 1 1 auto;
    height: 1px;
    background-color: rgb(74 74 74 / 13%);
    opacity: 0.9;
}

.chat_day_sep-text {
    flex: 0 0 auto;
    color: var(--color-null-element-text, rgba(255, 255, 255, 0.55));
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.chat_msg {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    padding: 15px 20px;
    box-sizing: border-box;
}

.chat_msg:hover {
    background-color: rgb(0 0 0 / 7%);
}

.chat_msg.is-me {
    align-self: stretch;
}

.chat_msg-toolbar {
    position: absolute;
    top: -11px;
    right: 10px;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    background-color: #2b2b2bc2;
    border: 0;
    box-shadow: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.12s ease, visibility 0.12s ease;
}

.chat_msg:hover .chat_msg-toolbar,
.chat_msg.is-menu-open .chat_msg-toolbar,
.chat_msg-toolbar:focus-within {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.chat_msg-toolbar[hidden] {
    display: none !important;
}

.chat_msg-tool {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px;
    cursor: pointer;
    opacity: 0.72;
}

.chat_msg-tool:hover {
    background-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.chat_msg-tool[hidden] {
    display: none !important;
}

.chat_msg-tool.chat_msg-react {
    background-image: url('../../ico/bt/emoji-emotions.svg');
}

.chat_msg-tool.chat_msg-tool-reply {
    display: inline-flex;
    align-items: center;
    width: auto;
    min-width: 28px;
    padding: 0 8px 0 26px;
    background-image: url('../../ico/bt/reply.svg');
    background-position: 6px center;
    font: inherit;
    font-size: 75%;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

.chat_msg-tool.chat_msg-tool-reply .chat_msg-tool-label {
    line-height: 1;
}

@media (max-width: 1049px) {
    .chat_msg-tool.chat_msg-tool-reply {
        width: 28px;
        padding: 0;
        background-position: center;
    }

    .chat_msg-tool.chat_msg-tool-reply .chat_msg-tool-label {
        display: none;
    }
}

.chat_msg-tool.chat_msg-edit {
    background-image: url('../../ico/bt/edit.svg');
}

.chat_msg-tool.chat_msg-forward {
    background-image: url('../../ico/bt/forward.svg');
}

.chat_msg-tool.chat_msg-more {
    background-image: url('../../ico/bt/more-vert.svg');
}

.chat_msg-aside {
    flex: 0 0 auto;
    width: max-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chat_msg-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat_msg-head {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat_msg-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-null-element-border);
    background-color: var(--color-null-element-bg);
    background-image: url('../../ico/bt/avatar.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    overflow: hidden;
}

.chat_msg-avatar[have_img="1"] {
    background-size: cover;
}

.chat_msg-avatar[hidden] {
    display: none !important;
}

.chat_msg-avatar-letter {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    font-size: 75%;
    font-weight: 700;
    color: #ddd;
}

.chat_msg-author {
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    font-size: 90%;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--color-null-element-text);
}

.chat_msg-avatar.is-clickable,
.chat_msg-author.is-clickable {
    cursor: pointer;
}

.chat_msg.is-system-compact .chat_msg-aside,
.chat_msg.is-system-compact .chat_msg-avatar,
.chat_msg.is-system-compact .chat_msg-author,
.chat_msg.is-deleted .chat_msg-author {
    display: none;
}

.chat_msg.is-system-compact {
    justify-content: center;
}

.chat_msg.is-system-compact .chat_msg-content {
    flex: 0 1 auto;
    align-items: center;
}

.chat_msg.is-system-compact .chat_msg-head {
    justify-content: center;
}

.chat_msg-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat_msg-body {
    padding: 0px 0px 2px 0px;
    white-space: pre-wrap;
    word-break: break-word;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -webkit-touch-callout: default !important;
}

.chat_msg-link {
    color: #a39bf1;
    text-decoration: underline;
    word-break: break-all;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -webkit-touch-callout: default !important;
    -webkit-user-drag: none !important;
    user-drag: none !important;
    touch-action: manipulation;
}

/* Перебиваем #UI { user-select: none } — иначе long-press не выделяет ссылку. */
#UI .chat_msg-body,
#UI .chat_msg-link,
html[data-mobile="1"] .chat_msg-link,
#RADL_messages .chat_msg-body .chat_msg-link,
#feed_list .chat_msg-body .chat_msg-link {
    -webkit-user-drag: none !important;
    user-drag: none !important;
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    touch-action: manipulation;
    -webkit-touch-callout: default !important;
}

/* Выделение / long-press: не менять цвет и не снимать underline. */
.chat_msg-link:hover,
.chat_msg-link:active,
.chat_msg-link:focus,
html[data-mobile="1"] .chat_msg-link:hover,
html[data-mobile="1"] .chat_msg-link:active,
html[data-mobile="1"] .chat_msg-link:focus {
    color: #a39bf1 !important;
    text-decoration: underline !important;
    opacity: 1 !important;
}

.chat_msg-link::selection,
.chat_msg-link *::selection {
    background: rgba(163, 155, 241, 0.35);
    color: #a39bf1;
    text-decoration: underline;
}

.chat_msg-link::-moz-selection,
.chat_msg-link *::-moz-selection {
    background: rgba(163, 155, 241, 0.35);
    color: #a39bf1;
    text-decoration: underline;
}

.chat_msg-ref {
    word-break: break-word;
    font-weight: 700;
    text-decoration: none;
}

.chat_msg-ref.is-ok {
    color: #a39bf1;
    cursor: pointer;
}

.chat_msg-ref.is-ok:hover {
    text-decoration: underline;
}

button.chat_msg-hashtag {
    border: none;
    margin: 0;
    padding: 0;
    background: none;
    font: inherit;
    text-align: inherit;
}

.chat_msg-hashtag.is-active {
    text-decoration: underline;
}

.chat_msg-ref.is-missing {
    color: #e05555;
    cursor: default;
}

.chat_msg.is-me .chat_msg-body {
    /* возможно покрасить */
}

.chat_msg.is-publishing {
    opacity: 0.82;
}

.chat_msg.is-publishing .chat_msg-time::after {
    content: ' · публикация…';
    font-style: italic;
}

.chat_msg.is-system {
    max-width: 100%;
}

.chat_msg.is-system-compact {
    align-self: center;
    max-width: 92%;
    background: transparent;
    padding: 2px 8px;
}

.chat_msg.is-system-compact:hover {
    background: transparent;
}

.chat_msg.is-system-compact .chat_msg-body {
    padding: 4px 8px;
    background: transparent;
    border: none;
    text-align: center;
    opacity: 0.72;
    font-size: 85%;
    color: #c8c8c8;
}

.chat_msg.is-system-compact .chat_msg-meta {
    margin-left: 0;
    justify-content: center;
    opacity: 0.5;
    font-size: 65%;
}

.chat_msg.is-system-normal .chat_msg-avatar[have_img="1"] {
    background-size: 72%;
    background-color: #1c1c1c;
}

.chat_msg-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    margin-left: 4px;
    font-size: 70%;
    opacity: 0.55;
}

.chat_msg-time {
    cursor: default;
}

.chat_msg-edited {
    font-style: italic;
}

.chat_msg-edited[hidden] {
    display: none !important;
}

.chat_msg-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
}

.chat_msg-attachments[hidden] {
    display: none !important;
}

.chat_msg-att-image-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    max-width: min(100%, 420px);
    contain: layout style;
}

.chat_msg-att-image-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 4px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    flex: 0 0 auto;
}

.chat_msg-att-image-group .chat_msg-att--image {
    min-width: 0;
    max-width: 100%;
    max-height: 500px;
    overflow: hidden;
    box-sizing: border-box;
    border: solid 1px transparent;
}

.chat_msg-att-image-group[data-image-count="1"] .chat_msg-att--image {
    max-height: 600px;
}

.chat_msg-att-image-group.is-two-side-by-side .chat_msg-att-image-row--pair {
    flex-wrap: nowrap;
    align-items: stretch;
    overflow: hidden;
}

.chat_msg-att-image-group .chat_msg-att--image.is-box-sized {
    aspect-ratio: auto;
    max-width: none;
}

.chat_msg-att-image-group .chat_msg-att--image.has-dims {
    aspect-ratio: var(--att-w) / var(--att-h);
}

.chat_msg-att-image-group .chat_msg-att--image.no-dims {
    aspect-ratio: 4 / 3;
}

.chat_msg-att-image-group .chat_msg-att--image .chat_msg-att-thumb {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.chat_msg-embeds {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
    max-width: min(100%, 420px);
}

.chat_msg-embeds[hidden] {
    display: none !important;
}

.chat_msg-embed--video {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.35);
    text-align: left;
    color: inherit;
    font: inherit;
}

.chat_msg-embed-cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
}

.chat_msg-embed-thumb {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat_msg-embed-thumb.is-empty {
    width: 100%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(0, 0, 0, 0.35));
}

.chat_msg-embed-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.chat_msg-embed-play::before {
    content: '';
    position: absolute;
    left: 52%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent #fff;
}

.chat_msg-embed--video:hover .chat_msg-embed-play {
    background: rgba(0, 0, 0, 0.7);
}

.chat_msg-embed-title {
    display: block;
    padding: 8px 10px;
    font-size: 85%;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 0.9;
}

.chat_msg-embed--link {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.chat_msg-embed--link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chat_msg-embed-link-media {
    flex: 0 0 96px;
    width: 96px;
    min-height: 72px;
    max-height: 96px;
    background: rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.chat_msg-embed-link-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat_msg-embed-link-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px 10px;
}

.chat_msg-embed-link-host {
    font-size: 70%;
    opacity: 0.55;
    text-transform: lowercase;
}

.chat_msg-embed-link-title {
    font-size: 90%;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat_msg-embed-link-desc {
    font-size: 75%;
    line-height: 1.3;
    opacity: 0.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.chat_msg-att {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    cursor: pointer;
    box-sizing: border-box;
}

.chat_msg-att--image {
    display: inline-flex;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    max-width: min(100%, 420px);
    max-height: 360px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.chat_msg-att--image.has-dims {
    width: min(100%, 420px, calc(360px * var(--att-w) / var(--att-h)));
    aspect-ratio: var(--att-w) / var(--att-h);
}

.chat_msg-att--image.no-dims {
    width: min(100%, 280px);
    aspect-ratio: 4 / 3;
    min-height: 120px;
}

.chat_msg-att-thumb {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 360px;
    height: auto;
    object-fit: contain;
}

.chat_msg-att--image.has-dims .chat_msg-att-thumb,
.chat_msg-att--image.no-dims .chat_msg-att-thumb {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: 50% 20%;
}

.chat_msg-att-image-group .chat_msg-att--image.has-dims .chat_msg-att-thumb,
.chat_msg-att-image-group .chat_msg-att--image.no-dims .chat_msg-att-thumb {
    object-fit: contain;
    object-position: 50% 20%;
}

.chat_msg-att-image-group .chat_msg-att--image.is-cover-fill {
    aspect-ratio: auto;
    max-width: none;
}

.chat_msg-att-image-group .chat_msg-att--image.is-cover-fill .chat_msg-att-thumb {
    object-fit: cover;
    object-position: 50% 20%;
}

.chat_msg-att--placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 64px;
    padding: 10px 12px;
    border: 1px dashed var(--color-null-element-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.18);
    cursor: default;
}

.chat_msg-att-image-group .chat_msg-att--placeholder {
    height: 100%;
    min-height: 0;
}

.chat_msg-att-placeholder-spinner {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-top-color: currentColor;
    border-radius: 50%;
}

.chat_msg-att--placeholder.is-uploading .chat_msg-att-placeholder-spinner {
    animation: chat_att_upload_spin 0.8s linear infinite;
}

.chat_msg-att--placeholder.is-missing .chat_msg-att-placeholder-spinner {
    border: 0;
    border-radius: 0;
    background: url('../../ico/bt/close.svg') center / contain no-repeat;
    opacity: 0.75;
}

.chat_msg-att-placeholder-body {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.chat_msg-att-placeholder-name,
.chat_msg-att-placeholder-state {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat_msg-att-placeholder-state {
    font-size: 78%;
    opacity: 0.7;
}

@keyframes chat_att_upload_spin {
    to { transform: rotate(360deg); }
}

.chat_msg-att--audio,
.chat_msg-att--m3u,
.chat_msg-att--video,
.chat_msg-att--file {
    width: 100%;
    max-width: min(100%, 420px);
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.22);
}

.chat_msg-att--video.has-preview {
    display: block;
    width: fit-content;
    max-width: min(100%, 420px);
    padding: 0;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    align-items: stretch;
}

.chat_msg-att--audio:hover,
.chat_msg-att--m3u:hover,
.chat_msg-att--video:hover,
.chat_msg-att--file:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chat_msg-att--video.has-preview:hover {
    background: rgba(0, 0, 0, 0.4);
}

.chat_msg-att-cover {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 500px;
    aspect-ratio: 16 / 9;
    background: #1a1a1a;
}

.chat_msg-att-cover.has-dims {
    width: min(100%, calc(500px * var(--att-w) / var(--att-h)));
    max-height: 500px;
    height: auto;
    aspect-ratio: var(--att-w) / var(--att-h);
}

.chat_msg-att-thumb--video {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center;
}

.chat_msg-att-play-overlay {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    margin: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.55);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.chat_msg-att-play-overlay::before {
    content: '';
    position: absolute;
    left: 52%;
    top: 50%;
    transform: translate(-40%, -50%);
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 9px 0 9px 16px;
    border-color: transparent transparent transparent #fff;
}

.chat_msg-att--video.has-preview:hover .chat_msg-att-play-overlay {
    background: rgba(0, 0, 0, 0.7);
}

.chat_msg-att-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.chat_msg-att-footer .chat_msg-att-name {
    flex: 1 1 auto;
}

.chat_msg-att-footer .chat_msg-att-meta {
    flex: 0 0 auto;
}

.chat_msg-att-footer .chat_msg-att-download {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin-left: 0;
    border: 0;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background-color: transparent;
    background-image: url('../../ico/bt/download.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    opacity: 0.9;
}

.chat_msg-att-footer .chat_msg-att-download:hover {
    background-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.chat_msg-att-cover-img {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.25);
}

.chat_msg-att-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat_msg-att--audio,
.chat_msg-att--m3u,
.chat_msg-att--video:not(.has-preview),
.chat_msg-att--file {
    min-height: 46px;
}

.chat_msg-att-meta {
    font-size: 75%;
    opacity: 0.65;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.15em;
}

.chat_msg-att-icon,
.chat_msg-att-download,
.chat_msg-att-play {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    opacity: 0.9;
}

.chat_msg-att-icon--insert-drive-file { background-image: url('../../ico/bt/insert-drive-file.svg'); }

.chat_msg-att-icon--picture-as-pdf { background-image: url('../../ico/bt/picture-as-pdf.svg'); }

.chat_msg-att-icon--folder-zip { background-image: url('../../ico/bt/folder-zip.svg'); }

.chat_msg-att-icon--image { background-image: url('../../ico/bt/image.svg'); }

.chat_msg-att-icon--table-chart { background-image: url('../../ico/bt/table-chart.svg'); }

.chat_msg-att-icon--slideshow { background-image: url('../../ico/bt/slideshow.svg'); }

.chat_msg-att-icon--code { background-image: url('../../ico/bt/code.svg'); }

.chat_msg-att-icon--article { background-image: url('../../ico/bt/article.svg'); }

.chat_msg-att-icon--audio-file { background-image: url('../../ico/bt/audio-file.svg'); }

.chat_msg-att-icon--videocam { background-image: url('../../ico/bt/videocam.svg'); }

.chat_msg-att-download {
    margin-left: auto;
    background-image: url('../../ico/bt/download.svg');
}

.chat_msg-att-play {
    margin-left: auto;
    background-image: url('../../ico/bt/play-arrow.svg');
}

.chat_msg-att--audio .chat_msg-att-play,
.chat_msg-att--m3u .chat_msg-att-play {
    margin-left: auto;
}

.chat_msg-att--audio .chat_msg-att-download,
.chat_msg-att--m3u .chat_msg-att-download,
.chat_msg-att--m3u .chat_msg-att-stream {
    margin-left: 0;
}

.chat_msg-att-stream {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    background-color: transparent;
    background-image: url('../../ico/bt/public.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    opacity: 0.9;
    appearance: none;
    -webkit-appearance: none;
}

.chat_msg-att-stream:hover {
    background-color: rgba(255, 255, 255, 0.08);
    opacity: 1;
}

.chat_msg-att--m3u.is-missing-stream .chat_msg-att-play {
    opacity: 0.35;
    pointer-events: none;
}

.chat_msg-att-play.is-playing {
    background-image: url('../../ico/bt/pause.svg');
}

button.chat_msg-att-download {
    border: 0;
    padding: 0;
    cursor: pointer;
    background-color: transparent;
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
}

button.chat_msg-att-download:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
}

.chat_msg-att-name {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 1.15em;
    font-size: 85%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat_msg-actions {
    display: none !important;
}

.chat_msg-reactions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    margin: 6px 0 0;
}

.chat_msg-reactions[hidden] {
    display: none !important;
}

.chat_msg-reaction-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.chat_msg-reply-btn {
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-null-element-border);
    color: inherit;
    opacity: 0.65;
    font: inherit;
    font-size: 80%;
    font-weight: 600;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    height: 31px;
}

.chat_msg-reply-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.08);
}

.chat_msg-react-add {
    flex: 0 0 auto;
    width: 31px;
    height: 31px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.06);
    background-image: url('../../ico/bt/add.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px 16px;
    cursor: pointer;
    opacity: 0.75;
}

.chat_msg-react-add:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

.chat_msg-reaction {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    cursor: pointer;
    padding: 2px 8px 2px 4px;
    font: inherit;
    font-size: 75%;
    line-height: 1;
}

.chat_msg-reaction.is-me {
    border-color: rgba(164, 163, 255, 0.65);
    background: rgba(164, 163, 255, 0.14);
}

.chat_msg-reaction img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.chat_msg-reaction-count {
    opacity: 0.85;
}

.IFM_msg_more_menu {
    position: fixed;
    z-index: 1210;
    min-width: 200px;
    width: max-content;
    max-width: min(320px, 78vw);
    overflow: visible;
    padding: 15px;
    box-sizing: border-box;
    background-color: #2b2b2bde;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.IFM_msg_more_menu[hidden] {
    display: none !important;
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="reply"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/reply.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="forward"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/forward.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="edit"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/edit.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="push-pin"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/push-pin.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="emoji-emotions"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/emoji-emotions.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="content-copy"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/content-copy.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="link"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/link.svg');
}

.IFM_msg_more_menu .LAUL_menu-item[data-icon="delete"] .LAUL_menu-item-ico {
    background-image: url('../../ico/bt/delete.svg');
}

.IFM_msg_react_picker {
    position: fixed;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    max-width: min(320px, 70vw);
    max-height: 280px;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
    background-color: var(--color-null-element-bg);
    border: 1px solid var(--color-null-element-border);
    border-radius: 12px;
    box-shadow: 0 0px 30px 2px rgba(0, 0, 0, 0.35);
}

.IFM_msg_react_picker[hidden] {
    display: none !important;
}

.IFM_msg_react_picker .RADL_picker_scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.IFM_msg_react_picker .RADL_pack_bar {
    flex: 0 0 auto;
}

.chat_msg.is-pinned {
    box-shadow: inset 3px 0px 0px rgba(164, 163, 255, 0.75);
    background-color: rgb(164 163 255 / 5%);
}

.chat_msg.is-pinned:hover {
    background-color: rgba(164, 163, 255, 0.075);
}

.chat_msg.is-deleted .chat_msg-body {
    opacity: 0.55;
    font-style: italic;
}

.chat_msg.is-deleted .chat_msg-restore {
    margin-left: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--color-lpd-active-border, #8d87fb);
    font: inherit;
    font-style: normal;
    opacity: 1;
    cursor: pointer;
    text-decoration: underline;
    user-select: none;
}

.chat_msg.is-deleted .chat_msg-restore:hover {
    opacity: 0.85;
}

.chat_msg.is-deleted .chat_msg-restore:disabled {
    opacity: 0.5;
    cursor: default;
    text-decoration: none;
}

.RADL_inputs-progress-label {
    font-size: 90%;
}

.RADL_inputs-progress-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.RADL_inputs-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--color-lpd-active-border);
    transition: width 0.1s linear;
}

.RADL_inputs-progress-pct {
    font-size: 85%;
    opacity: 0.85;
}

.RADL_messages--channel_edit,
.RADL_messages--group_edit {
    height: auto;
    overflow: visible;
    padding: 0;
}

#RADL_inputs-reply,
#RADL_inputs-edit {
    order: -1;
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    margin: 0 0 8px;
    border-left: 3px solid var(--color-lpd-active-border, #8d87fb);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 4px;
    font-size: 90%;
    box-sizing: border-box;
    position: relative;
    z-index: 2;
}

#RADL_inputs-reply[hidden],
#RADL_inputs-edit[hidden] {
    display: none !important;
}

#RADL_inputs-edit.is-open {
    display: flex !important;
}

#RADL_inputs[data-edit="1"] #RADL_inputs-edit:not([hidden]) {
    display: flex !important;
}

.RADL_inputs-reply-label,
.RADL_inputs-edit-label {
    flex: 0 0 auto;
    font-weight: 600;
    opacity: 0.7;
    font-size: 85%;
}

.RADL_inputs-edit-label {
    flex: 1 1 auto;
    min-width: 0;
    opacity: 0.9;
}

.RADL_inputs-reply-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.RADL_inputs-reply-name {
    font-weight: 600;
    opacity: 0.9;
}

.RADL_inputs-reply-preview {
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.RADL_inputs-reply-preview .chat_emoji,
.chat_msg-reply-preview .chat_emoji {
    width: 1.1em;
    height: 1.1em;
    margin: 0 0.05em;
    vertical-align: -0.15em;
}

#RADL_inputs-reply_cancel,
#RADL_inputs-edit_cancel {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    opacity: 0.7;
    cursor: pointer;
    width: 20px;
    height: 20px;
    padding: 0;
    background-image: url('../../ico/bt/close.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

#RADL.is-file-drag #RADL_content,
#RADL.is-file-drag #RADL_inputs {
    /* legacy outline removed — используем #RADL_file_drop_overlay */
}

#RADL_file_drop_overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 80;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    box-sizing: border-box;
    border: 2px dashed var(--color-lpd-active-border, #8d87fb);
    border-radius: 8px;
    background: rgba(20, 20, 24, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#RADL.is-file-drag #RADL_file_drop_overlay {
    display: flex;
}

/* На смартфоне DnD файлов нет — long-press текста не должен показывать overlay. */
html[data-mobile="1"] #RADL_file_drop_overlay,
html[data-ifm-native="android"] #RADL_file_drop_overlay,
html[data-mobile="1"] #RADL.is-file-drag #RADL_file_drop_overlay,
html[data-ifm-native="android"] #RADL.is-file-drag #RADL_file_drop_overlay {
    display: none !important;
}

#RADL_file_drop_overlay-label {
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: var(--color-null-element-text, #fff);
    font-size: 95%;
    font-weight: 600;
    pointer-events: none;
}

.chat_msg-reply {
    margin-bottom: 4px;
    padding: 4px 8px;
    border-left: 3px solid rgba(141, 135, 251, 0.85);
    background: #8d87fb26;
    border-radius: 3px;
    cursor: pointer;
    font-size: 90%;
}

.chat_msg-reply-name {
    display: block;
    font-weight: 600;
    opacity: 0.9;
}

.chat_msg-reply-preview {
    display: block;
    opacity: 0.75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat_msg-fwd {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 6px;
}

.chat_msg-forward-quote {
    padding: 6px 10px;
    border-left: 3px solid rgba(141, 135, 251, 0.85);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    font-size: 90%;
}

.chat_msg-forward-name {
    display: block;
    margin: 0 0 2px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    opacity: 0.95;
    text-align: left;
    cursor: default;
}

.chat_msg-forward-name.is-clickable {
    cursor: pointer;
}

.chat_msg-forward-name.is-clickable:hover {
    text-decoration: underline;
    opacity: 1;
}

.chat_msg-forward-preview {
    display: block;
    opacity: 0.78;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 4.8em;
    overflow: hidden;
}

.chat_msg-forward-quote .chat_msg-attachments {
    margin-top: 8px;
}

.chat_msg-forward-source {
    align-self: flex-start;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #a39bf1;
    font: inherit;
    font-size: 85%;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}

.chat_msg-forward-source:hover {
    text-decoration: underline;
}

.IFM_msg_forward {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.IFM_msg_forward[hidden] {
    display: none !important;
}

.IFM_msg_forward-dialog {
    width: min(420px, 100%);
    max-height: min(72vh, 560px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    box-sizing: border-box;
    background: var(--color-null-element-bg);
    border: 1px solid var(--color-null-element-border);
    border-radius: 12px;
    box-shadow: 0 0 30px 2px rgba(0, 0, 0, 0.35);
    color: var(--color-ui-text, inherit);
}

.IFM_msg_forward-title {
    margin: 0;
    font-size: 110%;
    font-weight: 700;
}

.IFM_msg_forward-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.IFM_msg_forward-empty {
    opacity: 0.6;
    font-size: 90%;
    padding: 12px 4px;
    text-align: center;
}

.IFM_msg_forward-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    box-sizing: border-box;
}

.IFM_msg_forward-row:hover {
    background: rgba(255, 255, 255, 0.06);
}

.IFM_msg_forward-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-null-element-border);
    background-color: var(--color-null-element-bg);
    background-image: url('../../ico/bt/avatar.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 70%;
    overflow: hidden;
}

.IFM_msg_forward-avatar[have_img="1"] {
    background-size: cover;
}

.IFM_msg_forward-avatar--favorites {
    background-image: url('../../ico/bt/bookmark-white.svg');
    background-size: 55%;
    background-color: rgba(93, 92, 181, 0.28);
    border-color: rgba(93, 92, 181, 0.45);
}

.IFM_msg_forward-row.is-favorites {
    order: -1;
}

.IFM_msg_forward-meta {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.IFM_msg_forward-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.IFM_msg_forward-login {
    font-size: 85%;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.IFM_msg_forward-send {
    flex: 0 0 auto;
    border: 0;
    border-radius: 8px;
    padding: 7px 12px;
    background: rgba(164, 163, 255, 0.2);
    color: inherit;
    font: inherit;
    font-size: 85%;
    font-weight: 600;
    cursor: pointer;
}

.IFM_msg_forward-send:hover {
    background: rgba(164, 163, 255, 0.32);
}

.IFM_msg_forward-send[disabled] {
    opacity: 0.5;
    cursor: default;
}

.IFM_msg_forward-close {
    align-self: flex-end;
}

.project_roles_perm_group {
    grid-column: 1 / -1;
    font-weight: 600;
    opacity: 0.85;
    padding: 8px 0 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 4px;
}

.project_roles_perm_group:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
}

.user_card-last_seen {
    font-size: 90%;
    opacity: 0.75;
}

/* Market / inventory */
.search_promo_banner {
    position: relative;
    width: 100%;
    height: 0;
    max-height: none;
    padding-top: var(--promo-banner-height-pct, 25%);
    margin: 0 0 10px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--color-null-element-border, #444);
    background: var(--color-panel-bg, #222) center / cover no-repeat;
    box-sizing: border-box;
}

.search_promo_banner[hidden] {
    display: none !important;
}

.search_promo_banner-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    box-sizing: border-box;
    text-align: center;
    background: var(--promo-banner-shade-bg, rgba(0, 0, 0, 0.35));
}

.search_promo_banner-inner[data-content-layout="left"] {
    padding-right: 50%;
}

.search_promo_banner-inner[data-content-layout="right"] {
    padding-left: 50%;
}

.search_promo_banner-text {
    font-size: 95%;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    white-space: pre-wrap;
    word-break: break-word;
}

.search_promo_banner-btn {
    border: 0;
    border-radius: 7px;
    padding: 5px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.search_promo_banner-btn[hidden] {
    display: none !important;
}

#market_cats,
.market_cats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 auto;
    width: 100%;
    max-width: 900px;
}

.market_cats-roots,
.market_cats-level {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.market_cat_chip {
    border: 1px solid var(--color-null-element-border, #444);
    background: transparent;
    color: inherit;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font: inherit;
}

.market_cat_chip.is-active {
    border-color: var(--color-lpd-active-border, #6aa8ff);
    background: rgba(106, 168, 255, 0.12);
    font-weight: 600;
}

.market_search-grid .search_result-item.market_tile {
    cursor: pointer;
}

.inventory_grid .inventory_tile,
.inventory_tile {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 0 0 250px;
    width: 250px;
    height: auto;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--color-null-element-border, #444);
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: default;
    text-align: left;
    font: inherit;
    box-sizing: border-box;
}

.market_tile:not(.search_result-item),
.inventory_tile {
    cursor: default;
}

.market_tile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    background: var(--color-panel-bg, #222);
}

.market_tile-img--empty,
.inventory_tile-img--empty {
    min-height: 120px;
}

.inventory_tile-img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: 8px;
    background: var(--color-panel-bg, #222);
}

.market_tile-name,
.inventory_tile-name {
    word-break: break-word;
}

.market_tile-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.market_tile-xp {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.market_tile-xp.is-pos {
    color: #7ecf8a;
}

.market_tile-xp.is-neg {
    color: #e07070;
}

.market_tile-cost {
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
    margin-left: auto;
}

.market_buy_modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}

.market_buy_dialog {
    width: min(460px, 100%);
    background: var(--color-null-element-bg, #1c1c1c);
    border: 1px solid var(--color-null-element-border, #444);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--color-ui-text, inherit);
    box-sizing: border-box;
}

.market_buy_dialog--shop {
    width: min(920px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
}

.market_buy_grid {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(220px, 1.1fr);
    grid-template-rows: auto 1fr;
    gap: 12px 14px;
    align-items: start;
}

.market_buy_grid.has-thumbs {
    grid-template-columns: minmax(72px, 96px) minmax(140px, 1fr) minmax(220px, 1.1fr);
}

.market_buy_grid:not(.has-thumbs) .market_buy_hero {
    grid-column: 1;
}

.market_buy_grid:not(.has-thumbs) .market_buy_info {
    grid-column: 2;
}

.market_buy_grid.has-thumbs .market_buy_hero {
    grid-column: 2;
}

.market_buy_grid.has-thumbs .market_buy_info {
    grid-column: 3;
}

.market_buy_thumbs {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.market_buy_thumbs[hidden],
.market_buy_grid:not(.has-thumbs) .market_buy_thumbs {
    display: none !important;
}

.market_buy_thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 8px;
    background: var(--color-panel-bg, #222);
    cursor: pointer;
    overflow: hidden;
}

.market_buy_thumb.is-active {
    border-color: var(--color-accent, #6ab3ff);
}

.market_buy_thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.market_buy_hero {
    grid-row: 1 / span 2;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-null-element-border, #444);
    border-radius: 10px;
    background: var(--color-panel-bg, #222);
    padding: 8px;
    box-sizing: border-box;
}

.market_buy_hero img {
    max-width: 100%;
    max-height: min(360px, 50vh);
    object-fit: contain;
}

.market_buy_info {
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.market_buy_type {
    display: inline-block;
    align-self: flex-start;
    max-width: 100%;
    box-sizing: border-box;
    padding: 5px 11px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 88%;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.market_buy_type--gift {
    color: #ece4ff;
    background: rgba(142, 108, 255, 0.32);
    border-color: rgba(201, 184, 255, 0.5);
}

.market_buy_type--cool_ava {
    color: #c8f5ee;
    background: rgba(56, 178, 172, 0.26);
    border-color: rgba(94, 210, 198, 0.45);
}

.market_buy_type--cool_mini_bg {
    color: #d4e8ff;
    background: rgba(74, 128, 220, 0.28);
    border-color: rgba(130, 175, 255, 0.45);
}

.market_buy_type--cool_mini_border {
    color: #ddd6ff;
    background: rgba(108, 92, 231, 0.26);
    border-color: rgba(165, 148, 255, 0.42);
}

.market_buy_type--cool_msg_border {
    color: #ffd8ef;
    background: rgba(200, 88, 150, 0.24);
    border-color: rgba(240, 140, 190, 0.42);
}

.market_buy_type--pack_react {
    color: #ffe8c4;
    background: rgba(210, 140, 48, 0.28);
    border-color: rgba(240, 185, 90, 0.45);
}

.market_buy_type--pack_sticker {
    color: #d4f5c8;
    background: rgba(72, 160, 88, 0.26);
    border-color: rgba(120, 200, 130, 0.45);
}

.market_buy_type--booster {
    color: #fff4c2;
    background: rgba(200, 160, 40, 0.3);
    border-color: rgba(235, 200, 90, 0.48);
}

.market_buy_type--cool {
    color: #d0e4ff;
    background: rgba(90, 130, 200, 0.24);
    border-color: rgba(140, 175, 230, 0.4);
}

.market_buy_type--custom {
    color: #e2e2e2;
    background: rgba(120, 120, 128, 0.28);
    border-color: rgba(170, 170, 178, 0.38);
}

.market_buy_rating_row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 92%;
}

.market_buy_rating_avg {
    opacity: 0.9;
}

.market_buy_actions_row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.market_buy_icon_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--color-null-element-border, #444);
    background: var(--color-panel-bg, #2a2a2a);
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-size: 92%;
    box-sizing: border-box;
}

.market_buy_icon_btn-ico {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.market_buy_icon_btn--rate .market_buy_icon_btn-ico {
    background-image: url('../../ico/bt/sparkle.svg');
    opacity: 0.92;
}

.market_buy_icon_btn--rate .market_buy_icon_btn-text {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.market_buy_icon_btn-label {
    line-height: 1.2;
}

.market_buy_icon_btn--rate .market_buy_icon_btn-label {
    margin-right: 2px;
}

.market_buy_icon_btn--rate .market_buy_rate_val {
    font-weight: 600;
}

.market_buy_icon_btn--rate .market_buy_rate_sep {
    opacity: 0.45;
    font-size: 85%;
}

.market_buy_icon_btn--rate .market_buy_rate_count {
    opacity: 0.82;
    font-size: 90%;
}

.market_buy_icon_btn--fav .market_buy_icon_btn-ico {
    background-image: url('../../ico/bt/star-outline.svg');
}

.market_buy_icon_btn--fav.is-on .market_buy_icon_btn-ico {
    background-image: url('../../ico/bt/star-filled.svg');
    opacity: 1;
}

.market_buy_icon_btn--fav {
    padding: 0 10px;
}

.market_buy_icon_btn.is-on {
    border-color: var(--color-accent, #6ab3ff);
}

.market_buy_icon_btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.market_buy_traits {
    font-size: 92%;
    line-height: 1.45;
    opacity: 0.92;
}

.market_buy_traits-line + .market_buy_traits-line {
    margin-top: 4px;
}

.market_buy_traits-line .market_tile-xp {
    display: inline;
}

.market_buy_recipient {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 92%;
}

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

.market_buy_recipient_card {
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--color-null-element-border, #444);
    background: var(--color-panel-bg, #222);
}

.market_buy_recipient_card .market_user_pick_hit {
    padding: 0;
    border: 0;
    background: transparent;
}

.market_favorites_dialog {
    width: min(720px, 100%);
    max-height: min(85vh, 640px);
    overflow: auto;
}

.market_favorites_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.market_rate_stars {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 12px 0;
}

.market_rate_star {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    background: transparent url('../../ico/bt/star-outline.svg') center / 100% no-repeat;
    cursor: pointer;
    opacity: 0.45;
}

.market_rate_star.is-on {
    background-image: url('../../ico/bt/star-filled.svg');
    opacity: 1;
}

.market_user_pick_result {
    min-height: 0;
}

.market_user_pick_result[hidden] {
    display: none !important;
}

.market_user_pick_hit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--color-null-element-border, #444);
    background: var(--color-panel-bg, #222);
}

.market_user_pick_hit-avatar {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-null-element-bg, #1c1c1c);
}

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

.market_user_pick_hit-name {
    font-weight: 600;
    line-height: 1.3;
}

.market_user_pick_hit-login {
    font-size: 90%;
    line-height: 1.25;
    opacity: 0.82;
}

.market_user_pick_miss {
    font-size: 92%;
    line-height: 1.4;
    opacity: 0.88;
}

@media (max-width: 800px) {
    .market_buy_modal:has(.market_buy_dialog--shop) {
        align-items: flex-start;
        padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px))
            max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    }

    .market_buy_dialog--shop {
        width: 100%;
        max-width: none;
        max-height: min(94dvh, 100%);
        margin: 0 auto;
        padding: 12px;
        border-radius: 10px;
        max-width: 500px;
    }

    .market_buy_dialog--shop .market_buy_grid,
    .market_buy_dialog--shop .market_buy_grid.has-thumbs {
        grid-template-columns: 1fr;
        grid-template-rows: none;
        gap: 10px;
    }

    .market_buy_dialog--shop .market_buy_thumbs {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        flex-wrap: nowrap;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        padding-bottom: 2px;
    }

    .market_buy_dialog--shop .market_buy_thumb {
        width: 64px;
        height: 64px;
    }

    .market_buy_dialog--shop .market_buy_hero,
    .market_buy_dialog--shop .market_buy_grid:not(.has-thumbs) .market_buy_hero,
    .market_buy_dialog--shop .market_buy_grid.has-thumbs .market_buy_hero {
        grid-column: 1;
        grid-row: auto;
        min-height: 140px;
    }

    .market_buy_dialog--shop .market_buy_hero img {
        max-height: min(220px, 38vh);
    }

    .market_buy_dialog--shop .market_buy_info,
    .market_buy_dialog--shop .market_buy_grid:not(.has-thumbs) .market_buy_info,
    .market_buy_dialog--shop .market_buy_grid.has-thumbs .market_buy_info {
        grid-column: 1;
        grid-row: auto;
    }

    .market_buy_dialog--shop .market_buy_title {
        font-size: 122%;
    }

    .market_buy_dialog--shop .market_buy_cost {
        font-size: 112%;
    }

    .market_buy_dialog--shop .market_buy_actions_row {
        flex-direction: column;
        align-items: stretch;
    }

    .market_buy_dialog--shop .market_buy_icon_btn {
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    .market_buy_dialog--shop .market_buy_recipient_pick {
        align-self: stretch;
        width: 100%;
        justify-content: center;
    }

    .market_buy_dialog--shop .market_buy_actions {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .market_buy_dialog--shop .market_buy_actions .user_panel-menu-btn {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
}

.market_buy_product {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.market_buy_product-img {
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--color-null-element-border, #444);
    background: var(--color-panel-bg, #222);
    box-sizing: border-box;
}

.market_buy_product-img--empty {
    background: var(--color-panel-bg, #222);
}

.market_buy_product-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market_buy_title {
    font-size: 110%;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.market_buy_dialog--shop .market_buy_title {
    font-size: 128%;
    color: var(--color-market-buy-accent, #c9b8ff);
}

.market_buy_product-descr {
    font-size: 92%;
    line-height: 1.4;
    opacity: 0.82;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 7.2em;
    overflow: auto;
}

.market_buy_cost {
    font-variant-numeric: tabular-nums;
}

.market_buy_dialog--shop .market_buy_cost {
    font-size: 118%;
    font-weight: 600;
    line-height: 1.35;
    color: var(--color-market-buy-accent, #c9b8ff);
}

.market_buy_dialog--shop .market_buy_cost b {
    font-weight: 700;
    color: inherit;
}

.market_buy_opts {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.market_buy_gift_only_hint {
    font-size: 92%;
    line-height: 1.4;
    opacity: 0.88;
}

.market_buy_gift_switch {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
}

.market_buy_gift_switch .ifm_switch-label {
    min-width: 0;
    font-size: 95%;
    font-weight: 500;
    letter-spacing: normal;
    line-height: 1.3;
}

.market_buy_login {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background-color: var(--color-null-element-bg);
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 100%;
    outline: none;
    box-sizing: border-box;
}

.market_buy_login:focus {
    border-color: var(--color-btn-hover-border);
}

.market_buy_login::placeholder {
    color: var(--color-null-element-text);
    opacity: 0.28;
}

.market_buy_login[hidden] {
    display: none !important;
}

.market_buy_message_wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.market_buy_message_wrap[hidden] {
    display: none !important;
}

.market_buy_message {
    width: 100%;
    min-height: 72px;
    max-height: 140px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--color-null-element-border);
    border-radius: 10px;
    background-color: var(--color-null-element-bg);
    color: var(--color-null-element-text);
    font: inherit;
    font-size: 100%;
    line-height: 1.35;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
}

.market_buy_message:focus {
    border-color: var(--color-btn-hover-border);
}

.market_buy_message::placeholder {
    color: var(--color-null-element-text);
    opacity: 0.28;
}

.inventory_tile-qty {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    pointer-events: none;
}

.inventory_view_msgs {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: min(42vh, 280px);
    margin-top: 10px;
    overflow-y: auto;
    padding-right: 4px;
}

.inventory_view_msgs-title {
    font-size: 92%;
    font-weight: 600;
    opacity: 0.85;
    margin-bottom: 2px;
}

.inventory_view_msg {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 0;
    border-top: 1px solid var(--color-null-element-border, #444);
}

.inventory_view_msg:first-of-type {
    border-top: none;
    padding-top: 0;
}

.inventory_view_msg-ava {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-color: var(--color-panel-bg, #222);
}

.inventory_view_msg-ava--letter {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

.inventory_view_msg-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.inventory_view_msg-name {
    font-weight: 600;
    font-size: 94%;
    word-break: break-word;
}

.inventory_view_msg-text {
    font-size: 92%;
    line-height: 1.35;
    opacity: 0.92;
    word-break: break-word;
    white-space: pre-wrap;
}

.inventory_view_msg-text.is-empty {
    opacity: 0.45;
    font-style: italic;
}

.inventory_view_msgs-status {
    font-size: 90%;
    opacity: 0.55;
    text-align: center;
    padding: 6px 0;
}

.market_buy_err {
    color: #e07070;
    font-size: 92%;
    line-height: 1.35;
}

.market_buy_actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 4px;
}

.market_buy_actions > .user_panel-menu-btn:not(.user_panel-menu-btn--ghost) {
    order: 1;
}

.market_buy_actions > .user_panel-menu-btn--ghost {
    order: 2;
}

.market_buy_actions .user_panel-menu-btn {
    flex: 0 1 auto;
    min-width: 120px;
    padding: 9px 14px;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.market_buy_actions .user_panel-menu-btn:hover {
    filter: brightness(1.08);
}

.market_buy_actions .user_panel-menu-btn:disabled {
    opacity: 0.55;
    cursor: default;
    filter: none;
}

.market_buy_actions .user_panel-menu-btn--ghost {
    font-weight: 500;
}

.market_buy_actions #market_buy_success_ok {
    min-width: 100px;
    margin-left: auto;
}

.market_buy_dialog--success {
    gap: 14px;
}

.market_buy_success-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 95%;
    line-height: 1.4;
}

.market_buy_success-line {
    font-variant-numeric: tabular-nums;
}

.market_buy_success-product {
    font-weight: 700;
    word-break: break-word;
}

.inventory_toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 8px 0 12px;
}

.inventory_tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.inventory_gift_filter {
    margin-left: auto;
    flex: 0 0 auto;
}

.inventory_gift_filter select {
    font: inherit;
    color: inherit;
    background: var(--color-panel-bg, #222);
    border: 1px solid var(--color-null-element-border, #444);
    border-radius: 8px;
    padding: 5px 10px;
    cursor: pointer;
}

.inventory_tab {
    border: 1px solid var(--color-null-element-border, #444);
    background: transparent;
    color: inherit;
    border-radius: 8px;
    padding: 4px 10px;
    cursor: pointer;
    font: inherit;
}

.inventory_tab.is-active {
    border-color: var(--color-lpd-active-border, #6aa8ff);
    background: rgba(106, 168, 255, 0.12);
    font-weight: 600;
}

.inventory_tile {
    cursor: pointer;
}

.inventory_grid .inventory_tile,
button.inventory_tile {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    font: inherit;
    color: inherit;
    text-align: left;
}

.inventory_view_xp {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.inventory_view_xp.is-pos {
    color: #7ecf8a;
}

.inventory_view_xp.is-neg {
    color: #e07070;
}

.inventory_view_prov {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    margin-top: 4px;
    font-size: 92%;
    line-height: 1.35;
    opacity: 0.92;
}

.inventory_view_prov-who {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.inventory_view_prov-ava {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-panel-bg, #222) center / cover no-repeat;
    border: 1px solid var(--color-null-element-border, #444);
}

.inventory_view_prov-ava--letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.inventory_view_prov-name {
    font-weight: 600;
    word-break: break-word;
}

.inventory_view_dialog .market_buy_actions {
    justify-content: flex-end;
}

.inv_gift_badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: center / 14px no-repeat;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}

.inv_gift_badge--in {
    background-color: #2ecc71;
}

.inv_gift_badge--out {
    background-color: #9b59b6;
}

.inv_gift_badge::after {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 12c2.7 0 4.8-2.1 4.8-4.8S14.7 2.4 12 2.4 7.2 4.5 7.2 7.2 9.3 12 12 12zm0 2.4c-3.2 0-9.6 1.6-9.6 4.8v2.4h19.2v-2.4c0-3.2-6.4-4.8-9.6-4.8z'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.user_settings_points-balance {
    font-size: 1.4rem;
    font-variant-numeric: tabular-nums;
    margin: 0 0 8px;
}

.user_settings_points-row {
    display: flex;
    flex-direction: row;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user_settings_points-meta {
    opacity: 0.75;
    font-size: 90%;
}

.user_settings_sessions-connect {
    width: 100%;
    margin: 0;
}

.user_settings_sessions-connect-sec[hidden] {
    display: none !important;
}

.ifm_autofill_trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.user_settings_secret_input {
    -webkit-text-security: disc;
    text-security: disc;
}

.user_settings_form .user_settings_sessions-devices-sec,
.user_settings_form .user_settings_sessions-history-sec {
    margin: 0 0 22px;
    padding: 14px 14px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    box-sizing: border-box;
    user-select: text;
    -webkit-user-select: text;
}

.user_settings_form .user_settings_sessions-devices-sec .user_settings_section-title,
.user_settings_form .user_settings_sessions-history-sec .user_settings_section-title,
.user_settings_form .user_settings_sessions-title,
.user_settings_form .user_settings_sessions-meta,
.user_settings_form .user_settings_sessions-empty {
    user-select: text;
    -webkit-user-select: text;
}

.user_settings_form .user_settings_sessions-devices-sec .user_settings_section-title,
.user_settings_form .user_settings_sessions-history-sec .user_settings_section-title {
    margin-bottom: 10px;
}

.user_settings_sessions-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.user_settings_sessions-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.user_settings_sessions-item:last-child {
    border-bottom: none;
    padding-bottom: 2px;
}

.user_settings_sessions-main {
    min-width: 0;
    flex: 1 1 auto;
}

.user_settings_sessions-title {
    font-weight: 600;
    line-height: 1.3;
}

.user_settings_sessions-meta {
    margin-top: 3px;
    opacity: 0.75;
    font-size: 90%;
    line-height: 1.35;
}

.user_settings_sessions-badge {
    display: inline-block;
    margin: 6px 0 0;
    padding: 3px 8px 2px 8px;
    border-radius: 4px;
    font-size: 75%;
    font-weight: 500;
    opacity: 0.9;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.user_settings_sessions-revoke {
    flex: 0 0 auto;
    margin: 0;
    width: auto;
    min-height: 32px;
    padding: 4px 10px;
    font-size: 85%;
}

.user_settings_sessions-revoke.is-busy,
.user_settings_sessions-revoke:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.user_settings_sessions-empty {
    margin: 4px 0 0;
    opacity: 0.7;
    font-size: 90%;
}

.add_points_page {
    padding: 24px 8px;
    max-width: 480px;
}

#RADL_inputs-upload-mobile-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60050;
    pointer-events: none;
}

#RADL_inputs-upload-mobile-panel[data-open="1"] {
    display: block;
    pointer-events: auto;
    background-image: linear-gradient(0deg, #00000099 60%, #0000004f);
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 66vh;
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border-radius: 16px 16px 0 0;
    border: 1px solid var(--color-null-element-border);
    border-bottom: 0;
    background: var(--color-null-element-bg);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-handle {
    flex: 0 0 auto;
    width: 40px;
    height: 4px;
    margin: 8px auto 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-head {
    flex: 0 0 auto;
    padding: 4px 48px 10px 16px;
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-title {
    font-size: 95%;
    font-weight: 600;
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 16px;
}

#RADL_inputs-upload-mobile-panel .RADL_mobile_attach-scroll-sentinel {
    width: 100%;
    height: 2px;
    pointer-events: none;
    visibility: hidden;
}

#RADL_mobile_attach-attached {
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#RADL_mobile_attach-attached[hidden] {
    display: none !important;
}

#RADL_mobile_attach-attached-list .IFM_attach_files-item.is-pending .IFM_attach_files-drag {
    opacity: 0.25;
    pointer-events: none;
    cursor: default;
}

#RADL_mobile_attach-attached-list .RADL_mobile_attach-pending-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.7;
    background: transparent url('../../ico/bt/delete.svg') center / 60% no-repeat;
}

#RADL_mobile_attach-attached-list .RADL_mobile_attach-pending-remove:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.08);
}

#RADL_mobile_attach-attached .RADL_mobile_attach-attached-title {
    margin: 0 0 8px;
    font-size: 85%;
    opacity: 0.85;
}

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

.RADL_mobile_attach-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
}

.RADL_mobile_attach-tile--photo,
.RADL_mobile_attach-tile--video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    user-select: none;
    -webkit-user-select: none;
}

.RADL_mobile_attach-tile-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    background: #1a1a1a;
}

.RADL_mobile_attach-tile--photo .RADL_mobile_attach-thumb--file,
.RADL_mobile_attach-tile--video .RADL_mobile_attach-thumb--file {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.RADL_mobile_attach-tile.has-live-preview .RADL_mobile_attach-thumb--file {
    background: rgba(0, 0, 0, 0.18);
}

.RADL_mobile_attach-tile.has-live-preview .RADL_mobile_attach-thumb--file img {
    width: 28%;
    height: 28%;
    opacity: 0.95;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

#RADL_inputs-upload-mobile-panel,
#RADL_inputs-upload-mobile-panel * {
    -webkit-touch-callout: none;
}

.RADL_mobile_attach-photo-label {
    position: relative;
    z-index: 1;
    margin-top: auto;
    width: 100%;
    padding: 6px;
    font-size: 11px;
    text-align: center;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
    box-sizing: border-box;
    color: #fff;
    text-shadow: 0 0 5px #000000;
}

.RADL_mobile_attach-thumb {
    display: block;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.RADL_mobile_attach-thumb--file {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
}

.RADL_mobile_attach-thumb--file img {
    width: 42%;
    height: 42%;
    opacity: 0.9;
}

.RADL_mobile_attach-check,
.RADL_mobile_attach-list-check {
    pointer-events: auto;
    cursor: pointer;
}

.RADL_mobile_attach-check {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.85);
    background: rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
}

.RADL_mobile_attach-check.is-on {
    border-color: var(--color-lpd-active-border, #6a9cff);
    background: var(--color-lpd-active-border, #6a9cff);
    box-shadow: inset 0 0 0 2px #1a1a1a;
}

.RADL_mobile_attach-pick-more {
    grid-column: 1 / -1;
    min-height: 44px;
    border-radius: 10px;
    border: 1px dashed rgba(255, 255, 255, 0.25);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.RADL_mobile_attach-loading {
    padding: 12px 0;
    text-align: center;
    font-size: 90%;
    opacity: 0.75;
}

.RADL_mobile_attach-footer {
    flex: 0 0 auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--color-null-element-bg);
}

.RADL_mobile_attach-footer #RADL_mobile_attach-confirm {
    width: 100%;
    box-sizing: border-box;
    pointer-events: auto;
}

.RADL_mobile_attach-footer #RADL_mobile_attach-confirm.is-disabled {
    opacity: 0.45;
}

.RADL_mobile_attach-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
}

.RADL_mobile_attach-list-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 8px;
    border: 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.18);
    color: inherit;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
}

.RADL_mobile_attach-list-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
}

.RADL_mobile_attach-list-icon img {
    width: 22px;
    height: 22px;
    opacity: 0.9;
}

.RADL_mobile_attach-list-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 92%;
}

.RADL_mobile_attach-list-check {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    background: rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

.RADL_mobile_attach-list-check.is-on {
    border-color: var(--color-lpd-active-border, #6a9cff);
    background: var(--color-lpd-active-border, #6a9cff);
    box-shadow: inset 0 0 0 3px var(--color-null-element-bg);
}

#RADL_mobile_attach-preview {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 60100;
    background: rgba(0, 0, 0, 0.92);
    pointer-events: auto;
}

#RADL_mobile_attach-preview[data-open="1"]:not([hidden]) {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.RADL_mobile_attach-preview-toolbar {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: calc(8px + var(--m-safe-top, 0px)) 12px 8px;
    box-sizing: border-box;
    z-index: 2;
}

.RADL_mobile_attach-preview-back {
    flex: 0 0 auto;
}

.RADL_mobile_attach-preview-check {
    flex: 0 0 auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.RADL_mobile_attach-preview-check .RADL_mobile_attach-check {
    position: static;
    display: block;
    width: 28px;
    height: 28px;
}

.RADL_mobile_attach-preview-inner {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 0 12px 12px;
    box-sizing: border-box;
}

#RADL_mobile_attach-preview-img,
#RADL_mobile_attach-preview-video {
    position: absolute;
    inset: 0 12px 12px;
    width: auto;
    height: auto;
    max-width: calc(100% - 24px);
    max-height: calc(100dvh - 80px - var(--m-safe-top, 0px));
    margin: auto;
    object-fit: contain;
}

#RADL_mobile_attach-preview-video {
    background: #000;
    z-index: 1;
}

#RADL_mobile_attach-preview-img {
    z-index: 2;
}

#RADL_mobile_attach-preview[data-media="video"] #RADL_mobile_attach-preview-img {
    display: none !important;
}

#RADL_inputs-upload-mobile-photo {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 50005;
    background: #000;
}

#RADL_inputs-upload-mobile-photo[data-open="1"]:not([hidden]) {
    display: block;
}

.RADL_mobile_attach-filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 12px;
    padding: 0 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.RADL_mobile_attach-filter {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    box-sizing: border-box;
}

.RADL_mobile_attach-filter.is-active {
    border-color: var(--color-lpd-active-border, #6a9cff);
    background: rgba(106, 156, 255, 0.18);
}

.RADL_mobile_attach-filter-icon {
    display: block;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 58%;
    opacity: 0.92;
}

.RADL_mobile_attach-empty {
    grid-column: 1 / -1;
    margin: 8px 0;
    text-align: center;
    font-size: 90%;
    opacity: 0.75;
}

#RADL_inputs-upload-mobile-photo .RADL_mobile_attach-photo-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

#RADL_mobile_attach-photo-canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.RADL_mobile_attach-photo-shutter {
    position: absolute;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    width: 68px;
    height: 68px;
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

#RADL_inputs-upload-mobile-photo .RADL_mobile_attach-photo-close {
    z-index: 2;
}

