/* ==========================================================================
   Записи, комментарии, отметки «нравится», меню «…», окна выбора и жалоб.
   Общие для страниц релиза, профиля, группы, коллекции и новости.
   ========================================================================== */

/* глобальное правило «* { color }» ломает currentColor внутри svg */
.ic,
.ic * {
    color: inherit;
}

.ic {
    width: 20px;
    height: 20px;
    flex: none;
    display: inline-block;
    vertical-align: middle;
}

.ic_verified {
    width: 18px;
    height: 18px;
    color: var(--text-color-emphasis);
}

.cm-avatar_md {
    --size: 48px;
}

.cm-avatar_xl {
    --size: 100%;
}

/* Карточка-панель как в макете: тёмная, со скруглением */
.cm-card {
    padding: clamp(18px, 1.8vw, 30px);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.cm-card + .cm-card {
    margin-top: 20px;
}

.cm-card__title {
    margin: 0 0 18px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.cm-card__title b {
    font-size: inherit;
    font-weight: inherit;
    color: var(--text-color-emphasis);
}

/* Точка «в сети» */
.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2fd679;
    flex: none;
}

.online-dot_off {
    background: #5f626d;
}

.avatar-wrap {
    position: relative;
    display: inline-flex;
    flex: none;
}

.avatar-wrap .online-dot {
    position: absolute;
    right: 0;
    bottom: 0;
    border: 2px solid var(--bg-color);
    width: 12px;
    height: 12px;
}

/* ---------- Меню «…» ---------- */

.dots {
    position: relative;
    margin-left: auto;
}

.dots > summary {
    list-style: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-color-faint);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

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

.dots > summary:hover,
.dots[open] > summary {
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.dots__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 30;
    min-width: 190px;
    padding: 6px;
    border-radius: var(--radius-md);
    background: #1d1626;
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}

.dots__menu > button,
.dots__menu > a {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #fff;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
}

.dots__menu > button:hover,
.dots__menu > a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.dots__menu .is-danger {
    color: var(--danger-color);
}

/* ---------- Отметка «нравится» ---------- */

.like {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text-color-faint);
    font-size: 14px;
    cursor: pointer;
    transition: color .2s ease, transform .15s ease;
}

.like span {
    color: inherit;
    font-size: inherit;
}

.like:hover {
    color: #fff;
}

.like .ic {
    width: 18px;
    height: 18px;
}

.like.is-liked {
    color: #ff4d5e;
}

.like.is-liked span {
    color: #fff;
}

.like:active {
    transform: scale(.94);
}

.like_lg {
    font-size: 17px;
}

.like_lg .ic {
    width: 22px;
    height: 22px;
}

.like:not(.is-liked):not(.like_comment) .ic path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
}

/* ---------- Комментарий ---------- */

.cmt {
    display: flex;
    gap: 14px;
    padding: 18px 0;
}

.cmt + .cmt {
    border-top: 1px solid var(--border-color);
}

.cmt_reply {
    padding: 14px 0 0;
}

.cmt_reply + .cmt_reply {
    border-top: 0;
}

.cmt_reply .cm-avatar {
    --size: 36px;
}

.cmt__body {
    flex: 1;
    min-width: 0;
}

