.trends-page>.page-heading,
.trends-page>.content-inner {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto
}

.trends-page>.page-heading {
    margin-bottom: 22px;
    align-items: center
}

.trends-page h1 {
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -.6px
}

#trend-manage {
    gap: 7px;
    min-height: 35px;
    font-size: 12px;
    padding: 7px 13px;
    box-shadow: none
}

#trend-manage svg {
    width: 14px;
    height: 14px
}

#trend-keyword-count:empty {
    display: none
}

#trend-keyword-count {
    font-size: 10px;
    opacity: .75
}

.trends-layout {
    display: block
}

.trend-feed {
    min-width: 0;
    background: #fff;
    border: 1px solid #e7e7ef;
    border-radius: 12px;
    box-shadow: 0 3px 14px #29234003
}

.trend-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px 12px
}

.trend-filters,
.trend-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0
}

.trend-tabs {
    display: flex;
    gap: 3px;
    background: #f3f3f8;
    border: 1px solid #efeff5;
    border-radius: 7px;
    padding: 3px
}

.trend-tabs button {
    padding: 6px 14px;
    border-radius: 5px;
    font-size: 12px;
    color: #7c7d8f;
    white-space: nowrap;
    line-height: 20px
}

.trend-tabs button[aria-selected=true] {
    color: #fff;
    background: #e03313;
    box-shadow: 0 1px 2px #e033132b;
    font-weight: 550
}

.trend-tabs button:hover {
    color: #e03313
}

.trend-filter-actions .form-field {
    margin: 0
}

.trend-filter-actions select {
    font-size: 12px;
    min-height: 33px;
    padding: 6px 10px;
    width: 104px;
    background: #fff;
    border-color: #e7e7ef;
    border-radius: 6px
}

.trend-filter-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap
}

.trend-more-filters {
    position: relative
}

.trend-more-filters>summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    cursor: pointer;
    color: #7c7d8f;
    min-width: 33px;
    height: 33px;
    border: 1px solid #e7e7ef;
    border-radius: 6px
}

.trend-more-filters>summary:hover,
.trend-more-filters[open]>summary {
    background: #f6f4ff;
    color: #6754c4;
    border-color: #ddd5f8
}

.trend-more-filters>summary svg {
    width: 16px;
    height: 16px
}

.trend-filter-count {
    font-size: 10px;
    padding-right: 4px
}

.trend-filter-count:empty {
    display: none
}

.trend-filter-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 5;
    display: grid;
    gap: 12px;
    width: 230px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e7e7ef;
    border-radius: 9px;
    box-shadow: 0 8px 30px #27203c12
}

.trend-filter-popover .form-field {
    margin: 0
}

.trend-filter-popover select {
    width: 100%
}

.trend-filter-popover .check-row {
    margin: 0;
    font-size: 12px
}

.trend-info summary {
    list-style: none;
    font-size: 11px;
    color: #7c7d8f;
    cursor: pointer
}

.trend-info p {
    font-size: 11px;
    color: #838395;
    line-height: 1.7;
    margin: 8px 0 0
}

.trend-feed-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 23px;
    padding: 0 20px 12px;
    color: #9999a7;
    font-size: 11px
}

.trend-source-state {
    padding: 3px 8px;
    background: #f5f5f9;
    border-radius: 4px;
    color: #878795;
    font-size: 10px
}

.trend-source-state.needs-attention {
    color: #a16d30;
    background: #fff7e9
}

.trend-results {
    border-top: 1px solid #efeff5;
    min-height: 280px
}

.trend-results:has(.trend-table) {
    min-height: 0
}

.trend-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    text-align: left
}

.trend-table th {
    font-size: 10px;
    font-weight: 500;
    color: #9393a3;
    padding: 10px 12px;
    background: #fcfcfe;
    border-bottom: 1px solid #efeff5
}

.trend-table th:nth-child(3),
.trend-table th:nth-child(4) {
    text-align: right
}

