:root {
  --grund: #171512; --flaeche: #211e1a; --flaeche2: #2b2722; --linie: #3d372f;
  --text: #f3efe8; --leise: #a89f91;
  --akzent: #9ccb6b; --akzent2: #5f8f3e;
  --bronze: #cd8b55; --silber: #cfccc6; --gold: #f0c64f;
  --rund: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: radial-gradient(1200px 600px at 80% -10%, #2a241c 0%, var(--grund) 60%) fixed, var(--grund);
  color: var(--text); font: 16px/1.45 "Segoe UI", system-ui, sans-serif; min-height: 100vh;
  padding: 24px 16px 60px; max-width: 1040px; margin-inline: auto;
}
h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
h2 { margin: 0 0 4px; font-size: 22px; }
h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); font-weight: 600; }
.leise { color: var(--leise); margin: 2px 0 0; font-size: 14px; }
.kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.punkte { text-align: right; font-size: 14px; color: var(--leise); }
.punkte b { display: block; font-size: 26px; color: var(--text); font-variant-numeric: tabular-nums; }
.hinweis { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #2b2a1c; border: 1px solid #5a5226; color: #ecdf9c; font-size: 14px; }
.fehler { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #5a2230; border: 1px solid #a8475c; padding: 10px 16px; border-radius: 12px; max-width: 90vw; }

.tabs { display: flex; gap: 6px; margin: 20px 0 18px; overflow-x: auto; padding-bottom: 4px; }
.tabs button {
  flex: 0 0 auto; background: transparent; color: var(--leise); border: 1px solid var(--linie);
  padding: 9px 16px; border-radius: 999px; font: inherit; font-size: 15px; cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--text); color: var(--grund); border-color: var(--text); font-weight: 600; }

.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 18px; }
.zielseite { display: grid; grid-template-columns: 250px 1fr; gap: 18px; align-items: start; }
.spalte { display: grid; gap: 18px; min-width: 0; }

