/* Klang – Schwarz/Weiß, iPhone-first */
:root {
  --ink: #0a0a0a;
  --muted: #5c5c5c;
  --line: #e6e6e6;
  --line2: #cfcfcf;
  --soft: #f5f5f5;
  --bg: #ffffff;
  --tab: 56px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-head: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Space Grotesk", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}
body.noscroll { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
svg { display: block; flex: none; }

/* Layout */
.view {
  width: min(760px, 100%); margin: 0 auto;
  padding: calc(var(--safe-t) + 20px) 16px calc(var(--tab) + var(--safe-b) + 150px);
  display: flex; flex-direction: column; gap: 28px; min-height: 100vh;
}
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pagehead h1, .h1 { font-family: var(--font-head); font-weight: 700; font-size: 32px; letter-spacing: -0.03em; line-height: 1.1; }
.sub { margin-top: 4px; font-size: 14px; color: var(--muted); }
.sec { display: flex; flex-direction: column; gap: 12px; }
.sec > h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 40px 24px; text-align: center; }
.empty .ico { width: 56px; height: 56px; border-radius: 28px; border: 1.5px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.empty b { font-size: 16px; }
.empty p { font-size: 14px; color: var(--muted); max-width: 320px; }

/* Buttons */
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 1.5px solid var(--line2); background: var(--bg); display: flex; align-items: center; justify-content: center; }
.iconbtn.plain { border: 0; background: transparent; }
.btn { min-height: 44px; padding: 0 20px; border-radius: 22px; border: 1.5px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; }
.btn.ghost { background: var(--bg); color: var(--ink); }
.linkbtn { min-height: 44px; padding: 0 4px; border: 0; background: transparent; font-size: 14px; font-weight: 600; text-decoration: underline; }

/* Cover */
.cover {
  position: relative; flex: none; overflow: hidden; border-radius: calc(var(--sz) * .18);
  width: var(--sz); height: var(--sz);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700;
}
.cover span { font-size: calc(var(--sz) * .46); line-height: 1; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #e9e9e9; }
.cover.c0 { background: #0a0a0a; color: #fff; }
.cover.c1 { background: #e9e9e9; color: #0a0a0a; }
.cover.c2 { background: #fff; color: #0a0a0a; box-shadow: inset 0 0 0 2px #0a0a0a; }
.cover.c3 { background: #3a3a3a; color: #fff; }
.cover.c4 { background: #cfcfcf; color: #0a0a0a; }
.cover.c5 { background: #1f1f1f; color: #fff; }
.cover.fluid { --sz: 100%; width: 100%; height: auto; aspect-ratio: 1; container-type: inline-size; border-radius: 18%; }
.cover.fluid span { font-size: 40px; font-size: 46cqw; }
.cover.big { --sz: min(342px, calc(100vw - 48px), 40vh); border-radius: 20px; }

/* Hinweis / Karten */
.card { display: flex; align-items: flex-start; gap: 14px; padding: 16px; border-radius: 16px; background: var(--soft); }
.card .badge { width: 40px; height: 40px; border-radius: 10px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.card .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.card b { font-size: 15px; }
.card p { font-size: 13px; line-height: 1.45; color: var(--muted); }
.card .x { margin: -8px -8px 0 0; }
.panel { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; }
.panel .prow { display: flex; align-items: center; gap: 14px; padding: 16px; }
.panel .prow + .prow { border-top: 1px solid var(--line); }
.panel .ptext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.panel .ptext b { font-size: 15px; }
.panel .ptext span { font-size: 13px; line-height: 1.4; color: var(--muted); }
.pval { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex: none; text-align: right; }

/* Switch */
.switch { flex: none; width: 52px; height: 44px; padding: 0; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.switch i { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--line2); transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 13px; background: #fff; box-shadow: 0 1px 3px rgba(10,10,10,.3); transition: left .15s; }
.switch[aria-pressed="true"] i { background: var(--ink); }
.switch[aria-pressed="true"] i::after { left: 23px; }

/* Weiterhören */
.hscroll { display: flex; gap: 12px; margin: 0 -16px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hscroll::-webkit-scrollbar { display: none; }
.ccard { flex: 0 0 292px; display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); text-align: left; }
.ccard .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.ccard .s { font-size: 12px; color: var(--muted); }
.ccard .n { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bar { display: block; height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 4px; background: var(--ink); }

/* Raster Abos */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 8px; text-decoration: none; min-width: 0; }
.tile b { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Episodenzeile */
.rows { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: center; gap: 4px; padding: 8px 0 8px 8px; border-radius: 14px; }
.row.cur { background: var(--soft); }
.rowmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; text-align: left; }
.rowtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rowtitle { font-size: 15px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rowmeta { font-size: 12px; color: var(--muted); }
.rowmeta.strong { color: var(--ink); font-weight: 500; }
.dlbtn { flex: none; width: 52px; height: 52px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.dlbtn .o { width: 40px; height: 40px; border: 1.5px solid var(--ink); border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.dlbtn .f { width: 40px; height: 40px; border-radius: 20px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }

/* Suche */
.searchform { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border: 1.5px solid var(--line2); border-radius: 24px; }
.searchform input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.searchform input:focus-visible { outline: none; }
.searchform:focus-within { border-color: var(--ink); }
.hit { display: flex; align-items: center; gap: 14px; padding: 8px; border-radius: 14px; text-decoration: none; }
.hit .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hit b { font-size: 15px; line-height: 1.3; }
.hit span { font-size: 13px; color: var(--muted); }

/* Podcast-Seite */
.showhead { display: flex; gap: 16px; align-items: center; }
.showhead .t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.showhead h1 { font-family: var(--font-head); font-size: 24px; line-height: 1.15; letter-spacing: -0.02em; }
.desc { font-size: 14px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.err { padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.skel { height: 72px; border-radius: 14px; background: var(--soft); }

/* Mini-Player */
.mini {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab) + var(--safe-b) + 8px);
  width: min(736px, calc(100% - 24px));
  display: flex; align-items: center; gap: 4px; padding: 8px; border-radius: 16px;
  background: var(--ink); color: #fff; overflow: hidden; z-index: 20;
}
.mini .mm { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: transparent; color: #fff; text-align: left; }
.mini .mm .cover { background: #fff; color: var(--ink); box-shadow: none; }
.mini .mt { flex: 1; min-width: 0; }
.mini .mt b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mt span { display: block; font-size: 12px; color: #cfcfcf; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .mp { flex: none; width: 48px; height: 48px; border: 0; border-radius: 24px; background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; }
.mini .mbar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #3a3a3a; }
.mini .mbar i { display: block; height: 3px; background: #fff; width: 0; }

/* Tab-Leiste */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--bg); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabs .in { width: min(760px, 100%); margin: 0 auto; height: var(--tab); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-decoration: none; font-size: 11px; font-weight: 500; color: var(--muted); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Vollbild-Player */
.player { position: fixed; inset: 0; z-index: 50; background: var(--bg); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.player.enter { animation: up .22s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .player.enter { animation: none; } }
.pl { width: min(480px, 100%); margin: 0 auto; padding: calc(var(--safe-t) + 12px) 24px calc(var(--safe-b) + 24px); display: flex; flex-direction: column; align-items: stretch; gap: 20px; min-height: 100%; }
.pl .head { display: flex; align-items: center; justify-content: space-between; }
.pl .head .iconbtn { border: 0; margin-left: -10px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pl .coverwrap { display: flex; justify-content: center; }
.pl h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.01em; }
.pl .by { margin-top: 4px; font-size: 15px; color: var(--muted); }
.scrub { display: flex; flex-direction: column; gap: 6px; }
.track { position: relative; height: 24px; }
.track .bg { position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--line); }
.track .fill { position: absolute; left: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--ink); width: 0; }
.track .tick { position: absolute; top: 7px; width: 2px; height: 10px; background: #fff; }
.track .knob { position: absolute; top: 4px; width: 16px; height: 16px; margin-left: -8px; border-radius: 8px; background: var(--ink); left: 0; }
.track input { position: absolute; left: 0; top: 0; width: 100%; height: 24px; margin: 0; opacity: 0; cursor: pointer; }
.times { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ctrls { display: flex; align-items: center; justify-content: center; gap: 28px; }
.ctrls .sk { width: 52px; height: 52px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; }
.ctrls .pp { width: 72px; height: 72px; border-radius: 36px; border: 0; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; }
.acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.act { min-height: 60px; padding: 8px 4px; border: 1.5px solid var(--line2); border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; text-align: center; line-height: 1.2; }
.act.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.act:disabled { color: var(--muted); border-style: dashed; cursor: default; }

/* Bottom-Sheet */
.backdrop { position: fixed; inset: 0; z-index: 60; border: 0; padding: 0; background: rgba(10,10,10,.45); }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  width: min(480px, 100%); margin: 0 auto;
  max-height: 80vh; overflow-y: auto;
  padding: 12px 20px calc(var(--safe-b) + 24px); border-radius: 24px 24px 0 0; background: var(--bg);
  display: flex; flex-direction: column; gap: 12px;
}
.sheet .grab { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--line2); }
.sheet .sh { display: flex; align-items: center; justify-content: space-between; }
.sheet h3 { font-size: 18px; font-weight: 600; }
.sheet .opts { display: flex; flex-direction: column; gap: 4px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 52px; padding: 0 14px; border: 0; border-radius: 12px; background: var(--soft); color: var(--ink); font-size: 16px; text-align: left; }
.opt[aria-pressed="true"], .opt.cur { background: var(--ink); color: #fff; font-weight: 600; }
.opt:disabled { color: var(--muted); }
.opt .tm { flex: none; width: 48px; font-size: 13px; font-variant-numeric: tabular-nums; opacity: .7; }
.opt .lb { flex: 1; }

/* Toast */
.toast {
  position: fixed; left: 50%; top: calc(var(--safe-t) + 12px); transform: translateX(-50%) translateY(-10px);
  max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 14px; text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 80;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

.offline { font-size: 12px; font-weight: 600; padding: 6px 10px; border: 1.5px solid var(--ink); border-radius: 12px; }