.trend-table td {
    height: 57px;
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f6;
    vertical-align: middle
}

.trend-table tr:last-child td {
    border-bottom: 0
}

.trend-table tbody tr:hover {
    background: #fbfaff
}

.trend-rank-col {
    width: 48px
}

.trend-number-col {
    width: 102px
}

.trend-action-col {
    width: 46px
}

.trend-rank {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 10px;
    color: #a2a0b1;
    font-variant-numeric: tabular-nums
}

.trend-leading .trend-rank {
    background: #f0ebff;
    color: #7054c3;
    border-radius: 6px;
    font-weight: 600
}

.trend-row-title {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    text-align: left;
    color: #454354;
    font-size: 13px;
    font-weight: 450;
    line-height: 1.65
}

.trend-row-title:hover {
    color: #6754c4
}

.trend-numeric {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    font-weight: 500;
    color: #565365
}

.trend-rising {
    display: inline-block;
    color: #268365;
    background: #edf8f2;
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500
}

.trend-muted {
    color: #b4b0be;
    font-weight: 400
}

.trend-row-menu {
    position: relative
}

.trend-row-menu summary {
    display: grid;
    place-items: center;
    list-style: none;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    color: #a3a0b0;
    font-size: 18px
}

.trend-row-menu summary:hover,
.trend-row-menu[open] summary {
    background: #f1eef9;
    color: #7054c3
}

.trend-row-popover {
    position: absolute;
    right: 0;
    top: 30px;
    z-index: 6;
    width: 150px;
    padding: 5px;
    border: 1px solid #e7e7ef;
    border-radius: 7px;
    background: #fff;
    box-shadow: 0 8px 26px #27203c12
}

.trend-row-popover button,
.trend-row-popover a {
    display: block;
    width: 100%;
    padding: 8px 10px;
    text-align: left;
    font-size: 12px;
    border-radius: 4px
}

.trend-row-popover button:hover,
.trend-row-popover a:hover {
    background: #f7f5fc
}

.trend-results:has(.trend-empty) {
    min-height: 0
}

.trend-empty {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 18px
}

.trend-empty-symbol {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    background: #eee;
    border-radius: 7px;
    color: #545454
}

.trend-empty-symbol svg {
    width: 17px;
    height: 17px
}

.trend-empty.source-error .trend-empty-symbol {
    color: #90541b;
    background: #fff2df
}

.trend-empty h2 {
    font-size: 14px;
    font-weight: 600;
    color: #252525
}

.trend-empty p {
    font-size: 12px;
    color: #626262;
    margin-top: 2px
}

.trend-empty .button {
    font-size: 12px;
    min-height: 32px;
    padding: 5px 10px;
    justify-content: center
}

@media(max-width:560px) {
    .trend-empty {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 12px;
        gap: 8px
    }

    .trend-empty .button {
        grid-column: 2;
        justify-self: start
    }
}

dialog.trend-keyword-dialog {
    width: 490px;
    max-width: calc(100vw - 40px);
    max-height: 80dvh;
    padding: 0;
    border: 1px solid #ece9f2;
    border-radius: 12px;
    box-shadow: 0 20px 80px #20183025;
    overflow: auto
}

.trend-keyword-dialog::backdrop {
    background: #24203135;
    backdrop-filter: blur(2px)
}

#trend-keyword-panel {
    padding: 16px 18px
}

.trend-dialog-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px
}

.trend-dialog-heading h2 {
    font-size: 16px;
    font-weight: 550
}

#trend-keyword-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr)95px auto;
    gap: 6px;
    margin-bottom: 3px
}

#trend-keyword-form .form-field {
    margin: 0
}

#trend-keyword-form input,
#trend-keyword-form select {
    min-height: 36px;
    font-size: 12px;
    padding: 7px 9px
}

#trend-keyword-form button {
    font-size: 12px;
    min-height: 36px
}

#trend-form-status {
    grid-column: 1/-1;
    font-size: 11px;
    color: #aa684d
}

