:root {
	--font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Cambria, Georgia, serif;
	--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', Menlo, monospace;
}

body {
	margin: 0;
	padding: 40px 20px;
	background: #efe9dd;
	font-family: var(--font-body);
	color: #2a2a2e;
}

.page {
	max-width: 1100px;
	margin: 0 auto;
}

h1 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 2.4rem;
	margin: 0 0 4px;
}

p.lead {
	color: #5c544a;
	margin-top: 0;
}

.inline-code {
	font-family: var(--font-mono);
	font-size: 0.85em;
	background: #fff;
	padding: 1px 5px;
	border-radius: 3px;
	border: 1px solid #d8cdb6;
	color: #5a3520;
}

/* Tabs */
.tabs {
	display: flex;
	gap: 4px;
	margin: 28px 0 20px;
	border-bottom: 1px solid #d8cdb6;
}

.tabs button {
	font-family: var(--font-display);
	font-size: 1.15rem;
	font-weight: 500;
	padding: 10px 22px;
	border: 1px solid transparent;
	border-bottom: none;
	border-radius: 8px 8px 0 0;
	background: transparent;
	color: #7a6a4a;
	cursor: pointer;
	margin-bottom: -1px;
	transition: background 0.15s, color 0.15s;
}

.tabs button:hover {
	background: #f3ead4;
	color: #2a2a2e;
}

.tabs button[aria-selected="true"] {
	background: #fdfaf2;
	border-color: #d8cdb6;
	color: #2a2a2e;
	border-bottom: 1px solid #fdfaf2;
}

.tabs button .num {
	font-family: var(--font-mono);
	font-size: 0.65em;
	color: #a64a3a;
	margin-right: 6px;
	letter-spacing: 0.05em;
}

.tab-panel[hidden] {
	display: none;
}

/* Theme switcher */
.theme-switcher {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 24px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #d8cdb6;
	border-radius: 10px;
}

.theme-switcher span {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 0.1em;
	color: #7a6a4a;
	align-self: center;
	margin-right: 6px;
	text-transform: uppercase;
}

.theme-switcher button {
	font-family: var(--font-display);
	font-size: 0.9rem;
	padding: 6px 14px;
	border-radius: 999px;
	border: 1px solid #c5b89d;
	background: #fdfaf2;
	color: #2a2a2e;
	cursor: pointer;
}

.theme-switcher button:hover {
	background: #f3ead4;
}

.theme-switcher button.is-active {
	background: #2a2a2e;
	color: #f0d889;
	border-color: #2a2a2e;
}

.example-label {
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #7a6a4a;
	margin: 28px 0 8px 4px;
}

.leak-note {
	margin: 0 0 20px;
	padding: 12px 16px;
	background: #fff;
	border: 1px dashed #c5b89d;
	border-radius: 10px;
	font-size: 0.9rem;
	line-height: 1.55;
	color: #5c544a;
}

.leak-note strong {
	color: #2a2a2e;
}

.leak-note code {
	font-family: var(--font-mono);
	font-size: 0.85em;
	background: #f0e8d3;
	padding: 1px 6px;
	border-radius: 4px;
	color: #5a3520;
}

.chord-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
	margin-top: 4px;
}

.chord-card {
	background: #fdfaf2;
	border: 1px solid #d8cdb6;
	border-radius: 12px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.chord-card h3 {
	margin: 0;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.4rem;
}

.chord-tones {
	font-family: var(--font-mono);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	color: #7a6a4a;
}

/* Doku */
.docs {
	padding: 32px 36px 28px;
	background: #fdfaf2;
	border: 1px solid #d8cdb6;
	border-radius: 12px;
}

.docs h2 {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.9rem;
	margin: 0 0 4px;
}

.docs .docs-lead {
	font-style: italic;
	color: #5c544a;
	margin: 0 0 28px;
}

.docs h3 {
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1.25rem;
	margin: 28px 0 8px;
	border-bottom: 1px dashed #d8cdb6;
	padding-bottom: 6px;
}

.docs h3 .num {
	font-family: var(--font-mono);
	font-size: 0.7em;
	color: #a64a3a;
	margin-right: 8px;
	letter-spacing: 0.05em;
}

.docs p {
	margin: 8px 0 12px;
	line-height: 1.55;
}

.docs ul {
	margin: 8px 0 14px;
	padding-left: 22px;
	line-height: 1.65;
}

.docs ul li {
	margin-bottom: 4px;
}

.docs code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: #f0e8d3;
	padding: 1px 6px;
	border-radius: 4px;
	color: #5a3520;
}

