/* Link kit: site icons, preview and share sheets, media, file cards, slider */
.site-ico { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 9999px; border: 1px solid var(--nav-border); background: var(--card); overflow: hidden; }
.site-ico img { width: 58%; height: 58%; object-fit: contain; display: block; }
.site-ico svg { width: 20px; height: 20px; color: var(--ink); }
.site-ico[data-size="24"], .site-ico[data-size="32"] { width: 32px; height: 32px; border-radius: 9999px; }

dialog.sheet { width: min(94vw, 640px); max-height: 92dvh; overflow: auto; padding: var(--sp-5); border: 0; border-radius: var(--r-feature); background: var(--surface); color: var(--ink); animation: sheet-in 260ms var(--ease); }
dialog.sheet::backdrop { background: rgba(0, 0, 0, 0.55); }
dialog.sheet[open] { display: block; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(0.98); } to { opacity: 1; transform: none; } }
.sheet-title { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: var(--fs-1); margin: 0 0 var(--sp-2); }
.sheet-url { margin: var(--sp-3) 0 0; color: var(--muted); font-size: var(--fs-small); overflow-wrap: anywhere; }
dialog.sheet .actions { justify-content: flex-end; margin-top: var(--sp-5); }

.preview-head { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); }
.preview-id { min-width: 0; }
.preview-site { margin: 0; color: var(--muted); font-size: var(--fs-small); font-weight: 600; }
.preview-title { margin: 2px 0 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; font-size: var(--fs-1); line-height: 1.25; overflow-wrap: anywhere; }
.preview-text { margin: var(--sp-3) 0 0; }
.preview-desc { color: var(--muted); white-space: pre-line; overflow-wrap: anywhere; }
.stage { margin: 0 0 var(--sp-3); border-radius: var(--r-card); overflow: hidden; background: var(--paper); }
.stage img, .stage video { display: block; width: 100%; height: auto; max-height: 60dvh; object-fit: contain; }
.stage-video { aspect-ratio: 16 / 9; }
.stage-video iframe { width: 100%; height: 100%; border: 0; display: block; }

.share-rows { display: grid; gap: var(--sp-1); margin-top: var(--sp-3); }
.share-row { display: flex; align-items: center; gap: var(--sp-4); min-height: 52px; padding: 0 var(--sp-4); border: 0; border-radius: var(--r-card); background: transparent; color: var(--ink); font: inherit; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.share-row:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.share-row svg { width: 24px; height: 24px; flex: none; }

.media { margin: 0; }
.media-img, .media-vid { display: block; width: 100%; height: auto; border-radius: var(--r-card); background: var(--paper); }
.file-card { display: flex; align-items: center; gap: var(--sp-4); min-height: 72px; padding: var(--sp-3) var(--sp-4); border-radius: var(--r-card); background: var(--paper); color: var(--ink); text-decoration: none; }
.file-card:hover { background: color-mix(in srgb, var(--teal) 12%, transparent); }
.file-ext { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9999px; border: 1px solid var(--nav-border); background: var(--card); color: var(--ink); font: 600 0.75rem var(--font-body); }

.slider { position: relative; }
.slider-track { list-style: none; margin: 0; padding: 4px 2px var(--sp-2); display: flex; gap: var(--sp-4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; scrollbar-width: none; align-items: flex-start; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track > * { flex: none; scroll-snap-align: start; }
.slider-track:focus-visible { outline-offset: 2px; border-radius: var(--r-card); }
.slider-btn { position: absolute; top: 40%; z-index: 3; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; box-shadow: 0 2px 10px color-mix(in srgb, var(--ink) 20%, transparent); }
.slider-btn[hidden] { display: none; }
.slider-btn:hover { background: var(--paper); }
.slider-btn svg { width: 22px; height: 22px; }
.slider-prev { left: -8px; }
.slider-next { right: -8px; }
@media (hover: none) { .slider-btn { display: none; } }

@media (prefers-reduced-motion: reduce) { dialog.sheet { animation: none; } .slider-track { scroll-behavior: auto; } }

.stage-video.stage-tall { aspect-ratio: 9 / 16; max-height: 70dvh; width: min(100%, 420px); margin-inline: auto; }
.preview-hint { margin: 0; font-size: var(--fs-small); color: var(--muted); }
.preview-label { display: inline-block; margin: 0 0 var(--sp-3); padding: 2px var(--sp-3); border-radius: var(--r-pill); background: color-mix(in srgb, var(--teal) 14%, transparent); color: var(--teal-deep); font-size: var(--fs-small); font-weight: 600; }
.stage-picture { background: var(--paper); }
.stage-picture img { width: 100%; height: auto; max-height: 60dvh; object-fit: contain; display: block; }
.stage-audio { padding: var(--sp-3); }
.stage-audio audio { display: block; width: 100%; }
.stage-fixed { aspect-ratio: auto; height: var(--stage-h, 166px); }