#trend-form-status:empty {
    display: none
}

.trend-keyword {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 4px 12px;
    padding: 8px 0;
    border-top: 1px solid #efedf4
}

.trend-keyword-meta {
    min-width: 0;
    overflow-wrap: anywhere
}

.trend-keyword strong {
    font-size: 13px;
    font-weight: 500;
    margin-right: 8px
}

.trend-platform-label {
    display: inline-block;
    font-size: 10px;
    color: #9691a5;
    background: #f5f3f8;
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 7px
}

.trend-keyword small {
    font-size: 10px;
    color: #a39cad
}

.trend-keyword-actions {
    display: flex;
    gap: 10px
}

.trend-keyword-actions .text-button {
    font-size: 11px;
    padding: 0
}

.trend-error {
    grid-column: 1/-1;
    font-size: 11px;
    color: #a57743;
    line-height: 1.7
}

.trend-error summary {
    cursor: pointer
}

.trend-error p {
    font-size: 11px;
    max-width: 380px
}

.trend-schedule,
.trend-help {
    font-size: 11px;
    line-height: 1.7;
    color: #a29aaf;
    margin-top: 15px
}

#trend-keyword-panel .trend-schedule {
    margin-top: 8px
}

.trend-connection {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0 12px;
    font-size: 12px;
    color: #827a95
}

.trend-connection .text-button {
    font-size: 12px;
    padding: 0
}

.trend-detail-caption {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.8
}

.trend-detail-image {
    display: block;
    max-width: 100%;
    max-height: 280px;
    margin: 15px auto;
    object-fit: contain
}

.trend-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 16px
}

.trend-metrics div {
    display: flex;
    gap: 7px;
    align-items: center
}

.trend-metrics dt {
    font-size: 11px;
    color: #a29aaf
}

.trend-metrics dd {
    font-size: 13px;
    margin: 0
}

.trend-view-change {
    display: block;
    color: #8a8398;
    font-size: 10px;
    margin-top: 3px
}

.trend-analysis-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 24px 0 12px
}

.trend-analysis-heading h3 {
    font-size: 14px;
    font-weight: 550
}

.trend-analysis-heading span {
    font-size: 11px;
    color: #8a8398
}

.trend-analysis-heading .button {
    font-size: 11px;
    padding: 6px 10px;
    min-height: 30px
}

.trend-analysis-table {
    width: 100%;
    font-size: 12px;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums
}

.trend-analysis-table th,
.trend-analysis-table td {
    padding: 9px 6px;
    text-align: right;
    border-bottom: 1px solid #efedf4
}

.trend-analysis-table th {
    font-size: 11px;
    color: #8a8398;
    font-weight: 400
}

.trend-analysis-table th:first-child,
.trend-analysis-table td:first-child {
    text-align: left
}

.trend-history {
    margin: 18px 0;
    font-size: 12px;
    color: #8a8398
}

.trend-history summary {
    cursor: pointer
}

.trend-history>div {
    max-height: 230px;
    overflow: auto;
    margin-top: 10px
}

.trend-topic-result {
    white-space: pre-wrap;
    font-size: 13px;
    line-height: 1.8;
    margin-top: 12px
}

dialog:has(#trend-insight) {
    width: min(1200px, 96vw);
    max-width: 96vw;
    max-height: 94dvh;
    border-radius: 14px
}

dialog:has(#trend-insight) .modal-body {
    padding: 26px 30px
}

dialog:has(#trend-insight) .modal-header h2 {
    font-size: 20px;
    font-weight: 550
}

dialog:has(#trend-insight) .modal-body>p {
    font-size: 13px;
    margin-bottom: 22px
}

.trend-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 30px;
    align-items: start
}

.trend-detail-content,
#trend-insight {
    min-width: 0
}

.trend-detail-content {
    padding-right: 28px;
    border-right: 1px solid #efedf4
}

.trend-detail-content .trend-detail-caption {
    font-size: 15px;
    line-height: 1.8;
    margin: 0 0 18px
}

