/*
Theme Name: Tunelist
Description: A fast, list-first music theme. Tracks with artists, albums, genres, an audio player, licence info, sorting and ad slots. Light and dark mode.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tunelist
*/

/* ---------------------------------------------------------------- tokens */
:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #e9e9e9;
	--text: #1a1a1a;
	--muted: #5f5f5f;
	--line: #dedede;
	--accent: #d8232a;
	--accent-ink: #ffffff;
	--accent-soft: #f1e3e4;
	--link: #1a5db8;
	--rule: #e6288f;
	--header-bg: #202020;
	--header-text: #f5f5f5;
	--header-muted: #c4c4c4;
	--radius: 10px;
	--wrap: 1120px;
	--shadow: 0 1px 2px rgba(20, 16, 50, .06), 0 2px 8px rgba(20, 16, 50, .04);
	color-scheme: light;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body { overflow-x: clip; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
	-webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg, video, audio { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 14px;
	background: var(--accent); color: var(--accent-ink); border-radius: 6px;
}
.skip-link:focus { top: 8px; }

/* ---------------------------------------------------------------- header */
.site-header { background: var(--header-bg); color: var(--header-text); }

.header-bar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 12px; }

.brand-name {
	display: inline-flex; align-items: center; gap: 10px;
	color: var(--header-text); font-weight: 800; font-size: 1.3rem; letter-spacing: -.02em;
}
.brand-name:hover { text-decoration: none; }
.brand-mark {
	display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
	background: var(--accent); color: #fff;
}
.brand-mark svg { width: 20px; height: 20px; }
.custom-logo { max-height: 44px; width: auto; }

.menu-toggle {
	display: none; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px;
	background: transparent; color: var(--header-text); cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
	display: block; width: 22px; height: 2px; margin: 0 auto; background: currentColor; border-radius: 2px;
	position: relative; transition: transform .2s, opacity .2s;
}
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -7px; }
.menu-toggle-bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-7px) rotate(-45deg); }

.primary-nav { border-top: 1px solid rgba(255, 255, 255, .08); }
.primary-nav .menu { display: flex; flex-wrap: wrap; gap: 2px; margin: 0; padding: 6px 0; list-style: none; }
.primary-nav a {
	display: block; padding: 8px 12px; border-radius: 7px;
	color: var(--header-muted); font-weight: 600; font-size: .95rem;
}
.primary-nav a:hover, .primary-nav .current-menu-item > a {
	color: var(--header-text); background: rgba(255, 255, 255, .08); text-decoration: none;
}

