/* 对标账号页基础样式：结构由 benchmark.js 生成，样式集中在这里维护。 */
#view-benchmark { overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
#benchmark-page { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-bottom: 28px; }
.bm-header { display: flex; flex-flow: row nowrap; align-items: flex-end; justify-content: space-between; gap: 16px; flex-shrink: 0; }
.bm-stats { flex-shrink: 0; display: flex; align-items: baseline; gap: 10px; padding-bottom: 5px; font-size: 12.5px; color: var(--theme-ink-subtle); white-space: nowrap; }
.bm-stat b { font-size: 16px; font-weight: 650; color: var(--theme-ink); margin-right: 4px; font-variant-numeric: tabular-nums; }
.bm-stat-sep { width: 3px; height: 3px; border-radius: 9999px; background: var(--theme-surface); align-self: center; }
.bm-layout { display: flex; gap: 24px; align-items: stretch; flex: 1; min-height: 0; }
.bm-side { width: 312px; flex-shrink: 0; display: flex; flex-direction: column; min-height: 0; }
.bm-toolbar { display: flex; gap: 8px; margin-bottom: 14px; flex-shrink: 0; }
.bm-search { flex: 1; position: relative; }
.bm-search i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--theme-ink-subtle); font-size: 14px; pointer-events: none; transition: color .15s; }
.bm-search input { width: 100%; background: var(--theme-sunken); border: 1px solid var(--theme-line); border-radius: 10px; color: var(--theme-ink); font-size: 13px; padding: 8px 10px 8px 31px; outline: none; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; }
.bm-search input:focus { border-color: var(--theme-accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-accent) 16%, transparent); }
.bm-search input::placeholder { color: var(--theme-ink-subtle); }
.bm-new { flex-shrink: 0; display: inline-flex; align-items: center; gap: 5px; background: var(--bm-accent); border: none; border-radius: 10px; color: var(--accent-ink); font-size: 13px; font-weight: 600; padding: 8px 14px; cursor: pointer; transition: filter .15s, transform .1s; }
.bm-new:hover { background: var(--accent-hover); }
.bm-new:active { transform: scale(.97); }
.bm-purpose-tabs { display: flex; flex-wrap: wrap; gap: 5px; overflow: visible; margin: 0 -2px 10px; padding: 2px 2px 6px; flex-shrink: 0; }
.bm-purpose-tab { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--theme-line); border-radius: 999px; background: transparent; color: var(--theme-ink-subtle); font: inherit; font-size: 11.5px; padding: 5px 9px; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.bm-purpose-tab span { color: var(--theme-ink-subtle); font-size: 10px; font-variant-numeric: tabular-nums; }
.bm-purpose-tab:hover { background: var(--theme-surface); color: var(--theme-ink); }
.bm-purpose-tab.active { background: color-mix(in srgb, var(--bm-accent) 14%, var(--theme-surface)); border-color: color-mix(in srgb, var(--bm-accent) 48%, var(--theme-line)); color: var(--theme-ink); }
.bm-purpose-tab.active span { color: var(--theme-accent-ink); }
.bm-gallery-section { margin: 16px 0 24px; padding: 16px; border: 1px solid var(--theme-line); border-radius: 14px; background: var(--surface-sunken); }
.bm-gallery-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bm-gallery-hint { margin-top: 5px; color: var(--theme-ink-subtle); font-size: 11.5px; line-height: 1.5; }
.bm-gallery-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.bm-gallery-actions .bm-input { width: 104px; }
.bm-gallery-drop { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin-top: 14px; padding: 9px 12px; border: 1px dashed color-mix(in srgb,var(--theme-line) 28%,transparent); border-radius: 10px; color: var(--theme-ink-subtle); background: color-mix(in srgb,var(--theme-ink) 1.8%,transparent); cursor: pointer; transition: border-color .15s, background .15s, color .15s; }
.bm-gallery-drop i { color: var(--theme-accent-ink); font-size: 18px; }
.bm-gallery-drop small { color: var(--theme-ink-subtle); font-size: 10.5px; }
.bm-gallery-drop:hover, .bm-gallery-drop.dragging { border-color: color-mix(in srgb, var(--bm-accent) 58%, var(--theme-line)); background: color-mix(in srgb, var(--bm-accent) 7%, transparent); color: var(--theme-ink); }
.bm-gallery-filters { display: flex; flex-wrap: wrap; gap: 5px; margin: 14px 0 10px; }
.bm-gallery-filter { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; background: transparent; color: var(--theme-ink-subtle); font: inherit; font-size: 11px; cursor: pointer; }
.bm-gallery-filter span { color: var(--theme-ink-subtle); font-size: 10px; }
.bm-gallery-filter:hover { background: var(--theme-surface); color: var(--theme-ink); }
.bm-gallery-filter.active { border-color: color-mix(in srgb, var(--bm-accent) 46%, var(--theme-line)); background: color-mix(in srgb, var(--bm-accent) 12%, var(--theme-surface)); color: var(--theme-ink); }
.bm-gallery-filter.active span { color: var(--theme-accent-ink); }
.bm-gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.bm-gallery-card { position: relative; min-width: 0; padding: 7px; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--theme-surface); }
.bm-gallery-preview { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; border-radius: 8px; background: var(--theme-surface); cursor: zoom-in; }
.bm-gallery-preview img { display: block; width: 100%; height: 100%; object-fit: contain; transition: transform .18s ease, opacity .18s ease; }
.bm-gallery-preview:hover img { transform: scale(1.025); }
.bm-gallery-image-fallback { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 3px; color: var(--theme-ink-subtle); font-size: 10px; }
.bm-gallery-image-fallback i { font-size: 20px; }
.bm-gallery-preview img[src=""] { display: none; }
.bm-gallery-preview img[src=""] + .bm-gallery-image-fallback { display: flex; }
.bm-gallery-preview img:not([src=""]):not([data-loaded]) { background: var(--theme-surface); }
.bm-gallery-card-meta { display: flex; align-items: center; gap: 5px; margin-top: 7px; }
.bm-gallery-kind, .bm-gallery-source { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; padding: 2px 6px; border-radius: 999px; font-size: 9.5px; white-space: nowrap; }
.bm-gallery-kind { background: color-mix(in srgb, var(--bm-accent) 14%, var(--theme-surface)); color: var(--theme-ink); }
.bm-gallery-source { background: var(--theme-surface); color: var(--theme-ink-subtle); }
.bm-gallery-name { overflow: hidden; margin-top: 5px; color: var(--theme-ink-subtle); font-size: 10.5px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.bm-gallery-delete { margin-top: 5px; padding: 0; border: 0; background: transparent; color: var(--theme-ink-subtle); font: inherit; font-size: 10px; cursor: pointer; }
.bm-gallery-delete:hover { color: var(--theme-danger); }
.bm-gallery-empty { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 68px; color: var(--theme-ink-subtle); font-size: 11px; }
.bm-gallery-empty i { color: var(--theme-ink); font-size: 20px; }
.bm-gallery-lightbox { position: fixed; inset: 0; z-index: 10020; display: flex; align-items: center; justify-content: center; padding: 24px; background: color-mix(in srgb,var(--theme-overlay) 72%,transparent); backdrop-filter: blur(8px); }
.bm-gallery-lightbox-card { position: relative; display: flex; align-items: center; justify-content: center; width: min(1080px, 94vw); height: min(820px, 92vh); padding: 22px 54px 50px; border: 1px solid var(--theme-line); border-radius: 16px; background: var(--theme-surface); box-sizing: border-box; }
.bm-gallery-lightbox-image { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.bm-gallery-lightbox-close, .bm-gallery-lightbox-nav { position: absolute; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--theme-line); border-radius: 8px; background: var(--theme-surface); color: var(--theme-ink); cursor: pointer; }
.bm-gallery-lightbox-close { top: 14px; right: 14px; }
.bm-gallery-lightbox-nav { top: 50%; transform: translateY(-50%); }
.bm-gallery-lightbox-nav.prev { left: 12px; }
.bm-gallery-lightbox-nav.next { right: 12px; }
.bm-gallery-lightbox-close:hover, .bm-gallery-lightbox-nav:hover:not(:disabled) { border-color: var(--theme-accent-ink); color: var(--theme-ink); }
.bm-gallery-lightbox-nav:disabled { opacity: .3; cursor: default; }
.bm-gallery-lightbox-meta { position: absolute; right: 54px; bottom: 16px; left: 54px; display: flex; align-items: center; gap: 8px; color: var(--theme-ink-subtle); font-size: 11px; }
.bm-gallery-lightbox-meta span:first-child { color: var(--theme-ink); }
.bm-gallery-lightbox-meta small { margin-left: auto; color: var(--theme-ink-subtle); }
.bm-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 24px; }
.bm-item { position: relative; display: flex; gap: 14px; align-items: center; min-height: 96px; background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 12px; padding: 11px 12px; cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s; box-shadow: inset 0 1px 0 color-mix(in srgb,var(--theme-overlay) 3%,transparent); }
.bm-item.sortable { cursor: grab; }
.bm-item.sortable:active { cursor: grabbing; }
.bm-item:hover { background: var(--theme-surface); border-color: var(--theme-line); }
.bm-item.active { background: var(--theme-surface); border-color: var(--theme-accent-ink); box-shadow: inset 0 1px 0 color-mix(in srgb,var(--theme-overlay) 4%,transparent), 0 0 0 1px color-mix(in srgb, var(--bm-accent) 24%, transparent); }
.bm-item.active::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--bm-accent); }
.bm-ava { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; border: 1px solid; font-weight: 600; user-select: none; overflow: hidden; }
.bm-ava-image-wrap { position: relative; background: var(--theme-surface); }
.bm-ava-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.bm-ava-fallback { position: absolute; inset: 0; }
.bm-item-body { flex: 1; min-width: 0; }
.bm-item-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bm-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 650; color: var(--theme-ink); letter-spacing: -.2px; }
.bm-item-meta { font-size: 11.5px; color: var(--theme-ink-subtle); margin-top: 3px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bm-chips { display: flex; gap: 5px; margin-top: 6px; overflow: hidden; }
.bm-mini-chip, .bm-badge { font-size: 10.5px; font-weight: 500; padding: 2px 8px; border-radius: 9999px; background: var(--theme-surface); border: 1px solid var(--theme-line); color: var(--theme-ink-subtle); flex-shrink: 0; }
.bm-drag-handle { flex: 0 0 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--theme-ink-subtle); font-size: 16px; cursor: grab; }
.bm-item:hover .bm-drag-handle { color: var(--theme-accent-ink); }
.bm-item.dragging { opacity: .35; }
.bm-item.drop-above::after, .bm-item.drop-below::after { content: ""; position: absolute; left: 8px; right: 8px; height: 2px; border-radius: 2px; background: var(--bm-accent); z-index: 2; }
.bm-item.drop-above::after { top: -5px; }
.bm-item.drop-below::after { bottom: -5px; }
.bm-main { flex: 1; min-width: 0; overflow-y: auto; padding-bottom: 28px; box-sizing: border-box; }
#bm-detail { background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 16px; padding: 26px 30px 30px; box-shadow: inset 0 1px 0 color-mix(in srgb,var(--theme-overlay) 4%,transparent); box-sizing: border-box; }
.bm-detail-head { display: flex; gap: 13px; align-items: center; }
.bm-name { flex: 1; min-width: 0; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--theme-ink); font-size: 19px; font-weight: 650; letter-spacing: -.3px; padding: 5px 10px; margin-left: -10px; outline: none; font-family: inherit; transition: background .15s, border-color .15s, box-shadow .15s; }
.bm-name:hover, .bm-name:focus { background: var(--theme-hover); }
.bm-name:focus { border-color: var(--theme-accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-accent) 16%, transparent); }
.bm-head-actions { margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 10px; }
.bm-status { min-width: 118px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; text-align: right; font-size: 12px; color: var(--theme-ink-subtle); white-space: nowrap; }
.bm-status.err { color: var(--theme-danger); }
.bm-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; background: none; border: 1px solid transparent; border-radius: 8px; color: var(--theme-ink-subtle); font-size: 15px; cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.bm-icon-btn:hover { color:var(--theme-accent-ink); border-color: color-mix(in srgb,var(--theme-line) 35%,transparent); background: color-mix(in srgb,var(--theme-accent) 8%,transparent); }
.bm-sec-label { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; font-size: 11.5px; font-weight: 600; letter-spacing: 1.6px; color: var(--theme-ink-subtle); }
.bm-sec-rule { flex: 1; height: 1px; background: var(--theme-surface); }
.bm-sec-badge { font-size: 10.5px; font-weight: 600; letter-spacing: .4px; color: var(--theme-accent-ink); background: color-mix(in srgb, var(--bm-accent) 12%, transparent); border-radius: 9999px; padding: 1px 9px; }
.bm-hint { font-size: 11px; color: var(--theme-ink-subtle); font-weight: 400; letter-spacing: 0; }
.bm-grid { display: grid; grid-template-columns: 150px 1fr 1.45fr; gap: 0 14px; }
.bm-field { min-width: 0; }
.bm-field-wide { margin-top: 14px; }
.bm-label { font-size: 12px; color: var(--theme-ink-subtle); margin: 0 0 6px; display: flex; align-items: baseline; gap: 8px; }
.bm-input { width: 100%; background: var(--theme-sunken); border: 1px solid var(--theme-line); border-radius: 10px; color: var(--theme-ink); font-size: 13.5px; padding: 9px 12px; outline: none; transition: border-color .15s, box-shadow .15s; font-family: inherit; box-sizing: border-box; }
.bm-input:focus { border-color: var(--theme-accent-ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bm-accent) 16%, transparent); }
.bm-input::placeholder { color: var(--theme-ink-subtle); }
textarea.bm-input { resize: vertical; line-height: 1.8; }
.bm-purpose-field { margin-top: 16px; }
.bm-purpose-options { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-purpose-option { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.bm-purpose-option input { position: absolute; opacity: 0; pointer-events: none; }
.bm-purpose-option span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border: 1px solid var(--theme-line); border-radius: 9px; background: var(--theme-surface); color: var(--theme-ink-subtle); font-size: 13px; transition: background .15s, border-color .15s, color .15s, box-shadow .15s; }
.bm-purpose-option:hover span { border-color: var(--theme-line); color: var(--theme-ink); }
.bm-purpose-option input:checked + span { border-color: color-mix(in srgb, var(--bm-accent) 52%, var(--theme-line)); background: color-mix(in srgb, var(--bm-accent) 16%, var(--theme-sunken)); color: var(--theme-ink); box-shadow: 0 0 0 2px color-mix(in srgb, var(--bm-accent) 10%, transparent); }
.bm-purpose-option input:focus-visible + span { outline: 2px solid var(--bm-accent); outline-offset: 2px; }
.bm-platforms { display: flex; flex-direction: column; gap: 14px; }
.bm-platform-card { background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 12px; padding: 16px; box-shadow: inset 0 1px 0 color-mix(in srgb,var(--theme-overlay) 3%,transparent); }
.bm-platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bm-platform-title { display: flex; align-items: center; gap: 9px; min-width: 0; color: var(--theme-ink); }
.bm-platform-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px; font-size: 16px; line-height: 1; }
/* 固定的平台色不跟随主题文字色，亮、暗外观下都能一眼分辨。 */
.bm-platform-icon-douyin { color: #7048d6; background: rgba(112,72,214,.13); }
.bm-platform-icon-channels { color: #b84f0c; background: rgba(184,79,12,.13); }
.bm-platform-icon-xhs { color: #d92c45; background: rgba(217,44,69,.12); }
.bm-platform-label { flex: 0 0 auto; color: var(--theme-ink-subtle); font-size: 12px; }
.bm-platform-title .bm-platform-name { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--theme-ink); font-size: 17px; font-weight: 700; letter-spacing: -.25px; }
.bm-platform-title .bm-platform-name.muted { color: var(--theme-ink-subtle); font-size: 13px; font-weight: 500; }
.bm-fans-sep { flex: 0 0 auto; color: var(--theme-ink-subtle); }
.bm-fans { flex: 0 0 auto; color: var(--theme-ink-subtle); font-size: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bm-platform-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.bm-small-btn, .bm-text-btn, .bm-danger-link { border: 0; background: transparent; color: var(--theme-accent-ink); cursor: pointer; font: inherit; font-size: 12px; }
.bm-small-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--theme-line); border-radius: 8px; padding: 6px 9px; color: var(--theme-ink-secondary); }
.bm-small-btn:hover, .bm-text-btn:hover { color: var(--theme-accent-ink); }
.bm-small-btn:hover { border-color: var(--theme-accent-ink); background: var(--theme-surface); }
.bm-danger-link { color: var(--theme-danger); padding: 4px 0; }
.bm-danger-link:hover { color: var(--theme-danger); }
.bm-platform-grid { display: grid; grid-template-columns: .8fr 1.7fr 1fr 1fr; gap: 12px; margin-top: 14px; }
.bm-auto-line { display: flex; align-items: center; gap: 9px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--theme-line); color: var(--theme-ink-secondary); font-size: 11.5px; }
.bm-auto-label { color: var(--theme-ink-subtle); font-size: 10.5px; letter-spacing: .5px; }
.bm-sync-time { margin-left: auto; color: var(--theme-ink-subtle); white-space: nowrap; }
.bm-signature { margin-top: 8px; color: var(--theme-ink-subtle); font-size: 11.5px; line-height: 1.6; }
.bm-no-platform, .bm-no-samples { color: var(--theme-ink-subtle); font-size: 12.5px; line-height: 1.9; padding: 18px 4px; }
.bm-samples-section { position: relative; margin-top: 14px; border-top: 1px solid var(--theme-line); }
.bm-sample-list-disclosure { margin: 0; }
.bm-samples-head { display: flex; align-items: center; justify-content: flex-start; min-height: 34px; margin: 0; padding: 5px 100px 5px 0; border: 0; color: var(--theme-ink-secondary); cursor: pointer; list-style: none; user-select: none; }
.bm-samples-head::-webkit-details-marker, .bm-sample-notes-toggle::-webkit-details-marker { display: none; }
.bm-samples-head > span { display: flex; align-items: center; gap: 6px; }
.bm-samples-head:hover, .bm-sample-notes-toggle:hover { color: var(--theme-ink); }
.bm-sample-list-chevron, .bm-sample-notes-chevron { color: var(--theme-accent-ink); font-size: 14px; transition: transform .15s ease; }
.bm-sample-list-disclosure[open] .bm-sample-list-chevron, .bm-sample-notes-disclosure[open] .bm-sample-notes-chevron { transform: rotate(90deg); }
.bm-sample-list-content { padding-top: 1px; }
.bm-sample-add { position: absolute; right: 0; top: 5px; margin: 0; z-index: 1; }
.bm-sample-tabs { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.bm-sample-tab { border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--theme-ink-subtle); cursor: pointer; font: inherit; font-size: 10.5px; padding: 4px 9px; }
.bm-sample-tab:hover { color: var(--theme-accent-ink); background: var(--theme-surface); }
.bm-sample-tab.active { color: var(--theme-ink); background: color-mix(in srgb, var(--bm-accent) 14%, var(--theme-surface)); border-color: color-mix(in srgb, var(--bm-accent) 35%, var(--theme-line)); }
.bm-sample-panel { display: none; }
.bm-sample-panel.active { display: block; }
.bm-samples { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.bm-sample { background: var(--theme-surface); border: 1px solid var(--theme-line); border-radius: 10px; padding: 12px; }
.bm-sample-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bm-sample-title-link, .bm-sample-title-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--theme-accent-ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.bm-sample-title-link:hover { color:var(--theme-accent-ink); text-decoration: underline; }
.bm-sample-title-input { flex: 1; min-width: 0; padding: 6px 8px; }
.bm-sample-metrics { margin-top: 6px; color: var(--theme-ink-subtle); font-size: 11px; font-variant-numeric: tabular-nums; }
.bm-sample-notes-disclosure { margin-top: 8px; border-top: 1px solid var(--theme-line); }
.bm-sample-notes-toggle { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--theme-ink-subtle); cursor: pointer; list-style: none; user-select: none; font-size: 11px; }
.bm-sample-notes-state { margin-left: auto; color: var(--theme-ink-subtle); font-weight: 400; }
.bm-sample-notes-state.has-content { color: var(--theme-accent-ink); }
.bm-sample-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; }
.bm-transcript-import { margin: 16px 0 24px; padding: 16px; border: 1px solid var(--theme-line); border-radius: 14px; background: var(--surface-sunken); }
.bm-transcript-import-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bm-transcript-hint { margin-top: 5px; color: var(--theme-ink-subtle); font-size: 11.5px; line-height: 1.55; }
.bm-transcript-status { flex: 0 0 auto; color: var(--theme-accent-ink); font-size: 11px; }
.bm-transcript-import-grid { display: grid; grid-template-columns: 1fr 2.6fr auto; align-items: stretch; gap: 10px; margin-top: 14px; }
.bm-transcript-start { min-width: 128px; align-self: center; }
.bm-sample-transcript-disclosure { margin-top: 8px; border-top: 1px solid var(--theme-line); }
.bm-sample-transcript-toggle { display: flex; align-items: center; gap: 6px; min-height: 28px; color: var(--theme-ink-subtle); cursor: pointer; list-style: none; user-select: none; font-size: 11px; }
.bm-sample-transcript-toggle::-webkit-details-marker { display: none; }
.bm-sample-transcript-disclosure[open] .bm-sample-notes-chevron { transform: rotate(90deg); }
.bm-transcript-badge { margin-left: auto; color: var(--theme-ink-subtle); font-size: 10px; }
.bm-transcript-badge.done { color:var(--theme-accent-ink); }
.bm-transcript-badge.error { color: var(--theme-danger); }
.bm-sample-transcript-body { padding-top: 8px; }
.bm-sample-transcript-body textarea { min-height: 112px; }
.bm-transcript-error { padding: 9px 10px; border-radius: 8px; background: color-mix(in srgb,var(--theme-danger) 8%,transparent); color: var(--theme-danger); font-size: 11px; line-height: 1.6; }
.bm-spin { animation: bm-spin .8s linear infinite; }
@keyframes bm-spin { to { transform: rotate(360deg); } }
.bm-empty { color: var(--theme-ink-subtle); font-size: 12.5px; line-height: 1.9; padding: 36px 16px; text-align: center; }
.bm-empty i { display: block; font-size: 20px; color: var(--theme-ink); margin-bottom: 8px; }
.bm-empty.err { color:var(--theme-accent-ink); }
.bm-empty-lg { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 96px 24px; }
.bm-empty-lg > i { font-size: 36px; color: var(--theme-ink); margin-bottom: 14px; }
.bm-empty-lg > .bm-new { justify-content: center; }
.bm-empty-title { font-size: 15.5px; font-weight: 600; color: var(--theme-ink); }
.bm-empty-sub { font-size: 12.5px; color: var(--theme-ink-subtle); line-height: 1.8; max-width: 380px; margin: 6px 0 18px; }
@media (max-width: 900px) {
  #view-benchmark { overflow-y: auto; }
  #benchmark-page { display: block; }
  .bm-layout { display: block; padding: 0 12px 24px; }
  .bm-side, .bm-main { width: auto; display: block; overflow: visible; }
  .bm-list { overflow: visible; padding-bottom: 10px; }
  .bm-grid, .bm-platform-grid, .bm-sample-notes { grid-template-columns: 1fr; }
  .bm-transcript-import-grid { grid-template-columns: 1fr; }
  .bm-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .bm-stats { padding-bottom: 0; }
  .bm-status { min-width: 0; }
  .bm-platform-head { align-items: flex-start; }
  .bm-platform-title { flex-wrap: wrap; }
  .bm-platform-title .bm-platform-name { max-width: 100%; }
  .bm-platform-actions { flex-wrap: wrap; }
  .bm-sync-time { margin-left: 0; }
  .bm-name { margin-left: 0; }
  .bm-gallery-head { flex-direction: column; gap: 10px; }
  .bm-gallery-actions { width: 100%; }
  .bm-gallery-actions .bm-input { flex: 1; width: auto; }
  .bm-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .bm-gallery-section { padding: 12px; }
  .bm-gallery-drop { flex-wrap: wrap; }
  .bm-gallery-drop small { width: 100%; text-align: center; }
  .bm-gallery-lightbox { padding: 10px; }
  .bm-gallery-lightbox-card { width: 100%; height: 86vh; padding-right: 42px; padding-left: 42px; }
  .bm-gallery-lightbox-meta { right: 42px; left: 42px; }
}

