/* Neugier – mobile first. Leitwerte: Spaß, Wissensgewinn, Einfachheit. */

:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-2: #f0ebe2;
  --ink: #1d1b19;
  --ink-2: #3b3833;
  --muted: #77716a;
  --line: #e6dfd3;
  --accent: #ff5a3c;
  --accent-ink: #ffffff;
  --explore: #7b5cff;
  --good: #1f9d6b;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(40, 30, 20, .06), 0 8px 24px -12px rgba(40, 30, 20, .18);
  --shadow-lift: 0 2px 4px rgba(40, 30, 20, .08), 0 18px 40px -16px rgba(40, 30, 20, .28);
  --serif: "Iowan Old Style", "Charter", "Source Serif Pro", "Georgia", ui-serif, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-h: 64px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141311;
    --surface: #1e1c1a;
    --surface-2: #282522;
    --ink: #f4efe7;
    --ink-2: #d9d2c7;
    --muted: #a39b90;
    --line: #2f2c28;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lift: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 40px -16px rgba(0, 0, 0, .8);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
}
body.is-reader { padding-bottom: 120px; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.dot { color: var(--muted); padding: 0 .1em; }
code { background: var(--surface-2); padding: .1em .35em; border-radius: 6px; font-size: .9em; }

/* ------------------------------------------------------------ Layout */
.page { padding: 8px 16px 24px; max-width: 1240px; margin: 0 auto; }
.page--narrow { max-width: 720px; }
.page-title { font-family: var(--serif); font-size: 2rem; line-height: 1.15; margin: 8px 0 16px; letter-spacing: -.01em; }
.page-title--tight { margin: 0; }
.lead { color: var(--ink-2); margin-top: -6px; }
.back-link { display: inline-block; color: var(--muted); text-decoration: none; margin: 8px 0 0; font-weight: 600; }

/* ------------------------------------------------------------ Top bar & Navigation */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.brand-mark svg { width: 30px; height: 30px; stroke: none; display: block; }
.topnav { display: none; }

.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.bottomnav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--muted); font-size: .72rem; font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.bottomnav a[aria-current="page"] { color: var(--ink); }
.bottomnav a[aria-current="page"] svg { stroke: var(--accent); transform: translateY(-1px); }
.is-explore .bottomnav a[aria-current="page"] svg { stroke: var(--explore); }
.bottomnav svg { transition: transform .2s; }

@media (min-width: 900px) {
  body { padding-bottom: 32px; }
  .bottomnav { display: none; }
  .topbar { padding: 14px 32px; }
  .topnav { display: flex; gap: 4px; margin-left: 24px; }
  .topnav a { text-decoration: none; padding: 8px 14px; border-radius: 999px; font-weight: 600; color: var(--muted); }
  .topnav a:hover { color: var(--ink); background: var(--surface-2); }
  .topnav a[aria-current="page"] { color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
  .page { padding: 8px 32px 40px; }
}

/* ------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 11px 20px;
  background: var(--ink); color: var(--bg); font-weight: 700; text-decoration: none;
  transition: transform .12s ease, box-shadow .2s, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--big { padding: 14px 26px; font-size: 1.05rem; }
.btn--small { padding: 7px 14px; font-size: .88rem; }
.btn--block { width: 100%; }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn--explore { background: var(--explore); color: #fff; }
.icon-btn {
  display: inline-grid; place-items: center; width: 42px; height: 42px;
  border-radius: 50%; border: 0; background: transparent; color: var(--ink); text-decoration: none;
}
.icon-btn:hover { background: var(--surface-2); }

/* ------------------------------------------------------------ Begrüßung */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; }
.hello-kicker { margin: 0; white-space: nowrap; color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.hello-title { margin: 2px 0 0; font-family: var(--serif); font-size: 1.85rem; line-height: 1.1; letter-spacing: -.015em; }
.hello-stats { display: flex; gap: 6px; text-decoration: none; flex-shrink: 0; }
.pill { background: var(--surface); box-shadow: var(--shadow); padding: 6px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }

/* ------------------------------------------------------------ Karten */
.stream { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .stream { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1080px) { .stream { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.card {
  --tint: hsl(var(--hue) 70% 55%);
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s, opacity .35s;
  animation: card-in .45s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
@media (hover: hover) { .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); } }
.card.is-dismissed { opacity: .35; transform: scale(.98); }
.card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; flex: 1; -webkit-tap-highlight-color: transparent; }
.card-link:active { opacity: .85; }

.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.card-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
@media (hover: hover) { .card:hover .card-img { transform: scale(1.03); } }

/* Karten ohne Bild: Farbverlauf aus der Quelle + Themen-Emoji */
.card-art {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(circle at 18% 22%, hsl(calc(var(--hue) + 30) 90% 70% / .55) 0 18%, transparent 19%),
    radial-gradient(circle at 85% 80%, hsl(calc(var(--hue) - 25) 85% 60% / .45) 0 24%, transparent 25%),
    radial-gradient(rgba(255, 255, 255, .18) 1.2px, transparent 1.3px) 0 0 / 14px 14px,
    linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%));
}
.card-art-emoji { font-size: 3.4rem; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25)); transition: transform .4s cubic-bezier(.2, .8, .2, 1.4); }
@media (hover: hover) { .card:hover .card-art-emoji { transform: rotate(-8deg) scale(1.08); } }
.card-art-initial {
  position: absolute; right: 14px; bottom: 6px; font-family: var(--serif); font-weight: 700;
  font-size: 4.2rem; line-height: 1; color: rgba(255, 255, 255, .22);
}
.card--noimg .card-media { aspect-ratio: 16 / 7; }
.card:not(.card--noimg) .card-art { opacity: 0; }

