/* Programmbereich (Legacy und Balance) im Aufbau der App: Kopf und Reiterkarte
   (programm-app.js), dazu der Support-Chat als „Arzt-Chat & Support".
   Farben aus den --legacy-*-Variablen des Bereichs: im Legacy-Reiter dunkel
   (konto.css :root), im Balance-Reiter hell (balance-app.css). Lime ist die
   Fläche, --pg-accent Schrift und Linien (hell: Grün). */

.pg {
  --pg-card: var(--legacy-card);
  --pg-border: var(--legacy-border);
  --pg-inner: var(--legacy-border-inner);
  --pg-field: var(--legacy-field);
  --pg-icon-bg: var(--legacy-icon-bg);
  --pg-ink: var(--legacy-ink);
  --pg-muted: var(--legacy-ink-muted);
  --pg-faint: var(--legacy-ink-faint);
  --pg-fill: #d1f843;
  --pg-on-fill: #062219;
  --pg-accent: #d1f843;
  --pg-track: rgba(255, 255, 255, 0.08);
  --pg-warn: #d97706;
  --pg-error: #ff9c8a;
  color: var(--pg-ink);
  margin-bottom: 14px;
}
#tabBalance .pg,
#tabBalance .legt-content {
  --pg-accent: #0f4a37;
  --pg-track: #eef1ec;
  --pg-faint: #c9d1cc;
  --pg-error: #dc2626;
  --pg-bubble: #f2f4ef;
  --pg-platzhalter: #8a968f;
}
#tabLegacy .legt-content { --pg-bubble: var(--legacy-bubble); --pg-accent: #d1f843; }

:where(.pg) :is(h2, h3, h4, p) { margin: 0; }
:where(.pg) button { font: inherit; color: inherit; cursor: pointer; }
.pg a { text-decoration: none; }
.pg button:focus-visible,
.pg a:focus-visible,
.pg input:focus-visible { outline: 2px solid var(--pg-accent); outline-offset: 2px; }

.pg-mt4 { margin-top: 4px; }
.pg-mt8 { margin-top: 8px; }
.pg-mt10 { margin-top: 10px; }
.pg-mt12 { margin-top: 12px; }
.pg-mt14 { margin-top: 14px; }
.pg-mt16 { margin-top: 16px; }
.pg-mt18 { margin-top: 18px; }
.pg-mt20 { margin-top: 20px; }
.pg-mt22 { margin-top: 22px; }
.pg-muted { font-size: 15px; color: var(--pg-muted); }
.pg-warn { color: var(--pg-warn) !important; }

/* ── Kopf (LegacyHeader) ───────────────────────────────── */

.pg-kopf { padding: 0 6px; }
.pg-wort { font-size: 13px; font-weight: 800; letter-spacing: 0.36em; color: var(--pg-ink); }
.pg-prog { margin-top: 4px !important; font-size: 14.5px; color: var(--pg-muted); }
.pg-hallo { margin-top: 8px !important; font-size: 34px; font-weight: 900; letter-spacing: -1.1px; line-height: 1.08; color: var(--pg-ink); }
.pg-name { margin-top: 4px !important; font-size: 14.5px; color: var(--pg-muted); }
.pg-phase { display: flex; gap: 12px; margin-top: 14px; }
.pg-phase > i { width: 9px; height: 9px; margin-top: 6px; flex: none; border-radius: 50%; background: var(--pg-accent); }
.pg-phase strong { display: block; font-size: 15.5px; font-weight: 700; }
.pg-phase span { display: block; margin-top: 2px; font-size: 13px; color: var(--pg-muted); }

/* ── Reiterkarte (LegacyDayCard) ───────────────────────── */

.pg-karte {
  margin-top: 22px;
  padding: 10px 10px 16px;
  background: var(--pg-card);
  border: 1px solid var(--pg-border);
  border-radius: 26px;
}
.pg-tabs {
  position: relative;
  display: flex;
  align-items: center;
  height: 52px;
  padding: 4px;
  border: 1px solid var(--pg-inner);
  border-radius: 999px;
  box-sizing: border-box;
}
.pg-tabs-pille {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px) / 4);
  border-radius: 999px;
  background: var(--pg-fill);
}
.pg-tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  padding: 0 2px;
  border: 0;
  border-radius: 999px;
  background: none;
  /* Wie FittedBox in der App: schmal etwas kleiner statt abgeschnitten */
  font-size: clamp(11.5px, 3.3vw, 13.5px) !important;
  font-weight: 500;
  color: var(--pg-ink) !important;
  white-space: nowrap;
}
.pg-tab.is-aktiv { font-weight: 800; color: var(--pg-on-fill) !important; }
.pg-tabs-strich { position: relative; z-index: 1; width: 1px; height: 22px; margin: 0 -0.5px; flex: none; background: var(--pg-faint); }