/* 对标账号页基础布局与基础样式已迁至 app/web/benchmark.css。 */
/* 动态生成模块：用 !important 压过脚本内遗留的深色声明。 */
html[data-theme="light"] #view-benchmark .bm-search input,
html[data-theme="light"] #view-benchmark .bm-input,
html[data-theme="light"] #view-benchmark .bm-item,
html[data-theme="light"] #view-benchmark #bm-detail,
html[data-theme="light"] #view-benchmark .bm-platform-card,
html[data-theme="light"] #view-benchmark .bm-sample,
html[data-theme="light"] #view-benchmark .bm-auto-line,
html[data-theme="light"] #view-benchmark .bm-gallery-section,
html[data-theme="light"] #view-benchmark .bm-gallery-card,
html[data-theme="light"] #view-benchmark .bm-gallery-lightbox-card {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
  box-shadow: none !important;
}
html[data-theme="light"] #view-benchmark .bm-item:hover,
html[data-theme="light"] #view-benchmark .bm-item.active { background: var(--primary-soft) !important; }
html[data-theme="light"] #view-benchmark .bm-item-name,
html[data-theme="light"] #view-benchmark .bm-name,
html[data-theme="light"] #view-benchmark .bm-platform-name,
html[data-theme="light"] #view-benchmark .bm-sample-title a { color: var(--text) !important; }
html[data-theme="light"] #view-benchmark .bm-item-meta,
html[data-theme="light"] #view-benchmark .bm-status,
html[data-theme="light"] #view-benchmark .bm-label,
html[data-theme="light"] #view-benchmark .bm-platform-label,
html[data-theme="light"] #view-benchmark .bm-fans,
html[data-theme="light"] #view-benchmark .bm-sample-metrics { color: var(--text-2) !important; }
html[data-theme="light"] #view-benchmark .bm-mini-chip,
html[data-theme="light"] #view-benchmark .bm-badge { background: var(--surface-3) !important; color: var(--text-2) !important; border-color: var(--line) !important; }
html[data-theme="light"] #view-benchmark .bm-gallery-drop { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
html[data-theme="light"] #view-benchmark .bm-gallery-filter:hover,
html[data-theme="light"] #view-benchmark .bm-gallery-source { background: var(--surface-3); }
html[data-theme="light"] #view-benchmark .bm-gallery-name,
html[data-theme="light"] #view-benchmark .bm-gallery-hint,
html[data-theme="light"] #view-benchmark .bm-gallery-drop small { color: var(--text-3); }
html[data-theme="light"] #view-benchmark .bm-gallery-kind { color: var(--primary-deep); background: var(--primary-soft); }
html[data-theme="light"] #view-benchmark .bm-gallery-lightbox-close,
html[data-theme="light"] #view-benchmark .bm-gallery-lightbox-nav { background: var(--surface-3); border-color: var(--line); color: var(--text-2); }
html[data-theme="light"] .bm-new {
  color: var(--theme-on-accent);
}

