/* 网址浏览和音乐播放器沿用聊天界面的暖纸色板。 */
.link-viewer {
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  width: min(960px, calc(100vw - var(--space-6)));
  height: min(800px, calc(100vh - var(--space-6)));
  height: min(800px, calc(100dvh - var(--space-6)));
  max-width: none;
  max-height: none;
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  font-family: var(--font-sans);
}
.link-viewer[open] { display: flex; flex-direction: column; }
.link-viewer::backdrop { background: var(--call-overlay); }
.link-viewer-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--bg-surface);
  flex: none;
}
.link-viewer-title { flex: 1; min-width: 0; display: grid; gap: var(--space-1); }
.link-viewer-title strong, .link-viewer-title span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.link-viewer-title span { color: var(--text-secondary); font-size: var(--text-xs); }
.link-viewer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  min-height: 44px;
  min-width: 44px;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  background: var(--bg-primary);
  text-decoration: none;
  font: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  flex: none;
}
.link-viewer-button:hover { background: var(--bg-sunken); }
.link-viewer-button:focus-visible, .link-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.link-viewer-button .lucide { width: 20px; height: 20px; }
.link-viewer-content { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: auto; }
.link-viewer-note {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.link-viewer-frame { flex: 1; min-height: 0; width: 100%; border: 0; background: var(--bg-primary); }
.link-viewer-music { align-items: center; justify-content: center; gap: var(--space-5); padding: var(--space-5); }
.link-viewer-song { text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.link-viewer-song h2 { margin: 0 0 var(--space-3); font-family: var(--font-serif); font-size: var(--text-lg); }
.link-viewer-song p { margin: 0; color: var(--text-secondary); }
.link-viewer-music audio { width: min(100%, 420px); flex: none; }
.link-viewer-music .link-viewer-note { text-align: center; max-width: 480px; padding: 0; }
@media (max-width: 600px) {
  .link-viewer { width: 100vw; height: 100vh; height: 100dvh; margin: 0; border-radius: 0; }
  .link-viewer-header { padding-top: max(var(--space-3), env(safe-area-inset-top)); gap: var(--space-1); }
  .link-viewer-music { padding-bottom: max(var(--space-5), env(safe-area-inset-bottom)); }
}
