/* ===== Gamification Patch G (André 12.11.2026): Fortschritt, Skilltree mit Ästen, Klick-Assistent ===== */
.kacheln.vier { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.reiter.unter { border-bottom: 0; gap: 6px; margin: -6px 0 16px; flex-wrap: wrap; }
.reiter.unter a { border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; margin: 0; font-size: 13.5px; }
.reiter.unter a.an { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.seite-kopf-zeile { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.gm-xp { flex: none; font-size: 12.5px; font-weight: 750; color: var(--gold); background: var(--gold-soft); border-radius: 99px; padding: 3px 10px; white-space: nowrap; }
.gm-aus { max-width: 720px; }

/* Fortschritt-Kopf */
.gm-heldkarte { padding: 22px; background: radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--gold) 16%, transparent), transparent 60%), var(--surface); }
.gmh { display: flex; gap: 24px; align-items: center; }
.gmh-ring { position: relative; width: 132px; height: 132px; flex: none; }
.gmh-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gmh-spur { fill: none; stroke: var(--line); stroke-width: 9; }
.gmh-fort { fill: none; stroke: url(#gmhG); stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.gmh-lv { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.gmh-lv small { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 650; }
.gmh-lv b { font-family: var(--head); font-size: 40px; font-weight: 800; margin-top: 2px; }
.gmh-rang { position: absolute; right: -4px; bottom: -2px; width: 42px; aspect-ratio: 1 / 1.1547; display: grid; place-items: center; clip-path: var(--hex);
  background: linear-gradient(160deg, #F3D79B, #9A6B1F); color: #1B1406; font-weight: 850; font-size: 20px; font-family: var(--head); text-align: center; line-height: 1;}
.gmh-text { flex: 1; min-width: 0; }
.gmh-ueber { font-family: var(--head); font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gmh-rangname { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.gmh-bar { height: 12px; border-radius: 99px; background: var(--line2); overflow: hidden; margin: 12px 0 6px; box-shadow: inset 0 1px 2px rgba(0,0,0,.08); }
.gmh-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9A6B1F, #E2BE78 70%, #F7E2B0); position: relative; overflow: hidden; }
.gmh-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: gmGlanz 2.8s infinite; }
@keyframes gmGlanz { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.gmh-zahlen { font-size: 13.5px; }
.gmh-heute { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 99px; padding: 1px 8px; }
.gmh-leiter { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.gmh-leiter span { display: flex; flex-direction: column; align-items: center; min-width: 52px; padding: 6px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.gmh-leiter span b { font-family: var(--head); font-size: 16px; }
.gmh-leiter span small { font-size: 12px; }
.gmh-leiter span.hinter { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 40%, var(--line)); }
.gmh-leiter span.ist { color: #1B1406; background: linear-gradient(160deg, #F3D79B, #C9A04F); border-color: transparent; box-shadow: 0 6px 16px -6px rgba(185,135,40,.6); }
@media (max-width: 560px) { .gmh { flex-direction: column; text-align: center; } .gmh-ueber { justify-content: center; } .gmh-leiter { justify-content: center; } }

/* Quest-Karten */
.gmq-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gmq { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: var(--surface2); display: flex; flex-direction: column; gap: 6px; }
.gmq.ok { border-color: var(--ok-line); background: var(--ok-soft); }
.gmq-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.gmq-kopf b { font-size: 14.5px; }
.gmq-bed { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.gmq-bed b { color: var(--ink); }
.gmq-bar { height: 7px; border-radius: 99px; background: var(--line); overflow: hidden; }
.gmq-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #B8924A, #E2BE78); }
.gmq.ok .gmq-bar i { background: var(--ok); }
.gmq-und { font-size: 12px; font-weight: 750; color: var(--muted); }
.gmq-fuss { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Quest-Verwaltung */
.gm-qk.aus { opacity: .55; }
.gm-qk-kopf { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.gm-qk-name { font-size: 15.5px; }
.gm-qk-bed { margin: 10px 0 8px; padding: 10px 12px; background: var(--surface2); border-radius: 10px; font-size: 13.5px; }
.gm-bestaetigen { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--amb-soft); }
.gm-bestaetigen select { min-height: 36px; max-width: 240px; }
.gm-mehr { margin-top: 10px; }
.gm-mehr summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.gm-mehr form { margin-top: 10px; }

/* Skilltree: wächst von unten nach oben, Äste werden nach oben dünner */
.gmt { overflow-x: auto; overflow-y: hidden; padding: 4px 0 8px; scrollbar-width: thin; }
.gmt-flaeche { position: relative; margin: 0 auto; }
.gmt-svg { position: absolute; inset: 0; overflow: visible; }
.gmt-kante { fill: none; stroke: color-mix(in srgb, var(--bronze) 55%, var(--line)); stroke-linecap: round; opacity: .75; }
.gmt-kante.frei { stroke: url(#gmtGold); opacity: 1; }
.gmt-kante.plus { stroke: var(--line); stroke-dasharray: 3 7; stroke-width: 2.5 !important; opacity: 1; }
.gmt-boden { fill: color-mix(in srgb, var(--bronze) 18%, transparent); }
.gmt-wurzel { fill: none; stroke: color-mix(in srgb, var(--bronze) 55%, var(--line)); stroke-width: 4; stroke-linecap: round; opacity: .7; }
.gmt-k { position: absolute; transform: translate(-50%, -25px); }
.gmt-b { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 112px; background: none; border: 0; padding: 0; font: inherit; color: inherit; }
button.gmt-b { cursor: pointer; }
.gmt-kreis { position: relative; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 3px solid var(--line); color: var(--faint);
  box-shadow: var(--sh); transition: transform .15s; }
.gmt-kreis svg { width: 22px; height: 22px; fill: currentColor; }
button.gmt-b:hover .gmt-kreis { transform: scale(1.08); }
.gmt-b.frei .gmt-kreis { background: radial-gradient(circle at 35% 30%, #FBE7B5, #C9A04F 60%, #8F6420); border-color: #F3D79B; color: #3A2806;
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 18%, transparent), 0 10px 22px -8px rgba(185,135,40,.7); }
.gmt-b.bereit .gmt-kreis { border-color: var(--gold); border-style: dashed; color: var(--gold); animation: gmPuls 2.2s infinite; }
.gmt-editor .gmt-b .gmt-kreis { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); animation: none; border-style: solid; }
.gmt-b.manuell .gmt-kreis::after { content: "✎"; position: absolute; top: -8px; right: -10px; font-size: 12px; background: var(--amb-soft); color: var(--amb); border-radius: 99px; padding: 1px 5px; }
@keyframes gmPuls { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 35%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.gmt-n { font-size: 12px; font-weight: 650; line-height: 1.2; text-align: center; max-width: 112px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border-radius: 6px; padding: 0 3px; }
.gmt-b.zu .gmt-n { color: var(--muted); }
.gmt-t { font-size: 12px; color: var(--gold); background: var(--gold-soft); border-radius: 99px; padding: 0 7px; max-width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmt-a { transform: translate(-50%, -50%); }
.gmt-a span { display: inline-block; font-size: 12px; font-weight: 750; letter-spacing: .02em; padding: 4px 10px; border-radius: 99px; background: var(--surface); border: 1.5px solid var(--line); white-space: nowrap; color: var(--muted); }
.gmt-a.frei span { border-color: var(--gold); color: var(--gold); }
.gmt-plus { transform: translate(-50%, -50%); width: 38px; height: 38px; border-radius: 50%; border: 2px dashed var(--acc); background: var(--acc-soft); color: var(--acc); font-size: 22px; font-weight: 700; cursor: pointer; display: grid; place-items: center; padding: 0; }
.gmt-plus:hover { background: var(--acc); color: #fff; }
.gmt-plus em { position: absolute; top: 42px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 12px; white-space: nowrap; color: var(--acc); font-weight: 650; }
.gmt-leer { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.gmt-legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 6px; justify-content: center; }
.gmt-legende i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; border: 2px solid var(--line); }
.gmt-legende i.frei { background: #C9A04F; border-color: #F3D79B; }
.gmt-legende i.bereit { border: 2px dashed var(--gold); }
.gmt-legende i.plus { border: 2px dashed var(--acc); background: var(--acc-soft); }
.gm-baumkarte { min-width: 0; }
.gm-info-z { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--line2); font-size: 13.5px; }
.gm-info-z span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.gm-info-z small { color: var(--muted); }
.gm-info-knoepfe { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.gm-info-knoepfe form { margin: 0; }
.gm-ol { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; }
.kachel-form { margin: 0; display: contents; }
button.kachel { font: inherit; color: inherit; text-align: left; background: var(--surface); cursor: pointer; width: 100%; }
.gm-skills { display: grid; gap: 6px; margin-top: 12px; }
.gm-skill-z { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.gm-skill-z small { display: block; color: var(--muted); font-size: 12px; }
.gm-stern { color: var(--gold); font-size: 16px; line-height: 1.2; }

/* XP-Regeln */
.gm-xp-tab td { vertical-align: middle; }
.gm-kurve { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0 8px; }
.gm-kurve div { background: var(--surface2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.gm-kurve span { font-size: 12px; color: var(--muted); }

/* Einstellungen */
.gm-addon { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface2); }
.schalter.gross { width: 54px; height: 30px; flex: none; }
.schalter.gross span::after { width: 24px; height: 24px; }
.schalter.gross input:checked + span::after { transform: translateX(24px); }
.gm-personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.gm-person { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.gm-person small { display: block; color: var(--muted); font-size: 12px; }

/* Klick-Assistent: eine Frage pro Schritt */
.gma [hidden], .gm-addon ~ [hidden] { display: none !important; }
.gma-dlg .di { max-height: 78vh; }
.gma-s { display: none; }
.gma-s.an { display: block; animation: gmaRein .22s ease; }
@keyframes gmaRein { from { transform: translateX(12px); } to { transform: none; } }   /* ohne opacity: Inhalt bleibt auch ohne laufende Animation sichtbar */
@media (prefers-reduced-motion: reduce) { .gma-s.an { animation: none; } }
.gma-kopf { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.gma-kopf small { color: var(--muted); font-size: 12px; }
.gma-punkte { display: flex; gap: 6px; }
.gma-punkte i { width: 26px; height: 5px; border-radius: 99px; background: var(--line); }
.gma-punkte i.fertig { background: var(--acc); }
.gma-punkte i.jetzt { background: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
.gma-frage { font-family: var(--head); font-size: 19px; font-weight: 750; margin: 0 0 12px; }
.gma-frage.klein { font-size: 15px; margin-bottom: 8px; }
.gma-fuss { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line2); }
.gma [data-gma-los] { margin-top: 14px; }
.gma-bed-liste { display: grid; gap: 6px; margin-bottom: 10px; }
.gma-bed-zeile { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--acc-soft); color: var(--acc-ink); font-size: 14px; }
.gma-bed-zeile > span { flex: 1; }
.gma-bed-zeile .gma-und { font-size: 12px; font-weight: 800; }
.gma-x { border: 0; background: none; color: inherit; font-size: 20px; cursor: pointer; line-height: 1; padding: 0 4px; }
.gma-bed-neu { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 6px; background: var(--surface2); }
.gma-bed-g { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.gma-frei-k { border-style: dashed; }
.gma-zusammen { display: grid; gap: 4px; margin: 6px 0 4px; }
.gma-z { display: grid; grid-template-columns: 140px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line2); font-size: 13.5px; }
.gma-z > span { color: var(--muted); font-size: 12.5px; }
@media (max-width: 560px) { .gma-z { grid-template-columns: 1fr; gap: 2px; } }

/* Außendienst „Meine Zahlen“ */
.kpi-kachel { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface2); }
.kpi-kachel small { color: var(--muted); font-size: 12px; }
.kpi-kachel b { font-family: var(--head); font-size: 24px; }
.kpi-kachel span { color: var(--muted); font-size: 12px; }

/* Breite Bäume scrollen in ihrer Karte, nie die Seite */
.stapel > .karte, .karte:has(.gmt), .gm-baumkarte { min-width: 0; }
.gmt { max-width: 100%; }