/* 对标账号页头统计：数字不再使用深色模块里的固定白色。 */
html[data-theme="light"] #view-benchmark .bm-stats { color: var(--text-2) !important; }
html[data-theme="light"] #view-benchmark .bm-stat b {
  color:var(--theme-accent-ink) !important;
  font-weight: 700;
}
html[data-theme="light"] #view-benchmark .bm-stat-sep { background: var(--line) !important; }
html[data-theme="light"] #view-benchmark .bm-sec-rule { background: var(--line) !important; }
html[data-theme="light"] #view-benchmark .bm-sample-cover {
  background: var(--surface-3) !important;
  color: var(--text-3) !important;
}
html[data-theme="light"] #view-benchmark .bm-sample-cover.is-missing {
  border-color: var(--line) !important;
}
html[data-theme="light"] #view-benchmark .bm-empty-title { color: var(--text) !important; }

/* 对标板块双 Tab：账号研究与独立视频文案库分开承载。 */
#view-benchmark .bm-top-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 14px;
  padding: 4px;
  width: fit-content;
  border: 1px solid var(--bm-border, var(--line));
  border-radius: 10px;
  background: var(--bm-inset, var(--surface-2));
}
#view-benchmark .bm-top-tab {
  border: 0;
  border-radius: 7px;
  padding: 8px 18px;
  color: var(--bm-muted, var(--text-2));
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}
#view-benchmark .bm-top-tab:hover,
#view-benchmark .bm-top-tab.active { color: var(--bm-text, var(--text)); background: var(--bm-elevated, var(--surface-3)); }
#view-benchmark [data-benchmark-panel] { display: none; }
#view-benchmark [data-benchmark-panel].active { display: block; }
#view-benchmark #bm-videos-panel { min-height: 0; }
.bmv-page { display: flex; flex-direction: column; gap: 18px; }
.bmv-import, .bmv-library { padding: 17px; border: 1px solid var(--bm-border, var(--line)); border-radius: 14px; background: var(--bm-inset, var(--surface-2)); }
.bmv-import-head, .bmv-library-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bmv-hint { margin-top: 5px; color: var(--bm-subtle, var(--text-3)); font-size: 11.5px; line-height: 1.55; }
.bmv-task-status { display: inline-flex; align-items: center; flex: 0 0 auto; min-height: 24px; padding: 2px 0; border: 0; color: var(--theme-accent-ink); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.bmv-task-status:empty { display: none; }
.bmv-task-status:hover, .bmv-task-status:focus-visible { color: var(--bm-text, var(--text)); text-decoration: underline; text-underline-offset: 3px; outline: none; }
.bmv-task-status.err { color: var(--theme-danger); }
.bmv-enrichment-controls { display: flex; align-items: center; flex: 0 0 auto; gap: 9px; }
.bmv-enrich-status { max-width: 230px; overflow: hidden; color: var(--bm-subtle, var(--text-3)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-enrich-status.err { color: var(--theme-danger); }
.bmv-import-body { display: grid; grid-template-columns: 1fr auto; align-items: stretch; gap: 10px; margin-top: 14px; }
.bmv-import-body textarea { min-height: 112px; resize: vertical; }
.bmv-start { min-width: 132px; align-self: center; }
.bmv-account-import { display: grid; grid-template-columns: auto minmax(220px, 1fr) 128px 92px auto; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid color-mix(in srgb, var(--bm-border, var(--line)) 70%, transparent); }
.bmv-account-label { color: var(--bm-text, var(--text)); font-size: 11px; font-weight: 600; white-space: nowrap; }
.bmv-account-import .bm-input { min-width: 0; }
.bmv-account-import .bmv-start { min-width: 132px; }
.bmv-filters { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.bmv-filters .bm-input { min-width: 0; }
.bmv-filters [data-benchmark-video-search] { flex: 1 1 240px; min-width: 200px; }
.bmv-filters select { width: auto; min-width: 140px; flex: 0 1 170px; }
.bmv-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.bmv-card { min-width: 0; padding: 12px; border: 1px solid var(--bm-border, var(--line)); border-radius: 12px; background: var(--bm-surface, var(--surface)); }
.bmv-card-head { display: flex; gap: 10px; min-width: 0; }
.bmv-cover { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 72px; width: 72px; height: 96px; overflow: hidden; border-radius: 7px; background: var(--bm-elevated, var(--surface-3)); color: var(--bm-subtle, var(--text-3)); }
.bmv-cover img { width: 100%; height: 100%; object-fit: cover; }
.bmv-card-main { min-width: 0; flex: 1; }
.bmv-card-title { display: block; max-width: 100%; overflow: hidden; color: var(--bm-text, var(--text)); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bmv-card-url { display: block; overflow: hidden; margin-top: 5px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-card-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; }
.bmv-card-enrichment { display: grid; gap: 4px; margin-top: 9px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; line-height: 1.45; }
.bmv-card-enrichment > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmv-card-enrichment span { display: inline-block; min-width: 28px; margin-right: 5px; color: var(--theme-accent-ink); }
.bmv-status { color: var(--bm-subtle, var(--text-3)); }
.bmv-status.done { color: var(--theme-success); }
.bmv-status.error, .bmv-status.interrupted { color: var(--theme-danger); }
.bmv-status.running, .bmv-status.queued { color: var(--theme-accent-ink); }
.bmv-legacy { color: var(--bm-subtle, var(--text-3)); }
.bmv-delete { flex: 0 0 auto; align-self: flex-start; border: 0; color: var(--bm-subtle, var(--text-3)); background: transparent; cursor: pointer; opacity: .55; }
.bmv-delete:hover { color: var(--theme-danger); opacity: 1; }
.bmv-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--bm-border, var(--line)) 70%, transparent); }
.bmv-card-note { overflow: hidden; color: var(--bm-subtle, var(--text-3)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-card-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.bmv-view { min-width: 80px; padding: 6px 10px; font-size: 11px; }
.bmv-error { margin-top: 9px; padding: 8px 9px; border-radius: 7px; background: color-mix(in srgb,var(--theme-danger) 8%,transparent); color: var(--theme-danger); font-size: 11px; line-height: 1.55; }
.bmv-loading, .bmv-empty { grid-column: 1 / -1; padding: 36px 14px; color: var(--bm-subtle, var(--text-3)); text-align: center; font-size: 12px; }
.bmv-empty i { display: block; margin-bottom: 8px; font-size: 24px; }
.bmv-transcript-mask { z-index: 60; }
.modal-mask .bmv-transcript-modal { width: min(1180px, 96vw) !important; max-width: 96vw; height: min(92vh, 920px); max-height: 92vh !important; display: grid !important; grid-template-rows: auto minmax(0, 1fr) auto; padding: 20px 22px !important; }
.bmv-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.bmv-modal-head h3 { margin: 2px 0 5px; font-size: 17px; line-height: 1.35; }
.bmv-modal-kicker { color: var(--theme-accent-ink); font-size: 10px; letter-spacing: .08em; }
.bmv-modal-url { overflow: hidden; max-width: 760px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-modal-close { flex: 0 0 auto; width: 30px; height: 30px; border: 1px solid var(--bm-border, var(--line)); border-radius: 8px; color: var(--bm-subtle, var(--text-3)); background: transparent; cursor: pointer; }
.bmv-modal-close:hover { color: var(--bm-text, var(--text)); background: var(--bm-elevated, var(--surface-3)); }
.bmv-modal-body { min-height: 0; overflow-x: hidden; overflow-y: auto; margin-top: 17px; padding-right: 4px; scrollbar-gutter: stable; }
.bmv-proofread-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; margin-top: 14px; }
.bmv-enrichment-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; gap: 14px; }
.bmv-editor-pane { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 12px; border: 1px solid var(--bm-border, var(--line)); border-radius: 10px; background: var(--bm-inset, var(--surface-2)); }
.bmv-proofread-pane { border-color: color-mix(in srgb, var(--bm-accent) 38%, var(--bm-border, var(--line))); }
.bmv-editor-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; color: var(--bm-text, var(--text)); font-size: 12px; font-weight: 600; }
.bmv-editor-label em { color: var(--bm-subtle, var(--text-3)); font-size: 10px; font-style: normal; font-weight: 400; }
.bmv-editor { width: 100%; line-height: 1.75; }
.bmv-enrichment-grid .bmv-editor { height: 104px; min-height: 104px; max-height: 104px; resize: none; }
.bmv-proofread-grid .bmv-editor { height: min(42vh, 420px); min-height: 280px; max-height: 420px; resize: vertical; }
.bmv-editor[readonly] { color: var(--bm-subtle, var(--text-3)); }
.bmv-modal-actions { position: relative; z-index: 1; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--bm-border, var(--line)) 70%, transparent); background: var(--surface-opaque); }
.bmv-modal-status { min-width: 0; overflow: hidden; color: var(--bm-subtle, var(--text-3)); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-modal-status.err { color: var(--theme-danger); }
.bmv-task-mask { z-index: 61; }
.bmv-task-modal { width: min(720px, 94vw) !important; max-width: 94vw; max-height: 86vh !important; padding: 20px 22px !important; }
.bmv-task-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.bmv-task-modal-head h3 { margin: 2px 0 2px; font-size: 17px; line-height: 1.35; }
.bmv-task-modal-updated { display: block; color: var(--bm-subtle, var(--text-3)); font-size: 10px; }
.bmv-task-modal-body { min-height: 120px; margin-top: 17px; }
.bmv-task-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.bmv-task-summary > div { display: flex; align-items: baseline; gap: 9px; }
.bmv-task-summary-actions { align-items: center !important; gap: 10px !important; }
.bmv-task-retry { min-height: 28px; padding: 4px 10px; font-size: 10px; }
.bmv-task-summary-label { color: var(--bm-subtle, var(--text-3)); font-size: 11px; }
.bmv-task-summary strong { color: var(--bm-text, var(--text)); font-size: 22px; font-variant-numeric: tabular-nums; }
.bmv-task-summary-state { color: var(--bm-subtle, var(--text-3)); font-size: 11px; }
.bmv-task-summary-state.done { color: var(--theme-success); }
.bmv-task-summary-state.error, .bmv-task-summary-state.interrupted { color: var(--theme-danger); }
.bmv-task-summary-state.running, .bmv-task-summary-state.queued { color: var(--theme-accent-ink); }
.bmv-task-progress { height: 6px; overflow: hidden; margin-top: 10px; border-radius: 99px; background: var(--bm-elevated, var(--surface-3)); }
.bmv-task-progress span { display: block; height: 100%; border-radius: inherit; background: var(--bm-accent); transition: width .25s ease; }
.bmv-task-summary-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; }
.bmv-task-summary-meta .is-error { color: var(--theme-danger); }
.bmv-task-list { max-height: 52vh; overflow: auto; margin: 16px 0 0; padding: 0 3px 0 0; list-style: none; }
.bmv-task-row { display: flex; align-items: flex-start; gap: 9px; min-width: 0; padding: 10px 0; border-top: 1px solid color-mix(in srgb, var(--bm-border, var(--line)) 70%, transparent); }
.bmv-task-row-index { display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--bm-elevated, var(--surface-3)); color: var(--bm-subtle, var(--text-3)); font-size: 10px; font-variant-numeric: tabular-nums; }
.bmv-task-row-main { min-width: 0; flex: 1; }
.bmv-task-row-title { overflow: hidden; color: var(--bm-text, var(--text)); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.bmv-task-row-url { overflow: hidden; margin-top: 3px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.bmv-task-row-status { flex: 0 0 auto; margin-left: 8px; color: var(--bm-subtle, var(--text-3)); font-size: 10px; white-space: nowrap; }
.bmv-task-row-status.done { color: var(--theme-success); }
.bmv-task-row-status.error, .bmv-task-row-status.interrupted { color: var(--theme-danger); }
.bmv-task-row-status.running, .bmv-task-row-status.queued { color: var(--theme-accent-ink); }
.bmv-task-row-error { margin-top: 5px; color: var(--theme-danger); font-size: 10px; line-height: 1.5; }
.bmv-task-loading, .bmv-task-empty, .bmv-task-error { display: grid; place-items: center; min-height: 100px; color: var(--bm-subtle, var(--text-3)); font-size: 11px; text-align: center; }
.bmv-task-loading i { margin-right: 5px; }
.bmv-task-error { color: var(--theme-danger); }
@media (max-width: 900px) {
  .bmv-list { grid-template-columns: 1fr; }}
@media (max-width: 640px) {
  .bmv-import-head { flex-direction: column; }
  .bmv-enrichment-controls { width: 100%; }
  .bmv-enrich-status { max-width: none; }
  .bmv-import-body { grid-template-columns: 1fr; }
  .bmv-account-import { grid-template-columns: 1fr 1fr; }
  .bmv-account-label, .bmv-account-import input { grid-column: 1 / -1; }
  .bmv-account-import .bmv-start { grid-column: 1 / -1; width: 100%; }
  .bmv-filters { min-width: 0; width: 100%; }
  .bmv-library-head { flex-direction: column; }
  .bmv-filters .bm-input,
  .bmv-filters select { flex: 1 1 100%; width: 100%; min-width: 0; }
  .bmv-transcript-modal { height: 94vh; max-height: 94vh !important; padding: 16px !important; }
  .bmv-proofread-grid { grid-template-columns: 1fr; }
  .bmv-enrichment-grid { grid-template-columns: 1fr; }
  .bmv-enrichment-grid .bmv-editor { height: 96px; min-height: 96px; max-height: 96px; }
  .bmv-proofread-grid .bmv-editor { height: 300px; min-height: 220px; max-height: none; }
  .bmv-modal-actions { flex-wrap: wrap; }
  .bmv-modal-status { width: 100%; }
  .bmv-task-modal { padding: 16px !important; }
  .bmv-task-list { max-height: 58vh; }}

/* 对标账号是“左侧目录 + 右侧详情”：桌面端两列各自滚动，避免互相带走位置。 */
#view-benchmark.bm-account-mode { overflow: hidden; }
#view-benchmark.bm-account-mode #benchmark-page { min-height: 0; overflow: hidden; }
#view-benchmark.bm-account-mode #bm-accounts-panel.active {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-layout {
  flex: 1;
  min-height: 0;
}
#view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-side,
#view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-main {
  min-height: 0;
}
#view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-list,
#view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-main {
  scrollbar-gutter: stable;
}

