/* Bổ sung cho giao diện SÓNG khi chạy trên TanroCMS (các phần trước đây do PHP của CouchCMS sinh ra). */

.lyrics--pre { white-space: pre-line; }

/* Số thứ tự hàng bài hát: trước đây Couch in k_count, giờ dùng bộ đếm CSS */
.tlist { counter-reset: trow; }
.tlist .trow { counter-increment: trow; }
.tlist .trow__n::before { content: counter(trow); }
.tlist--rank .trow:nth-child(-n+3) .trow__n { color: var(--accent, #d3f55c); font-weight: 700; }

/* Chip lọc (thể loại / vùng nhạc / sắp xếp) */
.filters--chips .filters__line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.chip { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px; font-size: .9rem; text-decoration: none;
        color: inherit; border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.chip:hover { border-color: color-mix(in srgb, currentColor 40%, transparent); }
.chip--on { background: var(--accent, #d3f55c); border-color: transparent; color: #0a100d; font-weight: 600; }
.filters__spacer { flex: 1; }
.nav-item.is-on { font-weight: 600; }

/* Thẻ */
.tm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.tm-tags a { padding: 4px 12px; border-radius: 999px; text-decoration: none; color: inherit;
             background: color-mix(in srgb, currentColor 8%, transparent); font-size: .9rem; }

/* Trang MV */
.watch { display: grid; gap: 20px; margin-bottom: 32px; }
.watch__video, .watch .ytbox, .watch__empty { width: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; overflow: hidden; }
.watch__empty { display: grid; place-items: center; position: relative; color: #fff; }
.watch__empty img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.watch__empty p { position: relative; }
.dhero__art--round img, .dhero__art--round .ph { border-radius: 50%; }

/* Blog, trang tĩnh */
.post { max-width: 860px; margin: 0 auto 48px; }
.post__title { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin: 8px 0 12px; }
.post__lead { font-size: 1.15rem; opacity: .85; }
.post__cover { margin: 24px 0; }
.post__cover img { width: 100%; height: auto; border-radius: 16px; }
.post__body img { max-width: 100%; height: auto; }
.tm-posts { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.tm-post__art { display: block; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; }
.tm-post__art img, .tm-post__art .ph { width: 100%; height: 100%; object-fit: cover; }
.tm-post__meta { font-size: .85rem; opacity: .7; margin: 10px 0 4px; }
.tm-post__title { font-size: 1.15rem; margin: 0 0 6px; }
.tm-post__title a { color: inherit; text-decoration: none; }
.tm-post__ex { opacity: .8; margin: 0; }
.tm-links { line-height: 2; }

/* Liên hệ */
.tm-contact { display: grid; gap: 32px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 860px) { .tm-contact { grid-template-columns: 1fr; } }

/* Thanh "Thích / Chia sẻ" và bình luận của TanroCMS trên nền tối */
.tanro-social { margin-top: 16px; }
.tanro-comments { max-width: 860px; }

.empty--404 { text-align: center; padding: 80px 16px; }
.empty--404 .btn { margin: 6px; }

/* Gợi ý khi gõ tìm kiếm (tanro-music.js) */
.tm-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 80; padding: 6px; border-radius: 14px;
              background: var(--surface-2, #141c17); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06); }
.tm-suggest a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.tm-suggest a:hover, .tm-suggest a.on { background: color-mix(in srgb, currentColor 9%, transparent); }
.tm-suggest img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: none; }
.tm-suggest__t { display: flex; flex-direction: column; min-width: 0; font-weight: 600; }
.tm-suggest__t small { font-weight: 400; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Lời chạy theo nhạc */
.lyrics--sync { white-space: pre-line; }
.lyrics--sync .ly { cursor: pointer; transition: opacity .2s, color .2s; opacity: .55; }
.lyrics--sync .ly.is-on { opacity: 1; color: var(--accent, #d3f55c); font-weight: 600; }

/* Nút giao diện ở thanh đầu: chỉ cần trên màn hình hẹp (thanh bên bị ẩn) */
@media (min-width: 1024px) { .tm-theme-m { display: none; } }

/* Bảng xếp hạng: ẩn bảng trống; chỉ hiện "chưa có số liệu" khi không có bài nào (như bản cũ) */
.ttable--chart:not(:has(tbody tr)) { display: none; }
#chart-all:has(.rkcard) .chart-empty { display: none; }
#chart-all { margin-bottom: var(--s-7, 48px); }