/* ---------- senkrechter Balken */
.saeule { display: flex; flex-direction: column; align-items: center; }
.rohr-wrap { position: relative; height: 440px; width: 100%; margin: 14px 0 6px; }
.rohr {
  position: absolute; left: 24px; top: 0; bottom: 0; width: 76px; border-radius: 38px;
  background: linear-gradient(180deg, #14120f, #1e1b17); border: 1px solid var(--linie);
  box-shadow: inset 0 0 18px rgba(0,0,0,.6); overflow: hidden;
}
.fuellung {
  position: absolute; left: 0; right: 0; bottom: 0; height: 0;
  background: linear-gradient(180deg, var(--akzent) 0%, var(--akzent2) 100%);
  box-shadow: 0 0 26px rgba(156,203,107,.55); transition: height .7s cubic-bezier(.2,.8,.2,1);
}
.fuellung::after { content: ""; position: absolute; left: 10px; top: 0; bottom: 0; width: 10px; background: rgba(255,255,255,.22); border-radius: 6px; filter: blur(2px); }
.marke { position: absolute; left: 16px; width: 92px; height: 0; border-top: 2px dashed currentColor; opacity: .55; }
.marke.erreicht { opacity: 1; border-top-style: solid; }
.marke span { position: absolute; left: 102px; top: -11px; font-size: 13px; white-space: nowrap; font-weight: 600; }
.marke small { display: block; font-weight: 400; color: var(--leise); font-variant-numeric: tabular-nums; }
.marke.Bronze { color: var(--bronze); } .marke.Silber { color: var(--silber); } .marke.Gold { color: var(--gold); }
.marke.Gold span { top: -2px; }
.stand-zahl { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fuss { font-size: 12px; color: var(--leise); }
.medaille { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid currentColor; }
.medaille.Bronze { color: var(--bronze); } .medaille.Silber { color: var(--silber); } .medaille.Gold { color: var(--gold); } .medaille.keine { color: var(--leise); }

/* ---------- 7 Tage */
.woche { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tag { background: var(--flaeche2); border: 1px solid var(--linie); border-radius: 12px; padding: 10px 6px; text-align: center; display: grid; gap: 8px; align-content: start; }
.tag.heute { border-color: var(--akzent); box-shadow: 0 0 0 1px var(--akzent) inset; }
.tag.fertig { background: #26301c; }
.tag.aussen { opacity: .55; }
.tag .wt { font-size: 12px; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; }
.tag .dt { font-weight: 600; font-variant-numeric: tabular-nums; }
.tag .rel { font-size: 11px; color: var(--leise); }
.knopf {
  background: transparent; color: var(--text); border: 1px solid var(--linie); border-radius: 10px;
  padding: 7px 4px; font: inherit; font-size: 13px; cursor: pointer; width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.knopf:hover { border-color: var(--akzent); }
.knopf.an { background: var(--akzent); border-color: var(--akzent); color: #16210c; font-weight: 600; }
.zaehl { display: grid; grid-template-columns: 1fr auto 1fr; gap: 4px; align-items: center; }
.zaehl b { font-variant-numeric: tabular-nums; min-width: 1.6em; }
.gross { background: var(--akzent); color: #16210c; border: 0; border-radius: 14px; padding: 14px 20px; font: inherit; font-size: 17px; font-weight: 700; cursor: pointer; }
.gross:hover { filter: brightness(1.08); }
.gross:active { transform: translateY(1px); }
.zeile { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

/* ---------- Kennzahlen */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kachel { background: var(--flaeche2); border-radius: 12px; padding: 12px 14px; }
.kachel .k { font-size: 12px; color: var(--leise); }
.kachel .w { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kachel .z { font-size: 12px; color: var(--leise); }
.strich { height: 8px; border-radius: 4px; background: var(--flaeche2); overflow: hidden; }
.strich i { display: block; height: 100%; background: var(--akzent); border-radius: 4px; }
.stufenliste { display: grid; gap: 10px; }
.stufe { display: grid; grid-template-columns: 70px 1fr 170px; gap: 10px; align-items: center; font-size: 14px; }
.stufe .r { text-align: right; color: var(--leise); font-variant-numeric: tabular-nums; }
.stufe.Bronze i { background: var(--bronze); } .stufe.Silber i { background: var(--silber); } .stufe.Gold i { background: var(--gold); }
.stufe.Bronze b { color: var(--bronze); } .stufe.Silber b { color: var(--silber); } .stufe.Gold b { color: var(--gold); }

details summary { cursor: pointer; color: var(--leise); font-size: 14px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 12px; align-items: end; }
.form label { font-size: 12px; color: var(--leise); display: grid; gap: 4px; }
.form input { background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); border-radius: 8px; padding: 8px; font: inherit; width: 100%; }
.form button { background: var(--flaeche2); color: var(--text); border: 1px solid var(--linie); border-radius: 8px; padding: 9px; font: inherit; cursor: pointer; }

/* ---------- Übersicht */
.uebersicht { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini { display: grid; grid-template-columns: 44px 1fr; gap: 14px; cursor: pointer; }
.mini:hover { border-color: var(--akzent); }
.mini .rohr-wrap { height: 230px; margin: 0; }
.mini .rohr { left: 0; width: 34px; border-radius: 17px; }
.mini .marke { left: -4px; width: 42px; }
.mini .marke span { display: none; }
.mini .fuellung::after { left: 5px; width: 5px; }
.mini dl { margin: 10px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; font-size: 13px; }
.mini dt { color: var(--leise); } .mini dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.punktreihe { display: flex; gap: 4px; justify-content: flex-end; }
.punktreihe i { width: 9px; height: 9px; border-radius: 50%; background: var(--linie); }
.punktreihe i.an { background: var(--akzent); }

/* ---------- Leaderboard */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--leise); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 8px; border-bottom: 1px solid var(--linie); }
td { padding: 12px 8px; border-bottom: 1px solid var(--linie); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr.ich td { background: rgba(156,203,107,.07); }
.tabwrap { overflow-x: auto; }
td .strich { margin-top: 5px; min-width: 90px; }

@media (max-width: 760px) {
  .zielseite { grid-template-columns: 1fr; }
  .rohr-wrap { height: 300px; max-width: 250px; }
  .uebersicht { grid-template-columns: 1fr; }
  .woche { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.woche + .leise { margin-top: 12px; }

/* ---------- Online-Fassung: Begrüßung, Plus-Maske, Freunde */
.schmal { max-width: 560px; margin: 30px auto 0; }
.maske { display: grid; gap: 14px; }
.maske label { font-size: 13px; color: var(--leise); display: grid; gap: 5px; }
.maske input, .maske select { background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); border-radius: 10px; padding: 11px; font: inherit; width: 100%; }
.maske .drei { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.arten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.arten button { text-align: left; padding: 12px; white-space: normal; }
.arten button small { display: block; color: var(--leise); font-weight: 400; margin-top: 3px; }
.arten button.an small { color: #2c3d1c; }
.tabs button.plus { border-style: dashed; }
.linkzeile { display: flex; gap: 8px; margin-top: 10px; }
.linkzeile input { flex: 1; min-width: 0; background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); border-radius: 10px; padding: 10px; font: 13px ui-monospace, Consolas, monospace; }
.klein { width: auto; padding: 7px 12px; }
.gesperrt td { opacity: .5; }
@media (max-width: 760px) { .arten { grid-template-columns: 1fr; } }

/* ---------- v2: status, target line, multi bars, join form */
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid currentColor; }
.status.ahead { color: var(--akzent); }
.status.on-target { color: var(--text); }
.status.behind { color: #e08a78; }
.status.not-started { color: var(--leise); }
.sollmarke { position: absolute; left: 10px; width: 104px; height: 0; border-top: 3px solid var(--text); }
.sollmarke span { position: absolute; left: 112px; top: -11px; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.sollmarke small { display: block; font-weight: 400; color: var(--leise); }
.rohr-wrap.klein { height: 230px; width: 44px; margin: 6px auto; }
.rohr-wrap.klein .rohr { left: 6px; width: 32px; border-radius: 16px; }
.rohr-wrap.klein .marke { left: 0; width: 44px; }
.rohr-wrap.klein .marke span, .rohr-wrap.klein .sollmarke span { display: none; }
.rohr-wrap.klein .sollmarke { left: 0; width: 44px; }
.rohr-wrap.klein .fuellung::after { left: 5px; width: 5px; }
.mehr { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.teil { text-align: center; }
.teilzahl { font-weight: 700; font-variant-numeric: tabular-nums; }
.teilname { font-size: 12px; max-width: 70px; overflow-wrap: anywhere; }
.teilname small { display: block; color: var(--leise); }
.minibalken { display: flex; gap: 4px; }
.mini { grid-template-columns: auto 1fr; }
.kachel .w.klein { font-size: 16px; }
.zahlfeld { display: grid; gap: 2px; }
.zahlfeld input { width: 100%; background: var(--grund); border: 1px solid var(--linie); color: var(--text); border-radius: 8px; padding: 6px 4px; font: inherit; text-align: center; }
.zahlfeld small { font-size: 11px; color: var(--leise); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.knopf:disabled, .zahlfeld input:disabled { opacity: .4; cursor: default; }
.zelle { display: flex; gap: 4px; flex-wrap: wrap; margin: 4px 0; }
.zielblock { border: 1px solid var(--linie); border-radius: 14px; padding: 14px; display: grid; gap: 12px; margin: 0; }
.zielblock legend { padding: 0 6px; font-weight: 700; }
.arten2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zeile2 { display: flex; gap: 8px; align-items: end; }
.zeile2 > * { flex: 1; }
.zeile2 > button { flex: 0 0 auto; }
.zeile2 input, .maske select { background: var(--flaeche2); border: 1px solid var(--linie); color: var(--text); border-radius: 10px; padding: 11px; font: inherit; width: 100%; }
.zaehlerblock { display: grid; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--linie); }
.leise.klein { font-size: 13px; }
.schmal { max-width: 640px; }
.zielseite { grid-template-columns: minmax(250px, max-content) 1fr; }
.mehr { flex-wrap: nowrap; gap: 6px; }
.teil { width: 62px; }
.rohr-wrap.klein { height: 260px; }
@media (max-width: 760px) { .zielseite { grid-template-columns: 1fr; } .mehr { flex-wrap: wrap; } }

/* ---------- Farben v2 (15.11.2026): mittel-lila Hintergrund wie Justins LinkedIn-Band (#7c76ee, LinkedIn D-036), helle Karten */
:root {
  --lila: #7c76ee; --indigo: #4f46e5; --ink: #1e1b4b;
  --grund: #7c76ee; --flaeche: #fbfaff; --flaeche2: #efedfc; --linie: #dcd9f3;
  --text: #1e1b4b; --leise: #6a6890;
  --akzent: #4f46e5; --akzent2: #7c76ee;
  --bronze: #b06a35; --silber: #7d8296; --gold: #c4950f;
}
body { background: var(--lila); color: var(--ink); }
.kopf h1, .kopf .leise, .punkte, .punkte b { color: #fff; }
.punkte { opacity: .95; }
.tabs button { color: #fff; border-color: rgba(255,255,255,.45); }
.tabs button:hover { color: #fff; border-color: #fff; }
.tabs button[aria-selected="true"] { background: #fff; color: var(--indigo); border-color: #fff; }
.karte { box-shadow: 0 6px 24px rgba(30,27,75,.18); border-color: transparent; }
.rohr { background: linear-gradient(180deg, #e9e7fb, #f4f3fd); box-shadow: inset 0 0 10px rgba(30,27,75,.12); border-color: var(--linie); }
.fuellung { background: linear-gradient(180deg, #7c76ee 0%, #4f46e5 100%); box-shadow: 0 0 18px rgba(79,70,229,.35); }
.sollmarke { border-top-color: var(--ink); }
.sollmarke span { color: var(--ink); }
.knopf { color: var(--ink); background: #fff; }
.knopf.an { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.arten button.an small, .knopf.an small { color: #e4e2ff; }
.gross { background: var(--indigo); color: #fff; }
.tag { background: var(--flaeche2); }
.tag.heute { border-color: var(--indigo); box-shadow: 0 0 0 1px var(--indigo) inset; }
.tag.fertig { background: #e2f3e8; }
.zahlfeld input { background: #fff; }
.strich { background: var(--flaeche2); }
.status.ahead { color: #2e9e5b; }
.status.behind { color: #d93025; }
.status.on-target { color: var(--indigo); }
.punktreihe i.an { background: var(--indigo); }
tr.ich td { background: rgba(124,118,238,.10); }
.hinweis { background: #fff8e1; border-color: #f0d98a; color: #6b5200; }
.fehler { background: #fde8e6; border-color: #e7a39b; color: #8a1c12; }
.linkzeile input, .maske input, .maske select, .zeile2 input, .form input { background: #fff; color: var(--ink); }
.mini:hover { border-color: var(--indigo); }

/* ---------- v3: explainer, start mark, graph */
.erklaerung { margin-top: 14px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); border-radius: 14px; padding: 10px 16px; color: #fff; }
.erklaerung summary { color: #fff; font-weight: 600; cursor: pointer; }
.erklaerung ul { margin: 10px 0 4px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.marke.Start { color: var(--leise); opacity: .9; border-top-style: dashed; }
.graphwrap { margin-top: 14px; }
.graph { width: 100%; height: auto; display: block; }
.graph line { stroke-width: 1.5; stroke-dasharray: 5 4; }
.graph .g-Bronze { stroke: var(--bronze); fill: var(--bronze); }
.graph .g-Silver { stroke: var(--silber); fill: var(--silber); }
.graph .g-Gold { stroke: var(--gold); fill: var(--gold); }
.graph .g-pfad { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 2 4; }
.graph .g-ist { fill: none; stroke: var(--indigo); stroke-width: 3; stroke-linejoin: round; }
.graph .g-punkt { fill: var(--indigo); }
.graph text { font-size: 11px; stroke: none; }
.graph .g-achse { fill: var(--leise); }
.spalte .karte h3 { display: flex; gap: 8px; align-items: center; }
.teilblock { border: 1px dashed var(--linie); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.arten3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.arten3 button { white-space: normal; }
@media (max-width: 560px) { .arten3 { grid-template-columns: 1fr; } }

/* ---------- 16.11.2026: labelled mini bars, 14-day chart, post box */
.minibalken { gap: 2px; }
.minibalken .rohr-wrap.klein { width: 92px; margin: 0; }
.minibalken .rohr-wrap.klein .marke span, .minibalken .rohr-wrap.klein .sollmarke span { display: block; left: 48px; top: -8px; font-size: 0; }
.minibalken .rohr-wrap.klein .marke span small { display: inline; font-size: 11px; font-weight: 600; color: inherit; }
.minibalken .rohr-wrap.klein .sollmarke span small { display: inline; font-size: 11px; font-weight: 700; color: var(--ink); }
.miniinhalt { display: flex; flex-direction: column; min-width: 0; }
.minigraph { margin-top: auto; padding-top: 10px; align-self: flex-end; width: 150px; }
.vierzehn { width: 100%; height: auto; display: block; margin-top: 4px; }
.vierzehn .v-an { fill: var(--indigo); }
.vierzehn .v-aus { fill: var(--linie); }
.vierzehn .v-achse { stroke: var(--linie); stroke-width: 1; }
.nachricht { border-top: 1px solid var(--linie); padding: 10px 0; }
.nachricht.erledigt { opacity: .55; }
.nachrichttext { white-space: pre-wrap; margin-top: 4px; }
.maske textarea { background: #fff; border: 1px solid var(--linie); color: var(--ink); border-radius: 10px; padding: 11px; font: inherit; width: 100%; resize: vertical; }

/* ---------- 16.11.2026: bar from 0, start part faint blue-lilac, progress light lilac, labels inside the card */
.fuellung { background: linear-gradient(180deg, #c3befa 0%, #a9a3f5 100%); box-shadow: none; }
.fuellung::after { display: none; }
.fuellung-start { position: absolute; left: 0; right: 0; bottom: 0; background: #dfe4fb; }
.rohr { background: #f1f0fc; }
.marke.Start { color: #7f8bb8; }
.saeule .rohr-wrap { margin-bottom: 14px; }
.marke span { line-height: 1.15; }

/* ---------- 16.11.2026: overview card with title on top, money at risk, aligned values */
.mini { display: block; }
.minikopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.minikopf h3 { margin: 0; }
.verlust { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.verlust.minus { color: #d93025; }
.verlust.null { color: #2e9e5b; }
.minikoerper { display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.mini .rohr-wrap.klein { height: 200px; }
dl.werte { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 6px 0 0; font-size: 13px; }
dl.werte dt { color: var(--leise); }
dl.werte dd { margin: 0; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 16.11.2026: KPI top right in overview cards; phone layout */
.kpi { font-weight: 700; font-size: 18px; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; }
.kpi .leise { font-size: 13px; font-weight: 500; }
@media (max-width: 760px) {
  body { padding: 16px 12px 40px; }
  .tabs { margin: 14px 0 12px; }
  .tabs button { padding: 8px 13px; font-size: 14px; }
  .woche { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .tag { padding: 6px 2px; gap: 5px; border-radius: 9px; }
  .tag .wt, .tag .rel { font-size: 9px; }
  .tag .dt { font-size: 12px; }
  .knopf { font-size: 11px; padding: 6px 2px; }
  .zahlfeld input { padding: 5px 2px; font-size: 13px; }
  .zahlfeld small { font-size: 9px; }
  .kacheln { grid-template-columns: 1fr 1fr; }
  .minigraph { width: 100%; }
}