.trend-detail-content .trend-detail-image {
    max-height: 520px;
    max-width: 100%;
    width: auto;
    margin: 16px auto
}

.trend-detail-content .trend-metrics {
    gap: 14px;
    margin-top: 20px
}

.trend-detail-content .trend-metrics dt {
    font-size: 12px
}

.trend-detail-content .trend-metrics dd {
    font-size: 15px
}

#trend-insight .trend-analysis-heading:first-child {
    margin-top: 0
}

#trend-insight .trend-analysis-heading h3 {
    font-size: 16px
}

#trend-insight .trend-analysis-heading span {
    font-size: 12px
}

#trend-insight .trend-analysis-table {
    font-size: 14px
}

#trend-insight .trend-analysis-table th {
    font-size: 12px
}

#trend-insight .trend-analysis-table th,
#trend-insight .trend-analysis-table td {
    padding: 12px 7px
}

#trend-insight .trend-help,
.trend-detail-content .trend-help {
    font-size: 12px;
    line-height: 1.8
}

#trend-insight .trend-topic-result {
    font-size: 14px;
    line-height: 1.85
}

@media(max-width:1000px) {
    .trend-detail-layout {
        grid-template-columns: 1fr;
        gap: 26px
    }

    .trend-detail-content {
        border: 0;
        border-bottom: 1px solid #efedf4;
        padding: 0 0 22px
    }

    .trend-detail-content .trend-detail-image {
        max-height: 420px
    }
}

@media(max-width:600px) {
    dialog:has(#trend-insight) .modal-body {
        padding: 20px 14px
    }

    #trend-insight .trend-analysis-table {
        font-size: 12px
    }

    #trend-insight .trend-analysis-table th {
        font-size: 10px
    }

    #trend-insight .trend-analysis-table th,
    #trend-insight .trend-analysis-table td {
        padding: 10px 3px
    }
}

@media(max-width:900px) {
    .trend-toolbar {
        padding: 12px;
        gap: 10px
    }

    .trend-tabs button {
        padding: 5px 10px
    }

    .trend-filter-actions {
        gap: 6px
    }

    .trend-filter-actions select {
        width: 88px
    }

    .trend-feed-meta {
        padding-left: 14px;
        padding-right: 14px
    }

    .trend-number-col {
        width: 82px
    }

    .trend-rank-col {
        width: 38px
    }

    .trend-table th,
    .trend-table td {
        padding-left: 8px;
        padding-right: 8px
    }

    .trend-row-title {
        font-size: 12px
    }

    .trend-action-col {
        width: 38px
    }
}

.trend-preview-link {
    display: block;
    padding: 4px 0;
    color: var(--primary);
    font-size: 12px;
    text-align: left
}

.trend-video-player {
    display: block;
    width: 100%;
    height: min(55dvh, 480px);
    border: 0;
    border-radius: 8px;
    background: #181818;
    margin-bottom: 12px
}

dialog:has(.trend-video-player) .modal-body>p:empty {
    display: none
}

.trend-video-player[data-platform="douyin"] {
    width: 100%;
    height: auto;
    aspect-ratio: 9/16
}

.trend-video-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px
}

.trend-video-actions .button {
    padding-inline: 9px
}

#trend-suggestions {
    margin: 4px 0 12px;
}

.trend-suggest-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    border: 0;
    background: transparent;
    color: #5948b4;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.trend-suggest-action .ui-icon {
    width: 13px;
    height: 13px;
}

.trend-suggest-action:hover:not(:disabled) {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.trend-suggest-action:disabled {
    color: #827a9a;
    cursor: default;
}

#trend-suggestion-results:empty {
    margin: 0;
}

#trend-suggestions[hidden] {
    display: none;
}

#trend-suggestion-results {
    margin-top: 8px;
    max-height: 260px;
    overflow: auto;
}

.trend-suggestion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
}