.docs pre {
	font-family: var(--font-mono);
	font-size: 0.85rem;
	line-height: 1.55;
	background: #2a2a2e;
	color: #e8dcc4;
	padding: 16px 18px;
	border-radius: 8px;
	overflow-x: auto;
	margin: 10px 0 16px;
}

.docs pre code {
	background: none;
	padding: 0;
	color: inherit;
	font-size: inherit;
}

.docs .api-list code {
	font-weight: 600;
}

.docs .note {
	margin: 12px 0 16px;
	padding: 12px 16px;
	background: #f0e8d3;
	border-left: 3px solid #a64a3a;
	border-radius: 0 8px 8px 0;
	font-size: 0.92rem;
	line-height: 1.55;
}

.docs .note strong {
	color: #7a3320;
}

/* Syntax-Farben */
pre .c-key {
	color: #f0d889;
}

pre .c-str {
	color: #c9e2c9;
}

pre .c-tag {
	color: #9ec5e0;
}

pre .c-com {
	color: #8a8275;
	font-style: italic;
}

pre .c-num {
	color: #f5c45e;
}

/* Download-Buttons */
.dl-row {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin: 6px 0 4px;
}

.dl-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 9px 9px 9px 14px;
	background: #2a2a2e;
	color: #e8dcc4;
	border: 1px solid #3a3a3e;
	border-radius: 10px;
	text-decoration: none;
	font-family: var(--font-mono);
	font-size: 0.88rem;
	transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.dl-btn:hover {
	background: #34343a;
	border-color: #54545a;
}

.dl-btn:active {
	transform: translateY(1px);
}

.dl-btn svg {
	color: #f0d889;
	flex-shrink: 0;
}

.dl-btn-badge {
	font-size: 0.72em;
	background: #54545a;
	color: #e8dcc4;
	padding: 3px 8px;
	border-radius: 5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* ---------- Spielwiese ---------- */
.pg {
	display: grid;
	grid-template-columns: 300px 1fr;
	gap: 22px;
	align-items: start;
}

@media (max-width: 760px) {
	.pg {
		grid-template-columns: 1fr;
	}
}

.pg-controls {
	background: #fdfaf2;
	border: 1px solid #d8cdb6;
	border-radius: 12px;
	padding: 18px 20px;
}

.pg-field {
	margin-bottom: 16px;
}

.pg-field:last-child {
	margin-bottom: 0;
}

.pg-field>label {
	display: block;
	font-family: var(--font-mono);
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #7a6a4a;
	margin-bottom: 6px;
}

.pg-field .val {
	color: #a64a3a;
}

.pg-row {
	display: flex;
	gap: 8px;
}

.pg select,
.pg input[type="text"] {
	width: 100%;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	padding: 7px 9px;
	border: 1px solid #c5b89d;
	border-radius: 7px;
	background: #fff;
	color: #2a2a2e;
}

.pg input[type="range"] {
	width: 100%;
	accent-color: #a64a3a;
}

.pg-check {
	display: flex;
	align-items: center;
	gap: 8px;
	font-family: var(--font-body);
	font-size: 0.92rem;
	color: #2a2a2e;
	cursor: pointer;
}

.pg-check input {
	width: 16px;
	height: 16px;
	accent-color: #a64a3a;
}

.pg-checks {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pg-hint {
	font-family: var(--font-mono);
	font-size: 11px;
	color: #a64a3a;
	min-height: 14px;
	margin-top: 4px;
}

.pg-stage {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.pg-code {
	margin: 0;
}

footer {
	margin-top: 48px;
	padding-top: 18px;
	border-top: 1px solid #d8cdb6;
	color: #7a6a4a;
	font-size: 0.82rem;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
}

footer a {
	color: #a64a3a;
	text-decoration: none;
}

footer a:hover {
	text-decoration: underline;
}