.search-band { padding: 12px 0 16px; }
.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1; min-width: 0; height: 46px; padding: 0 16px;
	border: 1px solid transparent; border-radius: var(--radius);
	background: #fff; color: #1c1a29; font: inherit;
}
.search-form input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.search-form button, .button, .comment-form .submit {
	height: 46px; padding: 0 20px; border: 0; border-radius: var(--radius);
	background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 700; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.search-form button:hover, .button:hover { filter: brightness(1.08); text-decoration: none; }
.main .search-form input[type="search"], .site-main .search-form input[type="search"] { border-color: var(--line); }

/* ----------------------------------------------------------------- main */
.site-main { padding-top: 20px; padding-bottom: 32px; }

.intro { margin: 0 0 20px; color: var(--muted); font-size: 1.05rem; }

.section { margin: 0 0 28px; }
.section-head {
	display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
	margin: 0 0 10px; padding: 0 0 8px; border-bottom: 2px solid var(--line);
}
.section-title {
	position: relative; margin: 0; padding-left: 12px; font-size: 1.15rem; font-weight: 800;
}
.section-title::before {
	content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 4px;
	border-radius: 2px; background: var(--accent);
}
.section-more { font-size: .9rem; font-weight: 600; white-space: nowrap; }

.page-head { margin: 4px 0 18px; }
.page-kind { margin: 0 0 2px; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.page-title { margin: 0; font-size: clamp(1.5rem, 4.5vw, 2.1rem); font-weight: 800; overflow-wrap: anywhere; }
.page-desc { margin-top: 6px; color: var(--muted); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs [aria-current] { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }

/* ---------------------------------------------------------------- lists */
.list {
	margin: 0; padding: 0; list-style: none;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); overflow: hidden;
}
.row + .row { border-top: 1px solid var(--line); }
.row-link {
	display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px;
	color: var(--text);
}
.row-link:hover { background: var(--surface-2); text-decoration: none; }
.row-link:hover .row-title { color: var(--accent); }

.row-thumb {
	flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden;
	border-radius: 8px; background: var(--accent-soft); color: var(--accent);
}
.row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.row-thumb .placeholder { width: 24px; height: 24px; }

.row-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title, .row-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title { font-weight: 650; }
.row-meta { color: var(--muted); font-size: .88rem; }
.row-dur {
	flex: none; padding: 2px 8px; border-radius: 999px;
	background: var(--surface-2); color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums;
}
.row-ad { padding: 10px 14px; }

.sort { display: flex; gap: 6px; margin: 0 0 12px; flex-wrap: wrap; }
.sort a {
	padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface); color: var(--muted); font-size: .9rem; font-weight: 600;
}
.sort a:hover { text-decoration: none; color: var(--text); }
.sort a[aria-current] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips a {
	display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px;
	border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
	color: var(--text); font-weight: 600; font-size: .92rem;
}
.chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip-count { color: var(--muted); font-weight: 500; font-size: .8rem; }

.empty {
	padding: 28px 16px; text-align: center; color: var(--muted);
	background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty p { margin: 0; }

/* -------------------------------------------------------------- pagination */
.pagination { margin-top: 16px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.page-numbers {
	min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-weight: 600;
}
.page-numbers:hover { text-decoration: none; border-color: var(--accent); }
.page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.page-numbers.dots { border: 0; background: none; }

/* ----------------------------------------------------------------- track */
.track {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 16px; margin-bottom: 28px;
}
.track-head { display: grid; gap: 16px; }
.track-cover {
	display: grid; place-items: center; width: 100%; max-width: 280px; aspect-ratio: 1; margin: 0 auto;
	overflow: hidden; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent);
}
.track-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-cover .placeholder { width: 35%; height: 35%; }
.track-title { margin: 0 0 12px; font-size: clamp(1.4rem, 4.5vw, 2rem); font-weight: 800; overflow-wrap: anywhere; }

.details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: .95rem; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }

.player {
	display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
	margin-top: 18px; padding: 12px; border-radius: var(--radius); background: var(--surface-2);
}
.player audio { flex: 1 1 260px; height: 46px; }

.entry { margin-top: 18px; overflow-wrap: break-word; }
.entry > :first-child { margin-top: 0; }
.entry > :last-child { margin-bottom: 0; }
.entry img { border-radius: 8px; }
.entry blockquote { margin: 1em 0; padding: .2em 1em; border-left: 4px solid var(--accent); color: var(--muted); }

.post-single, .page-single {
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 18px; margin-bottom: 28px;
}
.post-single .page-head, .page-single .page-head { margin-top: 0; }
.post-cover img { border-radius: 8px; margin-bottom: 16px; }

/* --------------------------------------------------------------- comments */
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 20px; }
.comment-body { padding: 12px 0; border-bottom: 1px solid var(--line); }
.comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
	background: var(--surface); color: var(--text); font: inherit;
}

