.pv-preview { position: relative; height: 320px; overflow: hidden; margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); isolation: isolate; }
.pv-preview > .demo { margin: 0; width: 161.3%; max-width: none; transform: scale(.62); transform-origin: top left; border: 0; border-radius: 0; pointer-events: none; }
.pv-preview::after { content: ''; position: absolute; inset: 45% 0 0; pointer-events: none; background: linear-gradient(transparent, var(--surface)); }
.pv-open { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; padding: 24px; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: .85rem; cursor: pointer; text-align: left; }
.pv-open > span:last-child { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; font-size: 1.15rem; background: var(--surface); transition: transform .18s ease, border-color .18s ease; }
.pv-open:hover > span:last-child { transform: translate(2px,-2px); border-color: var(--accent); }
.pv-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: 14px; }
.pv-viewing { overflow: hidden; }
.pv-viewer { padding: 0; width: min(1080px, calc(100% - 48px)); max-width: none; max-height: calc(100dvh - 48px); border: 1px solid var(--line); border-radius: 16px; background: var(--bg); color: var(--fg); box-shadow: 0 32px 120px #0008; overflow: hidden; }
.pv-viewer::backdrop { background: #000b; backdrop-filter: blur(8px); }
.pv-viewer[open] { display: flex; flex-direction: column; }
.pv-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex: none; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.pv-heading { min-width: 0; }
.pv-count { color: var(--muted); font-size: .65rem; letter-spacing: .16em; }
.pv-heading h2 { font-size: 1rem; overflow-wrap: anywhere; margin-top: 2px; }
.pv-actions { display: flex; gap: 6px; }
.pv-actions button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--fg); font: inherit; cursor: pointer; }
.pv-actions button:hover { border-color: var(--accent); color: var(--accent); }
.pv-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pv-content { min-height: 0; overflow: auto; padding: 24px; overscroll-behavior: contain; }
.pv-content > .demo { margin: 0 auto; width: 100%; }
@media (max-width: 600px) {
  .pv-preview { height: 270px; }
  .pv-open { padding: 16px; }
  .pv-viewer { width: calc(100% - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .pv-header { padding: 12px; gap: 8px; }
  .pv-actions { gap: 4px; }
  .pv-actions button { width: 36px; height: 36px; }
  .pv-content { padding: 8px; }
}
@media (prefers-reduced-motion: reduce) { .pv-open > span:last-child { transition: none; } }
