/* ===== Tokens ===== */
:root {
	/* Bảng màu theo site gốc (xanh ngọc) */
	--bg: #f8fafc;
	--card: #ffffff;
	--soft: #f8f9fa;
	--border: #e9ecef;
	--text: #1a1a1a;
	--text-2: #4a4a4a;
	--muted: #6b7280;
	--primary: var(--brand);
	--primary-2: var(--brand-2);
	--primary-soft: color-mix(in srgb, var(--brand) 14%, #fff);
	/* Màu thương hiệu cố định (không đổi theo chế độ tối) cho các băng nền có chữ trắng: banner trang chủ, đầu bài viết, Video. Đổi theme chỉ cần sửa 3 màu này. */
	--brand: #17a2b8;
	--brand-2: #0b7285;
	--brand-3: #3bc9db;
	--brand-grad: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 50%, var(--brand-3) 100%);
	--accent: #e65100;
	--chord: #dc2626;
	--hot: #e65100;
	--hero-a: var(--brand-2);
	--hero-b: var(--brand-3);
	--shadow: 0 1px 2px rgba(0, 0, 0, .05);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
	--radius: 16px;
	--wrap: 1280px;
	--font: Inter, Arial, Helvetica, sans-serif;
	--font-lyrics: "Segoe UI", system-ui, -apple-system, sans-serif;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #0f172a; --card: #1e293b; --soft: #273449; --border: #334155; --text: #f1f5f9; --text-2: #cbd5e1; --muted: #94a3b8;
		--primary: #22d3ee; --primary-2: #67e8f9; --primary-soft: rgba(22, 78, 99, .4); --chord: #f87171;
		--hero-a: var(--brand-2); --hero-b: var(--brand); --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--bg: #0f172a; --card: #1e293b; --soft: #273449; --border: #334155; --text: #f1f5f9; --text-2: #cbd5e1; --muted: #94a3b8;
	--primary: #22d3ee; --primary-2: #67e8f9; --primary-soft: rgba(22, 78, 99, .4); --chord: #f87171;
	--hero-a: var(--brand-2); --hero-b: var(--brand); --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}

/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: #1e293b; font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
:root[data-theme="dark"] body { color: var(--text); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
.muted { color: var(--muted); }
.sr-only, .skip-link:not(:focus) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--card); padding: 8px 12px; border-radius: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.page-pad { padding-top: 18px; padding-bottom: 32px; }
.narrow { max-width: 760px; }
.ic { flex: none; }
.emo { font-style: normal; }
body.no-scroll { overflow: hidden; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ===== Buttons / chips ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 10px; padding: 9px 16px; background: var(--primary); color: #fff; font-weight: 600; white-space: nowrap; }
.btn:hover { background: var(--primary-2); color: #fff; }
.btn-ghost { background: var(--soft); color: var(--text); }
.btn-ghost:hover { background: var(--primary-soft); color: var(--primary); }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: #ea580c; }
.btn-white { background: rgba(255, 255, 255, .16); color: #fff; border: 1px solid rgba(255, 255, 255, .28); }
.btn-white:hover, .btn-white.on { background: #fff; color: var(--primary-2); }
.btn-white.on .ic { fill: currentColor; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--soft); color: var(--primary); }
.badge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--hot); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; }
.badge:empty { display: none; }
.round-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.round-btn:hover { color: var(--primary); border-color: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border); white-space: nowrap; font-size: 14px; }
.chip:hover, .chip.active { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.chip-sm { padding: 4px 10px; font-size: 13px; }
.chip-wrap { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-size: 12px; font-weight: 700; }
.pill-light { background: rgba(255, 255, 255, .2); color: #fff; font-size: 14px; vertical-align: middle; }
.tone { color: var(--chord); font-weight: 600; }

/* ===== Header ===== */
.topbar { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.admin-bar .topbar { top: 32px; }
.topbar-in { display: flex; align-items: center; gap: 14px; height: 62px; }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 800; font-size: 19px; color: var(--primary); }
.logo:hover { color: var(--primary); }
.logo-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; font-size: 12px; letter-spacing: .5px; }
.logo-img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 8px 11px; border-radius: 9px; border: 0; background: none; color: var(--text); font-size: 14px; font-weight: 500; }
.nav-link .ic { width: 16px; height: 16px; color: var(--muted); }
.nav-link:hover { background: var(--soft); color: var(--primary); }
.dd { position: relative; }
.dd-menu { position: absolute; top: calc(100% + 8px); left: 0; display: none; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 40px rgba(20, 22, 40, .16); padding: 8px; z-index: 50; }
.dd.open .dd-menu { display: grid; }
.dd-menu a { padding: 8px 10px; border-radius: 8px; font-size: 14px; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.dd-menu a:hover { background: var(--soft); }
.dd-cats { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
.dd-rhythms { grid-template-columns: repeat(4, minmax(110px, 1fr)); }
.top-search { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 260px; height: 40px; padding: 0 12px; border-radius: 10px; background: var(--soft); border: 1px solid transparent; color: var(--muted); }
.top-search:focus-within { border-color: var(--primary); background: var(--card); }
.top-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); }
.top-search.on-home { visibility: hidden; }
.top-actions { display: flex; gap: 2px; }
/* display: grid (không để inline) để SVG không đứng trên đường chân chữ, icon nằm đúng giữa nút. */
.i-moon { display: grid; }
.i-sun { display: none; }
:root[data-theme="dark"] .i-sun { display: grid; }
:root[data-theme="dark"] .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display: grid; } :root:not([data-theme="light"]) .i-moon { display: none; } }
.only-mobile { display: none; }

/* Drawer */
.drawer { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 20, .45); }
.drawer-panel { width: min(340px, 88vw); height: 100%; overflow-y: auto; background: var(--card); padding: 14px 16px 30px; display: flex; flex-direction: column; gap: 6px; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.drawer-link { padding: 10px 4px; border-bottom: 1px solid var(--border); font-weight: 500; }
.drawer-title { margin-top: 14px; font-weight: 700; font-size: 13px; text-transform: uppercase; color: var(--muted); }
.drawer .searchbox { margin: 4px 0 6px; }
.drawer .searchbox .btn { display: none; }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; margin-top: 20px; padding: 46px 20px 74px; border-radius: 22px; text-align: center; color: #fff; background: linear-gradient(120deg, var(--hero-a), var(--hero-b)); }
.hero-bubble { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .09); }
.hero-bubble.b1 { width: 220px; height: 220px; left: -60px; top: -40px; }
.hero-bubble.b2 { width: 140px; height: 140px; right: 40px; bottom: -50px; }
.hero-stats { position: relative; display: inline-flex; align-items: center; gap: 12px; padding: 6px 16px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 13px; }
.hero-stats span { display: inline-flex; align-items: center; gap: 6px; }
.hero-stats .ic { width: 14px; height: 14px; }
.hero-stats .sep { width: 1px; height: 14px; background: rgba(255, 255, 255, .35); }
.hero-title { position: relative; margin-top: 16px; font-size: clamp(32px, 6vw, 52px); font-weight: 800; letter-spacing: -.5px; }
.hero-sub { position: relative; margin: 8px 0 0; opacity: .9; }
.hero-search { position: relative; max-width: 640px; margin: -28px auto 0; padding: 0 16px; z-index: 2; }
.searchbox { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(20, 22, 40, .12); color: var(--muted); }
.searchbox input { flex: 1; min-width: 0; border: 0; outline: none; background: none; padding: 8px 0; color: var(--text); font-size: 15px; }
.searchbox:focus-within { border-color: var(--primary); }

