.cpm2-sidebar-banner,
.cpm2-sidebar-market {
    position: relative;
    overflow: hidden;
    width: 100%;
    border: 1px solid var(--border-color, #e0e5ed);
    border-radius: 14px;
    background: var(--card-bg, #fff);
    box-shadow: 0 3px 12px rgba(20, 38, 64, .06);
}

.cpm2-sidebar-banner[hidden],
.cpm2-sidebar-market[hidden] { display: none !important; }

.cpm2-banner-square { aspect-ratio: 1 / 1; min-height: 180px; }
.cpm2-banner-wide { aspect-ratio: 1.72 / 1; min-height: 150px; }
.cpm2-banner-empty { background: linear-gradient(145deg, #f7f9fc, #edf3fb); }
.cpm2-showcase-empty { display: flex; width: 100%; min-height: 110px; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px; border: 1px dashed #b7c7db; border-radius: inherit; color: var(--text-color, #26354a); background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(237,243,251,.92)); text-align: center; cursor: pointer; }
.cpm2-banner-square .cpm2-showcase-empty, .cpm2-banner-wide .cpm2-showcase-empty { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; }
.cpm2-showcase-empty > span { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: #fff; background: #176bce; font-size: 1.25rem; }
.cpm2-showcase-empty strong { font-size: .78rem; }
.cpm2-showcase-empty small { max-width: 220px; color: var(--text-secondary, #64748b); font-size: .68rem; line-height: 1.4; }
.cpm2-showcase-empty em { color: #176bce; font-size: .65rem; font-style: normal; font-weight: 700; }
.cpm2-showcase-empty:hover { border-color: #176bce; background: #edf5ff; }
.cpm2-showcase-empty-public { cursor: default; }
.cpm2-showcase-empty-public:hover { border-color: #b7c7db; background: linear-gradient(145deg, rgba(255,255,255,.92), rgba(237,243,251,.92)); }
.cpm2-sidebar-market .cpm2-showcase-empty { min-height: 145px; }
.cpm2-banner-slide { position: absolute; inset: 0; display: block; color: #fff; text-decoration: none; animation: cpm2-banner-enter .55s ease both; }
.cpm2-banner-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cpm2-banner-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 16, 30, .04) 20%, rgba(7, 16, 30, .78) 100%); }
.cpm2-banner-copy { position: absolute; right: 13px; bottom: 13px; left: 13px; display: grid; gap: 5px; text-shadow: 0 1px 5px rgba(0,0,0,.5); }
.cpm2-banner-copy strong { font-size: 1rem; line-height: 1.2; }
.cpm2-banner-copy small { font-size: .78rem; line-height: 1.35; }
.cpm2-banner-copy em { width: fit-content; margin-top: 3px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: .7rem; font-style: normal; }
.cpm2-banner-count { position: absolute; top: 9px; right: 9px; padding: 3px 7px; border-radius: 999px; color: #fff; background: rgba(0,0,0,.48); font-size: .68rem; }

.cpm2-sidebar-market { padding: 10px; }
.cpm2-sidebar-market-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; color: var(--text-secondary, #64748b); font-size: .66rem; font-weight: 700; letter-spacing: .06em; }
.cpm2-sidebar-market-heading span { color: #176b4b; }
.cpm2-sidebar-market-heading strong { font-size: .62rem; font-weight: 500; letter-spacing: 0; }
.cpm2-sidebar-listing { display: grid; grid-template-columns: 68px minmax(0, 1fr); gap: 9px; width: 100%; padding: 7px 0; border: 0; border-top: 1px solid var(--border-color, #edf0f4); color: inherit; background: transparent; text-align: left; cursor: pointer; }
.cpm2-sidebar-listing:first-of-type { border-top: 0; }
.cpm2-sidebar-listing img, .cpm2-sidebar-listing-placeholder { display: grid; width: 68px; height: 55px; place-items: center; border-radius: 8px; background: #eef2f7; object-fit: cover; font-size: 1.4rem; }
.cpm2-sidebar-listing > span:last-child { display: grid; align-content: center; gap: 3px; min-width: 0; }
.cpm2-sidebar-listing strong, .cpm2-sidebar-listing small, .cpm2-sidebar-listing em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cpm2-sidebar-listing strong { font-size: .78rem; }
.cpm2-sidebar-listing small { color: var(--text-secondary, #64748b); font-size: .67rem; }
.cpm2-sidebar-listing em { color: #176b4b; font-size: .7rem; font-style: normal; font-weight: 700; }
.cpm2-sidebar-listing:hover strong { color: #176bce; }

.cpm2-home-editor { margin: 14px 0; padding: 12px; border: 1px solid var(--border-color, #dfe5ed); border-radius: 14px; background: var(--card-bg, #fff); }
.cpm2-home-editor > details > summary { cursor: pointer; font-weight: 700; }
.cpm2-home-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.cpm2-home-banner-editors fieldset, .cpm2-home-pick-group { min-width: 0; padding: 10px; border: 1px solid var(--border-color, #e4e8ef); border-radius: 10px; }
.cpm2-home-banner-editors legend { padding: 0 4px; font-size: .8rem; font-weight: 700; }
.cpm2-home-banner-editors label { display: grid; gap: 4px; margin: 7px 0; color: var(--text-secondary, #64748b); font-size: .72rem; }
.cpm2-home-banner-editors input, .cpm2-home-banner-editors textarea, .cpm2-home-pick-group select { width: 100%; min-width: 0; padding: 8px; border: 1px solid var(--border-color, #d7dde6); border-radius: 8px; background: var(--input-bg, #f7f8fa); color: inherit; font: inherit; font-size: .78rem; }
.cpm2-home-banner-editors textarea { min-height: 65px; resize: vertical; }
.cpm2-home-editor > details > p { color: var(--text-secondary, #64748b); font-size: .76rem; line-height: 1.45; }
.cpm2-home-banner-editors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cpm2-home-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cpm2-home-pick-group { display: grid; gap: 7px; }
.cpm2-home-pick-group legend { padding: 0 4px; font-size: .77rem; font-weight: 700; }
.cpm2-home-pick-group small { color: var(--text-secondary, #64748b); font-size: .7rem; }
.cpm2-home-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.cpm2-home-editor-actions button { padding: 9px 14px; border: 0; border-radius: 9px; color: white; background: #176bce; font-weight: 700; cursor: pointer; }
.cpm2-home-editor-actions button:disabled { opacity: .6; cursor: wait; }
.cpm2-home-editor-actions span { color: var(--text-secondary, #64748b); font-size: .78rem; }

@media (max-width: 760px) {
    .cpm2-home-banner-editors, .cpm2-home-picks { grid-template-columns: 1fr; }
}

@keyframes cpm2-banner-enter { from { opacity: .35; transform: scale(1.015); } to { opacity: 1; transform: scale(1); } }
