:root {
  --blau: #2249a8; --blau-d: #1a3a86; --gruen: #3c8a3f; --rot: #b03a3a;
  --bg: #f4f6f9; --card: #fff; --text: #1d2733; --muted: #5d6b7a; --line: #dfe5ec;
  --radius: 10px; --shadow: 0 1px 2px rgba(20, 40, 70, .06), 0 2px 8px rgba(20, 40, 70, .06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Source Sans Pro", sans-serif;
  color: var(--text); background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 15px; line-height: 1.45; }
body.noscroll { overflow: hidden; }
a { color: var(--blau); }
button { font: inherit; color: inherit; }
mark { background: #fff1a8; color: inherit; border-radius: 2px; padding: 0 1px; }
.note { color: var(--muted); font-size: .88em; }
.link { background: none; border: 0; color: var(--blau); cursor: pointer; padding: 0; text-decoration: underline; }

/* Kopf */
.top { background: #fff; border-bottom: 3px solid var(--blau); position: sticky; top: 0; z-index: 20; box-shadow: var(--shadow); }
.top-inner { max-width: 1320px; margin: 0 auto; padding: 10px 18px; display: flex; gap: 18px; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: inherit; flex: none; }
.brand-logo { height: 52px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; text-decoration: none; }
.brand-logo-link { display: block; line-height: 0; }
.brand-title { font-weight: 700; font-size: 1.25rem; color: var(--blau-d); }
.brand-sub { font-size: .78rem; color: var(--muted); }
.searchbar { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; }
.searchbar input { flex: 1; min-width: 0; font: inherit; font-size: 1.02rem; padding: 11px 12px 11px 40px; border: 1.5px solid var(--line); border-radius: var(--radius) 0 0 var(--radius); outline: none; background: #fbfcfd; }
.searchbar input:focus { border-color: var(--blau); background: #fff; }
.search-ico { position: absolute; left: 12px; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; }
.searchbar button[type=submit] { border: 0; background: var(--blau); color: #fff; padding: 0 20px; align-self: stretch; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; font-weight: 600; }
.searchbar button[type=submit]:hover { background: var(--blau-d); }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 30; }
.suggest li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.suggest li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest li small { color: var(--muted); flex: none; }
.suggest li:hover, .suggest li.act { background: #eaf0f7; }
.top-actions { display: flex; gap: 8px; flex: none; }
.pill { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; }
.pill:hover { border-color: var(--blau); }
a.pill { text-decoration: none; color: inherit; font: inherit; }
.badge { background: var(--blau); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .8em; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c3ccd6; }
.dot.on { background: var(--gruen); box-shadow: 0 0 0 3px rgba(60,138,63,.25); }

/* Layout */
.layout { max-width: 1320px; margin: 0 auto; padding: 18px; display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 22px; align-items: start; }
.filters { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 14px; position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; }
.btn.filters-toggle { display: none; }
.filter-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.fgroup { border-top: 1px solid var(--line); padding: 8px 0; }
.fgroup h3, .fgroup summary { font-size: .92rem; font-weight: 650; margin: 2px 0 8px; cursor: pointer; color: var(--blau-d); }
.fgroup h3 { cursor: default; }
.fgroup summary { list-style: none; display: flex; justify-content: space-between; margin-bottom: 4px; }
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary::after { content: "▸"; color: var(--muted); }
.fgroup[open] summary::after { content: "▾"; }
.sel-cnt:not(:empty) { background: var(--gruen); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .78em; margin-left: auto; margin-right: 6px; }
#klasse { width: 100%; padding: 6px; border-radius: 7px; border: 1.5px solid var(--line); font: inherit; }
.chk { display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.small { font-size: .85rem; }
.facet { max-height: 340px; overflow: auto; }
.frow { display: flex; gap: 7px; align-items: flex-start; padding: 3px 2px; cursor: pointer; border-radius: 5px; font-size: .9rem; }
.frow:hover { background: #f0f4f8; }
.frow input { margin-top: 3px; accent-color: var(--blau); }
.frow .fl { flex: 1; }
.frow .fc { color: var(--muted); font-size: .82em; font-variant-numeric: tabular-nums; }
.frow.sub { padding-left: 20px; font-size: .86rem; }
.frow.zero { opacity: .45; }
.frow.on .fl { font-weight: 600; }

/* Ergebnisse */
.results { min-width: 0; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
#status { font-size: 1rem; }
.sort { color: var(--muted); font-size: .9rem; display: flex; gap: 6px; align-items: center; }
.sort select { font: inherit; padding: 5px 8px; border-radius: 7px; border: 1.5px solid var(--line); background: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { border: 0; background: var(--blau); color: #fff; border-radius: 999px; padding: 4px 11px; font-size: .84rem; cursor: pointer; }
.chip.soft { background: #e8eef6; color: var(--blau-d); }
.chip.soft:hover { background: #d7e2f0; }
.hint { background: #fff8e1; border: 1px solid #f1dc93; padding: 9px 12px; border-radius: var(--radius); margin-bottom: 10px; font-size: .92rem; }
.list { display: flex; flex-direction: column; gap: 12px; }
.card { display: grid; grid-template-columns: 200px 1fr; gap: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.card-cover { padding: 0; border: 0; background: none; cursor: pointer; align-self: start; }
.cover, .mcover, .dcover { position: relative; aspect-ratio: 400 / 226; border-radius: 7px; overflow: hidden; background: linear-gradient(135deg, #e7edf4, #d5dfeb); }
.cover img, .mcover img, .dcover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--blau-d); font-size: .82rem; font-weight: 600; opacity: .7; text-align: center; padding: 6px; }
.card-body { min-width: 0; }
.card h2 { font-size: 1.06rem; margin: 0 0 2px; line-height: 1.3; }
.tlink { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--blau-d); font-weight: 650; }
.tlink:hover { text-decoration: underline; }
.series { color: var(--muted); font-size: .9rem; }
.meta { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.nr { font-variant-numeric: tabular-nums; }
.snip { margin: 6px 0 8px; font-size: .92rem; color: #33404d; }
.kws { display: flex; flex-wrap: wrap; gap: 4px; margin: -2px 0 6px; }
.kws span { font-size: .76rem; background: #eef2f8; color: #3a4a5e; border-radius: 4px; padding: 1px 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.btn { border: 1.5px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 13px; cursor: pointer; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 5px; }
.btn:hover { border-color: var(--blau); }
.btn.primary { background: var(--blau); border-color: var(--blau); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--blau-d); }
.btn.small { padding: 4px 10px; font-size: .86rem; }
.btn.merk.on { border-color: var(--gruen); color: #2d6a30; background: #eef7ee; }
.more-wrap { text-align: center; margin: 18px 0; }

/* Drawer / Modal */
.drawer { position: fixed; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: rgba(15, 30, 50, .45); }
.panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 100%); background: #fff; overflow: auto; padding: 22px 26px 40px; box-shadow: -8px 0 30px rgba(0,0,0,.2); }
.close { position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 28px; cursor: pointer; color: var(--muted); z-index: 2; }
.d-head { display: grid; grid-template-columns: 260px 1fr; gap: 18px; align-items: start; margin-right: 24px; }
.d-head h2 { margin: 0 0 4px; font-size: 1.3rem; color: var(--blau-d); }
.d-text { white-space: normal; margin: 16px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .92rem; margin: 10px 0 16px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.panel h3 { font-size: 1rem; color: var(--blau-d); margin: 18px 0 8px; }
.minis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.mini { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.mini:hover { border-color: var(--blau); }
.mt { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.mm { font-size: .76rem; color: var(--muted); }
.list.compact .card { grid-template-columns: 130px 1fr; box-shadow: none; border: 1px solid var(--line); }
.modal-wrap { display: grid; place-items: center; }
.modal-wrap[hidden] { display: none; }
.modal { position: relative; background: #fff; border-radius: 14px; max-width: 640px; width: calc(100% - 30px); max-height: calc(100vh - 40px); overflow: auto; padding: 24px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal h2 { margin-top: 0; color: var(--blau-d); }
.sess-form { display: flex; gap: 8px; }
.sess-form input { flex: 1; font: inherit; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 8px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #1d2733; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 60; box-shadow: var(--shadow); }
.foot { max-width: 1320px; margin: 10px auto 30px; padding: 0 18px; color: var(--muted); font-size: .84rem; }

@media (max-width: 920px) {
  .top-inner { flex-wrap: wrap; }
  .searchbar { order: 3; flex-basis: 100%; }
  .brand-sub { display: none; }
  .top-actions { margin-left: auto; }
  #sessLabel { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .btn.filters-toggle { display: inline-flex; justify-self: start; }
  .filters { display: none; position: static; max-height: none; }
  .filters.open { display: block; }
  .card { grid-template-columns: 120px 1fr; gap: 10px; }
  .d-head { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .card { grid-template-columns: 1fr; }
  .card-cover { display: none; }
}

/* Umschalter addieren / Schnittmenge */
.modus { border-top: 1px solid var(--line); padding: 8px 0 10px; }
.modus-lbl { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 5px; }
.seg { display: flex; border: 1.5px solid var(--blau); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: #fff; color: var(--blau-d); padding: 6px 4px; cursor: pointer; font: inherit; font-size: .88rem; }
.seg button.on { background: var(--blau); color: #fff; }
#klasse { margin-bottom: 6px; }

/* Derzeit beliebt */
.beliebt { margin: 2px 0 14px; }
.beliebt-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.beliebt-head h2 { font-size: 1.05rem; margin: 0; }
#beliebtStand { font-size: .8rem; color: var(--muted); }
.strip-wrap { position: relative; }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-width: thin; }
.strip .mini { scroll-snap-align: start; background: var(--card); box-shadow: var(--shadow); border-color: transparent; }
.strip .mini:hover { border-color: var(--blau); }
.strip-nav { position: absolute; top: 34%; z-index: 2; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--blau-d); }
.strip-nav.prev { left: -10px; }
.strip-nav.next { right: -10px; }
@media (hover: none) { .strip-nav { display: none; } }

/* Mediathek-Auswahl */
.mt-sel { gap: 4px; padding: 4px 6px 4px 12px; cursor: default; }
.mt-sel select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--blau-d); cursor: pointer; padding: 2px; }
.mt-lbl { color: var(--muted); font-size: .85rem; }
.nurhog { display: inline-block; font-size: .72rem; padding: 1px 6px; border-radius: 999px; background: #fff3d6; color: #7a5300; border: 1px solid #f0d48a; }
.note.warn { background: #fff3d6; border-radius: 6px; padding: 6px 8px; color: #5c3f00; }
@media (max-width: 520px) { .mt-lbl { display: none; } }
