/* Fretwork and Chill -- site styles */

:root {
	--bg: #1b1410;			/* dark rosewood */
	--bg-raised: #251c16;
	--board: #3a2a1f;		/* fretboard wood */
	--fret: #c9b79c;		/* nickel frets */
	--string: #d8cbb6;
	--text: #f1e8da;		/* aged cream */
	--text-muted: #b5a691;
	--accent: #e0a458;		/* amber / sunburst */
	--accent-deep: #b9772e;
	--line: rgba(241, 232, 218, 0.12);
	--serif: "Fraunces", Georgia, "Times New Roman", serif;
	--sans: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

* {
	box-sizing: border-box;
}

/* Elements styled with display: flex/grid would otherwise ignore hidden */
[hidden] {
	display: none !important;
}

html, body {
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body {
	background: var(--bg);
	background-image: radial-gradient(ellipse at 20% -10%, rgba(224, 164, 88, 0.14), transparent 55%);
	background-attachment: fixed;
	color: var(--text);
	font: 16px/1.6 var(--sans);
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
}

a {
	color: inherit;
	text-decoration: none;
}

main {
	flex: 1;
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
}

.amp {
	color: var(--accent);
	font-style: italic;
}

/* Header / footer */

.site-header,
.site-footer {
	width: 100%;
	max-width: 1080px;
	margin: 0 auto;
	padding: 24px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wordmark {
	font-family: var(--serif);
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.01em;
}

.site-footer {
	border-top: 1px solid var(--line);
	margin-top: 64px;
	color: var(--text-muted);
	font-size: 0.875rem;
	gap: 16px;
	flex-wrap: wrap;
}

.tune {
	font-family: var(--serif);
	font-style: italic;
}

/* Hero */

.hero {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: center;
	padding: 56px 0 72px;
}

.eyebrow {
	margin: 0 0 12px;
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.hero h1 {
	margin: 0 0 20px;
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(2.75rem, 6vw, 4.5rem);
	line-height: 1.02;
	letter-spacing: -0.02em;
}

.lede {
	margin: 0;
	max-width: 32em;
	color: var(--text-muted);
	font-size: 1.125rem;
}

/* Quote card */

.quote-card {
	margin: 0;
	padding: 32px 28px 28px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.quote-label {
	display: block;
	margin-bottom: 18px;
	color: var(--text-muted);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.quote-text {
	margin: 0;
	padding-left: 18px;
	border-left: 3px solid var(--accent);
	font-family: var(--serif);
	font-size: clamp(1.25rem, 2.4vw, 1.6rem);
	line-height: 1.35;
	color: var(--text);
}

.quote-who {
	margin-top: 18px;
	color: var(--accent);
	font-weight: 500;
}

.quote-who cite {
	font-style: normal;
}

.quote-note {
	display: block;
	margin-top: 2px;
	color: var(--text-muted);
	font-size: 0.875rem;
	font-weight: 400;
	font-style: italic;
}

.quote-note:empty {
	display: none;
}

.fretboard svg {
	display: block;
	width: 100%;
	height: auto;
}

.chord-picker {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.chord-picker button {
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: transparent;
	color: var(--text);
	font: 500 0.875rem var(--sans);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.chord-picker button:hover {
	border-color: var(--accent);
}

.chord-picker button[aria-pressed="true"] {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}

.chord-picker button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/* Section cards */

.sections {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.card {
	position: relative;
	padding: 28px 24px 24px;
	border: 1px solid var(--line);
	border-radius: 14px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.card h2 {
	margin: 6px 0 8px;
	font-family: var(--serif);
	font-weight: 600;
	font-size: 1.4rem;
}

.card p {
	margin: 0 0 18px;
	color: var(--text-muted);
}

.soon {
	display: inline-block;
	padding: 2px 10px;
	border: 1px dashed var(--accent-deep);
	border-radius: 999px;
	color: var(--accent);
	font-size: 0.75rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Small screens */

@media (max-width: 860px) {
	.hero {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 32px 0 48px;
	}
	.sections {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	main,
	.site-header,
	.site-footer {
		padding-left: 16px;
		padding-right: 16px;
	}
	.quote-card {
		padding: 22px 18px 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	* {
		transition: none !important;
	}
}

/* Shared bits for inner pages */

.back-link {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.back-link:hover {
	color: var(--accent);
}

/* Endorsements */

.endorsements {
	max-width: 760px;
	padding-top: 48px;
	text-align: center;
}

.endorsements h1 {
	font-family: var(--serif);
	font-weight: 600;
	font-size: clamp(2.25rem, 6vw, 3.5rem);
	line-height: 1.1;
	margin-bottom: 40px;
}

.endorse-msg {
	font-size: clamp(1.5rem, 4.5vw, 2.25rem);
	font-weight: 600;
	line-height: 1.35;
	color: var(--accent);
	padding: 32px 24px;
	border: 1px dashed var(--accent-deep);
	border-radius: 12px;
}

/* Instagram glyph (Journey card): centered in the space below the text,
   which the grid stretches to the height of the tallest card */

.card-social {
	display: flex;
	flex-direction: column;
}

/* Auto margins soak up the free space on all four sides */
.social-link {
	display: flex;
	margin: auto;
	padding: 4px;
	color: var(--accent);
}

.social-link:hover {
	color: var(--text);
}

.social-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
	border-radius: 4px;
}

/* Endorsements / Tour Dates / Fan Mail: one line of links shared by the
   homepage and the three pages; the current page is not underlined. */

.fun-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 0;
	margin-top: 48px;
	font-size: 0.95rem;
}

.fun-links a {
	color: var(--accent);
	border-bottom: 1px solid transparent;
}

.fun-links a:hover {
	border-bottom-color: var(--accent);
}

.fun-links a[aria-current="page"] {
	color: var(--text-muted);
	border-bottom-color: transparent;
	pointer-events: none;
}

.fun-links a + a::before {
	content: "\00b7";
	display: inline-block;
	margin: 0 12px;
	color: var(--text-muted);
}

/* Tour Dates */

.tour h1 {
	margin-bottom: 8px;
}

.tour-name {
	margin: 0 0 32px;
	color: var(--accent);
	font-family: var(--serif);
	font-size: 1.25rem;
	font-style: italic;
}

.tour-list {
	margin: 0;
	padding: 0;
	list-style: none;
	text-align: left;
	border-top: 1px solid var(--line);
}

.tour-list li {
	display: grid;
	grid-template-columns: 9em 1fr 1fr;
	gap: 4px 20px;
	align-items: baseline;
	padding: 16px 4px;
	border-bottom: 1px solid var(--line);
}

.tour-when {
	color: var(--accent);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.tour-venue {
	font-family: var(--serif);
	font-size: 1.2rem;
	font-weight: 600;
}

.tour-venue small {
	display: block;
	color: var(--text-muted);
	font-family: var(--sans);
	font-size: 0.8rem;
	font-weight: 400;
}

.tour-status {
	color: var(--text-muted);
	font-size: 0.9rem;
	text-align: right;
}

.tour-note {
	margin: 24px 0 0;
	color: var(--text-muted);
	font-size: 0.9rem;
	font-style: italic;
}

@media (max-width: 480px) {
	.fun-links {
		font-size: 0.9rem;
	}
	.fun-links a + a::before {
		margin: 0 8px;
	}
}

@media (max-width: 560px) {
	.tour-list li {
		grid-template-columns: 1fr;
	}
	.tour-status {
		text-align: left;
	}
}

/* Fan Mail */

.inbox {
	border: 1px solid var(--line);
	border-radius: 12px;
	background: var(--bg-raised);
	text-align: left;
	overflow: hidden;
}

.inbox-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid var(--line);
}

.inbox-title {
	font-weight: 600;
}

.inbox-count {
	color: var(--text-muted);
	font-weight: 400;
}

/* Beats the phone and touch rules that stretch and enlarge buttons */
.inbox-bar .inbox-refresh {
	flex: none;
	min-width: 0;
	padding: 6px 16px;
	font-size: 0.875rem;
}

.inbox-empty {
	padding: 64px 24px;
	text-align: center;
}

.inbox-big {
	margin: 0 0 8px;
	color: var(--accent);
	font-family: var(--serif);
	font-size: clamp(1.5rem, 4.5vw, 2.25rem);
	font-weight: 600;
}

.inbox-status {
	min-height: 1.6em;
	margin: 0;
	color: var(--text-muted);
}

/* Theory Crutches tool picker */

.tool-picker {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
}

.tool-picker select {
	flex: 1;
	min-width: 0;
	padding: 8px 10px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font: 0.95rem var(--sans);
	cursor: pointer;
}

.tool-picker button {
	padding: 8px 18px;
	background: var(--accent);
	border: 1px solid var(--accent);
	border-radius: 999px;
	color: var(--bg);
	font: 600 0.95rem var(--sans);
	cursor: pointer;
	transition: background 0.15s, opacity 0.15s;
}

.tool-picker button:hover:not(:disabled) {
	background: var(--accent-deep);
	border-color: var(--accent-deep);
}

.tool-picker button:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.tool-picker select:focus-visible,
.tool-picker button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

@media (hover: none), (pointer: coarse) {
	.tool-picker select,
	.tool-picker button {
		min-height: 44px;
	}
}

@media (max-width: 860px) {
	.tool-picker select {
		font-size: 16px;
	}
}

/* Fret Roulette */

.roulette {
	max-width: 720px;
}

.roulette-intro {
	padding: 40px 0 28px;
}

.roulette-intro h1 {
	margin: 0 0 12px;
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(2.5rem, 6vw, 3.5rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.roulette-panel {
	padding: 28px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
	text-align: center;
}

.note-set {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 24px;
	padding: 0;
	border: 0;
}

.note-set legend {
	width: 100%;
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.note-set label {
	position: relative;
	padding: 6px 14px;
	border: 1px solid var(--line);
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.note-set input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.note-set label:hover {
	border-color: var(--accent);
}

.note-set label:has(input:checked) {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg);
}

.note-set label:has(input:focus-visible) {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.note-set:disabled label {
	opacity: 0.55;
	cursor: not-allowed;
}

.note-set:disabled label:hover {
	border-color: var(--line);
}

.note-set:disabled label:has(input:checked) {
	opacity: 0.8;
}

.note-display {
	min-height: 1.2em;
	font-family: var(--serif);
	font-size: clamp(3rem, 15vw, 7.5rem);
	line-height: 1.2;
	white-space: nowrap;
	color: var(--accent);
}

.note-display.pop {
	animation: note-pop 0.25s ease-out;
}

@keyframes note-pop {
	from { transform: scale(0.85); opacity: 0.3; }
	to   { transform: scale(1);    opacity: 1; }
}

.stopwatch {
	margin: 4px 0 24px;
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 2rem;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.04em;
}

.roulette-controls {
	display: flex;
	justify-content: center;
	gap: 12px;
}

.btn-primary,
.btn-secondary {
	min-width: 128px;
	padding: 12px 24px;
	border-radius: 999px;
	font: 600 1rem var(--sans);
	cursor: pointer;
	transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.btn-primary {
	background: var(--accent);
	border: 1px solid var(--accent);
	color: var(--bg);
}

.btn-primary:hover {
	background: var(--accent-deep);
	border-color: var(--accent-deep);
}

.btn-secondary {
	background: transparent;
	border: 1px solid var(--text-muted);
	color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
	border-color: var(--text);
}

.btn-secondary:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-link:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.key-hint {
	margin: 16px 0 0;
	color: var(--text-muted);
	font-size: 0.8rem;
}

kbd {
	padding: 1px 6px;
	border: 1px solid var(--line);
	border-radius: 4px;
	font: 0.75rem ui-monospace, Consolas, monospace;
}

.roulette-log {
	padding-top: 36px;
}

.log-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}

.log-head h2 {
	margin: 0 0 12px;
	font-family: var(--serif);
	font-weight: 600;
	font-size: 1.4rem;
}

.btn-link {
	padding: 0;
	background: none;
	border: 0;
	color: var(--text-muted);
	font: 0.875rem var(--sans);
	cursor: pointer;
}

.btn-link:hover {
	color: var(--accent);
}

.log-empty {
	color: var(--text-muted);
	font-style: italic;
}

.log-list {
	margin: 0;
	padding: 0 4px 0 0;
	list-style: none;
	/* Fixed-height scroll box: the page never grows as results come in,
	   so the controls above stay put. */
	max-height: min(360px, 40vh);
	max-height: min(360px, 40dvh);
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.log-list:empty {
	display: none;
}

.log-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	white-space: nowrap;
	padding: 8px 4px;
	border-bottom: 1px solid var(--line);
}

.log-list .log-session {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-top: 24px;
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.log-list .log-session:first-child {
	padding-top: 4px;
}

.log-name {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: var(--serif);
	font-size: 1.15rem;
}

.log-time {
	flex-shrink: 0;
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-variant-numeric: tabular-nums;
	color: var(--text-muted);
}

.log-list .log-total {
	border-bottom-color: var(--accent-deep);
}

.log-total .log-name {
	font-family: var(--sans);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--accent);
}

.log-total .log-time {
	color: var(--text);
	font-weight: 600;
}

@media (max-width: 480px) {
	.roulette-panel {
		padding: 22px 16px;
	}
	.btn-primary,
	.btn-secondary {
		min-width: 0;
		flex: 1;
	}
}

/* Fret Roulette -- starting string options */

.visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.string-options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px 20px;
	margin: -8px 0 24px;
	padding: 0;
	border: 0;
	font-size: 0.875rem;
}

.string-options .toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.string-options input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--accent);
	cursor: pointer;
}

.string-options .instrument {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-muted);
}

.string-options select {
	padding: 6px 10px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font: 0.875rem var(--sans);
	cursor: pointer;
}

.string-options select:focus-visible,
.string-options input:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.string-options select:disabled,
.string-options:disabled .toggle {
	opacity: 0.45;
	cursor: not-allowed;
}

.string-display {
	min-height: 1.5em;
	margin-bottom: -4px;
	color: var(--text);
	font-size: 1.5rem;
	font-weight: 500;
}

.log-string {
	margin-left: 10px;
	color: var(--text-muted);
	font-family: var(--sans);
	font-size: 0.8rem;
}

/* Mobile and touch */

/* Fieldsets default to min-width: min-content, which lets a long select
   push them wider than the screen instead of letting the select shrink. */
fieldset {
	min-width: 0;
}

/* Taps should never wait for or trigger double-tap zoom -- matters most
   when hammering the Next button. */
button,
label,
select,
input,
a {
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

/* Touch screens: no keyboard hints, bigger tap targets, and hover colors
   reset so a tapped button doesn't stay highlighted. */
@media (hover: none), (pointer: coarse) {
	body {
		background-attachment: scroll;
	}
	.key-hint {
		display: none;
	}
	.chord-picker button,
	.note-set label {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
		padding: 8px 16px;
	}
	.string-options input[type="checkbox"] {
		width: 22px;
		height: 22px;
	}
	.string-options .toggle {
		min-height: 44px;
	}
	.string-options select {
		min-height: 44px;
	}
	.btn-primary,
	.btn-secondary {
		padding: 16px 24px;
		font-size: 1.125rem;
	}
	.btn-link {
		min-height: 44px;
		padding: 0 4px;
	}
	.back-link {
		padding: 10px 0;
	}
	.chord-picker button:hover,
	.note-set label:hover {
		border-color: var(--line);
	}
	.btn-primary:hover {
		background: var(--accent);
		border-color: var(--accent);
	}
	.btn-secondary:hover:not(:disabled) {
		border-color: var(--text-muted);
	}
	.btn-link:hover,
	.back-link:hover {
		color: var(--text-muted);
	}
}

/* iOS zooms the page when focusing a control with text under 16px */
@media (max-width: 860px) {
	.string-options select {
		font-size: 16px;
	}
}

/* Phones */
@media (max-width: 480px) {
	.site-header,
	.site-footer {
		padding-top: 16px;
		padding-bottom: 16px;
	}
	.site-footer {
		margin-top: 40px;
	}
	.lede {
		font-size: 1rem;
	}
	/* On phones the trainer itself is the page: drop the intro paragraph so
	   the controls and the first results fit on one screen without scrolling. */
	.roulette-intro {
		padding: 4px 0 14px;
	}
	.roulette-intro h1 {
		margin: 0;
		font-size: 2.25rem;
	}
	.roulette-intro .lede {
		display: none;
	}
	.note-set {
		margin-bottom: 18px;
	}
	.note-set legend {
		margin-bottom: 6px;
	}
	.roulette-log {
		padding-top: 24px;
	}
	/* Stack the string options so the instrument names never overflow */
	.string-options {
		flex-direction: column;
		align-items: stretch;
		gap: 10px;
	}
	.string-options .toggle {
		justify-content: center;
	}
	/* Label on the left, select fills the rest; minmax(0, 1fr) lets the
	   select shrink below its natural width instead of overflowing. */
	.string-options .instrument {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		text-align: left;
	}
	.string-options select {
		width: 100%;
		min-width: 0;
	}
	.string-display {
		font-size: 1.25rem;
	}
	.stopwatch {
		font-size: 1.75rem;
		margin-bottom: 20px;
	}
}

/* Capo Converter (capo calculator) */

.lede-aside {
	margin: 10px 0 0;
	max-width: 32em;
	color: var(--text-muted);
	font-size: 0.85rem;
	font-style: italic;
}

@media (max-width: 480px) {
	.lede-aside {
		font-size: 0.8rem;
	}
}

.capo {
	max-width: 720px;
}

.capo-intro {
	padding: 40px 0 28px;
}

.capo-intro h1 {
	margin: 0 0 12px;
	font-family: var(--serif);
	font-weight: 400;
	font-size: clamp(2.25rem, 6vw, 3.5rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
}

.capo-fields {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px 20px;
	margin-bottom: 24px;
	font-size: 0.875rem;
}

.capo-fields label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text-muted);
}

.capo-fields select {
	padding: 6px 10px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--text);
	font: 0.875rem var(--sans);
	cursor: pointer;
}

.capo-fields select:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.capo-panel .note-set:last-child {
	margin-bottom: 0;
}

.capo-results {
	padding-top: 36px;
}

.capo-results h2 {
	margin: 0 0 12px;
	font-family: var(--serif);
	font-weight: 600;
	font-size: 1.4rem;
}

.capo-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.capo-option {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 16px 4px;
	border-bottom: 1px solid var(--line);
}

.capo-fret {
	flex-shrink: 0;
	width: 64px;
	text-align: center;
}

.capo-num {
	display: block;
	font-family: var(--serif);
	font-size: 2.5rem;
	line-height: 1;
	color: var(--accent);
}

.capo-label {
	display: block;
	margin-top: 4px;
	color: var(--text-muted);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	white-space: nowrap;
}

.capo-detail {
	flex: 1;
	min-width: 0;
}

.capo-shape {
	margin-bottom: 6px;
	font-size: 1.05rem;
}

.capo-shape strong {
	font-family: var(--serif);
	font-size: 1.25rem;
	color: var(--accent);
}

.capo-chords {
	display: grid;
	gap: 2px;
}

.capo-row {
	display: grid;
	grid-template-columns: 64px repeat(5, minmax(0, 1fr));
	align-items: baseline;
	gap: 4px;
}

.capo-row span {
	white-space: nowrap;
}

.capo-row .capo-row-label {
	color: var(--text-muted);
	font-size: 0.7rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.capo-row + .capo-row span:not(.capo-row-label) {
	color: var(--text-muted);
}

@media (hover: none), (pointer: coarse) {
	.capo-fields select {
		min-height: 44px;
	}
}

@media (max-width: 860px) {
	.capo-fields select {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.capo-intro {
		padding: 4px 0 14px;
	}
	.capo-intro h1 {
		margin-bottom: 8px;
		font-size: 2.25rem;
	}
	/* One shared grid so the labels line up and each select gets the rest */
	.capo-fields {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-items: center;
		gap: 10px 12px;
		text-align: left;
	}
	.capo-fields label {
		display: contents;
	}
	.capo-fields select {
		width: 100%;
		min-width: 0;
	}
	.capo-results {
		padding-top: 24px;
	}
	.capo-results h2 {
		font-size: 1.2rem;
	}
	.capo-option {
		gap: 10px;
	}
	.capo-fret {
		width: 44px;
	}
	.capo-num {
		font-size: 2rem;
	}
	.capo-label {
		letter-spacing: 0.06em;
		white-space: normal;
	}
	.capo-row {
		grid-template-columns: 50px repeat(5, minmax(0, 1fr));
		font-size: 0.9rem;
	}
	.capo-row .capo-row-label {
		font-size: 0.62rem;
		letter-spacing: 0.06em;
	}
}

/* Mode-O-Matic */

.modes {
	max-width: 720px;
}

.mode-tabs {
	margin-bottom: 20px;
}

.modes-panel .note-set {
	margin-bottom: 24px;
}

.modes-label {
	display: block;
	margin-bottom: 10px;
	color: var(--text-muted);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.modes-input {
	width: 100%;
	padding: 12px 16px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 10px;
	color: var(--text);
	font: 500 1.25rem var(--sans);
	text-align: center;
}

.modes-input::placeholder {
	color: var(--text-muted);
	opacity: 0.6;
}

.modes-input:focus {
	outline: none;
	border-color: var(--accent);
}

.modes-hint {
	margin: 10px 0 16px;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.modes-examples {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 8px;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.btn-chip {
	padding: 4px 12px;
	background: transparent;
	border: 1px dashed var(--accent-deep);
	border-radius: 999px;
	color: var(--accent);
	font: 500 0.8rem var(--sans);
	cursor: pointer;
}

.btn-chip:hover {
	border-style: solid;
}

.btn-chip:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.modes-result {
	padding-top: 32px;
}

.mode-eyebrow {
	margin: 0 0 4px;
	color: var(--accent);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mode-name {
	margin: 0 0 6px;
	font-family: var(--serif);
	font-weight: 600;
	font-size: clamp(1.75rem, 5vw, 2.5rem);
	line-height: 1.15;
}

.mode-desc {
	margin: 0 0 16px;
	color: var(--text-muted);
}

.mode-sub {
	margin: 28px 0 10px;
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mode-scale {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.mode-scale span {
	min-width: 40px;
	padding: 4px 8px;
	border: 1px solid var(--line);
	border-radius: 8px;
	text-align: center;
	font-family: var(--serif);
}

.mode-scale span:first-child {
	border-color: var(--accent);
	color: var(--accent);
}

.mode-prog {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.mode-prog li {
	padding: 12px 6px 10px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 12px;
	text-align: center;
}

.mode-prog .tile-chord {
	display: block;
	font-family: var(--serif);
	font-size: 1.5rem;
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mode-prog .tile-numeral {
	display: block;
	margin-top: 4px;
	color: var(--accent);
	font-size: 0.85rem;
	font-weight: 600;
}

.mode-prog .is-outside {
	border-style: dashed;
	opacity: 0.7;
}

.mode-prog .is-outside .tile-numeral {
	color: var(--text-muted);
	font-weight: 400;
	font-style: italic;
}

.mode-prog-big {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mode-prog-big .tile-chord {
	font-size: clamp(1.75rem, 7vw, 2.5rem);
}

.mode-prog-small {
	grid-template-columns: repeat(7, minmax(0, 1fr));
	gap: 6px;
	margin-top: 0;
}

.mode-prog-small li {
	padding: 8px 2px 6px;
	border-radius: 10px;
}

.mode-prog-small .tile-chord {
	font-size: 1.1rem;
}

.mode-prog-small .tile-numeral {
	font-size: 0.75rem;
}

.mode-why {
	margin: 20px 0 0;
	padding-left: 20px;
}

.mode-why li {
	margin-bottom: 6px;
}

.mode-why li::marker {
	color: var(--accent);
}

.mode-alts {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.mode-alts h3 {
	margin: 0 0 8px;
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.mode-alts ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mode-alts li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid var(--line);
}

.alt-name {
	font-family: var(--serif);
	font-size: 1.1rem;
}

.alt-numerals {
	color: var(--accent);
	font-size: 0.9rem;
	text-align: right;
}

.modes-panel .btn-primary {
	min-width: 200px;
}

@media (hover: none), (pointer: coarse) {
	.btn-chip {
		min-height: 40px;
		padding: 6px 14px;
	}
	.btn-chip:hover {
		border-style: dashed;
	}
}

@media (max-width: 480px) {
	.mode-tabs label {
		flex: 1;
		justify-content: center;
		padding-left: 8px;
		padding-right: 8px;
		text-align: center;
		white-space: nowrap;
	}
	.mode-scale span {
		min-width: 34px;
		padding: 4px 2px;
	}
	.mode-prog {
		grid-template-columns: repeat(auto-fill, minmax(62px, 1fr));
	}
	.modes-result {
		padding-top: 24px;
	}
	/* Seven chords across a phone is too tight; wrap to 4 + 3 */
	.mode-prog-small {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.mode-prog-big {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.mode-prog-big .tile-chord {
		font-size: 1.6rem;
	}
	.modes-panel .btn-primary {
		width: 100%;
	}
}

/* Scale-O-Rama */

.scales {
	max-width: 960px;
}

.scales .capo-intro,
.scales-panel {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.scales-panel .note-set {
	margin-bottom: 0;
}

.scales-panel .note-set + .note-set {
	margin-top: 20px;
}

.caged {
	max-width: 720px;
	margin: 24px auto 0;
	text-align: center;
}

.caged-head {
	margin: 0 0 10px;
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.caged-picker {
	justify-content: center;
	margin-top: 0;
}

.caged-picker button {
	min-width: 48px;
}

.caged-note {
	margin: 8px 0 0;
	color: var(--text-muted);
	font-size: 0.8rem;
}

.caged-note:empty {
	display: none;
}

.scales-result {
	padding-top: 32px;
}

.scale-notes {
	grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
	max-width: 620px;
	margin-bottom: 24px;
}

.scale-notes li:first-child {
	border-color: var(--accent);
}

.scale-notes .tile-chord {
	font-size: 1.35rem;
}

.scale-board {
	overflow-x: auto;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	padding: 16px 12px 8px;
	background: var(--bg-raised);
	border: 1px solid var(--line);
	border-radius: 16px;
	color-scheme: dark;
	scrollbar-color: var(--fret) transparent;
}

.scale-board svg {
	display: block;
	width: 100%;
	height: auto;
}

.scale-hint {
	display: none;
	margin: 0 0 8px;
	color: var(--text-muted);
	font-size: 0.8rem;
}

@media (max-width: 760px) {
	.scale-hint {
		display: block;
	}
}

@media (max-width: 480px) {
	.scales-result {
		padding-top: 24px;
	}
	/* All seven notes on one row */
	.scale-notes {
		grid-template-columns: repeat(7, minmax(0, 1fr));
		gap: 4px;
	}
	.scale-notes li {
		padding: 8px 2px 6px;
		border-radius: 10px;
	}
	.scale-notes .tile-chord {
		font-size: 1.1rem;
	}
	.scale-notes .tile-numeral {
		font-size: 0.75rem;
	}
	.scale-board {
		padding: 12px 8px 4px;
	}
	/* Shape / pattern buttons share one row (up to All + 7) */
	.caged-picker {
		flex-wrap: nowrap;
		gap: 6px;
	}
	.caged-picker button {
		flex: 1 1 0;
		min-width: 0;
		padding-left: 0;
		padding-right: 0;
		justify-content: center;
	}
}

/* Very narrow phones: labels above the selects so long names fit */
@media (max-width: 360px) {
	.scales-panel .capo-fields {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}
	.scales-panel .capo-fields select {
		margin-bottom: 8px;
	}
}


/* ---------------------------------------------------------------
   Scale Roulette
   --------------------------------------------------------------- */

.skeet .skeet-target,
.skeet .skeet-setup {
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
}

.skeet-count {
	margin: 0 0 8px;
	color: var(--text-muted);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.skeet-prompt {
	margin: 0 0 24px;
	font-family: var(--serif);
	font-size: clamp(2rem, 7vw, 3.25rem);
	line-height: 1.15;
	color: var(--accent);
}

.skeet-prompt.pop {
	animation: note-pop 0.25s ease-out;
}

.skeet-shape {
	min-height: 1.2em;
	margin: 0 0 4px;
	/* Halfway between the old 1.4rem / 1.2rem and the prompt below it */
	font-size: clamp(1.6rem, 5vw, 2.3rem);
	font-weight: 500;
	line-height: 1.2;
}

.btn-pull {
	letter-spacing: 0.08em;
}

.btn-secondary[aria-pressed="true"] {
	border-color: var(--accent);
	color: var(--accent);
}

.skeet-cheat {
	max-width: 720px;
	margin: 0 auto;
	padding-top: 28px;
}

.skeet-cheat .note-set {
	margin-bottom: 16px;
	text-align: center;
}

.skeet-target {
	margin-top: 32px;
}

.skeet-set {
	margin: 0;
	padding: 0;
	border: 0;
}

.skeet-set + .skeet-set {
	margin-top: 28px;
}

.skeet-set legend {
	width: 100%;
	margin-bottom: 6px;
	color: var(--text-muted);
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.skeet-set .chord-picker {
	justify-content: center;
	margin-top: 0;
}

.skeet-quick {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 12px;
}

.skeet-group + .skeet-group {
	margin-top: 14px;
}

.skeet-group-name {
	display: block;
	margin-bottom: 6px;
	color: var(--text-muted);
	font-size: 0.8rem;
}

/* Twelve keys: one row on wide screens, two rows of six on phones */
.skeet-keys {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 6px;
}

.skeet-keys button {
	padding-left: 0;
	padding-right: 0;
	justify-content: center;
}

.skeet-set .caged-note {
	margin-top: 10px;
}

@media (max-width: 640px) {
	.skeet-keys {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}
}

@media (max-width: 480px) {
	.skeet-target .btn-primary,
	.skeet-target .btn-secondary {
		flex: 1 1 0;
		min-width: 0;
	}
}

/* Chord Finder */

.chords {
	max-width: 720px;
}

.chords-panel .note-set {
	margin-bottom: 20px;
}

.chords-panel .btn-primary {
	min-width: 200px;
	margin-top: 4px;
}

.chord-result {
	padding-top: 32px;
}

.chord-result .chord-tones {
	margin-bottom: 12px;
}

.chord-diagram svg {
	display: block;
	width: 100%;
	max-width: 360px;
	height: auto;
}

.chord-tab {
	margin: 4px 0 0;
	color: var(--text-muted);
	font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
	font-size: 0.85rem;
	letter-spacing: 0.06em;
}

.shape-hint {
	margin: 0 0 14px;
	color: var(--text-muted);
	font-size: 0.85rem;
}

.shape-board {
	-webkit-tap-highlight-color: transparent;
}

.shape-actions {
	display: flex;
	justify-content: center;
	margin-top: 16px;
}

.chord-aka {
	margin: 12px 0 0;
	color: var(--text-muted);
	font-size: 0.9rem;
}

.chord-aka:empty {
	display: none;
}

@media (max-width: 480px) {
	.chord-result {
		padding-top: 24px;
	}
	.chords-panel .btn-primary {
		width: 100%;
	}
	.chord-option .capo-detail {
		min-width: 0;
	}
}
