:root {
  --bg: #fbfaf7; --fg: #222; --muted: #77736b; --accent: #7a4b1e; --line: #e3dfd6;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #14130f; --fg: #e6e2d8; --muted: #9a958a; --accent: #d9a566; --line: #2c2a24; }
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--fg); }
body { margin: 0; font: 1.125rem/1.7 Georgia, "Times New Roman", serif; }
main { max-width: 38rem; margin: 0 auto; padding: 2rem 1.25rem 4rem; }
a { color: var(--accent); text-decoration: none; }
article .body a:hover { text-decoration: underline; }   /* nur Links im Beitragstext zeigen beim Überfahren eine Linie */
[hidden] { display: none !important; }
.site-header { margin-bottom: 2.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.banner { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 10px; margin-bottom: 1rem; }
.brand { display: flex; align-items: center; gap: 1rem; }
.avatar-link { display: contents; }
.pager { display: flex; justify-content: space-between; margin-top: 2.5rem; }
.avatar { width: 4.5rem; height: 4.5rem; border-radius: 50%; object-fit: cover; flex: none; border: 3px solid var(--bg); }
.has-banner .avatar { margin-top: -2.5rem; margin-left: .75rem; }
.has-banner .brand { align-items: flex-end; }
.site-title { font-size: 1.6rem; font-weight: bold; text-decoration: none; color: var(--fg); }
.site-bio { margin: .3rem 0 0; color: var(--muted); font-style: italic; }
.site-bio:empty { display: none; }
.post-card { margin: 0 0 2rem; }
.post-card h2 { margin: 0; font-size: 1.3rem; line-height: 1.3; }
.post-card h2 a { text-decoration: none; color: var(--fg); }
.post-card h2 a:hover { color: var(--accent); }
.meta { color: var(--muted); font-size: .9rem; margin: .15rem 0 .4rem; }
.post-card p { margin: 0; color: var(--muted); }
article h1 { font-size: 1.8rem; line-height: 1.25; margin: 0; }
article .body { margin-top: 1.5rem; }
article .body p { margin: 0 0 1.2rem; }
article .body h1, article .body h2, article .body h3 { line-height: 1.3; margin: 2rem 0 .8rem; }
article .body img { max-width: 100%; height: auto; }
article .body blockquote { margin: 0 0 1.2rem; padding-left: 1rem; border-left: 3px solid var(--line); color: var(--muted); }
article .body hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
article .body code { font-size: .9em; background: var(--line); padding: .1em .3em; border-radius: 3px; }
.back { display: inline-block; margin-top: 2.5rem; }
.status { color: var(--muted); }
.site-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--accent); }
article .cover { display: block; width: 100%; height: auto; border-radius: 8px; margin-top: 1.2rem; }
.video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 1.2rem; background: var(--line); border-radius: 8px; overflow: hidden; }
.video-play { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; height: 100%; padding: 1rem; text-align: center; text-decoration: none; color: var(--fg); }
.video-play:hover .video-icon { color: var(--accent); }
.video-icon { font-size: 2.6rem; line-height: 1; }
.video-play small { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.video iframe, article .body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video.has-thumb .video-play { position: relative; color: #fff; background: rgba(0,0,0,.35); text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.video.has-thumb .video-play small { color: #eee; }
.video.has-thumb .video-play:hover .video-icon { color: #fff; }
.video.has-thumb .video-play:hover { background: rgba(0,0,0,.2); }
.audio { margin: 0 0 1.2rem; }
.audio figcaption { margin: 0 0 .3rem; font-size: .9rem; color: var(--muted); }
.audio audio { display: block; width: 100%; }
.mention-card { position: absolute; z-index: 20; box-sizing: border-box; padding: .7rem .8rem; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.18); font-size: .9rem; line-height: 1.35; }
.mention-card[hidden] { display: none; }
.mention-card img { float: left; width: 44px; height: 44px; margin: 0 .6rem .2rem 0; border-radius: 50%; object-fit: cover; }
.mention-card .h { display: block; color: var(--muted); font-size: .85rem; }
.mention-card p { clear: both; margin: .5rem 0 0; white-space: pre-line; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--line); font-size: .85rem; line-height: 1.2; }
.topbar-inner { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; max-width: 38rem; margin: 0 auto; padding: .35rem 1.25rem; }
.topbar-link { color: var(--muted); text-decoration: none; }
.topbar-link:hover { color: var(--accent); }
.search { display: flex; align-items: center; margin: 0; }
.topbar-links { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.search input { width: 11rem; max-width: 100%; padding: .2rem .5rem; font: inherit; color: var(--fg); background: var(--bg); border: 1px solid transparent; border-radius: 4px 0 0 4px; }
.search input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.search button { display: flex; align-items: center; padding: .27rem .5rem; color: var(--muted); background: var(--bg); border: 1px solid transparent; border-left: 0; border-radius: 0 4px 4px 0; cursor: pointer; }
.search button:hover { color: var(--accent); }
@media (max-width: 34rem) { .search { flex: 1 0 100%; } .search input { flex: 1; width: auto; } .topbar-links { margin-left: 0; flex: 1 0 100%; justify-content: flex-end; } }
.meta { display: flex; align-items: center; gap: .6rem; }
.meta .tools { display: inline-flex; gap: .5rem; margin-left: auto; }
.icon-btn { display: inline-flex; align-items: center; background: none; border: 0; padding: .15rem; margin: 0; font: inherit; color: var(--muted, inherit); cursor: pointer; text-decoration: none; }
.icon-btn:hover, .icon-btn:focus-visible { color: var(--accent); }
.icon-btn .icon { display: block; }
.post-card.has-cover { display: grid; grid-template-columns: 10rem 1fr; gap: 1.1rem; align-items: start; }
.card-cover { display: block; }
.card-cover img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 6px; background: var(--line); }
@media (max-width: 32rem) { .post-card.has-cover { grid-template-columns: 1fr; gap: .6rem; } }

/* Tabellen */
.tablewrap { overflow-x: auto; margin: 0 0 1.2rem; }
article .body table { border-collapse: collapse; width: 100%; font-size: .95em; }
article .body th, article .body td { border: 1px solid var(--line); padding: .4rem .6rem; text-align: left; vertical-align: top; }
article .body th { background: color-mix(in srgb, var(--line) 50%, transparent); }

/* Kurzes Video aus dem eigenen PDS */
.videofile { margin: 0 0 1.2rem; text-align: center; }
.videofile video { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 8px; background: #000; }
.videofile figcaption { margin: .3rem 0 0; font-size: .9rem; color: var(--muted); }