/* 视频 Tab 内容是单一长页面，使用外层主滚动条。 */
#view-benchmark.bm-video-mode { overflow-y: auto; overflow-x: hidden; }
#view-benchmark.bm-video-mode #benchmark-page { min-height: max-content; overflow: visible; }

@media (max-width: 900px) {
  #view-benchmark.bm-account-mode { overflow-y: auto; overflow-x: hidden; }
  #view-benchmark.bm-account-mode #benchmark-page { min-height: max-content; overflow: visible; }
  #view-benchmark.bm-account-mode #bm-accounts-panel.active { display: block; overflow: visible; }
  #view-benchmark.bm-account-mode #bm-accounts-panel.active .bm-layout { display: block; }}

/* 对标账号作品墙：桌面端 3 列，保持抖音主页式的封面阅读节奏。 */
#view-benchmark .bm-samples-section {
  padding: 0 12px 14px;
}
#view-benchmark .bm-samples-head {
  position: relative;
  align-items: center;
  min-height: 42px;
  padding: 7px 100px 7px 0;
  cursor: pointer;
}
#view-benchmark .bm-samples-head > span {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
#view-benchmark .bm-samples-head small {
  color: var(--bm-subtle);
  font-size: 10px;
  font-weight: 400;
}
#view-benchmark .bm-sample-list-content { padding-top: 0; }
#view-benchmark .bm-sample-tabs { margin-top: 0; padding: 4px 0 2px; border-bottom: 1px solid var(--bm-border); }
#view-benchmark .bm-sample-tab { border-radius: 7px 7px 0 0; padding: 7px 12px; }
#view-benchmark .bm-sample-panel.active { display: block; }
#view-benchmark .bm-samples {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
#view-benchmark .bm-sample {
  position: relative;
  min-width: 0;
  padding: 8px;
  overflow: hidden;
  border-radius: 12px;
}
#view-benchmark .bm-sample-visual { position: relative; }
#view-benchmark .bm-sample-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--bm-inset);
  cursor: zoom-in;
}
#view-benchmark .bm-sample-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .18s ease, opacity .18s ease;
}
#view-benchmark .bm-sample-cover:hover img { transform: scale(1.025); }
#view-benchmark .bm-sample-cover-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  color: var(--bm-subtle);
  font-size: 11px;
}
#view-benchmark .bm-sample-cover img + .bm-sample-cover-fallback { display: none; }
#view-benchmark .bm-sample-cover-fallback i { font-size: 24px; }
#view-benchmark .bm-sample-delete {
  position: absolute;
  top: 7px;
  right: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid color-mix(in srgb,var(--theme-overlay) 20%,transparent);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-base) 72%, transparent);
  color: var(--theme-ink);
  opacity: 0;
  cursor: pointer;
  transition: opacity .15s ease, background .15s ease;
}
#view-benchmark .bm-sample:hover .bm-sample-delete,
#view-benchmark .bm-sample-delete:focus-visible { opacity: 1; }
#view-benchmark .bm-sample-delete:hover { background: color-mix(in srgb,var(--theme-accent) 88%,transparent); }
#view-benchmark .bm-sample-title {
  display: block;
  margin-top: 8px;
}
#view-benchmark .bm-sample-title-link,
#view-benchmark .bm-sample-title-text,
#view-benchmark .bm-sample-title-input {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.45;
}
#view-benchmark .bm-sample-metrics {
  overflow: hidden;
  margin-top: 3px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
}
#view-benchmark .bm-sample-notes-disclosure { margin-top: 6px; }
#view-benchmark .bm-sample-notes-toggle { min-height: 24px; font-size: 10.5px; }
#view-benchmark .bm-sample-notes { grid-template-columns: 1fr; }
#view-benchmark .bm-samples > .bm-no-samples { grid-column: 1 / -1; }

