/* ---- Proof-watch: Compare (public/compare.js) ---- */
.pw-viewer.has-ref { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: stretch; }
.pw-ref { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 6px; overflow: hidden; background: var(--pw-stage); box-shadow: 0 0 0 1px var(--border); }
.pw-ref[hidden] { display: none; }
.pw-ref-head { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 6px 0 10px; flex-shrink: 0; background: var(--panel); border-bottom: 1px solid var(--border); }
.pw-ref-label { flex: 1; min-width: 0; font-size: 12px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-ref-note { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; }
.pw-ref-chip { height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-dim); font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; font-family: inherit; }
.pw-ref-chip:hover { color: var(--text); background: var(--hover); }
.pw-ref-chip.on { color: var(--pw-accent); border-color: color-mix(in srgb, var(--pw-accent) 45%, transparent); background: color-mix(in srgb, var(--pw-accent) 12%, transparent); }
.pw-ref-body { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }
.pw-ref-body video, .pw-ref-body iframe { width: 100%; height: 100%; object-fit: contain; border: 0; display: block; background: var(--pw-stage); }
.pw-ref-error { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 16px; text-align: center; font-size: 12.5px; color: var(--text-dim); background: color-mix(in srgb, var(--pw-stage) 90%, transparent); }
.pw-ref-error[hidden] { display: none; }
#pw-compare-btn.active { color: var(--pw-accent); }

/* picker */
.pw-compare-item { height: auto; min-height: 36px; padding: 6px 8px; text-align: left; }
.pw-compare-item > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pw-compare-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pw-compare-sub { font-size: 11.5px; color: var(--pw-menu-dim); font-weight: 400; }
.pw-compare-empty { padding: 4px 8px 8px; font-size: 12.5px; color: var(--pw-menu-dim); }
.pw-compare-link { display: flex; gap: 6px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--pw-menu-border); }
.pw-compare-link input { flex: 1; min-width: 0; height: 28px; border-radius: 7px; border: 1px solid var(--pw-menu-border); background: var(--pw-menu-hover); color: var(--pw-menu-text); padding: 0 8px; font-size: 12.5px; font-family: inherit; outline: none; }
.pw-compare-link input:focus { border-color: var(--pw-accent); }

/* Narrow screens: one above the other. */
@media (max-width: 900px) {
  .pw-viewer.has-ref { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
  .pw-ref-head { height: 30px; }
  .pw-compare-link input { font-size: 16px; }
}
