/* Mises Karma – eigenes Stylesheet (ersetzt Pico CSS und Font Awesome seit 2026-11) */

@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url(/assets/fonts/source-serif-4-latin-ext.woff2) format('woff2');
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Source Serif 4';
	font-style: normal;
	font-weight: 500 700;
	font-display: swap;
	src: url(/assets/fonts/source-serif-4-latin.woff2) format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
	--bg: #f5efe3;
	--surface: #fffcf6;
	--surface-2: #efe6d5;
	--fg: #2a2219;
	--muted: #6e6253;
	--line: #e0d4bf;
	--accent: #9a4a1f;
	--accent-strong: #7d3a15;
	--accent-soft: #f3e1cf;
	--on-accent: #fffaf3;
	--hit: #f6d58e;
	--shadow: 0 1px 2px rgb(60 40 20 / .06), 0 8px 24px -12px rgb(60 40 20 / .18);
	--radius: 14px;
	--font-display: 'Source Serif 4', Georgia, 'Times New Roman', serif;
	--font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	--wrap: 60rem;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root {
		--bg: #1b1713;
		--surface: #24201a;
		--surface-2: #2e2821;
		--fg: #ede4d5;
		--muted: #ab9e8b;
		--line: #3b342b;
		--accent: #e39a62;
		--accent-strong: #f0b07d;
		--accent-soft: #3a2a1d;
		--on-accent: #1b1713;
		--hit: #6b4e1c;
		--shadow: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6);
		color-scheme: dark;
	}
}

/* --- Grundlagen --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font: 1.0625rem/1.6 var(--font-body);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 650; line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
small { font-size: .85em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.js .no-js-only, html:not(.js) .js-only { display: none !important; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 700px) { .wrap { padding: 0 1.5rem; } }

.skip { position: absolute; left: 1rem; top: -3rem; z-index: 200; background: var(--surface); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { top: .5rem; }

/* --- Knöpfe --- */
.btn {
	display: inline-flex; align-items: center; gap: .5em;
	padding: .6em 1.1em; border-radius: 999px;
	border: 1px solid var(--line); background: var(--surface); color: var(--fg);
	font: 600 .95rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
	transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--accent); color: var(--fg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }

/* Abspielknopf: Symbol je nach Zustand */
.play-toggle .i-pause, .episode-card.is-playing .play-toggle .i-play { display: none; }
.episode-card.is-playing .play-toggle .i-pause { display: inline-block; }
.play-mini {
	flex: none; display: grid; place-items: center;
	width: 2.5rem; height: 2.5rem; padding: 0; border-radius: 50%;
	border: 1px solid var(--line); background: var(--surface); color: var(--accent);
	cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.play-mini .icon { width: 1rem; height: 1rem; }
.play-mini .i-play { margin-left: 2px; }
.play-mini:hover, .episode-card.is-active .play-mini { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* --- Kopfleiste --- */
.topbar {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 88%, transparent);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.75rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--fg); text-decoration: none; font: 650 1.2rem/1 var(--font-display); }
.brand img { width: 40px; height: 40px; border-radius: 50%; }
.topbar nav { display: flex; gap: .25rem; }
.topbar nav a { color: var(--fg); text-decoration: none; font-weight: 550; font-size: .95rem; padding: .45rem .7rem; border-radius: 999px; }
.topbar nav a:hover { background: var(--surface-2); }
@media (max-width: 560px) {
	.brand span { display: none; }
	.topbar nav a { padding: .45rem .55rem; font-size: .9rem; }
}