.trend-suggestion small {
    display: block;
    color: #777482;
}

.trend-suggestion button {
    flex: none;
}

.trend-download-status {
    font-size: 12px;
    overflow-wrap: anywhere;
    margin: 8px 0
}

.trend-download-status:empty {
    display: none
}

.trends-page .trend-feed {
    border-color: var(--line);
    border-radius: 10px;
    box-shadow: none
}

.trends-page .trend-toolbar {
    background: #fafafa;
    border-radius: 10px 10px 0 0
}

.trends-page .trend-tabs button[aria-selected=true] {
    color: #fff;
    background: #e03313;
    box-shadow: 0 1px 2px #e033132b
}

.trends-page .trend-tabs button:hover {
    color: #e03313
}

.trends-page .trend-more-filters[open]>summary,
.trends-page .trend-more-filters>summary:hover {
    background: #fff1ee;
    color: #c52a0e;
    border-color: #f3b8ad
}

.trends-page .trend-leading .trend-rank {
    background: #fde8e3;
    color: #9e210a
}

.trends-page .trend-row-title:hover {
    color: #e03313
}

.trends-page .trend-row-menu summary:hover,
.trends-page .trend-row-menu[open] summary {
    background: #fff1ee;
    color: #c52a0e
}

.trends-page .trend-feed-meta {
    padding-top: 7px;
    border-top: 1px solid var(--line);
    color: #666
}

.trends-page .trend-table th {
    background: #f5f5f5;
    color: #5b5b5b;
    font-size: 11px
}

.trends-page .trend-table td {
    height: 65px;
    border-color: #eee
}

.trends-page .trend-table tbody tr:hover {
    background: #fafafa
}

.trends-page .trend-row-title {
    color: #222;
    font-weight: 550
}

.trends-page .trend-row-title:hover {
    text-decoration: underline
}

.trends-page .trend-rank {
    color: #555;
    background: #eee
}

.trend-row-source {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 11px;
    margin-top: 3px
}

.trend-source-icon {
    display: inline-grid;
    place-items: center;
    width: 14px;
    height: 14px;
    color: #fff;
    border-radius: 4px;
    background: #232323
}

.trend-source-icon.facebook {
    background: #1877f2
}

.trend-source-icon svg {
    width: 9px;
    height: 9px
}

.trend-post-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0
}

.trend-post-copy {
    flex: 1;
    min-width: 0
}

.trend-post-cover {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    height: 42px;
    border-radius: 7px;
    background: #f1f1f1;
    color: #626262;
    overflow: hidden
}

.trend-post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

.trends-page .trend-row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-height: 1.35;
    overflow-wrap: anywhere
}

.trends-page .trend-table th:nth-child(5) {
    text-align: right
}

.trends-page .trend-row-menu summary:hover {
    background: #eee;
    color: #242424
}