.card-play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); backdrop-filter: blur(6px); color: #fff;
}
.card-play svg { fill: #fff; stroke: none; width: 26px; height: 26px; margin-left: 3px; }

.card-body { padding: 14px 16px 6px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card-source { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; min-width: 0; }
.card-source-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.favicon { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; background: var(--surface-2); }
.card-title { margin: 0; font-family: var(--serif); font-size: 1.28rem; line-height: 1.22; letter-spacing: -.01em; font-weight: 700; text-wrap: pretty; }
.card-excerpt {
  margin: 0; color: var(--ink-2); font-size: .95rem; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card--noimg .card-excerpt { -webkit-line-clamp: 4; }

.card-foot { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px 16px; }
.reason {
  font-size: .75rem; font-weight: 700; color: hsl(var(--hue) 55% 38%);
  background: hsl(var(--hue) 70% 55% / .12); padding: 4px 9px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 55%;
}
@media (prefers-color-scheme: dark) { .reason { color: hsl(var(--hue) 70% 72%); } }
.reason--explore { color: var(--explore); background: color-mix(in srgb, var(--explore) 13%, transparent); }
@media (prefers-color-scheme: dark) { .reason--explore { color: #b3a2ff; } }
.readtime { font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.card-actions { margin-left: auto; display: flex; gap: 2px; }
.vote {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s;
}
.vote svg { width: 20px; height: 20px; }
.vote:hover { background: var(--surface-2); color: var(--ink); }
.vote--up.is-on { color: var(--accent); }
.vote--up.is-on svg { fill: currentColor; }
.vote--down.is-on { color: var(--ink); }
.vote--down.is-on svg { fill: currentColor; }
.vote.pop svg { animation: pop .45s cubic-bezier(.2, .8, .2, 1.6); }
@keyframes pop { 30% { transform: scale(1.45) rotate(-12deg); } 100% { transform: scale(1); } }

.card--explore { box-shadow: var(--shadow), inset 0 0 0 2px color-mix(in srgb, var(--explore) 45%, transparent); }

/* Hero-Karte (erste Karte) auf großen Screens */
@media (min-width: 640px) {
  .card--hero { grid-column: 1 / -1; display: grid; grid-template-columns: 1.35fr 1fr; }
  .card--hero .card-link { display: contents; }
  .card--hero .card-media { aspect-ratio: auto; min-height: 320px; grid-row: 1 / span 2; }
  .card--hero .card-body { padding: 26px 26px 8px; justify-content: center; }
  .card--hero .card-title { font-size: 2rem; }
  .card--hero .card-excerpt { -webkit-line-clamp: 5; font-size: 1.02rem; }
  .card--hero .card-foot { grid-column: 2; padding: 8px 18px 18px 26px; align-self: end; }
}

/* Konfetti-Partikel beim Like */
.burst { position: fixed; pointer-events: none; z-index: 100; font-size: 18px; animation: burst .8s ease-out forwards; }
@keyframes burst { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* ------------------------------------------------------------ Infinite Scroll & Leerzustände */
.stream-sentinel { display: grid; place-items: center; padding: 28px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.stream-end, .empty { text-align: center; padding: 40px 16px; max-width: 460px; margin: 0 auto; }
.stream-end h3, .empty h3 { font-family: var(--serif); font-size: 1.5rem; margin: 8px 0 4px; }
.stream-end p, .empty p { color: var(--muted); margin: 0 0 18px; }
.end-emoji { font-size: 3rem; animation: wobble 2.4s ease-in-out infinite; display: inline-block; }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-10deg) scale(1.08); } }

/* ------------------------------------------------------------ Über den Tellerrand */
.explore-hero {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  margin: 4px 0 18px; padding: 18px; border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .22) 0 14%, transparent 15%),
    linear-gradient(135deg, #7b5cff, #c35cff 60%, #ff7a9c);
  color: #fff; box-shadow: var(--shadow);
}
.explore-hero h1 { margin: 0; font-family: var(--serif); font-size: 1.6rem; line-height: 1.1; }
.explore-hero p { margin: 4px 0 0; opacity: .92; font-size: .95rem; }
.explore-hero .btn { grid-column: 1 / -1; justify-self: start; background: #fff; color: #5b3df0; margin-top: 8px; }
.explore-dice { font-size: 2.6rem; display: inline-block; }
.explore-dice.roll { animation: roll .7s cubic-bezier(.2, .8, .2, 1); }
@keyframes roll { to { transform: rotate(720deg) scale(1.1); } }
@media (min-width: 640px) {
  .explore-hero { grid-template-columns: auto 1fr auto; padding: 22px 26px; }
  .explore-hero .btn { grid-column: auto; margin: 0; }
}

/* ------------------------------------------------------------ Toasts */
.toasts { position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); translate: -50% 0; z-index: 200; display: grid; gap: 8px; width: min(92vw, 460px); }
.toast {
  background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: .92rem;
  box-shadow: var(--shadow-lift); animation: toast-in .35s cubic-bezier(.2, .8, .2, 1.2), toast-out .4s ease 4.6s forwards;
}
.toast--error { background: #c4372a; color: #fff; }
.toast--warning { background: #b8730d; color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); visibility: hidden; } }

/* ------------------------------------------------------------ Leseansicht */
.reader-bar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 8px 6px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  transition: transform .3s;
}
.reader-bar.is-hidden { transform: translateY(-100%); }
.reader-bar-source { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 700; font-size: .9rem; }
.reader-bar-source span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--accent); border-radius: 0 3px 3px 0; transition: width .15s linear; }

.reader { max-width: 760px; margin: 0 auto; }
.story-hero { margin: 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); }
.story-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-hero.is-broken { display: none; }
.story-art {
  aspect-ratio: 16 / 6; display: grid; place-items: center; font-size: 4rem;
  background:
    radial-gradient(rgba(255, 255, 255, .18) 1.2px, transparent 1.3px) 0 0 / 14px 14px,
    linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%));
}
.story-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.story-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (min-width: 800px) {
  .story-hero, .story-art, .story-video { border-radius: var(--radius); margin: 12px 16px 0; overflow: hidden; }
}
.story-head { padding: 20px 20px 4px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tag {
  font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: hsl(var(--hue) 70% 55% / .14); color: hsl(var(--hue) 55% 35%);
}
@media (prefers-color-scheme: dark) { .tag { color: hsl(var(--hue) 70% 75%); } }
.tag--small { font-size: .72rem; padding: 3px 8px; }
.tag--empty { --hue: 30; opacity: .7; }
.story-title { font-family: var(--serif); font-size: clamp(1.75rem, 6vw, 2.6rem); line-height: 1.12; letter-spacing: -.02em; margin: 0 0 10px; text-wrap: balance; }
.story-meta { color: var(--muted); font-size: .9rem; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 0 4px; }
.story-subscribe {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  background: color-mix(in srgb, var(--explore) 10%, var(--surface)); padding: 10px 12px 10px 14px;
  border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .9rem;
}
.listen-btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; padding: 10px 18px 10px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: var(--shadow); font-weight: 700;
  transition: transform .15s;
}
.listen-btn:active { transform: scale(.97); }
.listen-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: hsl(var(--hue) 70% 55% / .16); }
.listen-hint { font-weight: 500; color: var(--muted); font-size: .8rem; }