/* ------------------------------------------------------------------ ads */
.ad-slot { margin: 16px auto; text-align: center; overflow: hidden; }
.row-ad .ad-slot { margin: 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { padding: 24px 0 32px; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer .menu { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0 0 10px; padding: 0; list-style: none; }
.site-footer a { color: var(--muted); }
.footer-note { margin: 0; }

/* WordPress core classes */
.alignleft { float: left; margin: 0 1em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, figcaption { color: var(--muted); font-size: .88rem; }

/* ---------------------------------------------------------- responsive */
@media (min-width: 640px) {
	.track { padding: 20px; }
	.track-head { grid-template-columns: 220px 1fr; align-items: start; gap: 24px; }
	.track-cover { max-width: none; }
}

@media (max-width: 639px) {
	.menu-toggle { display: block; }
	.primary-nav { display: none; }
	.primary-nav.is-open { display: block; }
	.primary-nav .menu { flex-direction: column; padding: 8px 0 10px; }
	.primary-nav a { padding: 11px 12px; }
	.search-form button { padding: 0 16px; }
	.row-link { padding: 10px 12px; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; }
}

/* ------------------------------------------------- grid + sidebar layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; align-items: start; }
.site-main { min-width: 0; }

.grid {
	display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
	margin: 0; padding: 0; list-style: none;
}
.card-link {
	display: block; height: 100%; overflow: hidden; color: var(--text);
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.card-link:hover { text-decoration: none; border-color: var(--accent); }
.card-link:hover .card-title { color: var(--accent); }
.card-cover {
	display: grid; place-items: center; aspect-ratio: 1; overflow: hidden;
	background: var(--accent-soft); color: var(--accent);
}
.card-cover img { width: 100%; height: 100%; object-fit: cover; }
.card-cover .placeholder { width: 34%; height: 34%; }
.card-title, .card-meta { display: block; padding: 0 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-title { padding-top: 8px; font-weight: 700; font-size: .93rem; }
.card-meta { padding-bottom: 10px; color: var(--muted); font-size: .82rem; }

.more { margin: 16px 0 0; text-align: center; }

.sidebar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; margin-top: 8px; padding-bottom: 32px; min-width: 0; }
.sidebar > *, .panel { min-width: 0; }
.panel .section-head { margin-bottom: 8px; padding: 10px 12px; border: 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--header-bg); }
.panel .section-title { color: var(--header-text); font-size: 1rem; }
.panel .section-more { color: var(--header-muted); }
.panel .list { border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.panel .row-link { min-height: 56px; padding: 8px 12px; }
.panel .row-thumb { width: 40px; height: 40px; }
.panel .row-dur { display: none; }
.panel .chips { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }

@media (min-width: 520px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) {
	.layout { grid-template-columns: minmax(0, 1fr) 320px; }
	.grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
	.sidebar { margin-top: 20px; }
	.layout > .site-main { padding-bottom: 32px; }
}
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }


/* ---------------------------------------------------- colour treatment */
.section-head {
	margin: 0; padding: 9px 14px; background: var(--header-bg);
	border: 0; border-bottom: 2px solid var(--rule);
	border-radius: var(--radius) var(--radius) 0 0;
}
.section-title { padding-left: 0; color: var(--header-text); font-size: 1rem; font-weight: 700; }
.section-title::before { content: none; }
.section-more { color: var(--header-muted); }
.section-head + .list, .section-head + .grid, .section-head + .chips, .section-head + .empty { margin-top: 10px; }
.section-head + .list { margin-top: 0; border-top: 0; border-radius: 0 0 var(--radius) var(--radius); }
.panel .section-head { border-bottom: 2px solid var(--rule); }

.card-link { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-link:hover { border-color: var(--accent); }
.card-title { color: var(--text); }
.card-link:hover .card-title { color: var(--accent); }
.card-meta { color: var(--muted); }

.intro, .page-title { color: var(--link); }
.page-title { font-weight: 700; }
.chip-count, .row-dur { color: var(--muted); }
.row-link:hover .row-title { color: var(--link); }
.chips a:hover, .sort a:hover { border-color: var(--link); color: var(--link); }
.sort a[aria-current], .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.brand-mark { background: var(--accent); }
.search-form button, .button, .comment-form .submit { background: var(--accent); color: var(--accent-ink); }
.primary-nav { border-top: 0; background: var(--header-bg); border-bottom: 1px solid rgba(255,255,255,.12); }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: var(--accent); color: #fff; }
.search-band { background: var(--header-bg); }

/* ------------------------------------------------------- listen-on links */
.listen { margin: 1.25rem 0; }
.listen-title { font-size: 1rem; margin: 0 0 .5rem; }
.listen-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }

/* ------------------------------------------------------------- seo bits */
h1.intro { font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.track-summary { margin: 0 0 14px; color: var(--muted); }


/* ======================================================================
   PagalWorld design system (from pagalworld.is-design.md)
   Light, utility-first catalogue: dark chrome, white cards, one red accent,
   Helvetica Neue for UI text, Times New Roman for headings. No shadows or gradients.
   ====================================================================== */
:root {
	--bg: #ffffff;
	--surface: #ffffff;
	--surface-2: #ffffff;
	--text: #000000;
	--muted: #6b7280;
	--line: #e5e7eb;
	--accent: #dc2626;
	--accent-ink: #ffffff;
	--accent-soft: #f3f4f6;
	--link: #000000;
	--header-bg: #222222;
	--header-text: #ffffff;
	--header-muted: #d1d5db;
	--radius: 8px;
	--shadow: none;
	--font-ui: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-serif: "Times New Roman", Times, serif;
}

body { font: 400 14px/22px var(--font-ui); letter-spacing: -.2px; color: var(--text); }
a { color: var(--text); }
a:hover { color: var(--accent); text-decoration: none; }

/* Typography: serif headings, regular weight */
h1, h2, h3, .page-title, .track-title, .section-title, .card-title, .row-title, .brand-name {
	font-family: var(--font-serif); font-weight: 400; letter-spacing: 0;
}
.page-title, .track-title { font-size: 24px; line-height: 30px; color: var(--text); font-weight: 400; }
h1.intro, .intro { font: 400 16px/24px var(--font-ui); letter-spacing: -.3px; color: var(--muted); }
.page-kind { text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--muted); font-weight: 400; }
.row-title, .card-title { font-weight: 400; color: var(--text); }
.row-title { font-size: 16px; line-height: 22px; }
.card-title { font-size: 14px; line-height: 18px; }
.row-meta, .card-meta, .crumbs ol, .chip-count, .footer-note { font-size: 12px; line-height: 18px; color: var(--muted); }
.details { font-size: 14px; }
.details dd { font-weight: 400; }
.track-summary { color: var(--muted); }

/* Top bar: dark, 66px */
.site-header { background: #222; }
.header-bar { min-height: 66px; }
.brand-name { font-size: 24px; font-weight: 400; letter-spacing: -.3px; }
.brand-mark { border-radius: 8px; background: var(--accent); }
.primary-nav { background: #222; border-top: 1px solid #3a3a3a; border-bottom: 0; }
.primary-nav a { font: 400 14px/18px var(--font-serif); border-radius: 4px; color: #e5e7eb; }
.primary-nav a:hover, .primary-nav .current-menu-item > a { background: transparent; color: #fff; box-shadow: inset 0 -2px 0 var(--accent); }
.search-band { background: #222; padding: 10px 0 14px; }

/* Inputs + buttons */
.search-form input[type="search"], .comment-form input:not([type="submit"]):not([type="checkbox"]), .comment-form textarea {
	border: 1px solid var(--line); border-radius: 4px; background: #fff; color: #000; padding: 10px 12px; font: 400 14px/22px var(--font-ui);
}
.search-form input[type="search"] { height: 46px; }
.search-form button, .button, .comment-form .submit {
	height: 46px; padding: 15px 30px; border-radius: 10px; background: var(--accent); color: #fff;
	font: 400 14px/22px var(--font-ui); letter-spacing: -.2px; filter: none;
}
.search-form button:hover, .button:hover { background: #b91c1c; color: #fff; filter: none; }

/* Section headers: dark band, 38px, no pink rule */
.section-head, .panel .section-head {
	min-height: 38px; padding: 0 14px; display: flex; align-items: center;
	background: #222; border: 0; border-radius: 8px 8px 0 0;
}
.section-title, .panel .section-title { font: 400 16px/24px var(--font-ui); letter-spacing: -.3px; color: #fff; }
.section-more, .panel .section-more { color: #d1d5db; font-size: 12px; }
.section-more:hover { color: #fff; }

/* Cards: white, 1px border, 8px radius, no shadow */
.list, .track, .post-single, .page-single, .empty, .card-link {
	background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: none;
}
.section-head + .list, .panel .list { border-top: 0; border-radius: 0 0 8px 8px; }
.card-link:hover, .chips a:hover, .page-numbers:hover { border-color: var(--accent); }
.card-link:hover .card-title, .row-link:hover .row-title { color: var(--accent); }
.card-cover, .row-thumb, .track-cover { background: #f3f4f6; color: var(--accent); }
.card-cover { border-bottom: 1px solid var(--line); }
.row-link:hover { background: #f9fafb; }
.row-dur { background: transparent; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font-size: 12px; }
.grid { gap: 10px; }

/* Sort pills, chips, pagination: understated, rectilinear */
.sort a, .chips a, .page-numbers { border-radius: 4px; background: #fff; border: 1px solid var(--line); color: #000; font: 400 14px/18px var(--font-serif); }
.sort a:hover, .chips a:hover { color: var(--accent); border-color: var(--accent); }
.sort a[aria-current], .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; }

.player { background: #f9fafb; border: 1px solid var(--line); border-radius: 8px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.entry blockquote { border-left-color: var(--accent); }

/* ------------------------------------------------------ album page: header + tracklist */
.album-hero { display: flex; gap: 20px; align-items: flex-end; margin: 0 0 20px; padding: 16px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.album-hero-cover { flex: 0 0 180px; width: 180px; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.album-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.album-hero-cover .placeholder { width: 56px; height: 56px; }
.album-hero-body { min-width: 0; }
.album-hero .page-title { margin: 0 0 6px; font-size: clamp(1.4rem, 3.2vw, 2rem); line-height: 1.2; overflow-wrap: anywhere; }
.album-hero-artists { margin: 0 0 6px; font-weight: 700; font-size: 1.02rem; }
.album-hero-artists a { color: #111; }
.album-hero-facts { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.album-hero-facts span + span::before { content: "•"; margin: 0 8px; color: #b5b5b5; }
.album-hero-facts a { color: var(--muted); text-decoration: underline; }
.album-hero-first { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 700; }
.album-hero-first:hover { text-decoration: none; filter: brightness(.92); }

.tracklist { margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.tracklist-row + .tracklist-row { border-top: 1px solid #eef0f2; }
.tracklist-row:nth-child(even) { background: #fafafa; }
.tracklist-link { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 16px; color: #111; }
.tracklist-link:hover { text-decoration: none; background: #fff5f5; }
.tracklist-link:hover .tracklist-title { color: var(--accent); }
.tracklist-num { flex: 0 0 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: #f1f1f1; color: #333; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tracklist-link:hover .tracklist-num { background: var(--accent); color: #fff; }
.tracklist-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tracklist-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; overflow-wrap: anywhere; }
.tracklist-artist { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tracklist-dur { flex: 0 0 auto; color: #333; font-size: .92rem; font-variant-numeric: tabular-nums; }
.tracklist-go { flex: 0 0 auto; color: #9ca3af; font-size: 1.4rem; line-height: 1; }
.tracklist-link:hover .tracklist-go { color: var(--accent); }

@media (max-width: 600px) {
	.album-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 12px; }
	.album-hero-cover { flex-basis: auto; width: 140px; }
	.tracklist-link { gap: 10px; padding: 10px 12px; }
	.tracklist-title { font-size: 1rem; }
}

/* Song page: current song inside the album tracklist */
.tracklist-row.is-current, .tracklist-row.is-current:nth-child(even) { background: #fff1f1; box-shadow: inset 4px 0 0 var(--accent); }
.tracklist-row.is-current .tracklist-num { background: var(--accent); color: #fff; }
.tracklist-row.is-current .tracklist-title { color: var(--accent); }
.tracklist-now { flex: 0 0 auto; padding: 2px 8px; border-radius: 4px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
@media (max-width: 600px) { .tracklist-now { display: none; } }

/* Song page: auto description */
.track-about-body { padding: 16px 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; color: #333; line-height: 1.7; }
.track-about-body p { margin: 0; }

/* Home: album feed */
.album-feed-sentinel { height: 1px; }
.album-feed-button[disabled] { opacity: .7; cursor: progress; }

/* Home: intro text */
.home-intro { margin: 0 0 20px; padding: 16px 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; color: #333; line-height: 1.7; }
.home-intro-title { margin: 0 0 8px; font-size: clamp(1.2rem, 2.6vw, 1.6rem); line-height: 1.3; color: #111; }
.home-intro p { margin: 0 0 8px; }
.home-intro p:last-child { margin-bottom: 0; }

/* listen-on links (licensed services) */
.listen-on { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.listen-on-label { color: var(--muted); font-weight: 600; margin-right: .25rem; }

/* ------------------------------------------------------ ringtone maker */
.rt-lede { color: var(--muted); max-width: 60ch; margin: 6px 0 0; }
.rt-tool { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin: 18px 0 28px; }
.rt-drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 120px; padding: 18px; border: 2px dashed var(--line); border-radius: var(--radius); background: var(--accent-soft); text-align: center; cursor: pointer; transition: border-color .15s; }
.rt-drop:hover, .rt-drop.is-over, .rt-drop:focus-within { border-color: var(--accent); }
.rt-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.rt-drop-main { font-weight: 700; color: var(--accent); font-size: 1.05rem; }
.rt-drop-sub { color: var(--muted); font-size: .88rem; }
.rt-msg { margin: 12px 0 0; font-size: .93rem; color: var(--muted); }
.rt-msg--err { color: #b91c1c; font-weight: 600; }
.rt-editor { margin-top: 16px; }
.rt-name { margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.rt-wave { position: relative; height: 140px; margin: 0 12px; background: #f4f4f4; border-radius: 8px; overflow: visible; touch-action: none; cursor: col-resize; user-select: none; -webkit-user-select: none; }
.rt-wave canvas { display: block; width: 100%; height: 140px; }
.rt-shade { position: absolute; top: 0; bottom: 0; background: rgba(255, 255, 255, .72); pointer-events: none; }
.rt-shade--l { left: 0; }
.rt-handle { position: absolute; top: 0; bottom: 0; width: 22px; margin-left: -11px; cursor: ew-resize; z-index: 2; }
.rt-handle::before { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 3px; background: var(--header-bg); }
.rt-handle::after { content: ""; position: absolute; left: 3px; top: 50%; width: 17px; height: 28px; margin-top: -14px; border-radius: 5px; background: var(--header-bg); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.rt-handle:focus-visible { outline: none; }
.rt-handle:focus-visible::after { box-shadow: 0 0 0 3px var(--accent); }
.rt-playhead { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--link); pointer-events: none; z-index: 1; }
.rt-times, .rt-opts { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; margin-top: 14px; }
.rt-times label, .rt-opts label { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.rt-opts label:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 6px; color: var(--text); font-weight: 500; }
.rt-times input, .rt-opts select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 42px; }
.rt-times input { width: 7.5em; }
.rt-len { margin: 0 0 10px; color: var(--muted); font-size: .9rem; }
.rt-len strong { color: var(--text); font-size: 1rem; }
.rt-note { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.rt-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.rt-actions .button { min-height: 44px; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.rt-actions .button[disabled] { opacity: .5; cursor: not-allowed; }
.rt-actions .rt-btn-ghost, .rt-actions .rt-btn-ghost:hover { background: #f1f1f1; color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.rt-help { max-width: 72ch; }
@media (max-width: 560px) {
	.rt-tool { padding: 12px; }
	.rt-actions .button { flex: 1 1 100%; text-align: center; }
}
.rt-tool [hidden] { display: none !important; }