@media(max-width:720px) {
    .trends-page .trend-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 0 12px
    }

    .trends-page .trend-filters {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%
    }

    .trends-page .trend-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%
    }

    .trends-page .trend-tabs button {
        padding: 6px 8px;
        min-height: 36px;
        text-align: center
    }

    #main .trends-page .trend-tabs button,
    #main .trends-page .trend-window button,
    #main .trends-page .trend-select,
    #main .trends-page .trend-filter-actions button,
    #main .trends-page .trend-filter-actions select {
        min-height: 36px;
        height: 36px;
    }

    .trends-page .trend-filter-actions {
        width: 100%;
        justify-content: space-between;
        gap: 8px
    }

    .trends-page .trend-filter-actions .form-field {
        flex: 1 1 auto
    }

    .trends-page .trend-filter-actions select {
        width: 100%;
        min-height: 36px;
        height: 36px
    }

    .trends-page .trend-more-filters {
        margin-left: auto;
        flex: none
    }

    .trends-page .trend-more-filters>summary {
        min-width: 38px;
        height: 36px;
        padding: 0 8px
    }

    .trends-page .trend-filter-popover {
        left: auto;
        right: 0;
        width: min(268px, calc(100vw - 36px));
        max-width: calc(100vw - 36px)
    }

    .trends-page .trend-table,
    .trends-page .trend-table tbody {
        display: block
    }

    .trends-page .trend-table thead,
    .trends-page .trend-table colgroup {
        display: none
    }

    .trends-page .trend-table tr {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr)) 34px;
        padding: 9px 10px;
        gap: 6px;
        border-bottom: 1px solid var(--line)
    }

    .trends-page .trend-table tr:last-child {
        border-bottom: 0
    }

    .trends-page .trend-table td {
        height: auto;
        min-width: 0;
        padding: 0;
        border: 0
    }

    .trends-page .trend-table td:first-child {
        display: none
    }

    .trends-page .trend-post-cell {
        grid-column: 1/4;
        grid-row: 1
    }

    .trends-page .trend-table td:last-child {
        grid-column: 4;
        grid-row: 1;
        align-self: start
    }

    .trends-page .trend-table .trend-numeric {
        text-align: left;
        padding: 4px 0 0
    }

    .trends-page .trend-numeric::before {
        content: attr(data-label);
        display: block;
        font-size: 10px;
        color: #666
    }

    .trends-page .trend-view-change {
        display: none
    }
}

@media(max-width:560px) {
    #trend-keyword-panel {
        padding: 14px var(--mobile-gutter, 14px) 20px
    }

    #trend-keyword-form {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px
    }

    #trend-keyword-form .form-field:first-child {
        grid-column: 1 / -1
    }

    #trend-keyword-form select,
    #trend-keyword-form button {
        min-height: 44px
    }

    .trend-keyword {
        gap: 8px 10px;
        padding: 10px 0
    }

    .trend-keyword-actions .text-button {
        padding: 6px 8px;
        min-height: 34px;
        font-size: 12px
    }
}

.trend-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 285px), 1fr));
    gap: 10px;
    padding: 12px;
    background: #fafafa
}

.trend-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white
}

.trend-card>header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px
}

.trend-card>header time {
    font-size: 11px;
    color: #666
}

.trend-card .trend-row-source {
    margin: 0
}

.trend-card .trend-row-menu {
    margin-left: auto
}

.trend-card-post {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 3px 10px 12px;
    text-align: left
}

.trend-card-post:hover .trend-row-title {
    text-decoration: underline
}

.trend-card-post img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 6px;
    flex: none
}

.trend-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: auto 0 0;
    border-top: 1px solid var(--line)
}

.trend-card-metrics>div {
    padding: 7px 8px;
    min-width: 0
}

.trend-card-metrics>div+div {
    border-left: 1px solid var(--line)
}

.trend-card-metrics dt {
    font-size: 11px;
    color: #666
}

.trend-card-metrics dd {
    margin: 0;
    font-size: 14px;
    font-weight: 550;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere
}

.trend-card-metrics small {
    color: #666;
    font-size: 10px;
    font-weight: 400
}

.trend-card-metrics .trend-rising {
    padding: 0;
    color: #217255;
    background: transparent;
    font-size: inherit
}

#modal:has(.trend-detail-layout) {
    width: min(940px, 94vw);
    border-color: #ddd
}

#modal:has(.trend-detail-layout) .modal-body {
    padding: 18px
}

#modal:has(.trend-detail-layout) .modal-body>p {
    margin-bottom: 12px;
    color: #616161
}

.trend-detail-layout {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
    gap: 14px
}

.trend-detail-layout .trend-detail-content,
.trend-detail-layout #trend-insight {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px
}

.trend-detail-layout .trend-detail-caption {
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere
}

.trend-detail-layout .trend-video-actions {
    margin-top: 8px
}

@media(max-width:760px) {
    .trend-detail-layout {
        grid-template-columns: 1fr
    }

    .trend-detail-layout #trend-insight th,
    .trend-detail-layout #trend-insight td {
        overflow-wrap: anywhere
    }
}

