/* Music Index widget (assets/music-chart-widget.js). All classes prefixed ymu-. */
.ymu { container-type: inline-size; margin: 8px 0 56px; border: 1px solid var(--line, #ebebeb); border-radius: var(--radius, 12px); background: #fff; overflow: hidden; }
.ymu[hidden] { display: none; }
/* Hold the card's usual height while the chart loads, so nothing below it jumps. */
.ymu-body:empty { min-height: 456px; }
.ymu-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line, #ebebeb); }
.ymu-title { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.ymu-title::before { content: ''; width: 3px; height: 16px; border-radius: 2px; background: var(--red, #b0000e); }
.ymu-sym { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; font-weight: 600; letter-spacing: .08em; color: var(--red, #b0000e); background: var(--red-soft, #fbf1f1); padding: 3px 7px; border-radius: 5px; }
.ymu-spacer { flex: 1; }
.ymu-select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 12.5px; color: var(--ink, #0d0d0d); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23737373' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid var(--line, #ebebeb); border-radius: 8px; padding: 6px 28px 6px 10px; cursor: pointer; max-width: 100%; }
.ymu-select:focus-visible { outline: none; border-color: var(--red, #b0000e); box-shadow: 0 0 0 3px var(--red-ring, rgba(176,0,14,.12)); }
.ymu-asof { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #737373); }
.ymu-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ymu-table th { padding: 9px 18px; font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted, #737373); text-align: left; border-bottom: 1px solid var(--line, #ebebeb); }
.ymu-table th.n, .ymu-table td.n { text-align: right; }
.ymu-table td { padding: 10px 18px; border-bottom: 1px solid var(--line, #ebebeb); vertical-align: middle; overflow: hidden; }
.ymu-table tr:last-child td { border-bottom: 0; }
.ymu-table tbody tr { transition: background .15s; }
.ymu-table tbody tr:hover { background: var(--red-soft, #fbf1f1); }
.ymu-rank-col { width: 56px; }
.ymu-vol-col { width: 150px; }
.ymu-likes-col { width: 96px; }
.ymu-rank { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 600; color: var(--muted, #737373); }
.ymu-video { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.ymu-video:focus-visible { outline: 2px solid var(--red, #b0000e); outline-offset: 2px; border-radius: 6px; }
.ymu-thumb { flex: none; width: 64px; height: 36px; border-radius: 6px; object-fit: cover; background: #f2f2f2; }
.ymu-text { display: block; flex: 1; min-width: 0; overflow: hidden; }
.ymu-vt { display: block; font-size: 13px; font-weight: 550; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ymu-ch { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted, #737373); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ymu-num { font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ymu-vol .ymu-num { font-weight: 650; color: var(--ink, #0d0d0d); }
.ymu-bar { height: 3px; margin-top: 6px; margin-left: auto; border-radius: 2px; background: var(--red, #b0000e); opacity: .85; }
.ymu-likes .ymu-num { color: var(--muted, #737373); }
.ymu-empty { padding: 28px 18px; text-align: center; font-size: 13px; color: var(--muted, #737373); }
.ymu-foot { padding: 10px 18px; border-top: 1px solid var(--line, #ebebeb); font-size: 11px; color: #8a8a8a; }
/* Top 5 as thumbnail cards (same look as the channel search's Top 5), ranks 6-10 in the table below. */
.ymu-cards { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 12px; overflow-x: auto; padding: 14px 18px 16px; border-bottom: 1px solid var(--line, #ebebeb); scroll-snap-type: x mandatory; scroll-padding-inline: 18px; scrollbar-width: thin; scrollbar-color: #e8c9cb transparent; }
.ymu-card { display: flex; flex-direction: column; gap: 5px; min-width: 0; color: inherit; text-decoration: none; scroll-snap-align: start; }
.ymu-card:focus-visible { outline: 2px solid var(--red, #b0000e); outline-offset: 3px; border-radius: 8px; }
.ymu-cth { position: relative; display: block; }
.ymu-cth img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #f2f2f2; transition: transform .2s; }
.ymu-card:hover .ymu-cth img { transform: scale(1.03); }
.ymu-cth { overflow: hidden; border-radius: 8px; }
.ymu-crk { position: absolute; left: 6px; top: 6px; padding: 4px 5px; border: 1px solid rgba(255,42,60,.6); border-radius: 4px; background: #7f000a; color: #fff; font: 700 11px/1 ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; }
.ymu-cvw { position: absolute; right: 6px; bottom: 6px; padding: 3px 5px; border-radius: 3px; background: rgba(0,0,0,.74); color: #fff; font: 700 10px/1 ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace; font-style: normal; letter-spacing: .04em; }
.ymu-ctt { font-size: 12.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ymu-card:hover .ymu-ctt { color: var(--red, #b0000e); }
.ymu-cch { font-size: 11.5px; color: var(--muted, #737373); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@container (max-width: 560px) { .ymu-cards { padding: 12px 14px 14px; scroll-padding-inline: 14px; grid-auto-columns: minmax(148px, 46%); } }
@container (max-width: 560px) {
  .ymu-head { padding: 12px 14px; }
  .ymu-table th, .ymu-table td { padding: 9px 12px; }
  .ymu-rank-col { width: 38px; }
  .ymu-vol-col { width: 84px; }
  .ymu-likes-col, .ymu-likes { display: none; }
  .ymu-thumb { width: 48px; height: 27px; }
  .ymu-asof { width: 100%; order: 3; }
}

/* Wide screens: left column under the search area, opposite the Trending Index. */
@media (min-width: 1240px) {
  .wrap:has(> .ytt:not([hidden])):has(> .ymu:not([hidden])) { grid-template-rows: auto auto auto 1fr; }
  .wrap:has(> .ytt:not([hidden])):has(> .ymu:not([hidden])) > .ytt { grid-row: 2 / span 3; }
  .wrap:has(> .ytt:not([hidden])):has(> .ymu:not([hidden])) > #results:empty { margin: 0; }
  .wrap:has(> .ytt:not([hidden])) > .ymu { grid-column: 1; grid-row: 4; align-self: start; margin: 32px 0 56px; }
}
