.source-song-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 15px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #1f2937; }
.source-song-art { width: 52px; height: 52px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 7px; background: #f1f5f9; color: #64748b; font-size: 25px; overflow: hidden; }
.source-song-art img { width: 100%; height: 100%; object-fit: cover; }
.source-song-copy { flex: 1; min-width: 0; display: grid; gap: 4px; }
.source-song-copy strong { color: #1f2937; font-size: 15px; line-height: 1.4; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.source-song-copy span { color: #475569; font-size: 13px; line-height: 1.4; }
.source-song-copy small { color: #64748b; font-size: 12px; }
.source-song-copy small:empty { display: none; }
.source-song-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.source-listen, .source-song-actions .change-source { min-width: 40px; min-height: 44px; padding: 7px; border: 0; border-radius: 6px; color: #c2410c; background: transparent; cursor: pointer; font-weight: 650; }
.source-listen:hover, .source-song-actions .change-source:hover { background: #fff7ed; }
.source-song-card [hidden], .song-picker [hidden], #music-tool-form select[data-source-select][hidden], #music-tool-form select[data-source-b-select][hidden] { display: none; }
.source-selection-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; }
.tool-source-player { grid-column: 1 / -1; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; min-width: 0; padding-top: 8px; border-top: 1px solid #e2e8f0; }
.tool-source-player [data-source-time] { color: #64748b; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#music-tool-form .tool-source-player input.result-progress[type="range"] { min-height: 44px; padding: 0; border: 0; border-radius: 4px; background: transparent; }
.song-picker { width: min(680px, calc(100vw - 40px)); height: min(680px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #cbd5e1; border-radius: 14px; background: #f8fafc; color: #1f2937; }
.song-picker[open] { display: flex; flex-direction: column; }
.song-picker::backdrop { background: rgb(15 23 42 / .66); }
.song-picker-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px 16px; }
.song-picker-head h2 { margin: 0; color: #111827; font-size: 22px; line-height: 1.3; font-weight: 700; }
.song-picker-head p { margin: 6px 0 0; color: #475569; font-size: 14px; }
.song-picker-head button { flex: 0 0 auto; width: 44px; height: 44px; border: 0; border-radius: 7px; background: transparent; color: #475569; font-size: 27px; cursor: pointer; }
.song-picker-search { padding: 0 24px 18px; flex: 0 0 auto; }
.song-picker-search input[type="search"] { box-sizing: border-box; width: 100%; min-height: 46px; margin: 0; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #1f2937; font: inherit; font-size: 16px; }
.song-picker-search input::placeholder { color: #64748b; }
.song-picker-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px 12px; display: flex; flex-direction: column; gap: 10px; }
.song-picker-list .source-song-card { flex: 0 0 auto; padding: 14px; }
.song-picker-list .source-song-card.is-selected { border-color: #ea580c; background: #fff7ed; }
.song-picker-list .source-use { min-width: 58px; min-height: 44px; padding: 8px 13px; border: 1px solid #fdba74; border-radius: 7px; background: #fff7ed; color: #9a3412; cursor: pointer; font-size: 14px; font-weight: 650; }
.song-picker-list .source-use:hover { background: #ffedd5; }
.song-picker-footer { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 66px; padding: 10px 24px; border-top: 1px solid #e2e8f0; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.song-picker-footer p { margin: 0; font-size: 13px; color: #475569; }
.song-picker-footer button { min-height: 44px; border: 0; border-radius: 6px; padding: 8px 10px; background: transparent; color: #c2410c; white-space: nowrap; font-weight: 650; cursor: pointer; }
.song-picker-empty { margin: auto; padding: 28px 0; color: #475569; text-align: center; font-size: 15px; }
.song-picker :focus-visible, .source-song-card button:focus-visible { outline: 2px solid #ea580c; outline-offset: 3px; }
@media (max-width: 620px) {
  .song-picker { position: fixed; inset: auto 0 0; width: 100%; height: min(85dvh, 760px); margin: 0; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .song-picker-head { padding: 18px 16px 14px; }
  .song-picker-head h2 { font-size: 20px; }
  .song-picker-search { padding: 0 16px 14px; }
  .song-picker-list { padding: 0 16px 12px; }
  .song-picker-footer { padding-left: 16px; padding-right: 16px; }
  .source-song-card { gap: 10px; padding: 12px; }
  .source-song-art { width: 48px; height: 48px; }
  .source-song-actions { gap: 2px; }
}
@media (max-width: 360px) {
  .source-song-card { flex-wrap: wrap; }
  .source-song-copy { flex-basis: calc(100% - 64px); }
  .source-song-actions { margin-left: auto; }
}
