/* Genial Social Lab – ruhig, warm, gut lesbar auf dem Handy */
:root {
  --bg: #f6f1ea;
  --paper: #fffdf9;
  --ink: #2a221d;
  --ink-2: #6f645b;
  --line: #e6ddd2;
  --accent: #b4532a;       /* Terrakotta */
  --accent-soft: #f1dccf;
  --we: #d9a27f;
  --up: #2f7a4f;
  --up-bg: #e3f1e7;
  --down: #b2392f;
  --down-bg: #f8e3e0;
  --neutral-bg: #efe9e1;
  --ig: #c13584; --fb: #3b5ba9; --shop: #b4532a; --web: #6a7f5a; --nl: #b8892a; --gg: #4a77c9;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1815; --paper: #26211d; --ink: #f1e9df; --ink-2: #a99d91; --line: #3a332d;
    --accent: #e0835a; --accent-soft: #4a2f22; --we: #9c6a4d;
    --up: #7cc596; --up-bg: #1f3428; --down: #ef8a7f; --down-bg: #3d2421; --neutral-bg: #332c26;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--sans); }
a { color: inherit; }
h2, h3 { font-family: var(--serif); font-weight: 600; margin: 0; letter-spacing: .01em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; margin-bottom: .75rem; }
small { display: block; color: var(--ink-2); font-size: .8rem; }
.muted { color: var(--ink-2); font-weight: 400; font-family: var(--sans); font-size: .85rem; }
.empty { color: var(--ink-2); font-style: italic; }

/* Kopf */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.mark {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font: italic 600 1.3rem/1 var(--serif); padding-bottom: 3px;
}
.brand-name { font: 600 1.1rem/1.1 var(--serif); }
.brand-sub { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.range { display: flex; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.range a { text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .85rem; color: var(--ink-2); white-space: nowrap; }
.range a.on { background: var(--ink); color: var(--paper); }

main { max-width: 1080px; margin: 0 auto; padding: 8px 16px 32px; }
.period { margin: 10px 2px 14px; font-weight: 600; }

/* Karten */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.summary { background: var(--accent-soft); border-color: transparent; }
.summary ul { margin: 8px 0 0; padding-left: 1.1rem; }
.summary li { margin: 4px 0; }

/* Kacheln */
.hero, .tiles { display: grid; gap: 10px; margin-bottom: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 10px; min-width: 0; }
.hero .tile { border-top: 3px solid var(--accent); }
.tile-label { font-size: .8rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.tile-value { font: 600 1.55rem/1.2 var(--serif); margin: 4px 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero .tile-value { font-size: 1.8rem; }
.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hint { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line); font-size: .65rem; cursor: help; }
.delta { font-size: .75rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.delta.up { color: var(--up); background: var(--up-bg); }
.delta.down { color: var(--down); background: var(--down-bg); }
.delta.neutral { color: var(--ink-2); background: var(--neutral-bg); }
.spark { width: 46%; max-width: 120px; height: 28px; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--accent); opacity: .1; }

/* Balken */
.bars { width: 100%; height: auto; display: block; }
.bar { fill: var(--accent); }
.bar.we { fill: var(--we); }
.bar:hover { opacity: .75; }
.grid { stroke: var(--line); stroke-dasharray: 3 3; }
.axis { fill: var(--ink-2); font-size: 11px; font-family: var(--sans); }
.axis.halo { fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.legend { font-size: .78rem; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.lg-wd { background: var(--accent); } .lg-we { background: var(--we); margin-left: 6px; }

/* Kanäle */
.channel { margin-top: 26px; }
.ch-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 1.35rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot.ig { background: var(--ig); } .dot.fb { background: var(--fb); } .dot.shop { background: var(--shop); }
.dot.web { background: var(--web); } .dot.nl { background: var(--nl); } .dot.gg { background: var(--gg); }
.split { display: grid; gap: 14px; }
.split > .tiles { margin-bottom: 0; align-content: start; }
.split > .card { margin-bottom: 0; }
.tiles.one { grid-template-columns: 1fr; }

/* Beiträge */
.posts, .list, .camps, .shares, .reviews ul { list-style: none; margin: 0; padding: 0; }
.post { display: flex; align-items: center; gap: 10px; padding: 8px 0; text-decoration: none; border-top: 1px solid var(--line); }
.posts li:first-child .post { border-top: 0; }
.rank { width: 22px; flex: none; text-align: center; font: 600 .95rem var(--serif); color: var(--ink-2); }
.post img, .post .ph { width: 48px; height: 48px; flex: none; border-radius: 8px; object-fit: cover; background: var(--neutral-bg); display: grid; place-items: center; color: var(--ink-2); }
.post-body { flex: 1; min-width: 0; }
.post-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: .92rem; }
.post-meta { display: block; font-size: .75rem; color: var(--ink-2); margin-top: 2px; }
.post-val { text-align: right; font: 600 1.05rem var(--serif); }
.post-val small { font: .68rem var(--sans); }

.list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.grow { flex: 1; min-width: 0; font-size: .92rem; }
.list b { font-variant-numeric: tabular-nums; white-space: nowrap; }

.shares li { margin: 10px 0; }
.share-row { display: flex; justify-content: space-between; font-size: .88rem; margin-bottom: 4px; }
.share-track { height: 8px; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; }
.share-fill { height: 100%; background: var(--accent); border-radius: 999px; }

.camps li { padding: 10px 0; border-top: 1px solid var(--line); }
.camps li:first-child { border-top: 0; padding-top: 0; }
.camp-title { font-size: .92rem; }
.camp-stats { display: flex; gap: 16px; font-size: .85rem; color: var(--ink-2); margin-top: 4px; }
.camp-stats b { color: var(--ink); }

.rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rating .big { font: 600 2.2rem/1 var(--serif); }
.stars { --pct: calc(var(--r) / 5 * 100%); font-size: 1.2rem; letter-spacing: 2px;
  background: linear-gradient(90deg, #d99a2b var(--pct), var(--line) var(--pct)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stars.small { font-size: .85rem; letter-spacing: 1px; }
.reviews li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.todo { color: var(--down); font-weight: 600; }

/* Fuß */
footer { max-width: 1080px; margin: 0 auto; padding: 12px 16px 40px; font-size: .78rem; color: var(--ink-2); }
.status { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.st::before { content: "●"; margin-right: 4px; }
.st.ok::before { color: var(--up); } .st.err::before { color: var(--down); }
.admin { margin-bottom: 10px; } .admin p { margin: 4px 0; word-break: break-word; }

/* Login */
body.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: 100%; max-width: 360px; display: grid; gap: 14px; }
.login-card label { display: grid; gap: 4px; font-size: .85rem; color: var(--ink-2); }
.login-card input { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
.login-card button { font: 600 1rem var(--sans); padding: 11px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; cursor: pointer; }
.error { color: var(--down); background: var(--down-bg); padding: 8px 10px; border-radius: 8px; margin: 0; font-size: .88rem; }

@media (min-width: 720px) {
  .hero { grid-template-columns: repeat(4, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles.three { grid-template-columns: repeat(3, 1fr); }
  #google .tiles { grid-template-columns: repeat(4, 1fr); }
  .split { grid-template-columns: 1fr 1fr; }
  .tiles.two { grid-template-columns: 1fr 1fr; }
}