@media (max-width: 900px) {
  #view-benchmark .bm-samples { grid-template-columns: repeat(2, minmax(0, 1fr)); }}
@media (max-width: 560px) {
  #view-benchmark .bm-samples { grid-template-columns: 1fr; }}

/* 本页的配色层次集中在 benchmark-theme.css，由页面紧接本文件加载。 */
@media (prefers-reduced-motion: reduce) {
  #view-benchmark *,
  #view-benchmark *::before,
  #view-benchmark *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }}

/* 作品墙最终布局覆盖：确保每张作品卡都是网格的直接子项。 */
#view-benchmark .bm-samples {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
  margin-top: 12px !important;
}

@media (max-width: 900px) {
  #view-benchmark .bm-samples {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }}

@media (max-width: 560px) {
  #view-benchmark .bm-samples {
    grid-template-columns: 1fr !important;
  }}



/* 对标资产：主体默认阅读，编辑按需展开；目的筛选收进更多。 */
.bm-purpose-more { position: relative; flex: 0 0 auto; }
.bm-purpose-more > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; padding: 5px 9px; border: 1px dashed var(--line); border-radius: 999px; color: var(--text-2); font-size: 11.5px; }
.bm-purpose-more > summary::-webkit-details-marker { display: none; }
.bm-purpose-more-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; display: flex; flex-wrap: wrap; gap: 5px; width: min(360px, calc(100vw - 40px)); padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-opaque); box-shadow: var(--shadow-pop); }
.bm-profile-read { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.bm-read-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.bm-read-head b { font-size: 16px; }
.bm-muted { color: var(--text-2); font-size: 12px; line-height: 1.55; }
.bm-read-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 14px 0; }
.bm-read-facts div { min-width: 0; }
.bm-read-facts dt { margin-bottom: 2px; color: var(--text-2); font-size: 11px; }
.bm-read-facts dd { margin: 0; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.bm-read-block { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.bm-read-block h4 { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.bm-read-block p { margin: 0; color: var(--text); font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.bm-purpose-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
@media (max-width: 700px) { .bm-read-facts { grid-template-columns: 1fr; }}