.prose { padding: 8px 20px 0; font-family: var(--serif); font-size: 1.16rem; line-height: 1.68; color: var(--ink); }
.prose > :first-child { margin-top: 12px; }
.prose p { margin: 0 0 1.05em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--sans); line-height: 1.25; margin: 1.6em 0 .5em; letter-spacing: -.01em; }
.prose h2 { font-size: 1.35rem; } .prose h3 { font-size: 1.15rem; }
.prose a { color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 2px; }
.prose img { height: auto; border-radius: var(--radius-sm); display: block; margin: 1.2em auto; }
.prose figure { margin: 1.4em 0; }
.prose figcaption { font-family: var(--sans); font-size: .82rem; color: var(--muted); margin-top: -.6em; }
.prose blockquote { margin: 1.4em 0; padding: .2em 0 .2em 1em; border-left: 4px solid hsl(var(--hue) 70% 55%); color: var(--ink-2); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.05em; }
.prose li { margin: .3em 0; }
.prose pre { background: var(--surface-2); padding: 14px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .85rem; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .9rem; display: block; overflow-x: auto; }
.prose td, .prose th { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; }
.prose .tts-active { background: hsl(var(--hue) 80% 60% / .18); border-radius: 6px; box-shadow: 0 0 0 4px hsl(var(--hue) 80% 60% / .18); }