/* --- Startseite: Kopf --- */
.hero {
	padding: clamp(2rem, 6vw, 4rem) 0 1.5rem;
	background:
		radial-gradient(120% 90% at 15% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%),
		var(--bg);
}
.hero-inner { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center; }
.hero-logo { width: clamp(96px, 20vw, 168px); height: auto; border-radius: 50%; box-shadow: var(--shadow); border: 4px solid var(--surface); }
.hero h1 { margin: 0; }
.eyebrow { margin: 0 0 .35rem; color: var(--accent); font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tagline { font: 500 1.25rem/1.3 var(--font-display); color: var(--muted); margin: .2rem 0 1rem; }
.lead { max-width: 38rem; }
.stats { display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .95rem; }
.stats strong { color: var(--fg); font: 650 1.35rem/1 var(--font-display); margin-right: .2rem; }
@media (max-width: 640px) {
	.hero-inner { grid-template-columns: 1fr; }
	.hero-logo { width: 96px; }
}
.about { margin-top: 1.75rem; border-top: 1px solid var(--line); padding-top: .75rem; }
.about summary { cursor: pointer; font-weight: 600; color: var(--accent); width: max-content; }
.about-body { max-width: 44rem; padding-top: .75rem; }

/* --- Abschnitte --- */
.section { padding: clamp(1.5rem, 4vw, 2.5rem) 0; }
.section-head { margin-bottom: 1.25rem; }
.section-head h2 { margin-bottom: .2rem; }
.section-head p { margin: 0; }

/* --- Letzte Folge --- */
.feature {
	display: grid; grid-template-columns: 200px 1fr; gap: 1.75rem; align-items: start;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
	padding: clamp(1rem, 3vw, 1.75rem); box-shadow: var(--shadow);
}
.feature-cover { width: 200px; border-radius: 10px; }
.feature h2 { font-size: clamp(1.4rem, 3vw, 1.8rem); margin: .1rem 0 .5rem; }
.feature h2 a { color: var(--fg); text-decoration: none; }
.feature h2 a:hover { color: var(--accent); }
.feature-excerpt { margin: .75rem 0 1rem; }
.feature .progress-bar { max-width: 18rem; margin-top: .9rem; }
@media (max-width: 640px) {
	.feature { grid-template-columns: 1fr; gap: 1rem; }
	.feature-cover { width: 120px; }
}

/* --- Metazeile und Personen --- */
.ep-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .45rem; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.ep-meta .sep { opacity: .6; }
.ep-no { font-weight: 650; color: var(--fg); }
.ep-people { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.person {
	display: inline-block; padding: .1rem .55rem; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-strong);
	font-size: .8rem; font-weight: 550; text-decoration: none; line-height: 1.6;
}
.person:hover { background: var(--accent); color: var(--on-accent); }

/* --- Archiv: Werkzeuge --- */
.archive-tools {
	position: sticky; top: 3.75rem; z-index: 20;
	display: grid; gap: .75rem;
	margin: 0 -1rem; padding: .85rem 1rem;
	background: color-mix(in srgb, var(--bg) 94%, transparent);
	backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid transparent;
}
@media (min-width: 700px) { .archive-tools { margin: 0 -1.5rem; padding: .85rem 1.5rem; } }
/* Auf dem Handy wäre die klebende Leiste zu hoch: dort scrollt sie mit */
@media (max-width: 699px) { .archive-tools { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; } }
.archive-tools.is-stuck { border-bottom-color: var(--line); }
.search-field { position: relative; display: flex; align-items: center; }
.search-field > .icon { position: absolute; left: 1rem; color: var(--muted); pointer-events: none; }
.search-field input {
	width: 100%; padding: .85rem 3rem; border-radius: 999px;
	border: 1px solid var(--line); background: var(--surface); color: var(--fg);
	font: 1.05rem/1.2 var(--font-body); box-shadow: var(--shadow);
	-webkit-appearance: none; appearance: none;
}
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.search-clear { position: absolute; right: .5rem; display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.search-clear:hover { background: var(--surface-2); color: var(--fg); }

.chips { display: flex; gap: .4rem; border: 0; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; position: relative; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
	display: inline-flex; align-items: baseline; gap: .35rem; cursor: pointer;
	padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface); font-size: .9rem; font-weight: 550; white-space: nowrap;
}
.chip small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.chip span:hover { border-color: var(--accent); }
.chip input:checked + span { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip input:checked + span small { color: inherit; opacity: .7; }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.selects { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.select select {
	-webkit-appearance: none; appearance: none;
	padding: .45rem 2rem .45rem .85rem; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E") no-repeat right .6rem center / 1rem;
	color: var(--fg); font: 550 .9rem/1.2 var(--font-body); max-width: 15rem; cursor: pointer;
}
.select select:hover { border-color: var(--accent); }
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 550; cursor: pointer; padding: 0 .3rem; }
.toggle input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; }
@media (max-width: 560px) {
	.selects { display: grid; grid-template-columns: 1fr 1fr; }
	.select:first-child { grid-column: 1 / -1; }
	.select select { max-width: none; width: 100%; }
	.toggle { grid-column: 1 / -1; }
}

.result-line { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: .75rem 0 .5rem; font-size: .9rem; color: var(--muted); }
.result-line p { margin: 0; }
.result-count { font-weight: 600; }

/* --- Archiv: Liste --- */
.archive { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.ep { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem .25rem; border-bottom: 1px solid var(--line); }
.ep .play-mini { margin-top: .1rem; }
.ep-body { min-width: 0; flex: 1; }
.ep-title { display: block; color: var(--fg); text-decoration: none; font: 600 1.12rem/1.35 var(--font-display); margin-bottom: .15rem; }
.ep-title:hover { color: var(--accent); }
.ep.is-active .ep-title { color: var(--accent); }
.ep.is-done:not(.is-active) .ep-title { color: var(--muted); }
.ep.is-done:not(.is-active) .play-mini { opacity: .6; }
.ep-hit { margin: .45rem 0 0; font-size: .9rem; color: var(--muted); }
mark { background: var(--hit); color: inherit; border-radius: 3px; padding: 0 .1em; }
.ep .progress-bar { margin-top: .55rem; max-width: 14rem; }
.empty { text-align: center; padding: 2.5rem 1rem; }

/* Fortschrittsbalken */
.progress-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.progress-bar > div { width: 0; height: 100%; background: var(--accent); }

/* --- Hörbücher --- */
.books { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: 1.25rem; }
.books a { display: grid; gap: .25rem; color: var(--fg); text-decoration: none; }
.books img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: .4rem; transition: transform .2s; }
.books a:hover img { transform: translateY(-3px); }
.books span { font: 600 1rem/1.3 var(--font-display); }
.books a:hover span { color: var(--accent); }
.books small { color: var(--muted); }
@media (max-width: 420px) { .books { grid-template-columns: 1fr 1fr; gap: 1rem; } }

/* --- Inhaltsseiten (Episode, Hörbuch, Spenden) --- */
.page { padding: clamp(1.5rem, 5vw, 3rem) 0; }
.page .wrap { max-width: 46rem; }
.page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin-bottom: .6rem; }
.page h2 { font-size: 1.45rem; margin-top: 2rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 3vw, 1.5rem); box-shadow: var(--shadow); margin: 1.5rem 0; }
.card > :last-child { margin-bottom: 0; }
.prose { font-size: 1.075rem; }
.prose img { border-radius: 8px; margin: 1rem 0; }
.prose blockquote { margin: 1rem 0; padding-left: 1rem; border-left: 3px solid var(--line); color: var(--muted); }
.crumb { display: inline-flex; align-items: center; gap: .25rem; font-size: .9rem; font-weight: 550; text-decoration: none; margin-bottom: 1rem; }
.listen-card { display: grid; gap: .9rem; }
.listen-card .actions { justify-content: space-between; }
.download { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; font-weight: 550; }
.download small { color: var(--muted); font-weight: 400; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: 2rem; }
.pager a { display: grid; gap: .15rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); text-decoration: none; min-width: 0; }
.pager a:hover { border-color: var(--accent); }
.pager small { color: var(--muted); display: flex; align-items: center; gap: .2rem; }
.pager span { font: 600 1rem/1.3 var(--font-display); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pager .next { text-align: right; grid-column: 2; }
.pager .next small { justify-content: flex-end; }
.related { margin-top: 2.5rem; }
.related .archive { border-top: 1px solid var(--line); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; }
.grid-3 h3 { font-size: 1.1rem; }
.qr { width: 160px; background: #fff; padding: 8px; border-radius: 8px; }
code { font-size: .8rem; word-break: break-all; background: var(--surface-2); padding: .1rem .35rem; border-radius: 4px; }
.stack { display: grid; gap: .5rem; justify-items: start; }
.shop { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.shop img { border-radius: 10px; }
.embed iframe { width: 100%; max-width: 100%; border: 0; border-radius: 8px; }

/* --- Fußzeile --- */
.footer { margin-top: 2rem; padding: 2.5rem 0 3rem; background: var(--surface-2); border-top: 1px solid var(--line); font-size: .92rem; }
.footer-inner { display: grid; gap: 1.5rem; }
.footer-title { font: 650 1.1rem/1.2 var(--font-display); margin-bottom: .6rem; }
.pills { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pills a { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--fg); text-decoration: none; font-weight: 550; }
.pills a:hover { border-color: var(--accent); color: var(--accent); }
.footer-meta p { margin: 0 0 .35rem; }

/* --- Sticky-Player (assets/js/player.js) --- */
#global-player-container {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
	padding: .45rem 0 calc(.45rem + env(safe-area-inset-bottom));
	background: color-mix(in srgb, var(--surface) 94%, transparent);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-top: 1px solid var(--line);
	box-shadow: 0 -8px 24px -12px rgb(0 0 0 / .25);
}
.player-inner { display: flex; align-items: center; gap: 1rem; }
.player-info { display: flex; align-items: center; gap: .75rem; width: 32%; min-width: 200px; }
.player-info img { flex: none; width: 44px; height: 44px; border-radius: 50%; }
.player-info div { display: grid; overflow: hidden; font-size: .85rem; line-height: 1.3; }
.player-info strong, .player-info small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.player-info small { color: var(--muted); }
.plyr--audio {
	flex-grow: 1;
	--plyr-color-main: var(--accent);
	--plyr-audio-controls-background: transparent;
	--plyr-audio-control-color: var(--fg);
	--plyr-menu-background: var(--surface);
	--plyr-menu-color: var(--fg);
	--plyr-font-family: var(--font-body);
}
.plyr__menu__container { border: 1px solid var(--line); }
body.player-open { padding-bottom: 5rem; }
html.is-loading, html.is-loading * { cursor: progress; }
@media (max-width: 768px) {
	.player-inner { flex-direction: column; align-items: stretch; gap: .2rem; }
	.player-info { width: 100%; min-width: 0; }
	.plyr__volume input[type="range"] { display: none; }
	body.player-open { padding-bottom: 8rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Hörbuch-Karte */
.book-card { display: grid; grid-template-columns: 180px 1fr; gap: 1.5rem; align-items: center; }
.book-card img { border-radius: 10px; }
@media (max-width: 560px) { .book-card { grid-template-columns: 1fr; } .book-card img { width: 140px; } }
.related > p { margin-top: 1rem; }
.page.wide .wrap { max-width: var(--wrap); }
.embed .embed-note { margin: .75rem 0 0; }
.embed iframe { display: block; height: 102px; }