.pg-seiten {
  display: flex;
  align-items: flex-start;
  margin-top: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  transition: height 0.16s ease-out;
}
.pg-seiten::-webkit-scrollbar { display: none; }
.pg-seite { flex: 0 0 100%; min-width: 0; padding: 0 4px; box-sizing: border-box; scroll-snap-align: start; }
.pg-seite > .pg-lime { margin-top: 16px; }

.pg-titelzeile { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px 10px; margin-bottom: 14px; }
.pg-titelzeile h3 { font-size: 21px; font-weight: 900; letter-spacing: -0.4px; line-height: 1.15; color: var(--pg-ink); }
.pg-titelzeile span { padding-bottom: 3px; font-size: 11px; color: var(--pg-muted); }
.pg-hinweis { font-size: 14.5px; line-height: 1.45; color: var(--pg-muted); }

.pg-card {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
  background: var(--pg-card);
  border: 1px solid var(--pg-inner);
  border-radius: 20px;
  color: var(--pg-ink);
  text-align: left;
}
button.pg-card:hover,
a.pg-card:hover { filter: brightness(1.04); }

.pg-disc { display: grid; place-items: center; flex: none; border-radius: 50%; background: var(--pg-icon-bg); color: var(--pg-accent); }

.pg-stat { min-width: 0; }
.pg-stat strong { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--pg-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-stat--gross strong { font-size: 28px; }
.pg-stat span { display: block; font-size: 13.5px; color: var(--pg-muted); }

/* Übersicht */
.pg-kcal { display: flex; align-items: center; gap: 16px; padding: 18px 14px; }
.pg-ring { position: relative; width: 132px; height: 132px; flex: none; }
.pg-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pg-ring-spur { fill: none; stroke: var(--pg-track); stroke-width: 13; }
.pg-ring-bogen { fill: none; stroke: var(--pg-accent); stroke-width: 13; stroke-linecap: round; }
.pg-ring-bogen.is-warn { stroke: var(--pg-warn); }
.pg-ring > div { position: absolute; inset: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.pg-ring strong { font-size: 32px; font-weight: 800; line-height: 1.05; }
.pg-ring span { font-size: 12px; color: var(--pg-muted); }
.pg-vstrich { display: block; width: 1px; height: 116px; flex: none; background: var(--pg-faint); }
.pg-vstrich--klein { height: 48px; }
.pg-hstrich { display: block; height: 1px; margin: 12px 0; background: var(--pg-faint); }
.pg-kcal-stats { flex: 1; min-width: 0; padding-left: 2px; }
.pg-zeile { display: flex; align-items: center; gap: 16px; margin-top: 10px; padding: 14px 10px 14px 14px; }
.pg-zeile .pg-stat { flex: 1; }
.pg-zeile > svg { flex: none; color: var(--pg-ink); }

/* Knöpfe (LegacyPrimaryButton, LegacyOutlineButton) */
.pg-lime {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 20px;
  box-sizing: border-box;
  border: 0;
  border-radius: 999px;
  background: var(--pg-fill);
  color: var(--pg-on-fill) !important;
  font-size: 16.5px !important;
  font-weight: 800;
  text-align: center;
}
.pg-lime:hover { filter: brightness(1.04); }
.pg-lime:disabled { opacity: 0.5; cursor: default; }
.pg-lime-rund { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--pg-on-fill); color: var(--pg-fill); }
.pg-lime-ic { display: inline-flex; }
.pg-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  padding: 8px 14px;
  box-sizing: border-box;
  border: 1.2px solid var(--pg-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--pg-ink) !important;
  font-size: 14.5px !important;
  font-weight: 600;
  white-space: nowrap;
}
.pg-outline span { overflow: hidden; text-overflow: ellipsis; }
.pg-outline:hover { background: color-mix(in srgb, var(--pg-ink) 6%, transparent); }
.pg-outline:disabled { opacity: 0.5; cursor: default; }
.pg-outline-icon { flex: none; color: var(--pg-accent); }
.pg-outline.is-an { border: 1.6px solid var(--pg-accent); color: var(--pg-accent) !important; }
.pg-outline--kompakt { justify-content: space-between; min-height: 40px; padding: 0 10px 0 14px; font-size: 13px !important; }
.pg-zwei .pg-outline { gap: 6px; padding: 8px 10px; font-size: clamp(12px, 3.4vw, 14.5px) !important; }