.cmt__top {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cmt__name {
    font-weight: 600;
    color: #fff;
}

.cmt__name:hover {
    color: var(--text-color-emphasis);
}

.cmt__menu > summary {
    width: 28px;
    height: 28px;
}

.cmt__text {
    margin: 4px 0 6px;
    color: rgba(255, 255, 255, .88);
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.cmt__meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cmt__meta .like {
    margin-left: auto;
}

.cmt__time {
    color: var(--text-color-faint);
    font-size: 13px;
}

.cmt__reply-btn {
    padding: 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cmt__reply-btn:hover {
    color: var(--text-color-emphasis);
}

.cmt__replies:empty {
    display: none;
}

.cmt__body > .cbox {
    margin-top: 12px;
}

/* ---------- Поле «Напишите что-нибудь…» ---------- */

.cbox {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin: 0;
}

.cbox_guest {
    color: var(--text-color-muted);
}

.cbox_guest a {
    color: var(--text-color-emphasis);
}

.cbox__field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 4px 4px 16px;
    border-bottom: 1px solid var(--border-color);
    transition: border-color .2s ease;
}

.cbox__field:focus-within {
    border-color: var(--text-color-emphasis);
}

.cbox textarea,
.post-form textarea {
    flex: 1;
    min-height: 38px;
    max-height: 240px;
    padding: 9px 0;
    border: 0;
    outline: none;
    resize: none;
    background: none;
    color: #fff;
    font-size: 15px;
    line-height: 1.4;
}

.cbox textarea::placeholder,
.post-form textarea::placeholder {
    color: var(--text-color-faint);
}

.cbox__cancel {
    border: 0;
    background: none;
    color: var(--text-color-faint);
    font-size: 13px;
    cursor: pointer;
}

.cbox__send {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--text-color-emphasis);
    cursor: pointer;
    transition: background-color .2s ease;
}

.cbox__send:hover {
    background: rgba(1, 174, 76, .14);
}

.cbox__send .ic {
    width: 24px;
    height: 24px;
}

.cbox__avatar .cm-avatar {
    --size: 40px;
}

/* ---------- Блок комментариев (релиз, коллекция, новость) ---------- */

.comments__title {
    margin: 0 0 20px;
    font-size: clamp(22px, 1.6vw, 28px);
    font-weight: 700;
    color: #fff;
}

.comments > .cbox {
    margin-bottom: 24px;
}

.comments__list > .cmt {
    margin-top: 16px;
    padding: 20px clamp(16px, 1.6vw, 28px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
}

.comments__list > .cmt + .cmt {
    border-top: 1px solid var(--border-color);
}

.comments__empty {
    padding: 30px 0;
    color: var(--text-color-muted);
}

/* ---------- Запись (стена, группа) ---------- */

.post__head {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post__who {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 6px;
    min-width: 0;
}

.post__name {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-weight: 700;
}

.post__name:hover {
    color: var(--text-color-emphasis);
}

.post__pin {
    display: inline-flex;
    color: var(--text-color-faint);
}

.post__pin .ic {
    width: 14px;
    height: 14px;
}

.post__time {
    flex-basis: 100%;
    color: var(--text-color-faint);
    font-size: 13px;
}

.post__text {
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .9);
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.post__text a {
    color: var(--text-color-emphasis);
}

.post__image {
    display: block;
    margin-top: 16px;
    max-width: 640px;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.post__image img {
    display: block;
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.post__actions {
    display: flex;
    gap: 22px;
    margin-top: 18px;
}

.post__comments {
    margin-top: 18px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.post__comments.is-empty {
    display: none;
}

.post__comments > .cbox {
    margin-top: 10px;
}

.post__more {
    display: block;
    margin: 6px auto 4px;
    padding: 4px 8px;
    border: 0;
    background: none;
    color: var(--text-color-faint);
    font-size: 13px;
    cursor: pointer;
}

.post__more:hover {
    color: #fff;
}

.post-form {
    display: flex;
    align-items: center;
    gap: 14px;
}

.post-form__field {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 2px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, .03);
}

.post-form__field:focus-within {
    border-color: var(--text-color-emphasis);
}

.post-form__attach {
    display: grid;
    place-items: center;
    color: var(--text-color-faint);
    cursor: pointer;
}

.post-form__attach:hover {
    color: #fff;
}

.post-form__file {
    flex-basis: 100%;
    padding-bottom: 8px;
    color: var(--text-color-emphasis);
    font-size: 13px;
}

.posts > .cm-card + .cm-card,
.posts > .post + .post {
    margin-top: 20px;
}

.inline-edit {
    margin-top: 12px;
}

.inline-edit__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.status-form {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.status-form .cm-field {
    padding: 8px 12px;
    font-size: 15px;
}

/* ---------- Окна: жалоба, выбор друзей ---------- */

.cm-modal__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.cm-modal__foot .cm-faint {
    margin-right: auto;
}

.report__reasons {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.radio-row:hover {
    background: rgba(255, 255, 255, .05);
}

.radio-row input {
    accent-color: var(--text-color-emphasis);
    width: 18px;
    height: 18px;
}

.pick__search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-color-faint);
}

.pick__search input {
    flex: 1;
    height: 42px;
    border: 0;
    outline: none;
    background: none;
    color: #fff;
}

.pick [data-pick-title] {
    margin-bottom: 12px;
}

.pick__list {
    max-height: min(50vh, 420px);
    overflow-y: auto;
    margin: 0 -6px 12px;
}

.pick__empty {
    padding: 20px 6px;
}

.pick__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: var(--radius-md);
    background: none;
    text-align: left;
    cursor: pointer;
}

.pick__item:hover {
    background: rgba(255, 255, 255, .05);
}

.pick__item .cm-avatar {
    overflow: visible;
}

.pick__item .cm-avatar img {
    border-radius: 50%;
}

.pick__item .online-dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    border: 2px solid #1a1124;
}

.pick__name {
    flex: 1;
    color: #fff;
    font-weight: 600;
}

.pick__check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    transition: background-color .15s ease, border-color .15s ease;
}

.pick__item.is-on .pick__check {
    border-color: var(--text-color-emphasis);
    background: var(--text-color-emphasis) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

@media screen and (max-width: 768px) {
    .comments__list > .cmt {
        padding: 16px;
    }

    .post__text {
        font-size: 15px;
    }
}

/* ---------- Папка коллекции ---------- */

.folder {
    --folder-color: #01ae4c;
    display: block;
    padding-top: 14px;
    color: #fff;
}

.folder_blue { --folder-color: #3d6bff; }
.folder_purple { --folder-color: #a64dff; }
.folder_olive { --folder-color: #c2d82b; }
.folder_red { --folder-color: #ff3d5a; }
.folder_orange { --folder-color: #ff7a1a; }
.folder_green { --folder-color: #01ae4c; }

.folder__tab {
    position: absolute;
    top: 0;
    right: 6%;
    width: 34%;
    height: 30px;
    border-radius: 10px 10px 0 0;
    background: var(--folder-color);
    transform: skewX(18deg);
    transform-origin: bottom left;
}

.folder__body {
    display: block;
    aspect-ratio: 16 / 9.6;
    overflow: hidden;
    border-radius: 14px 4px 14px 14px;
    background: linear-gradient(135deg, #10301f, #23122f);
    box-shadow: 0 -2px 0 var(--folder-color);
}

.folder__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.folder:hover .folder__img {
    transform: scale(1.04);
}

.folder__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(9, 0, 15, .92) 0%, rgba(9, 0, 15, .2) 55%, rgba(9, 0, 15, 0) 70%);
}

.folder__counters {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 6px;
}

.folder__counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(9, 0, 15, .72);
    color: #fff;
    font-size: 12px;
}

.folder__counter .ic {
    width: 14px;
    height: 14px;
}

.folder__text {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 14px;
    display: grid;
    gap: 2px;
}

.folder__title {
    color: #fff;
    font-size: clamp(15px, 1vw, 18px);
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.folder__hidden,
.folder__meta {
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
}

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

/* Небольшая карточка-строка релиза (история, оценки) */
.mini-rel {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mini-rel + .mini-rel {
    margin-top: 16px;
}

.mini-rel__poster {
    flex: none;
    width: 58px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #10301f, #23122f);
}

.mini-rel__poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mini-rel__body {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.mini-rel__title {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.mini-rel:hover .mini-rel__title {
    color: var(--text-color-emphasis);
}

.mini-rel__meta {
    color: var(--text-color-faint);
    font-size: 12px;
}

.mini-rel__score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    font-size: 13px;
}

.mini-rel__score .ic {
    width: 14px;
    height: 14px;
    color: #f5c518;
}

/* Статистика списков (страница аниме, коллекция) */
.lstats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(10px, 1.2vw, 24px);
}

.lstats__tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px 24px 18px;
    border-radius: var(--radius-lg);
    background: var(--surface-color);
    border: 1px solid var(--border-color);
}

.lstats__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.lstats__label .bm-dot {
    width: 8px;
    height: 8px;
}

.lstats__label_watching { color: var(--status-watching); }
.lstats__label_completed { color: var(--status-completed); }
.lstats__label_dropped { color: var(--status-dropped); }
.lstats__label_on_hold { color: var(--status-on_hold); }
.lstats__label_planned { color: var(--status-planned); }

.lstats__value {
    color: #fff;
    font-size: clamp(40px, 3.6vw, 72px);
    font-weight: 700;
    line-height: 1;
}

.lstats__bar {
    display: flex;
    height: 14px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
}

.lstats__seg {
    height: 100%;
}

.bm-bg_watching { background: var(--status-watching); }
.bm-bg_completed { background: var(--status-completed); }
.bm-bg_dropped { background: var(--status-dropped); }
.bm-bg_on_hold { background: var(--status-on_hold); }
.bm-bg_planned { background: var(--status-planned); }
