@media (max-width: 980px) {
    html,
    body {
        overflow-x: hidden;
    }

    .wrap,
    #main-outlet,
    .list-container,
    .categories-and-top,
    .category-list,
    .b-category-container {
        width: 100%;
        max-width: 100%;
    }

    .categories-and-top {
        display: block;
    }

    .container,
    .container.posts {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
        box-sizing: border-box;
    }

    .container.posts {
        display: block !important;
        grid-template-columns: none !important;
    }

    .category-boxes {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        width: 100%;
    }

    .category-boxes .subcategory-container {
        width: 100%;
        margin: 0;
        float: none;
        max-width: 100%;
    }

    .category-boxes .b-subcategory {
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 12px 14px;
        box-sizing: border-box;
        min-width: 0;
    }

    .category-boxes .category-icon {
        flex: 0 0 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .category-boxes .category-icon img {
        width: 40px;
        height: 40px;
        object-fit: contain;
    }

    .category-boxes .category-text {
        flex: 1 1 auto;
        min-width: 0;
    }

    .b-category-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .b-category,
    .b-category .category-information,
    .b-category .heading,
    .b-category .category-description {
        width: 100%;
        max-width: 100%;
    }

    .b-category .heading,
    .b-category .category-description,
    .b-category .category-information {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .topic-list {
        display: table !important;
        width: 100% !important;
        table-layout: auto !important;
    }

    .topic-list tbody {
        display: table-row-group !important;
        width: 100% !important;
    }

    .topic-list tr {
        display: table-row !important;
        width: 100% !important;
    }

    .topic-list td {
        display: table-cell !important;
        width: auto !important;
    }

    .topic-list .posts,
    .topic-list .views,
    .topic-list .activity,
    .topic-list td.num.posts,
    .topic-list td.num.views,
    .topic-list td.num.age {
        display: none !important;
    }

    .topic-list td.main-link {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
    }

    .topic-list td.main-link .link-top-line,
    .topic-list td.main-link .main-link,
    .topic-list td.main-link .raw-topic-link {
        max-width: none !important;
        width: 100% !important;
    }

    .topic-list thead {
        display: none;
    }

    .topic-list-item {
        padding: 6px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .topic-list .creator,
    .topic-list .creator a {
        display: block;
        white-space: nowrap;
        word-break: normal;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .topic-list .num,
    .topic-list .age {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        width: auto;
        margin-top: 6px;
    }

    .topic-area,
    .posts-wrapper,
    .post-stream {
        width: 100%;
    }

    .topic-post .row {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 12px;
    }

    .topic-avatar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
    }

    .topic-avatar .avatar {
        width: 40px;
        height: 40px;
    }

    .topic-body {
        width: 100%;
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }

    .topic-avatar,
    .topic-body {
        float: none;
    }

    .topic-meta-data,
    .topic-meta-data .names,
    .topic-meta-data .names > div,
    .character-details,
    .primary-details {
        width: 100% !important;
        min-width: 0 !important;
    }

    .topic-meta-data .names,
    .topic-meta-data .names > div {
        display: block !important;
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
        gap: 0 !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .topic-meta-data {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 6px !important;
        overflow: visible !important;
        height: auto !important;
    }

    .character-details {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 4px !important;
    }

    .primary-details {
        display: flex !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px;
        width: auto !important;
    }

    .character-name {
        display: inline-block !important;
        max-width: 100% !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: inherit !important;
    }

    .user-post-count {
        white-space: nowrap !important;
    }

    .post-infos {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        margin-top: 4px;
        gap: 8px;
        order: 2;
    }

    .post-info,
    .post-info .post-date,
    .post-info .relative-date {
        max-width: 100%;
        white-space: normal !important;
        overflow: visible;
    }

    .post-info .post-date,
    .post-info .relative-date {
        display: block;
    }

    .topic-list .main-link .title,
    .topic-list .title.raw-link,
    .latest-topic-list-item .title {
        display: block !important;
        white-space: normal !important;
        overflow: visible !important;
        word-break: break-word !important;
        overflow-wrap: anywhere !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .topic-body .regular.contents,
    .topic-body .regular.contents .cooked {
        width: 100%;
        max-width: 100%;
    }

    .topic-body .regular.contents .cooked {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .topic-map,
    .topic-map ul {
        width: 100%;
        flex-wrap: wrap;
    }

    .topic-footer-main-buttons {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        align-items: stretch !important;
        white-space: normal !important;
    }

    .topic-footer-main-buttons > * {
        min-width: 0 !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    .topic-footer-main-buttons .topic-footer-button,
    .topic-footer-main-buttons nav.buttons,
    .topic-footer-main-buttons nav.buttons .topic-footer-button {
        width: 100% !important;
        max-width: 100% !important;
        white-space: normal !important;
    }

    .topic-footer-main-buttons nav.buttons {
        display: contents !important;
    }

    #reply-control {
        width: 100%;
        left: 0;
        right: 0;
    }

    .d-editor-container,
    .d-editor-textarea-wrapper,
    .d-editor-input,
    .d-editor-preview-wrapper,
    .composer-extras {
        width: 100%;
        box-sizing: border-box;
    }

    .d-editor-preview-wrapper {
        display: none;
    }

    .d-editor-textarea-wrapper textarea {
        min-height: 160px;
    }

    .composer-stickers-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
        gap: 8px;
    }
}

.tox-promotion,
.tox-promotion-link,
.tox-statusbar__branding {
    display: none !important;
}

.tox .tox-tbtn[data-mce-name="emoticons"] svg {
    display: none !important;
}

.tox .tox-tbtn[data-mce-name="emoticons"] .tox-icon,
.tox .tox-tbtn[data-mce-name="emoticons"] .tox-tbtn__icon-wrap {
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tox .tox-tbtn[data-mce-name="emoticons"] .tox-tbtn__icon-wrap::before {
    content: "🙂";
    font-size: 18px;
    line-height: 1;
}

#livewire-error {
    pointer-events: none;
    background-color: transparent !important;
}

#livewire-error iframe {
    display: none !important;
}
