.top-purchase-help,
.top-purchase-help * {
    box-sizing: border-box;
}

.thread-top-dialog,
.profile-top-dialog {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #665049 #171717;
}

.top-purchase-help {
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid #4c3d36;
    border-radius: 10px;
    background: #191818;
    color: #eee;
}

.top-purchase-help-summary {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 57px;
    padding: 9px 11px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background .18s ease;
}

.top-purchase-help-summary::-webkit-details-marker {
    display: none;
}

.top-purchase-help-summary:hover,
.top-purchase-help-summary:focus-visible {
    background: #24201e;
    outline: none;
}

.top-purchase-help-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid rgba(235, 113, 61, .65);
    border-radius: 50%;
    background: rgba(235, 113, 61, .08);
    color: #eb713d;
    font-size: 15px;
}

.top-purchase-help-summary-copy {
    min-width: 0;
}

.top-purchase-help-summary-copy strong,
.top-purchase-help-summary-copy > span {
    display: block;
}

.top-purchase-help-summary-copy strong {
    color: #fff;
    font-size: 13px;
    line-height: 1.2;
}

.top-purchase-help-summary-copy > span {
    margin-top: 3px;
    color: #c8c8c8;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.35;
}

.top-purchase-help-toggle {
    color: #eb8d64;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.top-purchase-help-toggle b {
    margin-left: 2px;
    font-size: 14px;
}

.top-purchase-help-hide,
.top-purchase-help[open] .top-purchase-help-show {
    display: none;
}

.top-purchase-help[open] .top-purchase-help-hide {
    display: inline;
}

.top-purchase-help-body {
    display: grid;
    grid-template-columns: 172px minmax(0, 1fr);
    gap: 13px;
    padding: 12px;
    border-top: 1px solid #413832;
    background: #211f1e;
}

.top-purchase-help-list {
    display: grid;
    align-content: center;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.top-purchase-help-list li {
    position: relative;
    margin: 0;
    padding-left: 17px;
    color: #ddd;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.32;
}

.top-purchase-help-list li::before {
    position: absolute;
    top: 0;
    left: 0;
    color: #eb713d;
    content: '✓';
    font-weight: 800;
}

.top-purchase-preview {
    position: relative;
    min-width: 0;
    height: 126px;
    overflow: hidden;
    border: 1px solid #4a4a4a;
    border-radius: 8px;
    background: #292929;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, .22);
}

.top-purchase-preview-heading {
    position: absolute;
    top: 8px;
    left: 9px;
    color: #eb713d;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
}

.top-purchase-preview--profile {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    padding: 23px 8px 27px;
}

.top-purchase-preview-profile {
    position: relative;
    overflow: hidden;
    border: 1px solid #555;
    border-radius: 5px;
    background: linear-gradient(150deg, #5a5a5a 0%, #292929 60%, #151515 100%);
}

.top-purchase-preview-profile:nth-of-type(3) {
    background: linear-gradient(150deg, #55443e 0%, #302923 55%, #151515 100%);
}

.top-purchase-preview-profile:nth-of-type(4) {
    background: linear-gradient(150deg, #3d4c52 0%, #242b2e 55%, #151515 100%);
}

.top-purchase-preview-profile.is-top {
    border-color: #eb713d;
    box-shadow: 0 0 0 1px rgba(235, 113, 61, .22);
}

.top-purchase-preview-profile i {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    background: #eb713d;
    color: #fff;
    font-size: 5px;
    font-style: normal;
    font-weight: 800;
}

.top-purchase-preview-profile b,
.top-purchase-preview-profile em {
    position: absolute;
    right: 5px;
    bottom: 13px;
    left: 5px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .9);
}

.top-purchase-preview-profile em {
    right: 15px;
    bottom: 6px;
    height: 3px;
    background: rgba(255, 255, 255, .45);
}

.top-purchase-preview-feed {
    position: absolute;
    right: 8px;
    bottom: 8px;
    left: 8px;
    height: 12px;
    border-left: 2px solid #eb713d;
    border-radius: 3px;
    background: #3a3a3a;
}

.top-purchase-preview--thread {
    padding: 24px 8px 8px;
}

.top-purchase-preview-thread {
    position: relative;
    display: block;
    height: 34px;
    margin-bottom: 6px;
    padding: 7px 7px 5px 31px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #343434;
}

.top-purchase-preview-thread.is-top {
    height: 49px;
    border-color: #37575a;
    border-left: 3px solid #eb713d;
}

.top-purchase-preview-thread i {
    position: absolute;
    top: 0;
    right: 0;
    padding: 3px 5px;
    border-radius: 0 4px 0 4px;
    background: #3e3b39;
    color: #eb8d64;
    font-size: 6px;
    font-style: normal;
    font-weight: 800;
}

.top-purchase-preview-thread b {
    position: absolute;
    top: 8px;
    left: 7px;
    width: 18px;
    height: 18px;
    border: 1px solid #777;
    border-radius: 4px;
    background: linear-gradient(145deg, #66534c, #272727);
}

.top-purchase-preview-thread em {
    display: block;
    width: 65%;
    height: 4px;
    margin-bottom: 5px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .8);
}

.top-purchase-preview-thread em + em {
    width: 88%;
    height: 3px;
    background: rgba(255, 255, 255, .32);
}

@media (max-width: 520px) {
    .thread-top-dialog,
    .profile-top-dialog {
        max-height: calc(100vh - 46px);
    }

    .top-purchase-help-summary {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .top-purchase-help-toggle {
        grid-column: 2;
        justify-self: start;
        margin-top: -3px;
    }

    .top-purchase-help-body {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 10px;
    }

    .top-purchase-preview {
        width: 100%;
        height: 118px;
    }

    .top-purchase-help-list {
        gap: 6px;
    }
}