.trend-player-frame {
    margin: 0 auto 12px
}

.trend-player-frame .trend-inline-video {
    margin: 0;
    height: auto;
    aspect-ratio: 16/9
}

.trend-player-frame[data-platform="douyin"] {
    position: relative;
    width: min(100%, 250px, 25dvh);
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 8px;
    background: #181818;
}

.trend-player-frame[data-platform="douyin"] .trend-inline-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 390px;
    max-width: none;
    height: auto;
    aspect-ratio: 9/16;
    transform-origin: top left;
    transform: scale(var(--player-scale, 0));
}

.trend-detail-layout .trend-video-actions .button {
    min-height: 32px;
    font-size: 12px
}

.trends-page {
    background: #fafafa
}

.trends-page>.page-heading {
    max-width: none;
    margin: 0;
    min-height: 63px;
    padding: 13px 28px;
    border-bottom: 1px solid var(--line);
    background: #fff;
    align-items: center
}

.trends-page h1 {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.25
}

.trends-page>.content-inner {
    max-width: none;
    margin: 0;
    padding: 12px 28px 26px
}

.trends-page .trend-feed {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none
}

.trends-page .trend-toolbar {
    padding: 0 0 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    gap: 12px;
    flex-wrap: wrap
}

.trends-page .trend-filters {
    gap: 12px;
    flex-wrap: wrap
}

.trends-page .trend-tabs {
    padding: 2px;
    background: #f1f1f4;
    border-color: #e6e6eb;
    border-radius: 7px
}

.trends-page .trend-tabs button {
    padding: 4px 11px;
    font-size: 12px;
    line-height: 19px;
    border-radius: 5px
}

.trends-page .trend-tabs button[aria-selected=true] {
    color: #fff;
    background: #e03313;
    box-shadow: 0 1px 2px #e033132b
}

.trends-page .trend-filter-actions {
    gap: 6px
}

.trends-page .trend-filter-actions select {
    min-height: 30px;
    height: 30px;
    padding: 4px 8px;
    width: auto;
    min-width: 82px;
    border-color: var(--line);
    border-radius: 7px
}

.trends-page .trend-more-filters>summary {
    min-width: 30px;
    height: 30px;
    border-color: var(--line);
    background: #fff;
    border-radius: 7px
}

.trends-page .trend-feed-meta {
    padding: 0;
    border-top: 0;
    min-height: 0;
    gap: 8px;
    font-size: 12px;
    color: #71717a
}

.trends-page .trend-results {
    border-top: 0;
    min-height: 0
}

.trends-page .trend-empty {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 22px
}

.trends-page .trend-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 265px), 1fr));
    gap: 14px;
    padding: 0;
    background: transparent
}

.trends-page .trend-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s
}

.trends-page .trend-card:hover {
    border-color: #d8c1b2;
    box-shadow: 0 3px 10px #2b1a0e0a
}

.trends-page .trend-card>header {
    padding: 10px 12px 6px
}

.trends-page .trend-card-post {
    align-items: flex-start;
    gap: 11px;
    padding: 4px 12px 14px
}

.trends-page .trend-card-post img {
    width: 68px;
    height: 68px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: #f5f2ef;
    object-fit: cover;
    flex: none
}

.trends-page .trend-card-post .trend-row-title {
    flex: 1;
    min-width: 0;
    width: auto
}

.trends-page .trend-row-title {
    font-size: 13px;
    line-height: 1.48;
    -webkit-line-clamp: 3
}

.trends-page .trend-card-metrics {
    background: #faf8f6;
    border-radius: 0 0 9px 9px;
    overflow: hidden
}

.trends-page .trend-card-metrics>div {
    padding: 8px 10px
}

@media(max-width:740px) {
    .trends-page>.page-heading {
        padding: 14px 16px
    }

    .trends-page>.content-inner {
        padding: 12px 16px 24px
    }

    .trends-page .trend-toolbar {
        padding: 10px
    }
}