.comic {
    width: 100%;
}

.comic__warn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--color-orange);
    border-radius: 12px;
    font-size: 15px;
    background-color: var(--accent-orange);
}

.comic__warn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: white;
}

.comic__layout {
    display: grid;
    align-items: start;
    gap: 24px;
    margin-top: 15px;
    grid-template-columns: var(--cover-max) 1fr;
}

.comic__side {
    display: flex;
    flex-direction: column;
}

.comic__cover {
    width: var(--cover-max);
    margin: 0 auto;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.comic__actions {
    display: flex;
    flex-wrap: wrap;
    width: var(--cover-max);
    margin: 10px auto 0;
    gap: 6px;
}

.comic__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    min-width: 165px;
    max-width: 385px;
    min-height: 42px;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-delay) ease, border-color var(--transition-delay) ease, transform var(--transition-delay) ease;
}

.comic__btn:active {
    transform: scale(var(--scale-click));
}

.comic__btn-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: currentColor;
}

.comic__btn--read {
    background-color: var(--color-brand);
}

.comic__btn--read:hover {
    background-color: color-mix(in srgb, var(--color-brand) 85%, white);
}

.comic__btn--chapters {
    display: none;
    background-color: var(--accent-brand);
}

.comic__btn--chapters:hover {
    background-color: color-mix(in srgb, var(--color-brand) 42%, transparent);
}

.comic__info {
    display: flex;
    flex-direction: column;
}

.comic__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--color-bgTheme-small);
    border-radius: 12px;
    background-color: var(--color-bgTheme-tiny);
}

.comic__card--first {
    margin-top: 15px;
}

.comic__card + .comic__card {
    margin-top: 6px;
}

.comic__row {
    position: relative;
    line-height: 19px;
}

.comic__label {
    display: block;
    font-family: var(--font-second);
    font-size: 13px;
    font-weight: 400;
    color: var(--color-txtSecondary);
}

.comic__value {
    font-size: 15px;
}

.comic__value--list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.comic__rank-delta {
    margin-left: 6px;
    font-size: 13px;
    color: var(--color-txtSecondary);
}

.comic__status {
    display: flex;
    align-items: center;
    gap: 4px;
}

.comic__alt {
    cursor: pointer;
    text-transform: none;
}

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

.comic__link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--color-bgTheme-small);
    border-radius: 12px;
    text-decoration: none;
    background-color: var(--color-bgTheme-tiny);
    transition: background-color var(--transition-delay) ease;
}

.comic__link:hover {
    background-color: var(--color-bgTheme-default);
}

.comic__link-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
}

.comic__link-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

.comic__link-name {
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-transform: none;
}

.comic__link-sub {
    font-size: 13px;
    color: var(--color-txtThird);
}

.comic__link-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: var(--color-txtThird);
}

.comic__main {
    display: flex;
    flex-direction: column;
}

.comic__about {
    display: flex;
    flex-direction: column;
}

.comic__head {
    display: flex;
    flex-direction: column;
}

.comic__meta {
    font-size: 16px;
    font-weight: 400;
    text-transform: none;
    color: var(--color-txtThird);
}

.comic__title {
    margin-top: 6px;
    font-family: var(--font-second);
    font-size: 22px;
}

.comic__stats {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comic__stat {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 4px;
}

.comic__stat span {
    font-size: 13px;
    line-height: 18px;
    text-transform: none;
    color: var(--color-txtThird);
}

.comic__stat-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    fill: var(--color-txtThird);
}

.comic__stat-icon--calendar {
    width: 18px;
    height: 18px;
}

.comic__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.comic__tag {
    width: max-content;
    padding: 6px 8px;
    border: 1px solid var(--color-bg800);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    background-color: var(--color-bgTheme-small);
}

.comic__tag--genre {
    font-size: 12.5px;
    font-weight: 500;
}

.comic__tag--tag {
    color: var(--color-txtSecondary);
    background-color: var(--color-bgTheme-tiny);
}

.comic__tag--restr {
    font-weight: 500;
    background-color: var(--color-red);
}

.comic__desc {
    margin: 10px 0 0;
    overflow: hidden;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
    white-space: pre-line;
    text-transform: none;
    color: var(--color-txtThird);
    -webkit-mask-image: linear-gradient(to bottom, currentColor 40%, transparent 100%);
    mask-image: linear-gradient(to bottom, currentColor 40%, transparent 100%);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 1000%;
    mask-size: 100% 1000%;
    transition: max-height .3s ease, -webkit-mask-size .3s ease, mask-size .3s ease;
}

.comic__desc--clamp {
    max-height: calc(1.4em * 3);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

.comic__desc--act {
    cursor: pointer;
}

.comic__desc--still {
    transition: none;
}

.comic__desc-toggle {
    display: flex;
    align-items: center;
    width: max-content;
    gap: 6px;
    margin-top: 2px;
    cursor: pointer;
    user-select: none;
}

.comic__desc-toggle-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-txtSecondary);
}

.comic__desc-toggle-icon {
    width: 12px;
    height: 12px;
    fill: var(--color-txtThird);
    transition: transform .2s ease;
}

.comic__desc-toggle--open .comic__desc-toggle-icon {
    transform: rotate(180deg);
}

.comic__chapters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
}

.comic__chapters-head {
    display: flex;
    gap: 4px;
    line-height: 16px;
}

.comic__chapters-title {
    font-family: var(--font-second);
    font-size: 16px;
    font-weight: 600;
}

.comic__chapters-count {
    font-size: 15px;
    font-weight: 400;
    color: var(--color-txtSecondary);
}

.comic__chapters-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0;
    gap: 4px;
    list-style: none;
}

.comic__chapters-item {
    display: block;
}

.comic__chapter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    background-color: var(--color-bg950);
    transition: background-color var(--transition-delay) ease;
}

.comic__chapter:hover {
    background-color: var(--color-bgTheme-default);
}

.comic__chapter--upd {
    background-color: color-mix(in srgb, var(--color-brand) 10%, var(--color-bg950));
}

.comic__chapter--upd:hover {
    background-color: color-mix(in srgb, var(--color-brand) 16%, var(--color-bg950));
}

.comic__chapter-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-right: 6px;
}

.comic__chapter-name {
    font-size: 15px;
    font-weight: 500;
    text-align: left;
}

.comic__chapter-date {
    font-size: 13px;
    text-align: left;
    color: var(--color-txtThird);
}

.comic__chapter-squad {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.comic__chapter-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.comic__chapter-squad-name {
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    text-transform: none;
    color: var(--color-txtSecondary);
}

.comic__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.comic__empty-img {
    width: 128px;
    height: 128px;
}

.comic__empty-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-txtThird);
}

@media (max-width: 728px) {
    .comic__layout {
        gap: 12px;
        grid-template-columns: 1fr;
    }

    .comic__actions,
    .comic__card--first,
    .comic__tags {
        margin-top: 0;
    }

    .comic__side,
    .comic__main {
        display: contents;
    }

    .comic__cover {
        order: 1;
        width: 200px;
    }

    .comic__head {
        order: 2;
    }

    .comic__title {
        font-size: 20px;
    }

    .comic__actions {
        order: 3;
        width: 100%;
    }

    .comic__info {
        order: 4;
    }

    .comic__about {
        order: 5;
    }

    .comic__chapters {
        order: 6;
    }

    .comic__btn--chapters {
        display: inline-flex;
    }

    .comic__chapter {
        gap: 8px;
    }
}
