// Viewer CSS. Plain CSS in a raw string: no backticks or template placeholders inside. export const CSS = String.raw` :root { color-scheme: dark; --bg: #0b0b0e; --text: rgba(255, 255, 255, 0.82); --muted: rgba(255, 255, 255, 0.58); } * { box-sizing: border-box; } html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; } body { font: 14px/1.35 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; } #viewer { position: fixed; inset: 0; touch-action: none; overflow: hidden; cursor: grab; outline: none; } #viewer.dragging { cursor: grabbing; } .slide { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; will-change: transform; } .slide img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 360ms ease; pointer-events: none; -webkit-user-drag: none; } .slide img.ready { opacity: 1; } .caption { position: fixed; left: 0; bottom: 0; z-index: 5; max-width: min(34rem, 100%); padding: 10px calc(14px + env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) calc(14px + env(safe-area-inset-left, 0px)); display: flex; align-items: flex-end; gap: 10px; color: var(--text); text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 0 12px rgba(0, 0, 0, 0.6); transition: opacity 280ms ease; pointer-events: none; } .caption.hidden { opacity: 0; } .caption .text { display: flex; flex-direction: column; min-width: 0; } .caption .title { font-size: 13px; font-weight: 500; letter-spacing: 0.01em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .caption .artist { font-size: 12px; color: var(--muted); } .caption .about { pointer-events: auto; flex: 0 0 auto; width: 28px; height: 28px; margin: 0 0 -4px -2px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border-radius: 50%; text-decoration: none; } .caption.hidden .about { pointer-events: none; } @media (prefers-reduced-motion: reduce) { .slide img { transition: none; } } `