/* Web app (chord browser) — builds on /style.css tokens. Static, no JS. */

.chords-container {
	width: 100%;
	max-width: 1000px;
	margin-inline: auto;
	padding: clamp(28px, 4vw, 48px) 24px;
}

.chords-intro {
	max-width: 640px;
}
.chords-intro .lead {
	font-size: 1.1875rem;
	color: var(--fg);
}

/* Breadcrumb */
.crumbs {
	font-size: 0.875rem;
	color: var(--muted);
	margin-bottom: 20px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--fg); }
.crumbs .sep { margin: 0 6px; }

/* --- Chord list (index): rows grouped by key --- */
.key-group { margin-top: 32px; }
.key-group h2 {
	margin: 0 0 8px;
	font-size: 1.25rem;
}
.chord-rows {
	display: grid;
	gap: 8px;
}
.chord-row {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 12px 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	color: var(--fg);
}
.chord-row:hover {
	border-color: var(--accent);
	text-decoration: none;
}
.chord-row .sym {
	font-size: 1.125rem;
	font-weight: 600;
}
.chord-row .name { color: var(--muted); font-size: 0.9375rem; }
.chord-row .notes {
	font-variant-numeric: tabular-nums;
	color: var(--fg);
	font-size: 0.9375rem;
	white-space: nowrap;
}

/* --- Chord detail --- */
.chord-head { margin-bottom: 8px; }
.chord-head h1 { margin: 0 0 4px; }
.chord-head .sub { color: var(--muted); margin: 0; }

.note-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 24px; }
.note-chip {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 8px 14px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	font-weight: 600;
}
.note-chip .deg { font-size: 0.75rem; color: var(--muted); font-weight: 500; }

/* Piano keyboard (SVG) */
.piano { width: 100%; max-width: 380px; height: auto; display: block; }
.piano.mini { max-width: 260px; }
.pkey { fill: #fff; stroke: #cfcfcf; stroke-width: 1; }
.pkey-black { fill: #23252b; }
.pkey.on { fill: var(--accent); }
.pkey-black.on { fill: var(--accent); }
.pkey.root { fill: var(--accent); }
.pkey-black.root { fill: var(--accent); }
@media (prefers-color-scheme: dark) {
	.pkey { fill: #e9e9ec; stroke: #4a4a4f; }
	.pkey-black { fill: #16171b; }
}

/* Play buttons (Web Audio) — progressive enhancement.
   Hidden by default; shown only in Chrome/Chromium, where the audio path is verified
   (the inline head script adds `can-audio` there). Safari support is being finished. */
.play { display: none; }
.can-audio .play {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font: inherit;
	font-size: 0.9375rem;
	color: var(--fg);
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 999px;
	padding: 7px 15px;
	-webkit-tap-highlight-color: transparent;
}
.can-audio .play:hover { border-color: var(--accent); }
.can-audio .play.playing { border-color: var(--accent); color: var(--accent); }
.play .ico { font-size: 0.8125rem; line-height: 1; }
.chord-play { margin: 16px 0 8px; }
.inv .play { padding: 5px 12px; margin-top: 10px; }

/* Inversions */
.inversions {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 20px;
	margin-top: 12px;
}
.inv {
	padding: 16px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
}
.inv h3 { margin: 0 0 2px; font-size: 1rem; }
.inv .inv-notes { color: var(--muted); font-size: 0.9375rem; margin: 0 0 12px; }

/* Related chords */
.related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.related a {
	padding: 6px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	font-size: 0.9375rem;
	color: var(--fg);
}
.related a:hover { border-color: var(--accent); text-decoration: none; }

/* App CTA */
.app-cta {
	margin-top: 40px;
	padding: 24px;
	background: var(--surface);
	border-radius: var(--radius);
	border-left: 3px solid var(--accent);
}
.app-cta p { margin: 0 0 12px; }
.app-cta img { width: 149px; height: auto; }