.thin-note { margin: 8px 20px; padding: 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.thin-note p { margin: 0 0 12px; color: var(--muted); }

.story-feedback { margin: 30px 20px 10px; padding: 22px 18px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.story-feedback > p { margin: 0 0 12px; font-weight: 700; font-size: 1.05rem; }
.feedback-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feedback {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; border-radius: 16px;
  border: 0; background: var(--surface-2); font-weight: 700; transition: transform .15s, background .2s;
}
.feedback:active { transform: scale(.96); }
.feedback-emoji { font-size: 1.9rem; transition: transform .3s cubic-bezier(.2, .8, .2, 1.6); }
.feedback.is-on { background: hsl(var(--hue) 70% 55% / .2); box-shadow: inset 0 0 0 2px hsl(var(--hue) 70% 50%); }
.feedback.is-on .feedback-emoji { transform: scale(1.2); }
.story-original { display: inline-block; margin-top: 16px; color: var(--muted); font-weight: 600; font-size: .9rem; }

/* Player */
.player {
  position: fixed; left: 10px; right: 10px; bottom: calc(10px + var(--safe-bottom)); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
  background: var(--ink); color: var(--bg); border-radius: 22px; box-shadow: var(--shadow-lift);
  max-width: 640px; margin: 0 auto; animation: toast-in .3s ease;
}
.player[hidden] { display: none; }
.player-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.player-btn svg { fill: currentColor; stroke: none; }
.player .i-play { display: none; }
.player.is-paused .i-play { display: block; }
.player.is-paused .i-pause { display: none; }
.player-close { background: transparent; color: var(--bg); }
.player-close svg { fill: none; stroke: currentColor; }
.player-info { flex: 1; min-width: 0; }
.player-title { font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-status { font-size: .76rem; opacity: .7; }
.player-track { height: 4px; background: rgba(255, 255, 255, .2); border-radius: 4px; margin-top: 6px; overflow: hidden; }
@media (prefers-color-scheme: dark) { .player-track { background: rgba(0, 0, 0, .15); } }
.player-fill { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.player-speed { border: 0; background: rgba(255, 255, 255, .14); color: inherit; border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: .85rem; }

/* ------------------------------------------------------------ Formulare */
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; font-weight: 600; font-size: .92rem; }
.field--check { flex-direction: row; align-items: center; font-weight: 500; }
.field small { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=url], .field input:not([type=checkbox]):not([type=range]) {
  font: inherit; font-weight: 400; width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
input[type=range] { width: 100%; accent-color: var(--explore); }
.form-error { color: #c4372a; font-weight: 600; margin: 6px 0; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.hint { color: var(--muted); font-size: .86rem; margin: 8px 2px 0; }
.stack-form .btn--block { margin-top: 10px; }
.key-state { font-size: .86rem; color: var(--muted); margin: 4px 0; }
.test-result { font-size: .88rem; font-weight: 600; min-height: 1.2em; margin: 10px 0 0; }

.add-feed { background: var(--surface); padding: 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.add-feed-row { display: flex; gap: 8px; }
.add-feed-row input { flex: 1; min-width: 0; }
.spinner--btn { display: none; width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255, 255, 255, .3); border-top-color: #fff; }
.is-busy .spinner--btn { display: inline-block; }
.is-busy .btn-label { display: none; }

/* Chips (Themenauswahl) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { position: relative; -webkit-tap-highlight-color: transparent; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 10px 15px; border-radius: 999px; font-weight: 600; font-size: .95rem;
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; user-select: none;
  transition: transform .15s cubic-bezier(.2, .8, .2, 1.6), background .2s, box-shadow .2s, color .2s;
}
.chip:active span { transform: scale(.94); }
.chip input:checked + span {
  background: hsl(var(--hue) 60% 40%); color: #fff; box-shadow: 0 6px 16px -8px hsl(var(--hue) 70% 40%);
  transform: scale(1.03);
}
.chip input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }

/* ------------------------------------------------------------ Onboarding */
.onboarding { padding-bottom: 120px; }
.steps { display: flex; gap: 6px; margin: 10px 0 18px; }
.steps span { height: 5px; flex: 1; border-radius: 5px; background: var(--line); }
.steps span.is-on { background: var(--accent); }
.onb-title { font-family: var(--serif); font-size: 2.1rem; line-height: 1.1; letter-spacing: -.02em; margin: 0 0 8px; }
.onb-lead { color: var(--ink-2); margin: 0 0 8px; font-size: 1.02rem; }
.sticky-actions {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; justify-content: flex-end;
  padding: 12px 16px calc(12px + var(--safe-bottom));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
}
.onb-count { margin-right: auto; color: var(--muted); font-weight: 600; font-size: .9rem; }
.feed-group h2 { font-size: 1rem; margin: 22px 0 8px; }
.feed-options { display: grid; gap: 8px; }
@media (min-width: 640px) { .feed-options { grid-template-columns: 1fr 1fr; } }
.feed-option {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; transition: box-shadow .2s, transform .15s;
}
.feed-option:active { transform: scale(.99); }
.feed-option input { position: absolute; opacity: 0; pointer-events: none; }
.feed-option-icon {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px; display: grid; place-items: center; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%));
}
.feed-option-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.feed-option-text small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-option-check {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .85rem;
  box-shadow: inset 0 0 0 1.5px var(--line); color: transparent; transition: all .2s cubic-bezier(.2, .8, .2, 1.6);
}
.feed-option:has(input:checked) { box-shadow: inset 0 0 0 2px var(--accent); }
.feed-option:has(input:checked) .feed-option-check { background: var(--accent); color: #fff; box-shadow: none; transform: scale(1.1); }
.feed-option--static { cursor: default; }
.subscribed-badge { color: var(--good); font-weight: 700; font-size: .85rem; white-space: nowrap; }

/* ------------------------------------------------------------ Feeds-Liste */
.catalog-link {
  display: flex; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 14px 16px; border-radius: var(--radius);
  text-decoration: none; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  box-shadow: var(--shadow); font-size: 1.4rem;
}
.catalog-link span:nth-child(2) { flex: 1; display: flex; flex-direction: column; font-size: 1rem; }
.catalog-link small { color: var(--muted); font-size: .85rem; }
.sub-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.sub { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); transition: transform .15s, box-shadow .2s; }
@media (hover: hover) { .sub:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); } }
.sub-link { display: flex; align-items: center; gap: 14px; padding: 14px 12px 14px 14px; text-decoration: none; color: inherit; -webkit-tap-highlight-color: transparent; }
.sub-link:active { opacity: .85; }
.sub-icon {
  position: relative; width: 46px; height: 46px; flex-shrink: 0; border-radius: 14px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%)); color: #fff; font-weight: 800; font-size: 1.1rem;
}
.sub-icon::before { content: attr(data-initial); }
.sub-icon img { position: absolute; inset: 9px; width: 28px; height: 28px; border-radius: 7px; background: #fff; }
.sub-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sub-title { font-weight: 750; font-size: 1.02rem; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.sub-meta .dot { padding: 0; }
.sub-flag { font-size: .7rem; font-weight: 750; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.sub-flag--more { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--good); }
.sub-flag--off { background: var(--ink); color: var(--bg); }
.sub-flag--error { background: color-mix(in srgb, #c4372a 12%, transparent); color: #c4372a; }
.sub-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 3px; align-items: center; }
.sub-chevron { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.ai-badge { font-size: .62rem; font-weight: 800; padding: 2px 6px; border-radius: 6px; background: var(--ink); color: var(--bg); letter-spacing: .04em; }
.empty-small { color: var(--muted); padding: 20px; text-align: center; }
.sample { background: var(--surface); padding: 12px 16px; border-radius: var(--radius-sm); box-shadow: var(--shadow); font-size: .9rem; }
.sample-label { margin: 0 0 4px; font-weight: 700; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.sample ul { margin: 0; padding-left: 1.1em; }

/* ------------------------------------------------------------ Ich & Einstellungen */
.me-head { display: flex; align-items: center; gap: 14px; margin: 10px 0 18px; }
.avatar {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #ff7a45, #ff3d6e);
}
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--surface); border-radius: 18px; padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.stat-num { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat--fire { background: linear-gradient(135deg, #ffefe2, #ffe1e6); }
@media (prefers-color-scheme: dark) { .stat--fire { background: linear-gradient(135deg, #3a2419, #3a1d26); } }
.card-section { background: var(--surface); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin: 16px 0; scroll-margin-top: 80px; }
.card-section h2 { margin: 0 0 6px; font-size: 1.12rem; }
.topic-bars { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.topic-bars li { display: grid; grid-template-columns: minmax(150px, 48%) 1fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.topic-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topic-bar { height: 10px; border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.topic-bar span { display: block; height: 100%; width: var(--share); background: hsl(var(--hue) 72% 55%); border-radius: 10px; animation: grow .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes grow { from { width: 0; } }
.topic-min { color: var(--muted); font-weight: 600; font-size: .82rem; }
.new-badge { font-style: normal; font-size: .66rem; font-weight: 800; background: var(--explore); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.kudos { background: color-mix(in srgb, var(--explore) 10%, transparent); padding: 10px 12px; border-radius: 12px; font-weight: 600; font-size: .9rem; margin: 14px 0 0; }
.menu-list { display: grid; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; margin: 16px 0; }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px; text-decoration: none; font-weight: 600;
  border: 0; background: transparent; width: 100%; text-align: left; border-bottom: 1px solid var(--line);
}
.menu-list form:last-child button, .menu-list > a:last-child { border-bottom: 0; }
.menu-list a::after { content: "›"; margin-left: auto; color: var(--muted); font-size: 1.3rem; }
.presets { list-style: none; padding: 0; margin: 10px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.preset { border: 0; background: var(--surface-2); padding: 6px 12px; border-radius: 999px; font-weight: 600; font-size: .85rem; }
.preset:hover { background: var(--line); }

/* ------------------------------------------------------------ Auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
body:has(.auth) { padding-bottom: 0; }
.auth-card { width: min(100%, 420px); background: var(--surface); padding: 28px 24px; border-radius: 26px; box-shadow: var(--shadow-lift); }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; margin-bottom: 14px; }
.auth-brand svg { width: 36px; height: 36px; stroke: none; }
.auth-card h1 { font-family: var(--serif); font-size: 1.8rem; line-height: 1.15; margin: 0 0 4px; }
.auth-links { text-align: center; color: var(--muted); font-size: .9rem; margin: 18px 0 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ============================================================ Erweiterungen: Suche, Listen, Podcast, Transparenz, Lesezeichen */

/* Topbar-Aktionen (Suche, Später lesen) */
.topbar-actions { margin-left: auto; display: flex; gap: 2px; }
.topbar-actions .icon-btn[aria-current="page"] { background: var(--surface); box-shadow: var(--shadow); }
.topbar-actions .icon-btn[aria-current="page"] svg { stroke: var(--accent); }
.hello-why { display: inline-block; margin-top: 4px; font-size: .82rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.hello-why:hover { color: var(--ink); }
.end-link { margin-top: 14px !important; font-size: .9rem; }

/* Lesezeichen-Knopf */
.save-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--muted);
  display: grid; place-items: center; -webkit-tap-highlight-color: transparent; transition: background .2s, color .2s; flex-shrink: 0;
}
.save-btn svg { width: 20px; height: 20px; }
.save-btn:hover { background: var(--surface-2); color: var(--ink); }
.save-btn.is-on { color: var(--explore); }
.save-btn.is-on svg { fill: currentColor; }
.save-btn.pop svg { animation: pop .45s cubic-bezier(.2, .8, .2, 1.6); }
.card-badge {
  position: absolute; left: 10px; top: 10px; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 800;
  background: rgba(0, 0, 0, .6); color: #fff; backdrop-filter: blur(6px);
}

/* Kompakte Artikellisten (Feed-Detail, Suche, Später lesen) */
.rows { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 4px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding-right: 4px; transition: opacity .3s, transform .3s; }
.row.is-leaving { opacity: 0; transform: translateX(30px); }
.row-link { flex: 1; min-width: 0; display: flex; gap: 12px; padding: 10px; text-decoration: none; color: inherit; }
.row-thumb {
  position: relative; width: 76px; height: 76px; flex-shrink: 0; border-radius: 12px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%));
}
.row-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.row-thumb-fallback { color: #fff; font-weight: 800; font-size: 1.4rem; font-family: var(--serif); }
.row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.row-meta { font-size: .76rem; color: var(--muted); font-weight: 600; display: flex; flex-wrap: wrap; gap: 0 4px; }
.row-source { color: var(--ink-2); max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-title { font-family: var(--serif); font-weight: 700; font-size: 1.04rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.row--read .row-title { color: var(--muted); }
.row-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.row-badges:empty { display: none; }
.badge { font-size: .7rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge--read { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.rows-more { list-style: none; display: grid; place-items: center; padding: 10px; }

/* Feed-Detail */
.source-head { display: flex; gap: 14px; align-items: center; margin: 12px 0 8px; }
.source-icon {
  position: relative; width: 68px; height: 68px; flex-shrink: 0; border-radius: 18px; overflow: hidden; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(var(--hue) 72% 56%), hsl(calc(var(--hue) + 40) 68% 42%)); color: #fff; font-size: 1.8rem; font-weight: 800; box-shadow: var(--shadow);
}
.source-icon::before { content: attr(data-initial); }
.source-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.source-info { min-width: 0; }
.source-info .muted { margin: 2px 0; font-size: .88rem; }
.source-site { font-weight: 700; color: var(--accent); text-decoration: none; font-size: .9rem; }
.source-desc { color: var(--ink-2); margin: 6px 0 10px; }
.source-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 10px 0; }
.tag-edit { font-size: .8rem; font-weight: 700; color: var(--muted); margin-left: 4px; }
.source-weight { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--surface); padding: 10px 12px; border-radius: 16px; box-shadow: var(--shadow); margin: 12px 0; }
.source-weight-label { font-weight: 700; font-size: .9rem; }

/* Segmentierte Gewichtung */
.level { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.level-opt { position: relative; }
.level-opt input { position: absolute; opacity: 0; pointer-events: none; }
.level-opt span { display: block; padding: 6px 11px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; user-select: none; }
.level-opt input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.level-opt--2n input:checked + span { background: #5c5750; color: #fff; }
.level-opt--1n input:checked + span { background: color-mix(in srgb, #b8730d 18%, var(--surface)); color: #9a5f08; }
.level-opt--1 input:checked + span { background: var(--good); color: #fff; }
.level-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.control-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.control-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.control-list li:last-child { border-bottom: 0; }
.control-name { font-weight: 600; text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* Suche */
.search { margin: 6px 0 4px; }
.search-box {
  display: flex; align-items: center; gap: 10px; background: var(--surface); border-radius: 16px; padding: 4px 6px 4px 14px;
  box-shadow: var(--shadow); border: 1.5px solid transparent;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box svg { color: var(--muted); flex-shrink: 0; }
.search-box input { border: 0 !important; box-shadow: none !important; padding: 12px 4px !important; background: transparent !important; font-size: 1.05rem; }
.filters { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  position: relative; display: flex; flex-direction: column; flex-shrink: 0; background: var(--surface); border-radius: 14px;
  padding: 6px 30px 6px 12px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.filter::after { content: "▾"; position: absolute; right: 11px; top: 50%; translate: 0 -50%; color: var(--muted); font-size: .8rem; pointer-events: none; }
.filter span { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.filter select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font: inherit; font-weight: 700; font-size: .9rem; color: var(--ink); padding: 0; cursor: pointer; }
.filter select:focus { outline: none; }
.filter.is-set { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.search-summary { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-weight: 600; font-size: .88rem; margin: 6px 2px 0; }
.search-summary a { color: var(--accent); }
.section-title { font-size: 1rem; margin: 22px 0 10px; }
.quick { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.quick-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; font-size: .92rem; line-height: 1.25; }
.quick-item span { font-size: 1.4rem; }

/* Leseansicht: Original-Link & Aktionen */
.story-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 4px; }
.original-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px 10px 12px; border-radius: 999px; text-decoration: none; font-weight: 700;
  background: hsl(var(--hue) 70% 55% / .14); color: hsl(var(--hue) 55% 32%); transition: transform .15s;
}
@media (prefers-color-scheme: dark) { .original-btn { color: hsl(var(--hue) 70% 76%); } }
.original-btn:active { transform: scale(.97); }
.original-btn .favicon { width: 18px; height: 18px; }
.reader-bar-source { text-decoration: none; }
.reader-bar .save-btn { width: 42px; height: 42px; color: var(--ink); }
.reader-bar .save-btn.is-on { color: var(--explore); }

/* Podcast */
.story-art--podcast { aspect-ratio: auto; padding: 26px 0; }
.story-art--podcast img { width: min(56%, 260px); aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .55); }
.podcast { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 16px 16px 12px; margin: 4px 0 14px; box-shadow: var(--shadow-lift); }
.podcast-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.podcast-play { width: 62px; height: 62px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; transition: transform .15s; }
.podcast-play:active { transform: scale(.94); }
.podcast-play svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.podcast .i-pause, .podcast.is-playing .i-play { display: none; }
.podcast.is-playing .i-pause { display: block; }
.podcast-skip { border: 0; background: transparent; color: inherit; font-weight: 800; font-size: .9rem; padding: 8px; opacity: .85; }
.podcast-speed { border: 0; background: rgba(255, 255, 255, .14); color: inherit; border-radius: 999px; padding: 6px 11px; font-weight: 800; font-size: .85rem; min-width: 46px; }
@media (prefers-color-scheme: dark) { .podcast-speed { background: rgba(0, 0, 0, .12); } }
.podcast { position: relative; }
.podcast-seek { width: 100%; margin: 12px 0 2px; accent-color: var(--accent); }
.podcast-time { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 600; opacity: .75; font-variant-numeric: tabular-nums; }

/* Transparenz */
.mini-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 4px; }
.signal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin: 10px 0; }
.signal-grid div { background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; }
.signal-grid strong { font-size: 1.4rem; }
.signal-grid span { font-size: .78rem; color: var(--muted); font-weight: 600; }
.mix { margin: 12px 0; }
.mix-bar { height: 12px; border-radius: 12px; background: color-mix(in srgb, var(--explore) 25%, var(--surface-2)); overflow: hidden; }
.mix-bar span { display: block; height: 100%; background: var(--accent); border-radius: 12px; }
.mix p { font-size: .9rem; margin: 8px 0 0; }
.src-badge { font-style: normal; font-size: .66rem; font-weight: 800; background: var(--accent); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }
.rules { padding-left: 1.2em; margin: 8px 0 0; display: grid; gap: 8px; font-size: .92rem; }
.rules li::marker { font-weight: 800; color: var(--accent); }

/* Gestapelte Balken (lange Beschriftungen) */
.topic-bars--stack li { grid-template-columns: 1fr auto; row-gap: 4px; }
.topic-bars--stack .topic-name { grid-column: 1 / -1; white-space: normal; }
.topic-bars--stack .topic-bar { grid-column: 1; }
.podcast-row .podcast-speed { margin-left: 4px; }
.src-badge--more { background: var(--good); }
@media (max-width: 520px) { .control-list li { flex-direction: column; align-items: flex-start; gap: 6px; } }

/* ============================================================ Formular-Elemente (modern, einheitlich) */
/* Schieberegler */
input[type=range] {
  --val: 50%; --range-fill: var(--explore); --range-track: var(--surface-2);
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; margin: 4px 0;
}
input[type=range]:focus { outline: none; box-shadow: none; }
input[type=range]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 8px;
  background: linear-gradient(to right, var(--range-fill) 0 var(--val), var(--range-track) var(--val) 100%);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25), inset 0 0 0 6px var(--range-fill); transition: transform .15s;
}
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--range-fill) 30%, transparent), inset 0 0 0 6px var(--range-fill); }
input[type=range]::-moz-range-track { height: 8px; border-radius: 8px; background: var(--range-track); }
input[type=range]::-moz-range-progress { height: 8px; border-radius: 8px; background: var(--range-fill); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25), inset 0 0 0 6px var(--range-fill); }
.podcast-seek { --range-fill: var(--accent); --range-track: rgba(255, 255, 255, .22); --val: 0%; }
@media (prefers-color-scheme: dark) { .podcast-seek { --range-track: rgba(0, 0, 0, .18); } }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.range-val { background: color-mix(in srgb, var(--explore) 13%, transparent); color: var(--explore); font-weight: 800; padding: 3px 10px; border-radius: 999px; font-size: .85rem; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .range-val { color: #b3a2ff; } }

/* Checkboxen als Schalter */
.field--check { gap: 12px; cursor: pointer; }
.field--check input[type=checkbox] {
  -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; margin: 0; cursor: pointer;
  width: 46px; height: 28px; border-radius: 28px; background: var(--line); transition: background .2s;
}
.field--check input[type=checkbox]::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1.3);
}
.field--check input[type=checkbox]:checked { background: var(--accent); }
.field--check input[type=checkbox]:checked::before { transform: translateX(18px); }
.field--check input[type=checkbox]:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 50%, transparent); outline-offset: 2px; }

/* Auswahlfelder (außerhalb der Suchfilter) */
.field select, select.select {
  -webkit-appearance: none; appearance: none; font: inherit; font-weight: 500; width: 100%; padding: 12px 40px 12px 14px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface) no-repeat right 14px center / 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377716a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  color: var(--ink);
}
.field select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }

/* Feed-Detail: Verwalten */
.source-manage { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 26px 0 8px; padding-top: 18px; border-top: 1px solid var(--line); }
.btn--danger { background: transparent; color: #c4372a; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, #c4372a 40%, transparent); }
.btn--danger:hover { background: color-mix(in srgb, #c4372a 8%, transparent); }

/* ============================================================ Mini-Player (läuft beim Navigieren weiter) */
.mini {
  position: fixed; z-index: 35; left: 10px; right: 10px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  display: flex; align-items: center; gap: 4px; padding: 8px 6px 8px 8px;
  background: var(--ink); color: var(--bg); border-radius: 18px; box-shadow: var(--shadow-lift); overflow: hidden;
  animation: mini-in .35s cubic-bezier(.2, .8, .2, 1.1);
}
.mini[hidden] { display: none; }
@keyframes mini-in { from { opacity: 0; transform: translateY(16px); } }
.is-reader .mini { bottom: calc(10px + var(--safe-bottom)); }
.mini-progress { position: absolute; left: 0; right: 0; top: 0; height: 3px; background: rgba(255, 255, 255, .15); }
@media (prefers-color-scheme: dark) { .mini-progress { background: rgba(0, 0, 0, .12); } }
.mini-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s linear; }
.mini-info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.mini-cover { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: rgba(255, 255, 255, .1); }
.mini-text { min-width: 0; display: flex; flex-direction: column; }
.mini-text strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-text small { font-size: .74rem; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; flex-shrink: 0; font-size: 1.15rem; font-weight: 800; }
.mini-btn:active { transform: scale(.92); }
.mini-play { width: 44px; height: 44px; background: var(--accent); color: #fff; }
.mini-play svg { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.mini .i-pause, .mini.is-playing .i-play { display: none; }
.mini.is-playing .i-pause { display: block; }
.mini-close svg { width: 18px; height: 18px; }
.mini-close { opacity: .7; }
@media (max-width: 430px) { .mini [data-mini-back] { display: none; } }
@media (max-width: 340px) { .mini-skip { display: none; } }
body.has-mini { padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 88px); }
body.is-reader.has-mini { padding-bottom: 190px; }
.has-mini .player { bottom: calc(86px + var(--safe-bottom)); }
@media (min-width: 900px) {
  .mini, .is-reader .mini { left: auto; right: 24px; bottom: 24px; width: 420px; }
  body.has-mini { padding-bottom: 110px; }
}

/* Ladeanzeige beim weichen Seitenwechsel */
body.is-loading::before {
  content: ""; position: fixed; z-index: 300; left: 0; top: 0; height: 3px; width: 40%;
  background: var(--accent); border-radius: 0 3px 3px 0; animation: loadbar 1s ease-in-out infinite;
}
@keyframes loadbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* Vorlesestimme: Anbieterwahl & Stimmenliste */
[hidden] { display: none !important; }
.level--wide { display: flex; width: 100%; }
.level--wide .level-opt { flex: 1; }
.level--wide .level-opt span { text-align: center; padding: 9px 10px; font-size: .88rem; }
.voice-picker { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 14px 0 4px; }
.voice-select { display: flex; gap: 6px; width: 100%; align-items: center; }
.voice-select select { flex: 1; min-width: 0; }
.voice-select .icon-btn { background: var(--surface-2); flex-shrink: 0; }
.advanced { margin: 10px 0; }
.advanced summary { cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--muted); padding: 6px 0; }
.advanced[open] summary { color: var(--ink); }
select.select { -webkit-appearance: none; appearance: none; font: inherit; font-weight: 500; padding: 11px 40px 11px 14px;
  border-radius: 14px; border: 1.5px solid var(--line); color: var(--ink);
  background: var(--surface) no-repeat right 14px center / 14px
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2377716a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }

/* Mitlese-Highlight beim Vorlesen (CSS Custom Highlight API) */
::highlight(tts-sentence) { background-color: rgba(255, 90, 60, .12); }
::highlight(tts-word) { background-color: rgba(255, 90, 60, .42); color: inherit; }
@media (prefers-color-scheme: dark) {
  ::highlight(tts-sentence) { background-color: rgba(255, 130, 100, .16); }
  ::highlight(tts-word) { background-color: rgba(255, 130, 100, .45); }
}

/* Interessen-Inseln (Transparenz) */
.islands { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 12px; }
.islands > li { --hue: 265; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 8px; }
.islands .topic-bar { background: var(--surface); }
.island-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.island-examples { margin: 0; padding-left: 1.1em; font-size: .86rem; color: var(--muted); display: grid; gap: 2px; }
.island-examples li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bezahl-Abos */
.paywall { border-top: 1px solid var(--line, color-mix(in srgb, currentColor 10%, transparent)); padding-top: 14px; margin-top: 14px; }
.paywall-head { display: flex; align-items: center; gap: 10px; }
.paywall .form-actions form { display: inline; }
.pill--ok { background: color-mix(in srgb, #2e9e5b 14%, var(--surface)); color: #1f7a45; box-shadow: none; }
.pill--warn { background: color-mix(in srgb, #d9822b 16%, var(--surface)); color: #a35a12; box-shadow: none; }
.paid-note { font-size: .85rem; color: var(--muted); margin: 0 0 10px; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); }
.paid-note--hint a { font-weight: 700; }
.podcast-label { margin: 0 0 6px; font-size: .86rem; font-weight: 700; color: var(--muted); }
.small { font-size: .8rem; }
.tts-slot:empty { display: none; }
.tts-slot { margin-top: 14px; }
