.ls-steam-cover-btn,
.ls-pa-tb-btn.ls-steam-cover-btn {
    position: relative;
}

.ls-steam-cover-btn.is-active,
.ls-steam-cover-btn.has-cover {
    color: var(--ls-theme-color, #1e88e5);
}

.ls-steam-cover-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    border: 1px solid #fff;
}

body.ls-steam-cover-sidebar-mode .ls-steam-cover-modal {
    display: none !important;
}

/* ========== 长文发布页：右侧空白区固定卡片（红框位置） ========== */
.ls-steam-cover-sidebar-rail {
    position: fixed;
    top: calc(var(--ls-header-height, 60px) + 24px);
    left: calc((100vw + 1100px) / 2 + 20px);
    width: 280px;
    z-index: 10010;
    max-height: calc(100vh - var(--ls-header-height, 60px) - 48px);
    overflow: auto;
    scrollbar-width: thin;
    pointer-events: auto;
    isolation: isolate;
}

.ls-steam-cover-sidebar-rail[hidden] {
    display: none !important;
}

.ls-steam-cover-inline-card {
    margin: 0 0 12px;
}

.ls-steam-cover-sidebar-card {
    background: var(--ls-card-bg, #fff);
    border: 1px solid var(--ls-border, #e2e8f0);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.ls-steam-cover-sidebar-card.has-cover {
    border-color: rgba(30, 136, 229, 0.35);
}

.ls-steam-cover-sidebar-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 10px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ls-text, #1e293b);
    border-bottom: 1px solid var(--ls-border, #e2e8f0);
}

.ls-steam-cover-sidebar-head .remix-icon {
    color: var(--ls-theme-color, #1e88e5);
    font-size: 18px;
}

.ls-steam-cover-sidebar-badge {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    color: #15803d;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 999px;
}

.ls-steam-cover-sidebar-body {
    padding: 12px 16px 8px;
}

.ls-steam-cover-sidebar-tip {
    padding: 10px 16px 14px;
    font-size: 12px;
    color: var(--ls-text-secondary, #64748b);
    line-height: 1.5;
    border-top: 1px solid var(--ls-border, #e2e8f0);
    background: var(--ls-bg-2, #f8fafc);
}

/* ========== 弹窗模式（动态/其他发布页） ========== */
.ls-steam-cover-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, 0.45);
}

.ls-steam-cover-modal.is-open {
    display: flex;
}

.ls-steam-cover-dialog {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.ls-steam-cover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 8px;
    font-size: 16px;
    font-weight: 600;
}

.ls-steam-cover-close {
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #64748b;
}

.ls-steam-cover-body {
    padding: 8px 18px 18px;
}

.ls-steam-cover-field {
    margin-bottom: 14px;
}

.ls-steam-cover-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #475569;
}

.ls-steam-cover-field input {
    width: 100%;
    max-width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    font-size: 14px;
    box-sizing: border-box;
    background: var(--ls-card-bg, #fff);
    color: var(--ls-text, #1e293b);
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.ls-steam-cover-row {
    display: flex;
    gap: 8px;
}

.ls-steam-cover-row input {
    flex: 0 0 150px;
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.ls-steam-cover-field input[type="url"],
.ls-steam-cover-field input[data-steam-cover-url] {
    width: 100%;
    max-width: 100%;
}

.ls-steam-cover-fetch-btn,
.ls-steam-cover-apply-btn,
.ls-steam-cover-clear-btn,
.ls-steam-cover-open-btn {
    border: 0;
    border-radius: 10px;
    padding: 0 14px;
    height: 40px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    pointer-events: auto;
}

.ls-steam-cover-fetch-btn:disabled,
.ls-steam-cover-apply-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.ls-steam-cover-fetch-btn,
.ls-steam-cover-apply-btn {
    background: var(--ls-theme-color, #1e88e5);
    color: #fff;
}

.ls-steam-cover-clear-btn {
    background: #f1f5f9;
    color: #475569;
}

.ls-steam-cover-open-btn {
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    background: #eff6ff;
    color: #1d4ed8;
}

.ls-steam-cover-preview {
    margin-top: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8fafc;
}

.ls-steam-cover-sidebar-card .ls-steam-cover-preview {
    min-height: 140px;
    aspect-ratio: 16 / 9;
}

.ls-steam-cover-preview img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 220px;
    object-fit: cover;
}

.ls-steam-cover-sidebar-card .ls-steam-cover-preview img {
    max-height: none;
}

.ls-steam-cover-preview-empty {
    color: #94a3b8;
    font-size: 13px;
}

.ls-steam-cover-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
    text-align: center;
    padding: 12px;
}

.ls-steam-cover-preview-loading[hidden] {
    display: none !important;
}

.ls-steam-cover-sidebar-card.is-fetching .ls-steam-cover-preview-empty,
.ls-steam-cover-sidebar-card.is-fetching .ls-steam-cover-preview img {
    display: none !important;
}

.ls-steam-cover-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #dbe3ef;
    border-top-color: var(--ls-theme-color, #1e88e5);
    border-radius: 50%;
    animation: ls-steam-cover-spin 0.8s linear infinite;
}

@keyframes ls-steam-cover-spin {
    to { transform: rotate(360deg); }
}

.ls-steam-cover-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #64748b;
    min-height: 18px;
    line-height: 1.4;
    word-break: break-word;
}

.ls-steam-cover-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.ls-steam-cover-sidebar-card .ls-steam-cover-actions {
    flex-direction: column;
}

.ls-steam-cover-sidebar-card .ls-steam-cover-fetch-btn,
.ls-steam-cover-sidebar-card .ls-steam-cover-apply-btn,
.ls-steam-cover-sidebar-card .ls-steam-cover-clear-btn {
    width: 100%;
}

.ls-steam-cover-setting .ls-pw-setting-right {
    display: flex;
    align-items: center;
}

@media (max-width: 1379px) {
    .ls-steam-cover-sidebar-rail {
        display: none !important;
    }
}