/* Trink-Tracker (Reiter „Tracker", unter dem Kalorien-Tracker): Balken hellblau bis 2,5 l */
.pg { --pg-wasser-spur: rgba(255, 255, 255, 0.12); }
#tabBalance .pg { --pg-wasser-spur: #dde3da; }
.pg-trinken { padding: 14px 14px 16px; }
.pg-trinken .pg-zeile { margin: 0; padding: 0; gap: 14px; }
.pg-stat strong small { margin-left: 4px; font-size: 15px; font-weight: 600; color: var(--pg-muted); }
.pg-wasser { height: 22px; margin-top: 14px; border-radius: 999px; background: var(--pg-wasser-spur); overflow: hidden; }
.pg-wasser i { display: block; height: 100%; max-width: 100%; border-radius: inherit; background: linear-gradient(90deg, #b8e5fb, #7fcdf4); transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.pg-wasser i:not([style^="width:0.0%"]) { min-width: 22px; }
.pg-wasser-text { margin-top: 8px; font-size: 13.5px; color: var(--pg-muted); }
.pg-wasser-text.is-erreicht { font-weight: 700; color: var(--pg-accent); }
.pg-drei { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pg-drei .pg-outline { gap: 6px; padding: 8px; font-size: clamp(12px, 3.4vw, 14.5px) !important; }
.pg-textlink.pg-textlink--leise { margin-left: auto; border: 0; background: none; font-weight: 600; color: var(--pg-muted) !important; }
.pg-textlink.pg-textlink--leise:disabled { opacity: 0.5; cursor: default; }
@media (prefers-reduced-motion: reduce) { .pg-wasser i { transition: none; } }

/* Ernährung */
.pg-summe { margin-bottom: 14px !important; font-size: 15px; color: var(--pg-muted); }
.pg-summe strong { font-size: 20px; font-weight: 800; color: var(--pg-ink); }
.pg-mahlzeit { display: flex; gap: 12px; margin-bottom: 10px; padding: 10px 6px 10px 10px; }
.pg-mahlzeit.is-gesperrt { opacity: 0.55; }
.pg-thumb { display: grid; place-items: center; width: 118px; min-height: 140px; flex: none; overflow: hidden; border-radius: 14px; background: var(--pg-icon-bg); color: var(--pg-accent); }
.pg-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-mahlzeit-text { display: flex; flex: 1; min-width: 0; flex-direction: column; }
.pg-mahlzeit-text > strong { font-size: 16px; font-weight: 800; }
.pg-mahlzeit-titel { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 13.5px; line-height: 1.3; color: var(--pg-muted); }
.pg-mahlzeit-text > b { margin-top: 4px; font-size: 17px; font-weight: 800; }
.pg-mahlzeit-pfeil { align-self: center; display: grid; color: var(--pg-ink); }
.pg-status { display: inline-flex; align-self: flex-start; align-items: center; gap: 10px; margin-top: 6px; padding: 4px 0; border: 0; border-radius: 12px; background: none; text-align: left; }
.pg-status:disabled { cursor: default; }
.pg-status em { display: block; font-style: normal; font-size: 13.5px; font-weight: 500; color: var(--pg-ink); }
.pg-status.is-gegessen em { font-weight: 700; color: var(--pg-accent); }
.pg-status small { display: block; font-size: 12.5px; color: var(--pg-muted); }
.pg-haken { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--pg-fill); color: var(--pg-on-fill); }
.pg-offen { width: 26px; height: 26px; flex: none; box-sizing: border-box; border: 1.6px solid var(--pg-muted); border-radius: 50%; }
.pg-info { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px !important; font-size: 13.5px; color: var(--pg-muted); }
.pg-info svg { flex: none; }

/* Training */
.pg-hero { position: relative; min-height: 200px; overflow: hidden; border-radius: 20px; background: linear-gradient(135deg, #0a3a23, #042516); }
.pg-hero img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 35%);
          mask-image: linear-gradient(to right, transparent, #000 35%);
}
.pg-hero-text { position: relative; width: 66%; padding: 20px 18px 18px; box-sizing: border-box; color: #fff; }
.pg-hero-text > strong { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 3; -webkit-box-orient: vertical; font-size: 25px; font-weight: 900; letter-spacing: -0.6px; line-height: 1.1; }
.pg-hero-text > span { display: block; margin-top: 6px; font-size: 14.5px; color: rgba(255, 255, 255, 0.78); }
.pg-hero-kcal { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #d1f843; }
.pg-hero-kcal svg { flex: none; }
.pg-hero-kcal p { font-size: 15px; color: #fff; }
.pg-hero-kcal b { font-size: 22px; font-weight: 800; }
.pg-hero-kcal small { display: block; font-size: 12.5px; color: rgba(255, 255, 255, 0.78); }
.pg-linie { display: block; height: 1px; background: var(--pg-border); }
.pg-gruppe { display: flex; align-items: center; gap: 16px; width: 100%; padding: 10px 0; border: 0; background: none; text-align: left; }
.pg-gruppe > strong { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; }
.pg-gruppe > span:not(.pg-disc) { font-size: 13.5px; color: var(--pg-muted); }
.pg-gruppe-pfeil { flex: none; color: var(--pg-ink); transition: transform 0.16s; }
.pg-gruppe.is-offen .pg-gruppe-pfeil { transform: rotate(90deg); }
.pg-uebungen { padding: 0 0 10px 62px; }
.pg-uebungen > div { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.pg-uebungen span { flex: 1; font-size: 14px; }
.pg-uebungen small { font-size: 13px; color: var(--pg-muted); }
.pg-verbrannt { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.pg-verbrannt-wert { flex: 6 1 0; min-width: 0; }
.pg-verbrannt-wert small { display: block; font-size: 11.5px; line-height: 1.3; color: var(--pg-muted); }
.pg-verbrannt-wert strong { display: block; font-size: 24px; font-weight: 800; }
.pg-verbrannt-info { flex: none; color: var(--pg-muted); }
.pg-verbrannt-hinweis { flex: 5 1 0; min-width: 0; font-size: 11.5px; line-height: 1.35; color: var(--pg-muted); }

/* Tracker */
.pg-trackertitel { font-size: 26px; font-weight: 900; letter-spacing: -0.4px; line-height: 1.15; }
.pg-zwei { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.pg-schnell { padding: 18px 16px 16px; }
.pg-schnell h4 { margin-bottom: 12px; font-size: 18px; font-weight: 800; }
.pg-feld-label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--pg-ink); }
.pg-feld {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1px solid var(--pg-inner);
  border-radius: 14px;
  background: var(--pg-field);
  color: var(--pg-ink);
  font: inherit;
  font-size: 15.5px;
}
input.pg-feld { outline: none; }
.pg-feld input { flex: 1; min-width: 0; height: 50px; border: 0; outline: 0; background: transparent; color: var(--pg-ink); font: inherit; }
.pg-feld:focus-within,
input.pg-feld:focus { border-color: var(--pg-accent); box-shadow: 0 0 0 0.6px var(--pg-accent); }
.pg-feld::placeholder,
.pg-feld input::placeholder { color: var(--pg-platzhalter, var(--pg-faint)); }
.pg-feld--einheit em { margin-left: 6px; font-style: normal; font-size: 15px; color: var(--pg-muted); }
.pg-fehler { margin-top: 8px !important; font-size: 13px; color: var(--pg-error); }
.pg-erfasst-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pg-erfasst-kopf strong { font-size: 17px; font-weight: 800; }
.pg-erfasst-kopf i { flex: 1; height: 1px; background: var(--pg-border); }
.pg-erfasst { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 8px 6px 8px 10px; }
.pg-erfasst-bild { width: 44px; height: 44px; flex: none; overflow: hidden; border-radius: 50%; background: var(--pg-icon-bg); }
.pg-erfasst-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-erfasst strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 700; }
.pg-erfasst b { font-size: 15.5px; font-weight: 800; white-space: nowrap; }
.pg-erfasst > svg { flex: none; }
.pg-gesamt { padding: 14px; }
.pg-textlink { display: flex; justify-content: flex-end; align-items: center; gap: 2px; margin-top: 6px; padding: 8px 4px; font-size: 13.5px; font-weight: 700; color: var(--pg-accent) !important; }

.pg-laedt { display: grid; place-items: center; padding: 24px; }
.pg-spinner { width: 22px; height: 22px; border: 2.4px solid var(--pg-accent); border-right-color: transparent; border-radius: 50%; animation: pg-dreh 0.8s linear infinite; }
.pg-spinner--klein { width: 18px; height: 18px; margin: 4px; }
@keyframes pg-dreh { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
  .pg-thumb { width: 104px; }
}
@media (max-width: 380px) {
  .pg-thumb { width: 96px; }
  .pg-ring { width: 116px; height: 116px; }
  .pg-ring strong { font-size: 28px; }
}

/* ── Arzt-Chat & Support (SupportChatCard, Legacy-Aufbau) ─ */

.legt-content .bal-chat-card {
  padding: 18px 12px 12px;
  background: var(--legacy-card);
  border: 1px solid var(--legacy-border);
  border-radius: 26px;
  overflow: visible;
}
.legt-content .bal-chat-header { display: flex; align-items: center; gap: 16px; padding: 0 8px; background: none; border: 0; }
.legt-content .bal-chat-avatar { width: 64px; height: 64px; flex: none; border-radius: 50%; background: var(--legacy-icon-bg); color: var(--pg-accent); }
.legt-content .bal-chat-avatar svg { width: 32px; height: 32px; stroke: currentColor; }
.legt-content .bal-chat-title { font-size: 23px; font-weight: 900; letter-spacing: -0.4px; line-height: 1.15; color: var(--legacy-ink); }
.legt-content .bal-chat-availability { margin-top: 2px; font-size: 15px; color: var(--legacy-ink-muted); }
.legt-content .bal-online-dot { display: none; }
.pg-chat-box { margin-top: 16px; border: 1px solid var(--legacy-border); border-radius: 20px; overflow: hidden; }
.legt-content .bal-chat-messages { min-height: 140px; max-height: 360px; padding: 16px 12px 8px; background: none; }
.legt-content .bal-msg { position: relative; max-width: none; margin-bottom: 16px; }
.legt-content .bal-msg--support { padding-left: 56px; align-items: flex-start; }
.legt-content .bal-msg--user { padding-right: 56px; align-items: flex-end; }
.legt-content .bal-msg::before {
  content: '';
  position: absolute;
  top: 0;
  width: 44px;
  height: 44px;
  box-sizing: border-box;
  border: 1px solid var(--legacy-border-inner);
  border-radius: 50%;
  background-color: var(--pg-bubble);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px;
}
.legt-content .bal-msg--support::before {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1f843' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M12 10.5v6M9 13.5h6'/%3E%3C/svg%3E");
}
.legt-content .bal-msg--user::before {
  right: 0;
  background-color: var(--legacy-icon-bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d1f843' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
}
#tabBalance .legt-content .bal-msg--support::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f4a37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M9 7V5a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2M12 10.5v6M9 13.5h6'/%3E%3C/svg%3E");
}
#tabBalance .legt-content .bal-msg--user::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f4a37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E");
}
/* Eigene Nachrichten: Initialen statt Personen-Symbol, sobald konto.html den Namen
   kennt (--pg-ini, body.has-ini). Keine Profilbilder fuer Patienten (Datenschutz,
   Betreiber 3.11.2026). Die #tabBalance-Zeile braucht es wegen der hoeheren
   Spezifitaet der Balance-Regel oben. */
body.has-ini .legt-content .bal-msg--user::before {
  content: var(--pg-ini);
  background-image: none;
  color: #d1f843;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 42px;
  text-align: center;
}
body.has-ini #tabBalance .legt-content .bal-msg--user::before { background-image: none; color: #0f4a37; }
/* Coach-Chat: an den Nachrichten des Coaches sein Bild wie im Kopf, bis dahin seine
   Initiale – nicht das Koffer-Symbol des Supports, das auf dem hellen Grund kaum zu
   sehen war (Betreiber 3.11.2026). Werte setzt konto.html (coachBubbleAvatar). */
body.coach-ini #tabCoach .legt-content .bal-msg--support::before {
  content: var(--coach-ini);
  background-image: none;
  background-color: #e2eee7;
  color: #0f4a37;
  font-size: 15px;
  font-weight: 800;
  line-height: 42px;
  text-align: center;
}
body.coach-av #tabCoach .legt-content .bal-msg--support::before {
  content: '';
  background-image: var(--coach-av);
  background-size: cover;
}
.legt-content .bal-msg-bubble { max-width: 72%; padding: 13px 18px; font-size: 15px; line-height: 1.4; }
.legt-content .bal-msg--support .bal-msg-bubble { background: var(--pg-bubble); border: 0; border-radius: 20px 20px 20px 6px; color: var(--legacy-ink); }
.legt-content .bal-msg--user .bal-msg-bubble { background: #d1f843; border: 0; border-radius: 20px 20px 6px 20px; color: #062219; }
.legt-content .bal-msg-time { margin-top: 6px; font-size: 12.5px; color: var(--legacy-ink-muted); opacity: 1; }
.legt-content .bal-chat-input-row { gap: 10px; padding: 4px 10px 10px; background: none; border: 0; }
.legt-content .bal-chat-input { min-height: 54px; padding: 0 20px; border: 1px solid var(--legacy-border-inner); border-radius: 999px; background: var(--legacy-field); color: var(--legacy-ink); font-size: 15.5px; }
.legt-content .bal-chat-input:focus { border-color: var(--pg-accent); }
.legt-content .bal-chat-send { width: 54px; height: 54px; flex: none; border-radius: 50%; background: #d1f843; color: #062219; }