/* ===== Sections ===== */
.block { margin-top: 28px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 700; }
.sec-title .ic { color: var(--primary); }
.sec-title.bar::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); }
.sec-tools { display: flex; align-items: center; gap: 6px; }
.more { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--primary); font-size: 14px; font-weight: 500; }
.more .ic { width: 16px; height: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card, .main-col > * + * { margin-top: 18px; }
.hscroll { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 8px; scroll-padding-inline: 2px; scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
.chips-row { margin-top: 22px; gap: 8px; }

/* Song cards */
.song-card { flex: 0 0 180px; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.song-card:hover { transform: translateY(-3px); color: inherit; }
.thumb { position: relative; display: flex; align-items: flex-end; height: 112px; padding: 12px; color: #fff; }
.thumb-title { font-weight: 800; font-size: 17px; line-height: 1.2; text-shadow: 0 1px 6px rgba(0, 0, 0, .25); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-right: 34px; }
.play { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--hot); }
.play .ic { width: 14px; height: 14px; }
.play.big { position: static; width: 56px; height: 56px; }
.play.big .ic { width: 24px; height: 24px; }
.card-body { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; font-size: 13px; }
.card-title { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub, .card-views { display: flex; align-items: center; gap: 5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-views { color: var(--primary); }
.card-sub .ic, .card-views .ic { width: 13px; height: 13px; }

/* Artists */
.artists-row { gap: 18px; }
.artists-row.wrap-row { flex-wrap: wrap; }
.artist { flex: 0 0 96px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 13px; }
.artist strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.avatar { display: grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; object-fit: cover; flex: none; }
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-md { width: 44px; height: 44px; font-size: 15px; }
.avatar-lg { width: 76px; height: 76px; font-size: 24px; box-shadow: 0 0 0 3px var(--card), 0 0 0 5px var(--border); }
.avatar-xl { width: 104px; height: 104px; font-size: 32px; }
.artist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; }
.artist-card { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 0 !important; }
.artist-card .muted { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; }
.artist-card .ic { width: 13px; height: 13px; }
.profile { display: flex; align-items: center; gap: 20px; margin-bottom: 18px; }

/* Recent */
.recent-item { flex: 0 0 200px; display: flex; flex-direction: column; padding: 12px 14px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; font-size: 13px; }
.recent-item strong { font-size: 14px; }

/* ===== Layout ===== */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; margin-top: 28px; align-items: start; }
.page-pad .layout { margin-top: 18px; }
.sidebar { display: flex; flex-direction: column; gap: 18px; }
.sidebar .card + .card { margin-top: 0; }

/* Song rows */
.song-rows { display: flex; flex-direction: column; }
.song-row-wrap { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
.song-row-wrap:last-child { border-bottom: 0; }
.song-row-wrap .song-row { flex: 1; border: 0; }
.song-row { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.song-row:last-child { border-bottom: 0; }
.song-row:hover { color: inherit; background: var(--soft); border-radius: 10px; }
.row-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); flex: none; font-weight: 700; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-title { font-size: 15px; }
.row-sub, .row-preview { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-preview { font-style: italic; }
.row-meta { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.row-meta .ic { width: 14px; height: 14px; }
.row-go { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.row-go .ic { width: 14px; height: 14px; }
.row-tools { display: flex; gap: 4px; }
.row-tool { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--muted); }
.row-tool:hover:not(:disabled) { color: var(--hot); border-color: var(--hot); }
.row-tool:disabled { opacity: .35; cursor: default; }
.local-foot { padding-top: 14px; text-align: right; }

/* Rank list */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list a { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rank-list li:last-child a { border-bottom: 0; }
.rank { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--muted); font-weight: 700; font-size: 13px; flex: none; }
.rank-1 { background: #fde68a; color: #92400e; }
.rank-2 { background: #e5e7eb; color: #374151; }
.rank-3 { background: #fed7aa; color: #9a3412; }
.rank-main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; }
.rank-main strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-main .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hot { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px; border-radius: 6px; background: #fee2e2; color: var(--hot); font-size: 10px; font-weight: 800; }
.hot .ic { width: 11px; height: 11px; }
.rank-views { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 12px; }
.rank-views .ic { width: 13px; height: 13px; }

/* CTA */

/* Docs + categories */
.doc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.doc-card { display: flex; flex-direction: column; gap: 8px; }
.doc-card .pill { align-self: flex-start; }
.doc-card strong { font-size: 14px; line-height: 1.35; }
.doc-thumb { display: grid; place-items: center; height: 100px; border-radius: 12px; color: rgba(255, 255, 255, .85); }
.doc-thumb .ic { width: 34px; height: 34px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 12px; background: var(--soft); font-size: 13px; }
.cat-tile strong { font-size: 14px; }
.cat-tile:hover { background: var(--primary-soft); }
.emo.big { font-size: 24px; }

/* Lists / tabs / headers */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--muted); }
.crumbs a:hover { color: var(--primary); }
.list-head { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.list-emo { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--primary-soft); font-size: 28px; flex: none; }
.page-title { font-size: 26px; font-weight: 800; }
.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: 12px; background: var(--soft); overflow-x: auto; }
.tab { flex: 1; text-align: center; padding: 7px 12px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tab.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state.big h1 { color: var(--text); margin: 10px 0 4px; }
.empty-state .searchbox { max-width: 480px; margin: 18px auto; }
.empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.post-row + .post-row { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.prose { line-height: 1.75; }

/* ===== Song page ===== */
.song-layout { --teal: var(--brand-2); --teal-2: var(--brand); }
.song-head { position: relative; overflow: hidden; border-radius: 16px; padding: 22px 28px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 70%, #000) 0%, var(--brand-2) 30%, var(--brand) 70%, var(--brand-3) 100%); box-shadow: 0 6px 18px rgba(6, 78, 91, .18); }
.song-head::before { content: ""; position: absolute; left: -50px; top: -70px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255, 255, 255, .05); }
.song-head::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.song-head-in { position: relative; z-index: 1; }
.song-title { margin: 0; font-size: clamp(22px, 3.6vw, 32px); font-weight: 900; letter-spacing: -.3px; line-height: 1.2; }
.song-meta, .song-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.song-meta { margin-top: 14px; }
.song-actions { margin-top: 10px; }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(255, 255, 255, .15); font: 600 13px/1.4 var(--font); color: #fff; backdrop-filter: blur(4px); cursor: pointer; }
.meta-chip:hover { background: rgba(255, 255, 255, .26); color: #fff; }
.meta-chip.dim { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .78); font-weight: 500; }
.meta-chip b { font-weight: 700; }
.meta-chip .ic { width: 14px; height: 14px; }
.meta-chip[data-like] .ic { color: #fcd34d; }
.meta-chip[data-like].on .ic { fill: #fcd34d; }
.meta-chip.on { background: rgba(255, 255, 255, .3); }

.toolbar { position: sticky; top: 70px; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--card) 95%, transparent); backdrop-filter: blur(16px); box-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.admin-bar .toolbar { top: 102px; }
.tb-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 38px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); font: 600 14px var(--font); color: var(--text); white-space: nowrap; }
.tb-btn:hover { background: var(--soft); color: var(--teal); }
.tb-btn.on, .tb-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.tb-btn.on:hover, .tb-btn.active:hover { background: #095c6b; color: #fff; }
.tb-btn .ic { width: 17px; height: 17px; }
.tb-tone { gap: 0; font-weight: 700; padding: 0 10px; }
.tb-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: #f59f00; border: 2px solid var(--card); }
.tb-sep { width: 1px; height: 22px; margin: 0 6px; background: var(--border); }
.lyrics-foot { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: flex-end; margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--border); }
.lyrics-foot .more { color: var(--muted); font-size: 13px; gap: 6px; }
.lyrics-foot .more:hover { color: var(--teal); }
.modal-sm { width: min(380px, calc(100% - 32px)); }
.tone-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.tone-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 52px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: 700 16px var(--font); }
.tone-opt small { font-size: 10px; font-weight: 500; color: var(--muted); }
.tone-opt:hover { border-color: var(--teal); color: var(--teal); }
.tone-opt.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.tone-opt.active small { color: rgba(255, 255, 255, .8); }
.tone-singers { display: grid; gap: 6px; margin-top: 12px; }
.tone-singer { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: 500 14px var(--font); text-align: left; }
.tone-singer:hover, .tone-singer.active { border-color: var(--teal); background: color-mix(in srgb, var(--teal) 8%, var(--card)); }
.tone-singer .grow { flex: 1; }

.setlist-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; flex-wrap: wrap; }
.setlist-nav[hidden] { display: none; }

.lyrics-card { padding: 22px 24px; }
.lyrics { font-size: 17px; line-height: 2; word-wrap: break-word; }
.lyrics.two-cols { column-count: 2; column-gap: 40px; column-rule: 1px solid var(--border); }
/* Đang tự cuộn: khung lời thành vùng cuộn riêng (song.js đặt max-height), khoảng trống 60vh ở đầu để kịp chuẩn bị; bỏ chia cột như site gốc. */
.lyrics.autoscroll { overflow-y: auto; padding-top: 60vh; overscroll-behavior: contain; scrollbar-width: thin; column-count: auto; }
/* Ngăn cách khi nhân đôi lời (x2), giống site gốc. */
.x2-sep { margin-top: 40px; padding-top: 32px; margin-bottom: 32px; border-top: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent); text-align: center; }
.x2-sep span { display: inline-block; padding: 8px 20px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; }
.ln { break-inside: avoid; }
.ln.gap { height: .9em; }
.lbl { display: inline-block; margin-right: 6px; padding: 0 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .85em; line-height: 1.6; }
.ch { color: var(--chord); font-weight: 700; cursor: help; white-space: nowrap; }
.ln:not(.above) .ch::before { content: "["; opacity: .55; font-weight: 400; }
.ln:not(.above) .ch::after { content: "]"; opacity: .55; font-weight: 400; }
.ann { color: var(--muted); font-style: italic; }
.ln.above { line-height: 1.25; margin-bottom: .45em; }
.seg { display: inline-flex; flex-direction: column; vertical-align: bottom; }
.sc { min-height: 1.3em; padding-right: .35em; font-size: .9em; }
.st { white-space: pre; }

.diagrams { display: flex; flex-wrap: wrap; gap: 12px; }
.dg { margin: 0; padding: 8px 6px 4px; border: 1px solid var(--border); border-radius: 12px; text-align: center; background: var(--soft); }
.dg figcaption { font-weight: 800; color: var(--chord); }
.dg-svg { color: var(--text); }
.dg-svg line { stroke: currentColor; stroke-opacity: .55; }
.dg-svg .dot { fill: currentColor; }
.dg-svg circle:not(.dot) { stroke: currentColor; stroke-width: 1.3; }
.dg-svg text { fill: currentColor; font-size: 10px; font-family: var(--font); }
.dg-svg .mk { font-size: 11px; }
.dg-none { display: grid; place-items: center; width: 84px; height: 106px; color: var(--muted); }

#chordtip { position: fixed; z-index: 80; display: none; padding: 6px 8px 2px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 22, 40, .2); text-align: center; pointer-events: none; }
#chordtip.show { display: block; }
#chordtip strong { color: var(--chord); }

.video { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; height: 100%; color: #fff; font-size: 14px; }
.video-thumb { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .92; transition: opacity .2s; }
.video-thumb:hover img { opacity: 1; }
.yt-play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #e62117; color: #fff; transform: translate(-50%, -50%); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); transition: transform .2s; }
.yt-play .ic { width: 22px; height: 22px; margin-left: 3px; }
.video-thumb:hover .yt-play { transform: translate(-50%, -50%) scale(1.08); }
.singer-list { list-style: none; max-height: 330px; margin: 12px -18px -18px; padding: 0; overflow-y: auto; border-top: 1px solid var(--border); }
.singer-list li + li { border-top: 1px solid var(--border); }
.singer-pick { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; border: 0; background: none; color: var(--text); font: 500 15px var(--font); text-align: left; }
.singer-pick { cursor: pointer; }
.singer-pick:hover { background: var(--soft); }
.singer-pick:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.sp-name { color: inherit; }
.sp-name:hover, .singer-pick.active .sp-name { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.singer-pick.active { background: color-mix(in srgb, var(--brand) 8%, var(--card)); }
.singer-pick .num { width: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.sp-play { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); color: var(--muted); }
.sp-play .ic { width: 11px; height: 11px; margin-left: 2px; }
.sp-play.off { opacity: .35; }
.singer-pick:hover .sp-play:not(.off), .singer-pick.active .sp-play:not(.off) { background: var(--brand-2); color: #fff; }
.sp-tone { padding: 2px 9px; border: 1px solid #99e9f2; border-radius: 6px; background: #e3fafc; color: var(--brand-2); font-size: 12px; font-weight: 700; }
:root[data-theme="dark"] .sp-tone { background: color-mix(in srgb, var(--brand) 15%, transparent); border-color: color-mix(in srgb, var(--brand) 40%, transparent); color: #66d9e8; }
.grow { flex: 1; }

#toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); opacity: 0; padding: 10px 18px; border-radius: 10px; background: #1b1d2a; color: #fff; font-size: 14px; transition: .2s; pointer-events: none; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Footer ===== */

/* ===== Responsive ===== */
@media (max-width: 1060px) {
	.top-search { width: 200px; }
	.layout { grid-template-columns: minmax(0, 1fr) 300px; }
}
@media (max-width: 900px) {
	.nav, .top-search { display: none; }
	.only-mobile { display: inline-grid; }
	.top-actions { margin-left: auto; }
	.layout { grid-template-columns: minmax(0, 1fr); }
	.lyrics.two-cols { column-count: 1; }
	.toolbar { top: 66px; }
}
@media (max-width: 782px) { .admin-bar .topbar { top: 46px; } .admin-bar .toolbar { top: 112px; } }
@media (max-width: 600px) {
	.topbar-in { height: 56px; gap: 6px; }
	.logo { min-width: 0; }
	.logo-text { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
	.hero { padding: 34px 16px 64px; border-radius: 18px; }
	.hero-search { padding: 0 6px; }
	.searchbox .btn { padding: 9px 12px; }
	.doc-grid { grid-template-columns: 1fr; }
	.song-card { flex-basis: 150px; }
	.thumb { height: 96px; }
	.card { padding: 14px; }
	.lyrics-card { padding: 16px; }
	.song-head { padding: 18px; }
	.toolbar { position: static; }
}

/* ===== In ===== */
@media print {
	.topbar, .footer, .toolbar, .sidebar, .song-actions, .crumbs, .song-layout .card:not(.lyrics-card), #chordtip, #toast, #wpadminbar { display: none !important; }
	body { background: #fff; color: #000; }
	.layout { display: block; }
	.song-head { background: none; color: #000; padding: 0; }
	.meta-chip, .pill-light { color: #000; background: none; }
	.card { border: 0; box-shadow: none; padding: 0; }
	.ch { color: #000; }
}

/* ===== Pager / ảnh thật ===== */
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 16px; }
.pager .page-numbers { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card); font-size: 14px; }
.pager .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager a.page-numbers:hover { border-color: var(--primary); }
.pager .dots { border: 0; background: none; }
.thumb.has-img { background-size: cover; background-position: center; }

/* ===== Form chung ===== */
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { resize: vertical; min-height: 84px; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--hot); }
.btn.danger:hover { background: rgba(239, 68, 68, .1); color: var(--hot); }
.notice-ok { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: rgba(34, 197, 94, .12); color: #15803d; }
:root[data-theme="dark"] .notice-ok { color: #4ade80; }

/* ===== Gợi ý tìm kiếm ===== */
.has-suggest { position: relative; }
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; max-height: min(70vh, 480px); overflow-y: auto; padding: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(20, 22, 40, .18); text-align: left; color: var(--text); }
.top-search .suggest { left: auto; min-width: 360px; }
.sg-title { padding: 8px 10px 4px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.sg-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; }
.sg-item:hover, .sg-item.active { background: var(--soft); }
.sg-item .grow { display: flex; flex-direction: column; min-width: 0; }
.sg-item strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-item .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-ic { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.sg-all { justify-content: center; margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; color: var(--primary); font-size: 14px; font-weight: 500; }
.sg-empty { padding: 12px; color: var(--muted); font-size: 14px; }
.mic-btn { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border: 0; border-radius: 8px; background: none; color: var(--muted); }
.mic-btn:hover { color: var(--primary); background: var(--primary-soft); }
.mic-btn.on { color: #fff; background: var(--hot); animation: mic 1s infinite; }
@keyframes mic { 50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, .25); } }

/* ===== Ca sĩ A–Z ===== */
.dd-az { grid-template-columns: repeat(7, 38px); gap: 4px; }
.dd-az a { justify-content: center; padding: 7px 0; font-weight: 600; }
.dd-az a.dd-az-all { grid-column: 1 / -1; justify-content: flex-start; padding: 8px 10px; color: var(--primary); }
.az-card { margin-bottom: 18px; }
.az { display: flex; flex-wrap: wrap; gap: 4px; }
.az a { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 8px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); }
.az a:hover { background: var(--soft); color: var(--text); }
.az a.active { background: var(--primary); color: #fff; }
.az-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.az-tools .tabs { margin: 0; }
.mini-search { display: flex; align-items: center; gap: 8px; flex: 1; max-width: 340px; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--soft); border: 1px solid transparent; color: var(--muted); }
.mini-search:focus-within { border-color: var(--primary); background: var(--card); }
.mini-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font: inherit; }

/* ===== Setlist nhiều danh sách ===== */
.sl-tabs { margin-bottom: 14px; }
.chip .muted { font-size: 12px; }
.chip.active .muted { color: inherit; opacity: .7; }
.chip-add { border-style: dashed; color: var(--primary); }
.sl-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.modal { width: min(460px, calc(100% - 32px)); padding: 0; border: 0; border-radius: 16px; background: var(--card); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .3); }
.modal::backdrop { background: rgba(10, 12, 20, .55); }
.modal-in { padding: 18px 20px 20px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal p { margin: 6px 0 14px; font-size: 14px; }
.sl-picks { display: grid; gap: 6px; max-height: 300px; overflow-y: auto; }
.sl-pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.sl-pick:hover { border-color: var(--primary); }
.sl-pick.on { border-color: var(--primary); background: var(--primary-soft); }
.sl-pick .grow { display: flex; flex-direction: column; min-width: 0; }
.sl-pick .muted { font-size: 13px; }
.sl-pick .box { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border: 2px solid var(--border); border-radius: 6px; color: #fff; font-weight: 800; font-size: 13px; }
.sl-pick.on .box { background: var(--primary); border-color: var(--primary); }
.sl-new { display: flex; gap: 8px; margin: 14px 0 12px; }
.sl-new .btn { flex: none; }

/* ===== Trình diễn ===== */
.tb-stage { background: var(--primary-soft); color: var(--primary); }
/* Khung toàn màn hình giống site gốc: tên bài ở giữa, lời chia 2 cột chữ lớn, tràn thì cuộn ngang. */
.stage { position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; box-sizing: border-box; padding: 2vh 8vw 3vh; background: var(--card); color: var(--text); }
.stage #toast { z-index: 10010; bottom: 80px; }
.stage-head { flex: none; margin-bottom: 4px; padding: 6px 0; text-align: center; }
.stage-head h1 { margin: 0 auto 8px; font-size: 42px; line-height: 1.3; }
.stage-head .muted { font-size: 13px; }
.stage-view { position: relative; flex: 1; min-height: 0; overflow-x: scroll; overflow-y: hidden; padding-bottom: 24px; }
.stage-lyrics { height: 100%; box-sizing: border-box; column-count: 2; column-gap: 4vw; column-rule: 2px dashed var(--border); column-fill: auto; padding-bottom: 28px; }
.stage-spacer { position: absolute; top: 0; width: 1px; height: 1px; pointer-events: none; }
.stage-view::-webkit-scrollbar { height: 12px; }
.stage-view::-webkit-scrollbar-track { background: var(--soft); border-radius: 6px; }
.stage-view::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 6px; }
/* Chia lời vừa 1 màn hình: không cuộn, số cột do song.js tính (--cols). */
.stage.fit .stage-view { overflow: hidden; padding-bottom: 0; }
.stage.fit .stage-lyrics { column-count: var(--cols, 2); column-gap: clamp(16px, 1.8vw, 32px); padding-bottom: 12px; }
/* 1 cột: cuộn dọc. */
.stage.vertical { padding-left: 0; padding-right: 0; }
.stage.vertical .stage-view { overflow: hidden auto; padding: 0 8vw; }
.stage.vertical .stage-lyrics { column-count: 1; height: auto; }
.stage.fit .grp.pg, .stage.vertical .grp.pg { display: none; }
/* Nút "Công cụ" ở góc và thanh công cụ nổi (ẩn cho tới khi bấm, phím C). */
.stage-tools-btn { position: fixed; top: 14px; right: 20px; z-index: 10005; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 999px; background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(16px); color: var(--text); font: 600 13px var(--font); box-shadow: 0 4px 18px -2px rgba(15, 23, 42, .15); cursor: pointer; }
.stage-tools-btn:hover { color: var(--primary); border-color: var(--primary); }
.stage.tools-open .stage-tools-btn { background: var(--primary); border-color: var(--primary); color: #fff; }
.stage-bar { position: fixed; top: 14px; left: 50%; z-index: 10001; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: max-content; max-width: calc(100vw - 180px); overflow-x: auto; padding: 8px 16px; border: 1px solid var(--border); border-radius: 18px; background: color-mix(in srgb, var(--card) 96%, transparent); backdrop-filter: blur(24px); box-shadow: 0 20px 45px -10px rgba(15, 23, 42, .25); opacity: 0; visibility: hidden; pointer-events: none; transform: translateX(-50%) translateY(-16px) scale(.96); transition: opacity .22s, transform .22s, visibility .22s; }
.stage.tools-open .stage-bar { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%); }
.stage-bar .grp { display: inline-flex; flex: none; align-items: center; gap: 2px; padding: 2px; border-radius: 9px; background: var(--soft); }
.stage-bar button { min-width: 34px; height: 32px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--text); font: 600 14px var(--font); white-space: nowrap; cursor: pointer; }
.stage-bar button:hover { color: var(--primary); background: var(--card); }
.stage-bar button.on { background: var(--primary); color: #fff; }
.stage-tone { min-width: 36px; text-align: center; font-weight: 800; color: var(--primary); }
.stage-bar .exit { flex: none; background: var(--card); color: var(--hot); border: 1px solid var(--border); }
.stage-bar .exit:hover { background: color-mix(in srgb, var(--hot) 12%, var(--card)); color: var(--hot); }
.stage-sl { display: flex; flex: none; justify-content: space-between; gap: 10px; padding-top: 8px; border-top: 1px solid var(--border); }
.stage-sl .btn { max-width: 48%; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 767px) {
	.toolbar .hide-sm { display: none; }
	.toolbar { gap: 4px; padding: 8px; }
	.tb-btn { min-width: 34px; height: 34px; padding: 0 8px; font-size: 13px; }
	.tb-sep { display: none; }
	.song-head { padding: 16px 18px; }
}


@media print { .stage, .modal, .suggest { display: none !important; } }

/* ===== Slider + khối trang chủ ===== */
.carousel { position: relative; }
.carousel::before, .carousel::after { content: ""; position: absolute; top: 0; bottom: 8px; width: 40px; z-index: 1; pointer-events: none; transition: opacity .2s; }
.carousel::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.carousel::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.carousel.at-start::before, .carousel.at-end::after { opacity: 0; }
.round-btn:disabled { opacity: .4; cursor: default; color: var(--muted); border-color: var(--border); }
.car-btn { position: absolute; top: calc(50% - 4px); z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--muted); box-shadow: var(--shadow); transition: opacity .2s; }
.car-btn:hover { color: var(--primary); border-color: var(--primary); }
.car-btn.prev { left: -6px; }
.car-btn.next { right: -6px; }
.car-btn:disabled { opacity: 0; pointer-events: none; }
.carousel-chips { margin-top: 22px; }
.carousel-chips .chips-row { margin-top: 0; }
.chip-cat { padding: 6px 14px 6px 6px; font-weight: 500; }
.chip-emo { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--soft); font-size: 14px; }
.song-card { flex-basis: 196px; }
.thumb.has-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35)); }
.thumb .play, .card-hot { z-index: 1; }
.card-hot { position: absolute; top: 8px; left: 8px; background: var(--hot); color: #fff; }
.artist { flex-basis: 112px; }
.artist-role { font-size: 10px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--primary); }
.artist .avatar-lg { width: 88px; height: 88px; margin-bottom: 4px; }
.pop-rhythms { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.pop-label { margin-right: 4px; font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.main-col section > .card.song-rows { padding: 4px 16px; }
.doc-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.doc-card.card { padding: 10px 10px 14px; margin: 0; }
.rank-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rank-title strong { min-width: 0; }
.rank-title .hot { flex: none; }
.rank-preview { font-size: 12px; font-style: italic; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.stat-grid div { display: flex; flex-direction: column; padding: 12px 4px; border-radius: 12px; background: var(--soft); }
.stat-grid b { font-size: 20px; font-weight: 800; color: var(--primary); }
.stat-grid span { font-size: 12px; color: var(--muted); }
.mini-singers { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mini-singers a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; font-size: 14px; }
.mini-singers a:hover { background: var(--soft); }
.mini-singers .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-singers .muted { font-size: 12px; }
.btn-block { justify-content: center; width: 100%; }
@media (max-width: 600px) {
	.song-card { flex-basis: 156px; }
	.car-btn { display: none; }
	.artist { flex-basis: 96px; }
	.artist .avatar-lg { width: 76px; height: 76px; }
	.rank-preview { display: none; }
}
.img-credit { margin-top: 6px; font-size: 12px; color: var(--muted); }
.img-credit a { text-decoration: underline; }

/* ===== Footer tối (theo footer site gốc) ===== */
.footer { --ft-accent: var(--brand); --ft-accent-2: var(--brand-3); margin-top: 40px; color: rgba(255, 255, 255, .8); font-size: 14px; }
.footer-main { padding: 32px 0; background: #1a1a1a; }
.footer-bottom { padding: 16px 0; background: #111; color: rgba(255, 255, 255, .3); font-size: 12px; text-align: center; }
.footer-bottom strong { color: rgba(255, 255, 255, .5); }
.footer-bottom p { margin: 0; }
.footer a { color: inherit; }
.footer a:hover { color: var(--ft-accent-2); }

/* Hàng widget: số cột = số widget (--cols, đặt trong footer.php) */
.footer-row { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 32px; }
.footer-row:empty { display: none; }
.footer-row-2 { margin-top: 28px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-col { min-width: 0; }
.footer-col .textwidget > * + * { margin-top: 14px; }
.footer-col h4 { margin: 0 0 16px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.footer-col p { margin: 0; font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, .5); }
.footer-col img { max-width: 100%; height: auto; border-radius: 8px; }

/* Cột thông tin site */
.footer-col .logo, .footer-col .logo:hover { color: #fff; }
.footer-col .logo-text { color: #fff; font-size: 18px; font-weight: 800; }
.footer-col .logo + p { margin-top: 12px; }
.ft-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-badge, .footer-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--ft-accent-2); font-size: 12px; font-weight: 500; }
.ft-badge .ic, .footer-badge .ic { width: 14px; height: 14px; }

/* Danh sách liên kết: 2 cột, mũi tên nhỏ màu nhấn */
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; font-size: 13px; }
.footer-col ul a { display: flex; align-items: center; gap: 10px; }
.footer-col ul a::before { content: ""; width: 5px; height: 5px; flex: none; border-top: 2px solid var(--ft-accent); border-right: 2px solid var(--ft-accent); transform: rotate(45deg); }

/* Thẻ (thể loại, điệu, A–Z) */
.ft-tags, .ft-az { display: flex; flex-wrap: wrap; gap: 10px; }
.footer .ft-tag { display: inline-flex; align-items: center; justify-content: center; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; background: rgba(255, 255, 255, .05); color: rgba(255, 255, 255, .6); font-size: 11px; line-height: 1.4; transition: all .15s; }
.footer .ft-tag:hover { border-color: var(--ft-accent); background: var(--ft-accent); color: #fff; }

/* A–Z: tiêu đề và hàng nút trên cùng một dòng */
.ft-az { flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.ft-az::-webkit-scrollbar { display: none; }
.footer .ft-az .ft-tag { flex: none; height: 28px; padding: 0 12px; font-weight: 700; }
.footer .ft-az .ft-az-key { width: 28px; padding: 0; }
.footer-row-2 .footer-col { display: flex; align-items: center; gap: 16px; }
.footer-row-2 .footer-col h4 { flex: none; min-width: 70px; margin: 0; }
.footer-row-2 .footer-col .textwidget { flex: 1; min-width: 0; }

@media (max-width: 900px) { .footer-row { grid-template-columns: repeat(min(var(--cols, 3), 2), minmax(0, 1fr)); } }
@media (max-width: 600px) {
	.footer-row { grid-template-columns: 1fr; }
	.footer-row-2 .footer-col { flex-direction: column; align-items: flex-start; }
	.ft-az { flex-wrap: wrap; }
	.footer .ft-az .ft-az-key { width: 32px; height: 32px; }
}

/* =====================================================================
 * Giao diện theo site gốc (đo từ hopamviet.vn, Tailwind): xanh ngọc var(--brand) / var(--brand-2),
 * nền #F8FAFC, viền #E9ECEF, bo góc 16px, font Inter. Đặt cuối file để đè các kiểu cũ.
 * ===================================================================== */

/* ---- Header ---- */
.topbar { background: rgba(255, 255, 255, .9); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(226, 232, 240, .6); box-shadow: var(--shadow); }
:root[data-theme="dark"] .topbar { background: rgba(15, 23, 42, .9); border-color: rgba(51, 65, 85, .6); }
.topbar-in { height: 64px; gap: 16px; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; background: linear-gradient(135deg, var(--brand-2), var(--brand)); }
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: -.5px; background: linear-gradient(135deg, var(--brand-2), var(--brand)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav { gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: 4px; color: #374151; font-weight: 400; }
.nav-link:hover { background: none; color: var(--primary); }
.dd-menu { border-color: #f3f4f6; border-radius: 12px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1); }
.dd-menu a { padding: 6px 12px; color: #374151; }
.dd-menu a:hover { background: #f9fafb; color: var(--primary); }
.top-search { width: 300px; height: 40px; padding: 0 4px 0 14px; border: 1px solid #e5e7eb; border-radius: 999px; background: #f9fafb; }
.top-search-btn { height: 32px; padding: 0 16px; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.icon-btn:hover { background: #f3f4f6; color: var(--primary-2); }

/* ---- Hero trang chủ ---- */
.hero { margin-top: 20px; padding: 44px 48px 68px; border-radius: 24px; background: var(--brand-grad); box-shadow: var(--shadow-md); }
.hero.no-search { padding-bottom: 44px; } /* Banner tắt ô tìm kiếm: bỏ khoảng chừa cho ô tìm đè lên. */
.hero-bubble { background: rgba(255, 255, 255, .1); }
.hero-stats { gap: 12px; padding: 8px 16px; margin-bottom: 8px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .15); backdrop-filter: blur(4px); font-size: 14px; }
.hero-stats b { font-weight: 900; }
.hero-stats .sep { background: rgba(255, 255, 255, .3); }
.hero-title { margin-top: 16px; font-size: clamp(30px, 5vw, 48px); font-weight: 900; letter-spacing: -1.2px; text-shadow: 0 1px 2px rgba(0, 0, 0, .05); }
.hero-sub { color: rgba(255, 255, 255, .8); opacity: 1; font-size: 16px; }
.hero-search { max-width: 544px; margin-top: -30px; }
.searchbox { padding: 6px 6px 6px 16px; border: 0; border-radius: 16px; box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1); }
.searchbox input { padding: 10px 0; font-size: 14px; color: var(--text); }
.searchbox input::placeholder { color: #7a7a7a; }
.searchbox .btn { border-radius: 12px; background: var(--brand-2); padding: 10px 20px; font-size: 14px; font-weight: 700; }

/* ---- Tiêu đề mục ---- */
.block { margin-top: 24px; }
.sec-head { margin-bottom: 16px; }
.sec-head-line { gap: 12px; margin-bottom: 12px; }
.sec-head-line .sec-title { font-size: 16px; font-weight: 700; }
.sec-head-line .emo { font-size: 18px; }
.sec-line { flex: 1; height: 1px; background: var(--border); }
.sec-title { color: var(--text); font-size: 18px; font-weight: 800; }
.sec-title.bar::before { width: 4px; height: 20px; border-radius: 999px; background: var(--primary); }
.sec-title.bar-slate::before { background: #94a3b8; }
.more { color: var(--primary); font-size: 14px; font-weight: 600; }
.sec-head-line .more { font-size: 12px; }
.more:hover { color: var(--primary-2); }
.round-btn { width: 32px; height: 32px; border-color: #dde2e6; color: #4b5563; box-shadow: var(--shadow); }
.round-btn:hover { border-color: var(--primary); color: var(--primary-2); }
.card { border-color: var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.list-card { padding: 8px 16px; }

/* ---- Thẻ bài hát nổi bật ---- */
.song-card { flex-basis: 200px; border-radius: 16px; box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.song-card:hover { transform: none; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.thumb { height: auto; aspect-ratio: 16 / 9; padding: 10px; overflow: hidden; }
.thumb.has-img::after { background: linear-gradient(0deg, rgba(0, 0, 0, .4), transparent 60%); }
.play { right: 6px; bottom: 6px; width: 28px; height: 28px; background: rgba(220, 38, 38, .9); color: #fff; box-shadow: 0 4px 6px rgba(0, 0, 0, .2); opacity: .85; }
.song-card:hover .play { opacity: 1; transform: scale(1.1); }
.play .ic { width: 12px; height: 12px; }
.card-hot { top: 6px; left: 6px; border-radius: 4px; background: #e65100; font-size: 9px; }
.card-body { gap: 2px; padding: 10px 14px 14px; font-size: 12px; }
.card-title { margin-bottom: 4px; color: var(--text); font-size: 13px; font-weight: 700; line-height: 1.35; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.song-card:hover .card-title { color: var(--primary-2); }
.card-sub { color: #6b7280; }
.card-views { margin-top: 6px; color: var(--primary-2); font-weight: 600; opacity: .8; }
.song-card:hover .card-views { opacity: 1; }

/* ---- Chip thể loại ---- */
.chip { border-color: var(--border); }
.chip-cat { gap: 6px; padding: 6px 12px 6px 6px; color: var(--text-2); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); }
.chip-cat:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-2); }
.chip-emo, .cat-ic { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 8px; font-size: 11px; flex: none; }
.cat-ic-lg { width: 28px; height: 28px; font-size: 14px; box-shadow: var(--shadow); }

/* ---- Nghệ sĩ ---- */
.artist { flex-basis: 120px; gap: 0; padding: 12px 10px; border-radius: 16px; transition: background .2s, box-shadow .2s; }
.artist:hover { background: var(--card); box-shadow: var(--shadow); }
.artist .avatar-lg { width: 80px; height: 80px; border: 2px solid #fff; box-shadow: var(--shadow); font-size: 20px; font-weight: 900; margin: 0 auto; }
.artist-role { margin-top: 8px; color: var(--primary); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
.artist strong { margin-top: 2px; color: var(--text); font-size: 13px; font-weight: 700; white-space: normal; }
.artist:hover strong { color: var(--primary-2); }
.artist .muted { font-size: 11px; }
.pop-label { color: var(--muted); }

/* ---- Dòng bài hát (mới cập nhật, danh sách, thịnh hành) ---- */
.song-rows .song-row, .song-row { gap: 12px; margin: 0 -4px; padding: 14px 8px; border-bottom: 1px solid var(--border); border-radius: 8px; }
.song-rows .song-row:last-child { border-bottom: 0; }
.song-row:hover { background: var(--soft); }
.row-ic { width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); color: var(--primary); }
.song-row:hover .row-ic { background: var(--primary-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent); }
.row-title { color: var(--text); font-size: 15px; font-weight: 700; }
.song-row:hover .row-title { color: var(--primary-2); }
.row-sub { display: flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--text-2); font-size: 13px; font-weight: 500; }
.row-names { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-cat { display: inline-flex; align-items: center; gap: 6px; flex: none; color: #4b5563; }
.row-cat i { width: 4px; height: 4px; border-radius: 50%; background: #d1d5db; }
.row-preview { margin-top: 4px; color: #4b5563; font-size: 12px; font-style: italic; }
.row-meta { color: #4b5563; font-size: 12px; font-weight: 600; }
.row-go { width: 24px; height: 24px; border-radius: 8px; background: rgba(0, 0, 0, .05); color: #6b7280; }
.rank-n { background: var(--card); color: #9ca3af; font-size: 14px; font-weight: 900; }
.rank-n.n1 { color: #eab308; } .rank-n.n2 { color: #9ca3af; } .rank-n.n3 { color: #ea580c; }
.hot-badge { display: inline-flex; align-items: center; gap: 2px; flex: none; padding: 1px 6px; border: 1px solid rgba(230, 81, 0, .2); border-radius: 4px; background: rgba(230, 81, 0, .1); color: #e65100; font-size: 9px; font-weight: 700; letter-spacing: .1em; line-height: 1.4; }
/* Kéo icon lên cho ngang chữ in hoa (hình ngọn lửa nằm lệch xuống trong khung 24px) và bù khoảng letter-spacing sau chữ T. */
.hot-badge .ic { width: 10px; height: 10px; margin-left: -.1em; }

/* ---- Tư liệu (trang chủ) ---- */
.doc-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.doc-row { display: flex; align-items: center; gap: 16px; padding: 12px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); transition: box-shadow .2s, border-color .2s; }
.doc-row:hover { border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.doc-row .doc-thumb { width: 80px; height: 80px; flex: none; border-radius: 12px; }
.doc-row strong { font-size: 14px; font-weight: 600; line-height: 1.4; }
.doc-row:hover strong { color: var(--primary); }


/* ---- Cột phải ---- */
.layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 32px; margin-top: 32px; }
.sidebar { gap: 24px; }
.main-col > * + * { margin-top: 32px; }
/* Cột trái là vùng widget (khung widget display: contents không nhận margin): chừa khoảng giữa các khối bằng lề của khối bên trong. */
.main-col > .side-widget + .side-widget > .textwidget > :first-child, .main-col > .side-widget + .side-widget > :not(.textwidget):first-child { margin-top: 32px; }
.box { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.box-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.box-head h3 { flex: 1; margin: 0; color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: .025em; }
.box-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 8px; color: #fff; }
.box-ic .ic { width: 15px; height: 15px; }
.box-body { padding: 16px; }
.box-body .song-rows { margin: -8px 0; }
.box-head .more { font-size: 12px; }
.box-head .more-hot { color: #ea580c; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; overflow: hidden; text-align: center; }
.stat-row > div { display: flex; flex-direction: column; padding: 16px 8px; }
.stat-row > div + div { border-left: 1px solid var(--border); }
.stat-row b { color: var(--primary-2); font-size: 20px; font-weight: 900; }
.stat-row .is-accent b { color: #e65100; }
.stat-row span { margin-top: 4px; color: #9ca3af; font-size: 11px; }
.sheet-chips, .tag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.list-card .sheet-chips { padding: 8px 0; }
.sheet-chip { display: inline-block; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fafbfc; color: var(--text); font-size: 12.5px; font-weight: 500; transition: all .2s; }
.sheet-chip span { color: #8a8a8a; font-weight: 400; }
.sheet-chip:hover { border-color: var(--primary); background: #fff; color: var(--primary-2); transform: translateY(-1px); }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); color: var(--text-2); font-size: 12px; font-weight: 500; transition: all .2s; }
.tag-chip:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.singer-chip { border-radius: 8px; font-size: 13px; font-weight: 700; }
.singer-chip .ic { width: 13px; height: 13px; color: #9ca3af; }
.mini-rank { list-style: none; margin: -16px; padding: 0; }
.mini-rank a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.mini-rank li:last-child a { border-bottom: 0; }
.mini-rank a:hover { background: var(--soft); }
.mini-rank .grow { display: flex; flex-direction: column; min-width: 0; }
.mini-rank strong { color: var(--text-2); font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-rank a:hover strong { color: #e91e63; }
.mini-rank .muted { font-size: 11px; }
.mini-rank-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #f3f4f6; color: #6b7280; font-size: 11px; font-weight: 900; }
.mini-rank-n.n1 { background: #fce7f3; color: #db2777; } .mini-rank-n.n2 { background: #e0e7ff; color: #4f46e5; } .mini-rank-n.n3 { background: #ffedd5; color: #ea580c; }
.cat-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.cat-list li + li { border-top: 1px solid #f1f3f5; }
.cat-list a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: var(--text-2); }
.cat-list a:hover { background: var(--soft); color: var(--primary-2); }
.cat-list a.active { background: var(--primary-soft); color: var(--primary-2); font-weight: 600; }
.cat-list .ic { width: 16px; height: 16px; }

/* ---- Khung trang (ca sĩ) ---- */
.page-card { padding: 0; overflow: hidden; }
.page-card > .song-rows { padding: 8px 16px; }
.page-card > .pager { padding: 0 16px 16px; }
.page-card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.crumbs { align-items: center; gap: 6px; margin-bottom: 12px; color: #a0aec0; font-size: 12px; font-weight: 500; }
.crumbs .ic { width: 12px; height: 12px; }
.crumbs > span:last-child { color: var(--text-2); font-weight: 700; }
.crumbs a:hover { color: #e91e63; }
.profile-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.profile { gap: 12px; margin: 0; }
.profile-av .avatar-xl { width: 56px; height: 56px; border: 1px solid rgba(233, 30, 99, .2); font-size: 18px; box-shadow: var(--shadow); }
.profile-title { margin: 0; color: var(--text); font-size: 16px; font-weight: 900; line-height: 1.25; }
.profile-title span { color: #e91e63; }
.profile-meta { margin: 2px 0 0; color: #7a7a7a; font-size: 12px; }
.profile-bio { margin: 12px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.6; white-space: pre-line; } /* giữ xuống dòng giữa các đoạn (mô tả Wikipedia) */
.sortseg { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); }
.sortseg-tab { display: flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 8px; color: #6b7280; font-size: 12px; font-weight: 600; }
.sortseg-tab:hover { color: var(--text); }
.sortseg-tab.active { background: var(--c, var(--brand-2)); color: #fff; box-shadow: var(--shadow); }
.page-card .sortseg-tab.active { background: #fff; color: var(--primary-2); }

/* ---- Đầu trang thể loại ---- */
.cat-hero { position: relative; overflow: hidden; margin-bottom: 16px; padding: 18px 20px 20px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, color-mix(in srgb, var(--c) 92%, #000), color-mix(in srgb, var(--c) 70%, #fff)); box-shadow: var(--shadow); }
.cat-hero .crumbs { color: rgba(255, 255, 255, .75); }
.cat-hero .crumbs > span:last-child, .cat-hero .crumbs a:hover { color: #fff; }
.cat-hero-in { display: flex; align-items: center; gap: 16px; }
.cat-hero-ic { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border: 1px solid rgba(255, 255, 255, .25); border-radius: 14px; background: rgba(255, 255, 255, .2); font-size: 26px; }
.cat-hero h1 { margin: 0; font-size: 22px; font-weight: 900; }
.cat-hero p { margin: 4px 0 8px; color: rgba(255, 255, 255, .85); font-size: 13px; }
.cat-hero-count { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .2); font-size: 12px; font-weight: 700; }
.cat-hero-count .ic { width: 13px; height: 13px; }
.sort-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: -8px -16px 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.sort-bar > span { color: var(--text-2); font-size: 12px; font-weight: 600; }
.sort-bar .sortseg-tab { min-height: 36px; }

/* ---- Trang bài hát: lời và hợp âm như site gốc ---- */
.lyrics { font-family: var(--font-lyrics); font-size: 16px; line-height: 2; color: var(--text); }
.lyrics-card { padding: 24px; border-radius: 16px; }
.ch { color: var(--chord); font-weight: 700; font-size: .95em; }
.ln:not(.above) .ch::before { content: "["; opacity: 1; font-weight: 700; }
.ln:not(.above) .ch::after { content: "]"; opacity: 1; font-weight: 700; }
.lbl { margin-right: 4px; padding: 0; background: none; color: inherit; font-size: 1em; font-weight: 400; }
.tb-btn { border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #495057; font-size: 13px; font-weight: 500; }
.tb-btn.active, .tb-btn.on { border-color: var(--brand-2); background: var(--brand-2); color: #fff; }
.toolbar { border-radius: 16px; }
.song-head { border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-2) 70%, #000) 0%, var(--brand-2) 30%, var(--brand) 70%, var(--brand-3) 100%); }

/* ---- Màn hình nhỏ ---- */
@media (max-width: 1060px) { .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; } }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } } /* minmax(0,…): cột được co nhỏ hơn chữ dài không xuống dòng, tránh tràn ngang */
@media (max-width: 640px) {
	.hero { padding: 32px 20px 60px; border-radius: 20px; }
	.doc-rows { grid-template-columns: 1fr; }
	.song-card { flex-basis: 180px; }
	.profile-row { flex-direction: column; align-items: flex-start; }
}
/* Tên site ở footer: chữ trắng (không dùng chữ chuyển màu của header) */
.footer-col .logo-text { background: none; -webkit-text-fill-color: #fff; color: #fff; }
/* Chế độ tối: các màu chữ cố định theo site gốc chuyển sang biến màu */
:root[data-theme="dark"] :is(.nav-link, .dd-menu a) { color: var(--text-2); }
:root[data-theme="dark"] :is(.top-search, .sheet-chip, .tb-btn) { background: var(--soft); border-color: var(--border); color: var(--text-2); }
:root[data-theme="dark"] :is(.row-cat, .row-preview, .row-meta) { color: var(--muted); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) :is(.nav-link, .dd-menu a) { color: var(--text-2); }
	:root:not([data-theme="light"]) :is(.top-search, .sheet-chip, .tb-btn) { background: var(--soft); border-color: var(--border); color: var(--text-2); }
	:root:not([data-theme="light"]) .topbar { background: rgba(15, 23, 42, .9); border-color: rgba(51, 65, 85, .6); }
	:root:not([data-theme="light"]) :is(.row-cat, .row-preview, .row-meta) { color: var(--muted); }
}

/* ---- Menu header theo site gốc ---- */
.nav { margin-left: 4px; }
.nav-link { gap: 4px; }
.nav-link .ic { width: 16px; height: 16px; color: inherit; }
.dd-btn .ic:last-child { width: 14px; height: 14px; }
.dd-menu { top: 100%; padding: 8px 0; border-radius: 12px; }
.dd-menu a { gap: 10px; margin: 0 4px; padding: 6px 12px; border-radius: 8px; font-size: 14px; }
.dd-cats { width: 208px; grid-template-columns: 1fr; }
.dd-ic { width: 24px; height: 24px; font-size: 12px; box-shadow: none; }
.dd-rhythms { width: 288px; grid-template-columns: 1fr 1fr; padding: 8px; }
.dd-rhythms a { gap: 8px; margin: 0; }
.dd-rhythms a:hover { background: var(--primary-soft); color: var(--primary); }
.dd-rhythms span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; }
.top-actions { gap: 6px; margin-left: 4px; }
.top-actions .icon-btn { border-radius: 12px; color: #64748b; }
/* Ô tìm gọn (tối đa 320px), tự co khi menu dài hoặc màn hình hẹp, để chừa chỗ cho menu tùy biến. */
.top-search { flex: 0 1 320px; width: auto; min-width: 180px; max-width: 320px; margin-left: auto; }
@media (max-width: 1060px) {
	.top-search { min-width: 150px; padding-right: 8px; }
	/* Màn hẹp: bỏ nút "Tìm" cho ô gõ rộng hơn, nhấn Enter vẫn tìm. */
	.top-search-btn { display: none; }
}
/* Logo và menu không bị xuống dòng; khi chật thì ô tìm co lại trước. */
.topbar-in > .logo, .topbar-in > .nav, .nav-link { flex-shrink: 0; white-space: nowrap; }
.top-search.on-home { visibility: hidden; }
@media (max-width: 900px) { .top-actions { margin-left: auto; } }

/* ===== Tư liệu (theo site gốc) ===== */
.docs-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.docs-title { display: flex; align-items: center; gap: 12px; }
.docs-bar { width: 4px; height: 24px; flex: none; border-radius: 9px; background: var(--primary); }
.docs-title h1 { margin: 0; color: var(--text); font-size: 24px; font-weight: 900; line-height: 1.25; }
.docs-title p { margin: 2px 0 0; color: #6b7280; font-size: 14px; }
.docs-search { display: flex; align-items: center; gap: 8px; width: 260px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: #9ca3af; }
.docs-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: var(--text); font-size: 13px; }
.docs-search:focus-within { border-color: var(--primary); }
.docs-layout { margin-top: 20px; }
.docs-found { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.docs-found a { color: var(--primary); font-weight: 600; }
.doc-feature, .doc-card2 { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); transition: box-shadow .3s, border-color .3s; }
.doc-feature:hover, .doc-card2:hover { border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.doc-feature-img { position: relative; display: block; height: 220px; background: center 20% / cover no-repeat; }
.doc-feature-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .55), transparent); }
.doc-new { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 3px 10px; border-radius: 99px; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; }
.doc-feature-body { display: flex; flex-direction: column; padding: 20px; }
.doc-feature-body strong { margin-bottom: 8px; color: var(--text); font-size: 20px; font-weight: 800; line-height: 1.35; }
.doc-feature:hover strong, .doc-card2:hover strong { color: var(--primary); }
.doc-excerpt { color: #7a7a7a; font-size: 15px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-meta { display: flex; align-items: center; gap: 12px; margin-top: 12px; color: #7a7a7a; font-size: 13px; }
.doc-read { margin-left: auto; color: var(--primary); font-weight: 600; }
.doc-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.doc-card2-img { display: grid; place-items: center; aspect-ratio: 4 / 3; background: center 20% / cover no-repeat; color: rgba(255, 255, 255, .85); }
.doc-card2-img .ic { width: 34px; height: 34px; }
.doc-card2-body { display: flex; flex: 1; flex-direction: column; padding: 16px; }
.doc-card2-body strong { flex: 1; margin-bottom: 6px; color: var(--text); font-size: 15px; font-weight: 600; line-height: 1.35; }
.doc-card2-body .doc-excerpt { margin-bottom: 8px; font-size: 13px; }
.doc-card2-body .doc-meta { justify-content: space-between; margin-top: 0; font-size: 12px; }
.box-bar { width: 4px; height: 16px; flex: none; border-radius: 999px; }
.pop-posts a { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border-top: 1px solid var(--border); }
.pop-posts a:first-child { border-top: 0; }
.pop-posts a:hover { background: var(--soft); }
.pop-posts.is-other a { align-items: center; padding: 14px 16px; }
.pop-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; margin-top: 4px; border-radius: 50%; background: #d1d5db; color: #fff; font-size: 11px; font-weight: 700; box-shadow: var(--shadow); }
.pop-n.n1 { background: #ef4444; } .pop-n.n2 { background: #fb923c; } .pop-n.n3 { background: #facc15; }
.pop-img { width: 52px; height: 52px; flex: none; border-radius: 12px; background: center / cover no-repeat; box-shadow: var(--shadow); }
.is-other .pop-img { width: 56px; height: 56px; }
.pop-posts .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pop-posts strong { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.is-other strong { font-size: 13px; line-height: 1.35; }
.pop-posts a:hover strong { color: var(--primary); }
.pop-posts .muted { display: flex; align-items: center; gap: 4px; margin-top: 6px; color: #9ca3af; font-size: 11px; }
.pop-posts .muted .ic { width: 12px; height: 12px; }
.pop-posts > a > .ic { width: 16px; height: 16px; flex: none; color: #d1d5db; }

/* ===== Chi tiết bài viết ===== */
.post-card { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.post-head { padding: 16px 32px 20px; background: var(--brand-grad); color: #fff; }
.post-head .crumbs { margin-bottom: 12px; color: rgba(255, 255, 255, .7); }
.post-head .crumbs a:hover { color: #fff; }
.post-head h1 { margin: 0; color: #fff; font-size: 30px; font-weight: 800; line-height: 1.25; }
.post-body { padding: 24px 32px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); color: #7a7a7a; font-size: 12px; }
.post-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.post-meta .ic { width: 14px; height: 14px; }
.post-meta .post-author { gap: 6px; }
.post-author strong { color: var(--text-2); font-weight: 600; }
.post-av { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 10px; font-weight: 700; }
.article-content { color: var(--text); font-size: 16.5px; line-height: 1.85; overflow-wrap: break-word; }
.article-content > * { margin: 0 0 1.25em; }
.article-content :is(h2, h3, h4) { margin: 1.6em 0 .7em; font-weight: 800; line-height: 1.35; }
.article-content h2 { font-size: 22px; }
.article-content h3 { font-size: 19px; }
.article-content img { display: block; max-width: 100%; height: auto; margin-left: auto; margin-right: auto; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .08); }
.article-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.article-content blockquote { margin-left: 0; padding: 12px 18px; border-left: 4px solid var(--primary); border-radius: 0 12px 12px 0; background: var(--primary-soft); }
.article-content figure { margin-left: 0; margin-right: 0; }
.article-content figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: center; }
.post-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--border); }
.post-back { display: inline-flex; align-items: center; gap: 6px; color: #7a7a7a; font-size: 14px; font-weight: 600; }
.post-back:hover { color: var(--primary); }
.post-back .ic { width: 16px; height: 16px; }
.post-share { display: inline-flex; align-items: center; gap: 8px; color: #7a7a7a; font-size: 12px; }
.post-fb { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; }
.post-fb .ic { width: 32px; height: 32px; }
.post-fb:hover { opacity: .8; }

/* Ca khúc liên quan */
.rel-song { position: relative; border-color: color-mix(in srgb, var(--brand) 30%, transparent); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.rel-song::before { content: ""; position: absolute; top: 0; left: 0; right: 0; z-index: 1; height: 6px; background: linear-gradient(90deg, var(--brand-2), var(--brand), var(--brand-3)); }
.rel-song-head { padding: 18px 20px 14px; background: linear-gradient(90deg, #f0fdfa, #fff); }
.rel-song-head span { font-size: 18px; }
.rel-song-head h3 { color: var(--primary-2); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.rel-song-media { position: relative; display: flex; align-items: flex-end; aspect-ratio: 16 / 9; padding: 16px; background: center / cover no-repeat; color: #fff; }
.rel-song-media::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, .1), transparent); }
.rel-song-media strong { position: relative; font-size: 18px; font-weight: 800; line-height: 1.25; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.rel-song-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(220, 38, 38, .9); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .2); }
.rel-song-play .ic { width: 22px; height: 22px; }
.rel-song-info { display: grid; gap: 10px; padding: 16px 20px; }
.rel-song-info > div:not(.rel-song-foot) { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; }
.rel-song-info small { display: block; color: #9ca3af; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.rel-ic { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 50%; background: #fce7f3; color: #db2777; }
.rel-ic .ic { width: 14px; height: 14px; }
.rel-song-foot { display: flex; align-items: center; gap: 10px; padding-top: 4px; }
.rel-cat { padding: 3px 10px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-2); font-size: 11px; font-weight: 600; }
.rel-song-foot .muted { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.rel-song-foot .muted .ic { width: 13px; height: 13px; }
.rel-go { display: grid; place-items: center; width: 32px; height: 32px; margin-left: auto; border: 2px solid var(--primary); border-radius: 50%; color: var(--primary); }
.rel-go:hover { background: var(--primary); color: #fff; }

@media (max-width: 640px) {
	.doc-grid2 { grid-template-columns: 1fr; }
	.docs-search { width: 100%; }
	.post-head { padding: 14px 20px 18px; }
	.post-head h1 { font-size: 24px; }
	.post-body { padding: 20px; }
}

/* Widget cột phải (inc/sidebars.php): khung widget không tạo lớp bọc, khối bên trong vẫn là con trực tiếp của .sidebar */
.side-widget, .side-widget .textwidget { display: contents; }
.side-widget-title { margin: 0 0 -8px; font-size: 15px; font-weight: 800; }

/* Menu PC: rê chuột (hoặc Tab tới) là mở dropdown; máy cảm ứng vẫn bấm để mở như cũ. */
@media (hover: hover) and (pointer: fine) {
	.dd:hover .dd-menu, .dd:has(:focus-visible) .dd-menu { display: grid; }
	.dd:hover .dd-btn, .dd:has(:focus-visible) .dd-btn { color: var(--primary); }
}
.dd-btn .ic:last-child { transition: transform .2s; }
.dd.open .dd-btn .ic:last-child { transform: rotate(180deg); }
@media (hover: hover) and (pointer: fine) {
	.dd:hover .dd-btn .ic:last-child, .dd:has(:focus-visible) .dd-btn .ic:last-child { transform: rotate(180deg); }
}

/* Bài chưa có lời (templates/song.php) */
.lyrics-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 16px; color: var(--muted); font-family: var(--font); font-size: 14px; text-align: center; white-space: normal; }
.lyrics-empty .ic { width: 36px; height: 36px; margin-bottom: 4px; padding: 8px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.lyrics-empty strong { color: var(--text); font-size: 16px; font-weight: 700; }
.lyrics-foot[hidden] { display: none; }

/* ===== Video guitar (templates/videos.php, video.php) ===== */
.vid-hero { display: flex; align-items: center; gap: 16px; margin-top: 12px; padding: 24px 28px; border-radius: 16px; background: var(--brand-grad); color: #fff; box-shadow: var(--shadow); }
.vid-hero-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: rgba(255, 255, 255, .2); }
.vid-hero-ic .ic { width: 20px; height: 20px; fill: currentColor; }
.vid-hero h1 { margin: 0 0 4px; color: #fff; font-size: 24px; font-weight: 800; }
.vid-hero p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; color: rgba(255, 255, 255, .9); font-size: 14px; }
.vid-hero-tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 6px; background: rgba(255, 255, 255, .92); color: var(--brand-2); font-size: 12px; font-weight: 600; }
.vid-hero-tag .ic { width: 12px; height: 12px; }
.vid-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.vid-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.vid-card:hover { transform: translateY(-2px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1); }
.vid-thumb { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #111; }
.vid-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vid-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--brand); color: #fff; opacity: 0; transition: opacity .2s; }
.vid-play .ic { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }
.vid-card:hover .vid-play { opacity: 1; }
.vid-body { display: flex; flex: 1; flex-direction: column; padding: 14px 14px 12px; }
.vid-body strong { flex: 1; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-card:hover strong { color: var(--primary); }
.vid-meta { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); color: #9ca3af; font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.vid-meta .ic { width: 13px; height: 13px; }
.vid-mini a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.vid-mini a:hover { background: var(--soft); }
.vid-mini-img { position: relative; width: 84px; height: 50px; flex: none; border-radius: 6px; background: #374151 center / cover no-repeat; }
.vid-mini-img span { position: absolute; right: 3px; bottom: 3px; padding: 1px 4px; border-radius: 3px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 8px; font-weight: 800; }
.vid-mini strong { color: var(--text); font-size: 12.5px; font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vid-mini a:hover strong, .vid-mini a.active strong { color: var(--primary); }
.vid-info > div { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.vid-info span { color: var(--muted); }
.vid-info .is-hot { color: var(--primary); }
.vid-player { overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; box-shadow: var(--shadow); }
.vid-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.vid-detail { margin-top: 16px; padding: 22px 24px; }
.vid-detail h1 { margin: 0 0 12px; font-size: 22px; font-weight: 800; line-height: 1.3; }
.vid-detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 13px; }
.vid-detail-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.vid-detail-meta .ic { width: 14px; height: 14px; }
.vid-by { padding: 4px 10px; border-radius: 8px; background: var(--soft); }
.vid-by b { color: var(--primary); }
.vid-rel-label { margin: 16px 0 8px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.vid-rel { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); }
.vid-rel:hover { border-color: var(--primary); }
.vid-rel-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
.vid-rel small { display: block; color: var(--muted); font-size: 11px; }
.vid-rel strong { font-size: 14px; }
.vid-rel > .ic { width: 16px; height: 16px; color: var(--muted); }
/* Khám phá thêm: số đo theo site gốc (khung p-16, dòng 52px, ô icon 36px, chữ 14px). */
.explore-box { padding: 16px; }
.explore-box h3 { margin: 0 0 12px; color: var(--text); font-size: 15px; font-weight: 700; }
.explore a { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; padding: 8px 10px; border-radius: 8px; color: #4a4a4a; font-size: 14px; font-weight: 500; }
.explore a:last-child { margin-bottom: 0; }
.explore a:hover { background: #f8f9fa; }
.explore-ic { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 8px; font-size: 16px; line-height: 1; }
.explore a > .ic { width: 14px; height: 14px; color: #9ca3af; }
:root[data-theme="dark"] .explore a { color: var(--text-2); }
:root[data-theme="dark"] .explore a:hover { background: var(--soft); }
@media (max-width: 1060px) { .vid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .vid-grid { grid-template-columns: 1fr; } .vid-thumb { aspect-ratio: auto; height: 170px; } .vid-hero { padding: 18px; } .vid-detail { padding: 18px; } }

/* ===== Danh sách ca sĩ (templates/singers.php, theo hopamviet.vn/info/singers) ===== */
.sg-hero { margin-top: 4px; padding: 32px 40px; border-radius: 24px; background: linear-gradient(135deg, var(--brand-2) 0%, var(--brand) 35%, color-mix(in srgb, var(--brand) 80%, #000) 65%, #343a40 100%); color: #fff; box-shadow: var(--shadow); }
.sg-hero .crumbs { margin: 0 0 14px; color: rgba(255, 255, 255, .7); }
.sg-hero .crumbs a:hover, .sg-hero .crumbs span { color: #fff; }
.sg-hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.sg-hero-title { display: flex; align-items: center; gap: 14px; }
.sg-hero-ic { display: grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 14px; background: rgba(255, 255, 255, .15); }
.sg-hero-ic .ic { width: 22px; height: 22px; }
.sg-hero h1 { margin: 0; color: #fff; font-size: 24px; font-weight: 900; }
.sg-hero p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0; color: rgba(255, 255, 255, .7); font-size: 14px; }
.sg-search { display: flex; align-items: center; gap: 6px; width: 380px; max-width: 100%; height: 44px; padding: 4px 4px 4px 12px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; background: rgba(255, 255, 255, .12); color: #fff; }
.sg-search:focus-within { background: rgba(255, 255, 255, .2); }
.sg-search .ic { width: 16px; height: 16px; flex: none; }
.sg-search input { flex: 1; min-width: 0; border: 0; outline: none; background: none; color: #fff; font-size: 14px; }
.sg-search input::placeholder { color: rgba(255, 255, 255, .7); }
.sg-search button { height: 34px; padding: 0 16px; border: 0; border-radius: 9px; background: #fff; color: var(--brand-2); font-size: 13px; font-weight: 700; cursor: pointer; }
.sg-filter { margin-top: 16px; overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: var(--card); box-shadow: var(--shadow); }
.sg-az { display: flex; flex-wrap: wrap; gap: 4px; padding: 12px 14px; }
.sg-az a { padding: 6px 10px; border-radius: 8px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.sg-az a:hover { background: var(--soft); color: var(--primary); }
.sg-az a.active { background: var(--primary); color: #fff; }
.sg-sort { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); }
.sg-sort > .muted { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.sg-sort > .muted .ic { width: 14px; height: 14px; }
.sg-seg { display: flex; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); }
.sg-seg a { padding: 6px 14px; border-radius: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.sg-seg a.active { background: var(--card); color: var(--primary); box-shadow: var(--shadow); }
.sg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sg-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); transition: box-shadow .2s, border-color .2s; }
.sg-card:hover { border-color: color-mix(in srgb, var(--primary) 40%, transparent); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1); }
.sg-av { display: grid; place-items: center; width: 48px; height: 48px; flex: none; overflow: hidden; border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent); border-radius: 50%; background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 6%, #fff), var(--primary-soft)); color: var(--primary); font-size: 18px; font-weight: 800; }
.sg-av img { width: 100%; height: 100%; object-fit: cover; }
.sg-card .grow { display: flex; flex-direction: column; min-width: 0; }
.sg-card strong { overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sg-card:hover strong { color: var(--primary); }
.sg-card small { color: var(--muted); font-size: 11px; }
.sg-rank { list-style: none; margin: 0; padding: 6px 0; }
.sg-rank a { display: flex; align-items: center; gap: 10px; padding: 7px 16px; color: var(--text); font-size: 14px; font-weight: 600; }
.sg-rank a:hover { background: var(--soft); color: var(--primary); }
.sg-rank-n { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--soft); color: var(--muted); font-size: 11px; font-weight: 700; }
.sg-rank-n.n1 { background: #fef9c3; color: #a16207; } .sg-rank-n.n2 { background: #e0e7ff; color: #4338ca; } .sg-rank-n.n3 { background: #ffedd5; color: #c2410c; }
.sg-rank-c { padding: 1px 8px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-2); font-size: 11px; font-weight: 700; }
@media (max-width: 1060px) { .sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sg-hero { padding: 22px 20px; } .sg-search { width: 100%; } }

/* Trang chủ – Bottom (vùng widget dự phòng, rộng hết khung) */
.home-bottom { margin-top: 32px; }
.home-bottom > .side-widget + .side-widget > .textwidget > :first-child, .home-bottom > .side-widget + .side-widget > :not(.textwidget):first-child { margin-top: 32px; }

/* Toàn site – Top / Bottom (vùng widget dự phòng, mọi trang) */
.site-top { margin-top: 18px; }
.site-footer-top { margin-top: 32px; } /* footer đã có lề trên riêng */
.site-bottom { padding: 20px 16px; }
.site-area > .side-widget + .side-widget > .textwidget > :first-child, .site-area > .side-widget + .side-widget > :not(.textwidget):first-child { margin-top: 24px; }

/* Menu chính từ Giao diện → Menu (inc/menu.php) */
.dd-list { min-width: 200px; grid-template-columns: 1fr; }
.nav-link.is-current { color: var(--primary); }
.drawer-link.drawer-sub { padding-left: 28px; font-size: 14px; color: var(--muted); }
.drawer-link.is-current { color: var(--primary); }

/* ===== Điện thoại: header + ngăn menu theo site gốc ===== */
/* Ngăn menu trượt từ bên phải, rộng 280px; các mục theo đúng thứ tự menu PC (inc/menu.php → hopam_render_drawer_menu). */
.drawer-panel { width: min(280px, 86vw); margin-left: auto; padding: 0; gap: 0; box-shadow: -20px 0 40px rgba(0, 0, 0, .18); animation: drawer-in .25s ease; }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.drawer-head { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.drawer-logo { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); font-size: 17px; font-weight: 800; }
.drawer-logo .logo-mark, .drawer-logo .logo-img { width: 30px; height: 30px; flex: none; }
.drawer-logo .logo-text { overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.drawer-close { display: grid; place-items: center; width: 34px; height: 34px; flex: none; border: 0; border-radius: 10px; background: var(--soft); color: #94a3b8; cursor: pointer; }
.drawer-close:hover { color: #ef4444; }
.drawer-close .ic { width: 18px; height: 18px; }
.drawer-nav { display: flex; flex-direction: column; padding: 6px 0 24px; }
.drawer-nav > .drawer-link { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border: 0; color: var(--text-2); font-size: 14px; font-weight: 600; }
.drawer-nav > .drawer-link:hover { background: var(--soft); }
.drawer-group > summary { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: var(--text-2); font-size: 14px; font-weight: 600; list-style: none; cursor: pointer; }
.drawer-group > summary::-webkit-details-marker { display: none; }
.drawer-group > summary:hover { background: var(--soft); }
.drawer-group > summary span { flex: 1; }
.drawer-group > summary .ic { width: 16px; height: 16px; color: #94a3b8; }
.drawer-group > summary .ic:last-child { transition: transform .2s; }
.drawer-group[open] > summary .ic:last-child { transform: rotate(180deg); }
.drawer-cats { display: grid; padding: 8px 20px; background: var(--soft); }
.drawer-cats a { display: flex; align-items: center; gap: 10px; padding: 8px 0 8px 12px; border-bottom: 1px dashed var(--border); color: var(--muted); font-size: 13px; }
.drawer-cats a:last-child { border-bottom: 0; }
.drawer-cats a:hover { color: var(--primary); }
.drawer-cats .dd-ic { width: 24px; height: 24px; font-size: 12px; }
.drawer-rhythms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; background: var(--soft); }
.drawer-rhythms a { padding: 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--muted); font-size: 12px; text-align: center; }
.drawer-rhythms a:hover { border-color: var(--primary); color: var(--primary); }

@media (max-width: 900px) {
	/* Điện thoại: logo trái, nút sáng/tối + ☰ phải; ô tìm kiếm thành hàng riêng rộng hết khung.
	   Trang chủ giống PC: ô tìm nằm trong banner nên thanh trên không lặp lại ô tìm. */
	.topbar-in { flex-wrap: wrap; height: auto; min-height: 56px; padding-top: 8px; padding-bottom: 10px; row-gap: 8px; }
	.topbar-in > .top-search { display: flex; order: 9; flex: 1 1 100%; width: 100%; max-width: none; min-width: 0; margin: 0; }
	.topbar-in > .top-search.on-home { display: none; }
	.top-search-btn { display: inline-flex; align-items: center; }
	.toolbar { top: 112px; }
	.admin-bar .toolbar { top: 158px; }
}
@media (max-width: 640px) {
	/* Màn nhỏ chỉ hiện chữ logo cho đỡ chật. */
	.topbar-in > .logo .logo-mark, .topbar-in > .logo .logo-img { display: none; }
}
/* Admin đăng nhập: ngăn menu nằm dưới thanh admin WordPress. */
.admin-bar .drawer { top: 32px; }
@media (max-width: 782px) { .admin-bar .drawer { top: 46px; } }

/* ===== Điện thoại: chỉ co giãn, giữ nguyên khối và thứ tự như PC (cột phải xuống dưới cột trái) ===== */
@media (max-width: 767px) {
	/* Slider: vuốt ngang, bỏ nút ‹ ›. */
	.sec-tools .round-btn { display: none; }
	/* Thanh công cụ bài hát một hàng, vuốt ngang. */
	.toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.toolbar::-webkit-scrollbar { display: none; }
	.toolbar > * { flex: none; }
	/* Thẻ đầu bài gọn lại. */
	.song-head .song-title { font-size: 22px; }
	.song-head .song-meta { gap: 6px; }
	.song-head .meta-chip { padding: 4px 10px; font-size: 12px; }
}
.tag-chip.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ===== Điện thoại: danh sách ca sĩ theo site gốc ===== */
@media (max-width: 767px) {
	.sg-hero h1 { font-size: 20px; }
	/* Chữ cái một hàng, vuốt ngang. */
	.sg-az { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.sg-az::-webkit-scrollbar { display: none; }
	.sg-az a { flex: none; }
	/* Bỏ chữ "Sắp xếp theo", 3 nút chia đều. */
	.sg-sort > .muted { display: none; }
	.sg-seg { flex: 1; }
	.sg-seg a { flex: 1; text-align: center; }
	/* Lưới 2 cột, thẻ gọn hơn. */
	.sg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.sg-card { gap: 10px; padding: 10px; }
	.sg-av { width: 40px; height: 40px; font-size: 15px; }
	.sg-card strong { font-size: 13px; }
}
/* Màn ≤600px: thanh admin WordPress cuộn theo trang (position: absolute), nên header / thanh công cụ / ngăn menu không chừa chỗ cho nó. */
@media (max-width: 600px) {
	.admin-bar .topbar { top: 0; }
	.admin-bar .toolbar { top: 112px; }
	.admin-bar .drawer { top: 0; z-index: 100000; } /* nằm trên thanh admin khi chưa cuộn */
}
