@import url("../_designsystem/tokens/base.css");
@import url("../_designsystem/tokens/colors.css");
@import url("../_designsystem/tokens/elevation.css");
@import url("../_designsystem/tokens/fonts.css");
@import url("../_designsystem/tokens/layout.css");
@import url("../_designsystem/tokens/materials.css");
@import url("../_designsystem/tokens/motion.css");
@import url("../_designsystem/tokens/radius.css");
@import url("../_designsystem/tokens/spacing.css");
@import url("../_designsystem/tokens/typography.css");

/* URLs in Custom Properties resolve at the stylesheet that consumes them.
   Keep the design-system token, but bind its runtime path from css/stil.css. */
:root {
  --eb-logo-lockup: url("../_designsystem/assets/brand/logo-lockup.png");
  --eb-mat-oak: url("../_designsystem/assets/materials/smoked-oak-kachel.png");
  --eb-mat-iron: url("../_designsystem/assets/materials/soot-iron-kachel.png");
}

* { box-sizing: border-box; }
:root { color-scheme: dark; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: var(--eb-surface-void); color: var(--eb-text-primary); font: var(--eb-type-body); }
button { font: inherit; color: inherit; cursor: pointer; }
.versteckt { display: none !important; }
.dezent { color: var(--eb-text-secondary); font-size: var(--eb-size-caption); }
#spielflaeche, #spielflaeche canvas { position: absolute; inset: 0; }

/* --- Pause-Kit 01.11. (Overlay) ------------------------------------------- */
#pause-kit {
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
}
#pause-kit[state="none"], #pause-kit:not([state]) {
  display: none !important;
  pointer-events: none !important;
  background: transparent !important;
}
#pause-kit[state]:not([state="none"]) {
  display: block !important;
  pointer-events: auto !important;
}

/* --- Intro-Overlay (Video) ----------------------------------------------- */
#intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
#intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.intro-skip-btn {
  position: absolute;
  bottom: 32px;
  right: 32px;
  z-index: 101;
  padding: 12px 24px;
  background: rgba(18, 16, 13, 0.88);
  color: var(--eb-text-primary);
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-panel-inner, 4px);
  font: var(--eb-type-button);
  letter-spacing: var(--eb-tracking-button);
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
  transition: background 0.15s, border-color 0.15s, transform 0.08s;
}
.intro-skip-btn:hover {
  background: var(--eb-surface-row-hover);
  border-color: var(--eb-border-gold-strong);
  color: var(--eb-text-gold);
}
.intro-skip-btn:active {
  transform: translateY(1px);
}
.intro-skip-btn:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
}

/* --- Pause-Kit 01.11. (Web Component) ------------------------------------ */
eb-pause-kit {
  position: absolute;
  inset: 0;
  z-index: 40;
}

/* --- Hauptmenü / Spielhülle (Designsystem Stand 01.11.) ------------------- */
#titelbildschirm {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 40px);
  background: linear-gradient(0deg, rgba(12, 11, 10, 0.92) 0%, rgba(12, 11, 10, 0.7) 14%, rgba(12, 11, 10, 0) 32%),
              radial-gradient(ellipse 80% 75% at 50% 42%, rgba(12, 11, 10, 0) 50%, rgba(12, 11, 10, 0.78) 100%),
              url("../_designsystem/assets/imagery/world-plate.png") center/cover no-repeat;
  overflow-y: auto;
}
.titel-buehne {
  width: min(1520px, 96vw);
  max-height: 92vh;
  display: grid;
  grid-template-columns: minmax(360px, 440px) 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: stretch;
}
.titel-hauptmenue {
  display: flex;
  flex-direction: column;
  gap: var(--eb-space-m);
  background: var(--eb-grad-panel);
  border: var(--eb-frame-width, 2px) solid var(--eb-border-frame);
  outline: 1px solid var(--eb-border-iron);
  border-radius: var(--eb-radius-panel);
  box-shadow: var(--eb-emboss-inner), 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: clamp(20px, 3vw, 36px);
}
.titel-kopf {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.titel-logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.titel-wappen {
  height: clamp(52px, 6vw, 68px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.titel-schriftzug {
  font-family: var(--eb-font-display, "Cormorant Garamond", serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: 0.14em;
  background: var(--eb-grad-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--eb-gold-300);
  text-transform: uppercase;
}
.titel-logo {
  height: clamp(64px, 8vw, 88px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  align-self: flex-start;
}
.titel-untertitel {
  font: var(--eb-type-display);
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.25;
  color: var(--eb-text-secondary);
  letter-spacing: 0.04em;
}
.titel-teiler {
  height: 1px;
  background: var(--eb-border-iron);
  box-shadow: var(--eb-emboss-divider);
  margin: 4px 0 10px;
}
.titel-knopfliste {
  display: flex;
  flex-direction: column;
  gap: var(--eb-space-s);
  flex: 1;
}
.menueknopf {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-card, 4px);
  background: var(--eb-grad-row);
  padding: 12px 18px;
  color: var(--eb-text-primary);
  font: var(--eb-type-button);
  letter-spacing: var(--eb-tracking-button);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.08s, color 0.15s;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.menueknopf:hover {
  border-color: var(--eb-border-gold-strong);
  background: var(--eb-surface-row-hover);
  color: var(--eb-text-gold);
}
.menueknopf:active {
  transform: translateY(1px);
}
.menueknopf:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
  border-color: var(--eb-border-gold-strong);
}
.menueknopf.primaer {
  background: linear-gradient(180deg, #38301F 0%, #221B12 100%);
  border-color: var(--eb-border-gold);
  color: #FFF1C8;
  font-weight: var(--eb-weight-semibold, 600);
  box-shadow: inset 0 1px 0 rgba(255, 235, 170, 0.2);
}
.menueknopf.primaer:hover {
  background: linear-gradient(180deg, #5D4E37 0%, #3B2F20 100%);
  border-color: var(--eb-border-gold-strong);
  color: #FFFFFF;
}
.menueknopf.aktiv {
  border-color: var(--eb-border-gold-strong);
  box-shadow: inset 0 0 0 1px var(--eb-border-gold);
  background: var(--eb-surface-row-hover);
  color: #F3DC9B;   /* zw-m9-dorf2h 14.11.: Kontrast >= 7:1 (text-gold ergab 5,8:1) */
}
.titel-fuss {
  display: flex;
  align-items: center;
  gap: var(--eb-space-s);
  font: var(--eb-type-label);
  font-weight: 400;
  font-size: var(--eb-size-micro);
  letter-spacing: var(--eb-tracking-label);
  color: var(--eb-text-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(74, 62, 44, 0.35);
}

/* D4 (zw-d4a 15.11.): Sprachwahl im Hauptmenü, Zustand über aria-pressed */
.titel-sprache {
  display: flex;
  gap: var(--eb-space-s);
  margin-top: var(--eb-space-m);
}
.titel-sprachknopf {
  flex: 1;
  min-height: 36px;
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-card, 4px);
  background: transparent;
  color: var(--eb-text-secondary);
  font: var(--eb-type-label);
  letter-spacing: var(--eb-tracking-label);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.titel-sprachknopf:hover {
  border-color: var(--eb-border-gold-strong);
  background: var(--eb-surface-row-hover);
}
.titel-sprachknopf[aria-pressed="true"] {
  border-color: var(--eb-border-gold);
  background: var(--eb-surface-row-hover);
  color: #F3DC9B;
  box-shadow: inset 0 0 0 1px var(--eb-border-gold);
}
.titel-sprachknopf:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
}

/* Rechte Inhaltsseite (Detailpanel) */
.titel-inhalt {
  display: flex;
  flex-direction: column;
}
.titel-panel {
  background: var(--eb-grad-panel);
  border: var(--eb-frame-width, 2px) solid var(--eb-border-frame);
  outline: 1px solid var(--eb-border-iron);
  border-radius: var(--eb-radius-panel);
  box-shadow: var(--eb-emboss-inner), 0 24px 70px rgba(0, 0, 0, 0.6);
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: var(--eb-space-m);
  height: 100%;
  overflow-y: auto;
}
.titel-panel-titel {
  margin: 0;
  color: var(--eb-text-gold);
  font: var(--eb-type-h2);
  letter-spacing: var(--eb-tracking-title);
  text-transform: uppercase;
}
.titel-panel-untertitel {
  margin: 2px 0 0;
  color: var(--eb-text-secondary);
  font: var(--eb-type-body);
  font-size: var(--eb-size-caption);
}

/* Hauptmenue: Textkontrast >= 7:1 auf den dunklen Tafeln (zw-m9-dorf2h 14.11.; Token text-muted erreicht dort nur ca. 3,7:1) */
.titel-hauptmenue, .titel-panel { --eb-text-muted: #D3C9AE; --eb-text-secondary: #E2D9C2; }
.titel-panel .mission-badge { color: #B4E8C0; }
/* Fortsetzen-Karte */
.fortsetzen-karte {
  display: flex;
  gap: var(--eb-space-m);
  align-items: center;
  padding: 16px;
  background: var(--eb-surface-row);
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-card);
  box-shadow: var(--eb-emboss-inner);
}
.fortsetzen-bild {
  width: 168px;
  height: 168px;
  object-fit: contain;
  flex: none;
}
.fortsetzen-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.fortsetzen-name {
  font: var(--eb-type-h2);
  color: var(--eb-text-primary);
}
.fortsetzen-meta {
  font: var(--eb-type-label);
  color: var(--eb-text-muted);
}
.fortsetzen-kennwerte { display: flex; gap: 18px; margin-top: 8px; font: var(--eb-type-label); color: var(--eb-text-secondary); }
.fortsetzen-kennwerte b { color: var(--eb-text-gold); font-weight: 600; }
.mission-karte.gewaehlt { border-color: var(--eb-border-gold-strong); background: var(--eb-surface-row-hover); box-shadow: var(--eb-emboss-inner), inset 3px 0 0 var(--eb-text-gold); }
.fortsetzen-zeit {
  font-family: var(--eb-font-numeric);
  color: var(--eb-text-secondary);
  font-size: var(--eb-size-label);
}

/* Missionsliste */
.missions-liste {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}
.mission-karte {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: var(--eb-space-m);
  width: 100%;
  padding: 10px 14px;
  text-align: left;
  background: var(--eb-surface-row);
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-card);
  box-shadow: var(--eb-emboss-inner);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: inherit;
}
.mission-karte:hover {
  background: var(--eb-surface-row-hover);
  border-color: var(--eb-border-gold-strong);
}
.mission-karte:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
}
.mission-nr {
  font-family: var(--eb-font-numeric);
  font-size: var(--eb-size-num-sub);
  color: var(--eb-text-gold);
}
.mission-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mission-titel {
  font: var(--eb-type-body);
  font-weight: 600;
  color: var(--eb-text-primary);
}
.mission-desc {
  font: var(--eb-type-label);
  font-size: var(--eb-size-caption);
  color: var(--eb-text-muted);
}
.mission-badge {
  padding: 3px 9px;
  font: var(--eb-type-label);
  font-size: var(--eb-size-micro);
  letter-spacing: var(--eb-tracking-label);
  color: var(--eb-success-text);
  background: rgba(47, 95, 59, 0.28);
  border: 1px solid var(--eb-success-dim);
  border-radius: 4px;
}

/* Freies Spiel Karten */
.frei-raster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 10px;
}
.frei-karte {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 14px;
  background: var(--eb-surface-row);
  border: 1px solid var(--eb-border-frame);
  border-radius: var(--eb-radius-card);
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: inherit;
}
.frei-karte:hover {
  border-color: var(--eb-border-gold-strong);
  background: var(--eb-surface-row-hover);
  transform: translateY(-2px);
}
.frei-karte:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
}
.frei-stufe {
  font: var(--eb-type-h2);
  color: var(--eb-text-gold);
}
.frei-desc {
  font: var(--eb-type-body);
  font-size: var(--eb-size-caption);
  color: var(--eb-text-secondary);
}

/* Spielstände */
.spielstand-zeile {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 8px;
}
.spielstand-zeile > .menueknopf {
  flex: 1;
}
.loeschenknopf {
  padding: 8px 14px;
  border: 1px solid var(--eb-danger-dim);
  background: var(--eb-grad-danger);
  color: #fff;
  border-radius: var(--eb-radius-card);
  cursor: pointer;
  transition: background 0.15s;
}
.loeschenknopf:hover {
  background: var(--eb-danger);
}
.loeschenknopf:focus-visible {
  outline: none;
  box-shadow: var(--eb-ring-focus);
}

/* Anleitung & Overlay */
#anleitung, #ende-overlay {
  position: absolute;
  inset: 0;
  z-index: 31;
  display: grid;
  place-items: center;
  padding: 20px;
  background: var(--eb-surface-scrim);
}
.anleitung-kasten {
  width: min(840px, 94vw);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--eb-grad-panel);
  border: 2px solid var(--eb-border-frame);
  outline: 1px solid var(--eb-border-iron);
  border-radius: var(--eb-radius-panel);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--eb-emboss-inner), 0 24px 70px rgba(0, 0, 0, 0.6);
}
/* D4: Endefenster bekommt dieselbe Tafel wie Anleitung und Pause – vorher stand der Text ohne Fläche auf dem Schleier. */
#ende-overlay .titel-kasten {
  width: min(560px, 94vw);
  background: var(--eb-grad-panel);
  border: 2px solid var(--eb-border-frame);
  outline: 1px solid var(--eb-border-iron);
  border-radius: var(--eb-radius-panel);
  padding: clamp(20px, 4vw, 36px);
  box-shadow: var(--eb-emboss-inner), 0 24px 70px rgba(0, 0, 0, 0.6);
  text-align: center;
  color: var(--eb-text-secondary);
}
#ende-overlay .titel-kasten h1 {
  margin: 0 0 10px;
  font: var(--eb-type-h1);
  letter-spacing: 0.08em;
  color: var(--eb-text-gold);
}
#ende-overlay .titel-kasten.niederlage h1 { color: var(--eb-danger-text); }
#ende-overlay .titel-kasten p { margin: 0 0 10px; line-height: 1.5; }
#ende-overlay .titel-kasten .reihe { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 18px; }
#ende-overlay .titel-kasten .menueknopf { width: auto; min-width: 200px; justify-content: center; text-align: center; }
.anleitung-text {
  text-align: left;
  color: var(--eb-text-secondary);
  line-height: 1.55;
}
.anleitung-text p {
  margin: 0 0 12px;
}
.anleitung-text b {
  color: var(--eb-text-gold);
}

@media (max-width: 900px) {
  .titel-buehne {
    grid-template-columns: 1fr;
    max-height: none;
  }
  .frei-raster {
    grid-template-columns: 1fr;
  }
}

#hud { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
#hud > * { pointer-events: auto; }
#rohstoffleiste, #bauliste, #zielliste, #auswahlanzeige, #befehlsleiste { background: var(--eb-grad-panel); border: 1px solid var(--eb-border-frame); box-shadow: 0 8px 28px rgba(0,0,0,.35), inset 0 1px var(--eb-emboss-light); }
#rohstoffleiste { position: absolute; top: 0; left: 50%; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; max-width: 96vw; padding: 9px 18px; border-top: 0; border-radius: 0 0 5px 5px; color: var(--eb-text-secondary); }
.rohstoff { white-space: nowrap; font-family: var(--eb-font-numeric); font-variant-numeric: tabular-nums; }
.rohstoff b { margin-left: 5px; color: var(--eb-text-primary); }
.rohstoff i { color: var(--eb-text-muted); font-style: normal; font-size: var(--eb-size-num-sub); }
.rohstoff.warnung { color: var(--eb-warning-text); }
/* R2 Nahrungsbilanz: Netto je Minute an der Nahrung, Hinweis unter der Leiste */
.rohstoff em.bilanz { margin-left: 6px; font-style: normal; font-size: var(--eb-size-num-sub); color: var(--eb-success-text); }
.rohstoff em.bilanz.knapp { color: var(--eb-warning-text); }
.rohstoff em.bilanz.mangel { color: var(--eb-danger-text); font-weight: 600; }
#nahrung-hinweis { position: absolute; top: 50px; left: 50%; transform: translateX(-50%); display: flex; align-items: baseline; gap: 10px; padding: 6px 14px 7px; border: 1px solid var(--eb-danger-dim); border-top: 0; border-left: 3px solid var(--eb-danger); border-radius: 0 0 5px 5px; background: var(--eb-grad-panel); box-shadow: 0 8px 22px rgba(0,0,0,.35), inset 0 1px var(--eb-emboss-light); color: var(--eb-text-secondary); font: inherit; font-size: var(--eb-size-caption); white-space: nowrap; cursor: pointer; }
#nahrung-hinweis b { color: var(--eb-danger-text); font-weight: 600; }
#nahrung-hinweis span { color: var(--eb-gold-200); }
#nahrung-hinweis:hover { border-color: var(--eb-border-gold-strong); }
#nahrung-hinweis:focus-visible { outline: 2px solid var(--eb-gold-400); outline-offset: 2px; }
#nahrung-hinweis.knapp { border-color: var(--eb-warning-dim); border-left-color: var(--eb-warning); }
#nahrung-hinweis.knapp b { color: var(--eb-warning-text); }
#zielliste { position: absolute; top: 58px; right: 14px; width: min(290px, 30vw); padding: 10px 13px; }
#zielliste:empty { display: none; }
.ziel { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 6px 0; color: var(--eb-text-secondary); font-size: 13px; }
.ziel-badge { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.ziel-badge.offen { background: rgba(200, 166, 90, 0.15); color: var(--eb-gold-300); border: 1px solid var(--eb-gold-600); }
.ziel-badge.erfuellt { background: rgba(77, 166, 98, 0.2); color: var(--eb-success); border: 1px solid var(--eb-success); }
.ziel-text { flex: 1 1 auto; margin: 0 4px; }
.ziel-fortschritt { font-family: var(--eb-font-numeric); font-variant-numeric: tabular-nums; color: var(--eb-text-primary); }
#bauliste { position: absolute; left: 14px; top: 58px; width: min(230px, 23vw); max-height: calc(100vh - 136px); box-sizing: border-box; overflow-y: auto; padding: 10px 12px; scrollbar-width: thin; }
#hud h3, #bauliste h3 { margin: 8px 0 10px 2px; color: var(--eb-text-gold); font: var(--eb-type-panel-title); text-transform: uppercase; letter-spacing: var(--eb-tracking-title); }
.bauknopf { display: block; width: 100%; box-sizing: border-box; margin: 5px 0; padding: 8px 10px; border: 1px solid var(--eb-border-frame); border-radius: 3px; background: var(--eb-grad-row); color: var(--eb-text-primary); text-align: left; transition: border-color .15s, background .15s, transform .08s, outline .2s, box-shadow .2s; }
.bauknopf:hover { border-color: var(--eb-border-gold-strong); background: var(--eb-surface-row-hover); }
.bauknopf b { display: inline-block; margin-left: 8px; vertical-align: middle; font-weight: 600; color: var(--eb-text-primary); font-size: var(--eb-size-item); }
.portrait { width: 30px; height: 30px; object-fit: cover; vertical-align: middle; border: 1px solid var(--eb-border-frame); border-radius: 2px; }
.bauknopf span { display: block; margin-top: 3px; margin-left: 38px; color: var(--eb-gold-200); font-size: var(--eb-size-caption); font-weight: 500; font-family: var(--eb-font-numeric); }
.bauknopf.empfohlen { outline: 2px solid var(--eb-gold-400); box-shadow: 0 0 12px rgba(200, 166, 90, 0.6); animation: bauempfehlung-puls 2s infinite ease-in-out; }
@keyframes bauempfehlung-puls { 0%, 100% { box-shadow: 0 0 6px rgba(200, 166, 90, 0.4); } 50% { box-shadow: 0 0 16px rgba(200, 166, 90, 0.85); } }
.bauknopf.unerschwinglich { opacity: .45; }
#minikarte-kasten { position: absolute; right: 14px; bottom: 14px; padding: 4px; background: var(--eb-surface-sunken) url("../_designsystem/assets/imagery/minimap-valley.png") center/cover; border: 1px solid var(--eb-border-frame); }
#minikarte { display: block; width: min(200px, 18vw); height: auto; cursor: crosshair; }
#auswahlanzeige { position: absolute; left: 258px; bottom: 84px; width: min(400px, 34vw); padding: 12px 14px; } /* ueber der Befehlsleiste (14 + 58 + 12 Luft): sonst verdeckt sie Abriss/Reparatur/Ausbau bis 2560 px */
.balken { height: 8px; margin: 7px 0; overflow: hidden; background: var(--eb-track); }
.balken i { display: block; height: 100%; background: var(--eb-success); }
.knopf-reihe { margin-top: 8px; flex-wrap: wrap; }
.knopf-reihe button { flex: 1; min-width: 90px; padding: 7px 9px; font-size: var(--eb-size-label); border: 1px solid var(--eb-border-frame); border-radius: 3px; background: var(--eb-grad-row); color: var(--eb-text-primary); text-align: left; transition: border-color .15s, background .15s; }
.knopf-reihe button:hover { border-color: var(--eb-border-gold-strong); background: var(--eb-surface-row-hover); }
button:disabled { opacity: .4; cursor: not-allowed; }
#befehlsleiste { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 4px; white-space: nowrap; z-index: 22; }
#befehlsleiste .gruppe { display: flex; gap: 5px; }
#befehlsleiste button { width: 40px; height: 40px; padding: 5px; border: 1px solid var(--eb-border-frame); background: var(--eb-grad-row); }
#befehlsleiste button img, .ui-icon { width: 22px; height: 22px; object-fit: contain; vertical-align: middle; }
#befehlsleiste button.aktiv { border-color: var(--eb-focus-ring); box-shadow: 0 0 0 1px var(--eb-focus-ring); }
#tempo-gruppe button { width: 44px; font-size: var(--eb-size-caption); }
#nachrichtenzeile { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); max-width: 60vw; padding: 7px 18px; color: var(--eb-text-gold); background: rgba(12,11,10,.88); border: 1px solid var(--eb-border-hairline); border-radius: 4px; text-align: center; pointer-events: none !important; z-index: 21; }
#nachrichtenzeile.aufblitzen { animation: aufblitzen .4s; }
@keyframes aufblitzen { from { border-color: var(--eb-focus-ring); } }
#auswahlrahmen { position: fixed; z-index: 25; border: 1px dashed var(--eb-focus-ring); background: rgba(200,166,90,.08); pointer-events: none; }
.befehl-marker { position: absolute; width: 26px; height: 26px; border: 2px solid var(--eb-gold-400); border-radius: 50%; transform: translate(-50%, -50%) scale(0.6); pointer-events: none; animation: befehl-puls .55s ease-out forwards; z-index: 15; }
@keyframes befehl-puls { from { transform: translate(-50%, -50%) scale(0.5); opacity: 1; } to { transform: translate(-50%, -50%) scale(2.2); opacity: 0; } }
/* --- Gefechtsanalyse (AnalysisOverlay, Design System) ----------------------
 * Rechts über der Minikarte: nie über Bauliste, Zielen, Minikarte oder
 * Befehlsleiste. Kein Mausfang, nie dauerhaft (Zeiten in oberflaeche.js). */
#analyse-overlay { position: absolute; right: 14px; bottom: calc(14px + min(200px, 18vw) + 30px); z-index: var(--eb-z-overlay); width: 300px; max-width: calc(100vw - 28px); box-sizing: border-box; pointer-events: none !important; opacity: 0; transform: translateY(6px); transition: opacity var(--eb-dur-exit) var(--eb-ease-calm), transform var(--eb-dur-exit) var(--eb-ease-calm); border-radius: var(--eb-radius-panel); border: var(--eb-frame-width) solid var(--eb-border-frame); outline: 1px solid var(--eb-border-iron); background: linear-gradient(180deg, rgba(31,27,21,.88) 0%, rgba(20,17,13,.88) 100%); box-shadow: var(--eb-emboss-inner), var(--eb-shadow-tooltip); }
/* leicht transparent (Vorgabe): Glas über dem Spielfeld; ohne backdrop-filter bleibt .88 */
@supports ((backdrop-filter: blur(6px)) or (-webkit-backdrop-filter: blur(6px))) {
  #analyse-overlay { background: linear-gradient(180deg, rgba(31,27,21,.78) 0%, rgba(20,17,13,.78) 100%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
#analyse-overlay * { pointer-events: none !important; }
#analyse-overlay.sichtbar { opacity: 1; transform: translateY(0); transition: var(--eb-transition-overlay); }
.analyse-kopf { display: flex; align-items: center; gap: var(--eb-space-s); padding: 9px var(--eb-space-m); border-bottom: 1px solid rgba(0,0,0,.6); box-shadow: var(--eb-emboss-divider); }
.analyse-kopf img { height: 30px; width: auto; }
.analyse-kopf span { font: var(--eb-type-panel-title); letter-spacing: var(--eb-tracking-title); text-transform: uppercase; color: var(--eb-text-gold); }
.analyse-mitte { display: flex; align-items: center; justify-content: center; gap: var(--eb-space-m); padding: var(--eb-space-m) var(--eb-space-m) var(--eb-space-s); text-align: center; }
.analyse-zahl { font-family: var(--eb-font-numeric); font-weight: var(--eb-weight-semibold); font-size: var(--eb-size-num-hero); font-variant-numeric: tabular-nums lining-nums; line-height: 1; color: var(--eb-text-primary); text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.analyse-label { margin-top: 3px; font: var(--eb-type-label); font-weight: 400; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); }
.analyse-spur { fill: none; stroke: var(--eb-track); stroke-width: 5; }
.analyse-ring { fill: none; stroke-width: 5; stroke-linecap: butt; transition: stroke-dasharray var(--eb-dur-base) var(--eb-ease-standard); }
.analyse-ring.gut { stroke: var(--eb-success); }
.analyse-ring.mittel { stroke: var(--eb-warning); }
.analyse-ring.schlecht { stroke: var(--eb-danger); }
.analyse-preis { margin: 0 var(--eb-space-m) var(--eb-space-s); padding: 7px 10px 8px; border: 1px solid var(--eb-border-iron); border-radius: 3px; background: rgba(0,0,0,.28); box-shadow: inset 0 1px 0 var(--eb-emboss-light); }
.analyse-preis-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: var(--eb-space-s); font: var(--eb-type-label); font-size: var(--eb-size-label); color: var(--eb-text-secondary); }
.analyse-preis-kopf b { font-family: var(--eb-font-numeric); font-weight: var(--eb-weight-semibold); font-size: calc(var(--eb-size-label) * 1.25); font-variant-numeric: tabular-nums lining-nums; }
.analyse-preis.gering .analyse-preis-kopf b { color: var(--eb-success-text); }
.analyse-preis.mittel .analyse-preis-kopf b { color: var(--eb-warning-text); }
.analyse-preis.hoch .analyse-preis-kopf b { color: var(--eb-danger-text); }
.analyse-preis-spur { display: flex; gap: 2px; height: 7px; margin: 6px 0 5px; border-radius: 2px; overflow: hidden; background: var(--eb-track); border: 1px solid var(--eb-border-iron); }
.analyse-preis-spur i { display: block; height: 100%; min-width: 0; }
.analyse-preis-spur .bleibt { background: linear-gradient(180deg, var(--eb-gold-400) 0%, var(--eb-gold-600) 100%); }
.analyse-preis-spur .faellt { background: repeating-linear-gradient(135deg, #95403C 0 3px, #6E2E2B 3px 6px); }
.analyse-preis-satz { font: var(--eb-type-label); font-weight: 400; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); line-height: 1.3; }
.analyse-faktoren { display: flex; flex-direction: column; gap: 7px; padding: 0 var(--eb-space-m) var(--eb-space-s); }
.analyse-faktor { display: flex; align-items: center; gap: var(--eb-space-s); }
.analyse-faktor-name { flex: 1; min-width: 0; font: var(--eb-type-body); font-size: var(--eb-size-label); color: var(--eb-text-secondary); line-height: 1.25; overflow-wrap: anywhere; }
.analyse-faktor-spur { display: flex; flex: 0 0 64px; height: 6px; border-radius: 2px; overflow: hidden; background: var(--eb-track); border: 1px solid var(--eb-border-iron); }
.analyse-faktor-spur.minus { justify-content: flex-end; }
.analyse-faktor-spur i { display: block; height: 100%; }
.analyse-faktor-spur.plus i { background: linear-gradient(180deg, #5FBE77 0%, #3D8550 100%); }
.analyse-faktor-spur.minus i { background: linear-gradient(180deg, #C6635D 0%, #95403C 100%); }
.analyse-faktor-wert { flex: 0 0 58px; white-space: nowrap; text-align: right; font-family: var(--eb-font-numeric); font-weight: var(--eb-weight-semibold); font-size: var(--eb-size-label); font-variant-numeric: tabular-nums lining-nums; }
.analyse-faktor-wert.plus { color: var(--eb-success-text); }
.analyse-faktor-wert.minus { color: var(--eb-danger-text); }
.analyse-klippe { font: var(--eb-type-body); font-size: var(--eb-size-label); color: var(--eb-text-primary); line-height: 1.35; overflow-wrap: anywhere; }
.analyse-klippe b { font-weight: var(--eb-weight-semibold); }
.analyse-klippe-grund { white-space: nowrap; }
.analyse-klippe-satz { margin-top: 2px; color: var(--eb-text-secondary); font-size: var(--eb-size-caption); }
.analyse-hinweis { padding: 0 var(--eb-space-m) 7px; text-align: center; font: var(--eb-type-label); font-weight: 400; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); }
.analyse-status { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px var(--eb-space-m) 11px; border-top: 1px solid rgba(0,0,0,.55); box-shadow: inset 0 1px 0 var(--eb-emboss-light); font: var(--eb-type-label); font-weight: 400; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); }
.analyse-status span { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--eb-gold-600); border-top-color: transparent; display: inline-block; }
@media (prefers-reduced-motion: reduce) {
  #analyse-overlay, #analyse-overlay.sichtbar { transform: none; transition: none; }
  .analyse-ring { transition: none; }
}
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-thumb { background: var(--eb-border-frame); }
@media (max-width: 1480px) { #minikarte-kasten { bottom: 84px; } } /* Befehlsleiste (1013 px, mittig) traefe sonst die Minikarte */
@media (max-width: 900px) { #bauliste { width: 190px; } #auswahlanzeige { left: 12px; bottom: 74px; width: min(380px, calc(100vw - 24px)); } #minikarte { width: 150px; } }
@media (max-width: 640px) { #nahrung-hinweis { top: 78px; } #rohstoffleiste { left: 8px; right: 8px; transform: none; gap: 8px; font-size: 12px; } #bauliste { top: 54px; width: 170px; max-height: 42vh; } #zielliste { top: 54px; right: 8px; width: 170px; font-size: 12px; } #minikarte-kasten { right: 8px; bottom: 8px; } #minikarte { width: 120px; } #befehlsleiste { left: 8px; right: 8px; bottom: 8px; transform: none; gap: 5px; } #befehlsleiste button { width: 34px; height: 34px; } }

/* ---- Balancing-Labor (Taste B): Befunde des Berichts im Spiel ---------------------------- */
#labor { position: absolute; inset: 0; z-index: var(--eb-z-modal); display: grid; place-items: center; padding: 24px; background: var(--eb-surface-scrim); }
#labor .nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.labor-panel { width: min(1640px, 100%); max-height: calc(100vh - 48px); overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 18px 22px 16px; background: var(--eb-grad-panel); border: var(--eb-frame-width, 2px) solid var(--eb-border-frame); outline: 1px solid var(--eb-border-iron); border-radius: var(--eb-radius-panel); box-shadow: var(--eb-emboss-inner), 0 24px 70px rgba(0,0,0,.6); animation: labor-auf var(--eb-dur-base) var(--eb-ease-standard); }
@keyframes labor-auf { from { opacity: 0; transform: translateY(8px); } }
#labor :focus-visible { outline: none; box-shadow: var(--eb-ring-focus); }
#labor .labor-titel:focus { box-shadow: none; outline: none; }
.labor-kopf { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--eb-border-frame); }
.labor-kopf img { width: 34px; height: 34px; object-fit: contain; }
.labor-kopf-text { flex: 1; }
.labor-titel { margin: 0; color: var(--eb-text-gold); font: var(--eb-type-h2); letter-spacing: var(--eb-tracking-title); }
.labor-unterzeile { margin: 2px 0 0; color: var(--eb-text-secondary); font-size: var(--eb-size-caption); }
.labor-zu { width: 36px; height: 36px; border: 1px solid var(--eb-border-frame); border-radius: 3px; background: var(--eb-grad-row); font-size: 22px; line-height: 1; }
.labor-zu:hover { border-color: var(--eb-border-gold-strong); }
.labor-kennwerte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.labor-kachel { display: flex; flex-direction: column; gap: 4px; padding: 10px 14px; border: 1px solid var(--eb-border-frame); border-radius: 4px; background: var(--eb-grad-row); }
.labor-zahl { font: var(--eb-type-num-lg); font-variant-numeric: tabular-nums; color: var(--eb-text-primary); display: flex; align-items: center; gap: 8px; }
.labor-zahl .vorher { color: var(--eb-text-secondary); }
.labor-etikett, .kpi-etikett { color: var(--eb-text-secondary); font-size: var(--eb-size-caption); }
.pfeil { color: var(--eb-text-muted); padding: 0 6px; }
.gut { color: var(--eb-success-text); } .warn { color: var(--eb-warning-text); }
.labor-raster { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; }
.labor-spalte { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.labor-abschnitt { padding: 12px 14px 14px; border: 1px solid var(--eb-border-frame); border-radius: 4px; background: rgba(0,0,0,.16); }
.labor-abschnitt h3 { margin: 0 0 6px; color: var(--eb-text-gold); font: var(--eb-type-panel-title); text-transform: uppercase; letter-spacing: var(--eb-tracking-title); }
.labor-lead, .labor-feinzeile, .labor-status { margin: 0 0 10px; color: var(--eb-text-secondary); font-size: var(--eb-size-caption); line-height: 1.45; }
.labor-feinzeile { display: block; margin: 4px 0 0; color: var(--eb-text-muted); }
.labor-status { display: flex; align-items: center; gap: 10px; min-height: 120px; justify-content: center; }
.labor-kreisel { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--eb-border-frame); border-top-color: var(--eb-text-gold); animation: labor-dreh 0.9s linear infinite; }
@keyframes labor-dreh { to { transform: rotate(360deg); } }

/* Herkunft: Form statt Farbe allein – Punkt voll, halb, Ring */
.herkunft { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; flex: none; border: 1.5px solid var(--eb-text-secondary); }
.herkunft.belegt { background: var(--eb-text-primary); border-color: var(--eb-text-primary); }
.herkunft.geschaetzt { background: linear-gradient(90deg, var(--eb-text-secondary) 50%, transparent 50%); }
.herkunft.gesetzt { background: transparent; border-color: var(--eb-text-muted); }
.labor-legende { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.labor-legende .herkunft { margin-left: 8px; }

/* Duellblatt */
.labor-blatt { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.labor-blatt th { color: var(--eb-text-secondary); font: var(--eb-type-label); font-size: var(--eb-size-caption); text-align: center; padding: 4px; }
.labor-blatt th[scope="row"] { text-align: right; width: 18%; }
.labor-blatt td { position: relative; height: 66px; padding: 13px 4px 5px; text-align: center; border-radius: 3px; border: 1px solid rgba(0,0,0,.35); vertical-align: middle; }
.labor-blatt td.korrekturziel { box-shadow: inset 0 0 0 1px rgba(200,166,90,.35); }
.labor-blatt td.dominant { border: 2px solid var(--eb-text-primary); }
.zelle-p { display: block; font: var(--eb-type-num-lg); font-variant-numeric: tabular-nums; color: var(--eb-text-primary); }
.zelle-w { display: inline-flex; align-items: center; gap: 4px; font-size: var(--eb-size-micro); color: var(--eb-text-primary); opacity: .82; font-variant-numeric: tabular-nums; }
.zelle-v { font-size: var(--eb-size-micro); color: var(--eb-text-primary); opacity: .82; font-variant-numeric: tabular-nums; white-space: nowrap; }
.zelle-zeile { display: flex; justify-content: center; align-items: baseline; gap: 6px; flex-wrap: nowrap; }
.zelle-d { display: block; font-size: var(--eb-size-micro); font-weight: 600; color: var(--eb-text-primary); }
.zelle-d.minus { color: #F2C3C0; } .zelle-d.plus { color: #BFE6C8; }
.zelle-marke { position: absolute; top: 2px; left: 0; right: 0; font-size: 9px; text-align: center; letter-spacing: .06em; text-transform: uppercase; color: var(--eb-text-primary); }
.labor-skala { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--eb-text-muted); font-size: var(--eb-size-micro); }
.labor-skala i { flex: 1; height: 6px; border-radius: 3px; background: linear-gradient(90deg, rgb(107,46,43), rgb(42,35,26)); }
.labor-skala i.hoch { background: linear-gradient(90deg, rgb(42,35,26), rgb(47,95,59)); }

/* Korrektur */
.labor-schalterzeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.labor-schalterzeile h3 { margin: 0; }
.labor-schalter { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 8px; border: 1px solid var(--eb-border-frame); border-radius: 18px; background: var(--eb-grad-row); font: var(--eb-type-label); }
.labor-schalter:hover { border-color: var(--eb-border-gold-strong); }
.labor-schalter:disabled { opacity: .5; cursor: not-allowed; }
.schalter-spur { position: relative; width: 38px; height: 20px; border-radius: 10px; background: var(--eb-track, #2a241b); border: 1px solid var(--eb-border-iron); }
.schalter-spur i { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--eb-text-secondary); transition: transform var(--eb-dur-base) var(--eb-ease-standard), background var(--eb-dur-base); }
.labor-schalter[aria-checked="true"] .schalter-spur { background: rgba(77,166,98,.35); border-color: var(--eb-success); }
.labor-schalter[aria-checked="true"] .schalter-spur i { transform: translateX(18px); background: var(--eb-success-text); }
.labor-werte { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: var(--eb-size-caption); }
.labor-werte dt { color: var(--eb-text-muted); }
.labor-werte dd { margin: 0; color: var(--eb-text-primary); }
.labor-kette { display: inline-flex; align-items: center; flex-wrap: wrap; font-variant-numeric: tabular-nums; margin-left: 4px; }
.labor-kette > span:not(.pfeil) { display: inline-flex; align-items: center; gap: 4px; }
.labor-urteil { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 10px; border: 1px solid currentColor; font-weight: 600; }
.labor-zuordnung { width: 100%; border-collapse: collapse; font-size: var(--eb-size-caption); }
.labor-zuordnung caption { text-align: left; color: var(--eb-text-muted); padding-bottom: 4px; }
.labor-zuordnung th { text-align: left; color: var(--eb-text-muted); font-weight: 600; border-bottom: 1px solid var(--eb-border-frame); padding: 3px 6px; }
.labor-zuordnung td { padding: 3px 6px; border-bottom: 1px solid rgba(74,62,44,.45); }
.labor-zuordnung tr.korrekturziel td { color: var(--eb-text-gold); }

/* Dominanz-Liste: Intervall mit Schwellenlinie */
.dom-kopf, .dom-liste li { display: grid; grid-template-columns: 48px minmax(0, 1.25fr) minmax(0, 1fr) 46px 72px; align-items: center; gap: 10px; }
.dom-kopf { color: var(--eb-text-muted); font-size: var(--eb-size-micro); padding: 0 4px 4px; }
.dom-achse { position: relative; display: flex; justify-content: space-between; }
.dom-achse { justify-content: flex-end; }
.dom-achse b { position: absolute; left: var(--schwelle); transform: translateX(-3px); color: var(--eb-warning-text); font-weight: 600; white-space: nowrap; }
.dom-liste { list-style: none; margin: 0; padding: 0; max-height: 470px; overflow: auto; border-radius: 3px; }
.dom-liste li { padding: 4px; font-size: var(--eb-size-caption); border-bottom: 1px solid rgba(74,62,44,.45); }
.dom-liste li:nth-child(odd) { background: rgba(255,255,255,.02); }
.dom-kennung { color: var(--eb-text-secondary); font-variant-numeric: tabular-nums; }
.dom-truppen { display: flex; align-items: baseline; gap: 4px; min-width: 0; white-space: nowrap; }
.dom-namen { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dom-rest { flex: none; }
.dom-spur { position: relative; height: 14px; background: linear-gradient(90deg, transparent calc(var(--schwelle) - 1px), var(--eb-warning) calc(var(--schwelle) - 1px), var(--eb-warning) calc(var(--schwelle) + 1px), transparent calc(var(--schwelle) + 1px)), var(--eb-track, rgba(0,0,0,.3)); border-radius: 2px; }
.dom-spur .band { position: absolute; top: 4px; height: 6px; border-radius: 3px; background: rgba(127,196,143,.55); }
.dom-spur .punkt { position: absolute; top: 2px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: var(--eb-text-primary); }
.dom-zahl { text-align: right; font-variant-numeric: tabular-nums; display: inline-flex; justify-content: flex-end; align-items: center; gap: 5px; }
.dom-zahl.unten { color: var(--eb-success-text); }

/* Belegbilanz + KPI */
.bilanz-balken { display: flex; height: 12px; border-radius: 6px; overflow: hidden; border: 1px solid var(--eb-border-iron); }
.bilanz-balken .belegt { background: var(--eb-text-primary); }
.bilanz-balken .geschaetzt { background: var(--eb-text-secondary); }
.bilanz-balken .gesetzt { background: repeating-linear-gradient(135deg, #4a4232 0 4px, #2e281e 4px 8px); }
.bilanz-zahlen { display: flex; flex-wrap: wrap; gap: 14px; margin: 6px 0 12px; font-size: var(--eb-size-caption); }
.bilanz-zahlen > span { display: inline-flex; align-items: center; gap: 5px; }
.kpi-reihe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border: 1px solid rgba(74,62,44,.6); border-radius: 3px; }
.kpi-zahl { font: var(--eb-type-num); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.labor-fuss { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--eb-border-frame); color: var(--eb-text-muted); font-size: var(--eb-size-micro); }
@media (max-width: 1200px) { .labor-raster { grid-template-columns: 1fr; } .labor-kennwerte { grid-template-columns: repeat(2, 1fr); } }
@media (prefers-reduced-motion: reduce) { .labor-panel { animation: none; } .labor-kreisel { animation: none; } .schalter-spur i { transition: none; } }

/* Labor: Belastbarkeit, Kostenkurve, Gates */
.belastbar-zeile { display: grid; grid-template-columns: 120px 1fr 52px; align-items: center; gap: 8px; font-size: var(--eb-size-caption); margin: 3px 0; }
.belastbar-spur { height: 10px; border-radius: 5px; background: rgba(0,0,0,.35); overflow: hidden; }
.belastbar-spur i { display: block; height: 100%; background: var(--eb-text-gold); }
.belastbar-wert { text-align: right; font-variant-numeric: tabular-nums; }
.labor-urteilzeile { margin: 6px 0 0; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); }
.labor-urteil.warn { color: var(--eb-warning-text); }
.labor-urteil.gut { color: var(--eb-success-text); }
.labor-sperre { margin: 0 0 8px; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); }
.kosten-diagramm { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; margin-top: 6px; background: rgba(0,0,0,.2); border-radius: 3px; }
.kosten-diagramm circle { fill: var(--eb-text-gold); }
.kosten-diagramm polyline { fill: none; stroke-width: 1.6; }
.kosten-diagramm .gemessen { stroke: var(--eb-warning-text); }
.kosten-diagramm .fair { stroke: var(--eb-text-muted); stroke-dasharray: 4 3; }
.kosten-legende { display: flex; gap: 14px; margin: 4px 0 0; font-size: var(--eb-size-caption); }
.l-gemessen { color: var(--eb-warning-text); } .l-fair { color: var(--eb-text-muted); }
.kosten-diagramm .rahmen { fill: none; stroke: var(--eb-border-frame); stroke-width: 1; }
.kosten-diagramm .gitter { stroke: rgba(255,255,255,.08); stroke-width: .6; }
.kosten-diagramm .strich { stroke: var(--eb-text-muted); stroke-width: 1; }
.kosten-diagramm text { fill: var(--eb-text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.kosten-diagramm .achse { fill: var(--eb-text-muted); font-size: 11.5px; }
.gate-grund { display: block; margin-top: 2px; font-size: var(--eb-size-micro); color: var(--eb-text-muted); line-height: 1.35; }
.labor-untertitel { margin: 10px 0 4px; font-size: var(--eb-size-caption); color: var(--eb-text-secondary); font-weight: 600; }
.zahl-rechts { text-align: right; font-variant-numeric: tabular-nums; }
.flanken-diagramm { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; margin-top: 6px; background: rgba(0,0,0,.2); border-radius: 3px; }
.flanken-diagramm .rahmen { fill: none; stroke: var(--eb-border-frame); stroke-width: 1; }
.flanken-diagramm .gitter { stroke: rgba(255,255,255,.08); stroke-width: .6; }
.flanken-diagramm .strich { stroke: var(--eb-text-muted); stroke-width: 1; }
.flanken-diagramm text { fill: var(--eb-text-secondary); font-size: 11px; font-variant-numeric: tabular-nums; }
.flanken-diagramm .achse { fill: var(--eb-text-muted); font-size: 11.5px; }
.flanken-diagramm polyline { fill: none; stroke-width: 2; }
.flanken-diagramm .flanke-2 { stroke: var(--eb-text-gold); }
.flanken-diagramm .flanke-3 { stroke: var(--eb-text-muted); stroke-dasharray: 4 3; }
.l-flanke2 { color: var(--eb-text-gold); } .l-flanke3 { color: var(--eb-text-muted); }

/* --- Zwischensequenzen 17.11. (js/zwischensequenz.js) -------------------- */
.sequenz {
  --seq-eule: #9fd8ff;
  --seq-baron: #c79be6;
  position: fixed; inset: 0; z-index: 120; background: #070605; overflow: hidden; cursor: pointer;
  opacity: 0; transition: opacity 600ms ease;
}
.sequenz.sichtbar { opacity: 1; }
.sequenz-ebenen, .sequenz-ebene { position: absolute; inset: 0; }
.sequenz-ebene { opacity: 0; transition: opacity 1100ms ease; }
.sequenz-ebene.aktiv { opacity: 1; }
.sequenz-ebene > img, .sequenz-ebene > video {
  width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 50%;
  animation: seq-kamera-0 18s ease-out forwards;
}
.sequenz-ebene.kamera-1 > img { animation-name: seq-kamera-1; }
.sequenz-ebene.kamera-2 > img { animation-name: seq-kamera-2; }
.sequenz-ebene > video { animation: none; }
@keyframes seq-kamera-0 { from { transform: scale(1.04) translate(0, 0); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
@keyframes seq-kamera-1 { from { transform: scale(1.14) translate(1.5%, 0.5%); } to { transform: scale(1.04) translate(0, 0); } }
@keyframes seq-kamera-2 { from { transform: scale(1.06) translate(-1.5%, 1%); } to { transform: scale(1.12) translate(1.5%, -0.5%); } }
.sequenz-titeltafel { display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 45%, #2a2116 0%, #0d0a07 62%, #050403 100%); }
.sequenz-titeltafel > img { width: min(62vw, 880px); height: auto; object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(200, 166, 90, 0.35)); animation: seq-titel 6s ease-out forwards; }
@keyframes seq-titel { from { transform: scale(0.94); opacity: 0; } 30% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
.sequenz-vignette { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(5, 4, 3, 0.55) 0%, transparent 16%, transparent 58%, rgba(5, 4, 3, 0.92) 100%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.5) 100%); }
.sequenz-untertitel {
  position: absolute; left: 50%; bottom: clamp(28px, 7vh, 72px); transform: translate(-50%, 12px);
  width: min(88vw, 1080px); text-align: center; opacity: 0; transition: opacity 350ms ease, transform 350ms ease;
}
.sequenz-untertitel.sichtbar { opacity: 1; transform: translate(-50%, 0); }
.sequenz-sprecher {
  font: 600 clamp(12px, 1.15vw, 15px) / 1.2 var(--eb-font-display); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--eb-text-gold); margin-bottom: 0.55em; text-shadow: 0 1px 8px #000;
}
.sequenz-sprecher[data-sprecher="eule"] { color: var(--seq-eule); }
.sequenz-sprecher[data-sprecher="baron"] { color: var(--seq-baron); }
.sequenz-text {
  font: 500 clamp(19px, 2.05vw, 30px) / 1.38 var(--eb-font-display); color: var(--eb-text-primary);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.95), 0 0 2px #000; text-wrap: balance;
}
.sequenz-hilfe {
  position: absolute; top: 20px; right: 24px; font: 500 13px/1 var(--eb-font-display); letter-spacing: 0.06em;
  color: rgba(239, 231, 210, 0.62);
}
.sequenz-start {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 16px 34px; font: 600 clamp(18px, 1.6vw, 24px) / 1 var(--eb-font-display); letter-spacing: 0.08em;
  color: var(--eb-text-gold); background: rgba(18, 16, 13, 0.9); border: 1px solid var(--eb-border-gold-strong);
  border-radius: 4px; cursor: pointer;
}
.sequenz-start:focus-visible { outline: none; box-shadow: var(--eb-ring-focus); }
@media (prefers-reduced-motion: reduce) {
  .sequenz-ebene > img, .sequenz-titeltafel > img { animation: none; }
  .sequenz-ebene, .sequenz, .sequenz-untertitel { transition-duration: 1ms; }
}

/* Leistungscheck 17.11.: Pop-up, wenn das Gerät die Grafikstufe nicht trägt */
.leistung-hinweis { max-width: min(520px, calc(100vw - 32px)); padding: 26px 28px 22px; color: var(--eb-text-primary); border-radius: var(--eb-radius-panel); border: var(--eb-frame-width) solid var(--eb-border-frame); outline: 1px solid var(--eb-border-iron); background: linear-gradient(180deg, rgba(31,27,21,.97) 0%, rgba(20,17,13,.97) 100%); box-shadow: var(--eb-emboss-inner), var(--eb-shadow-tooltip); font: inherit; line-height: 1.5; }
.leistung-hinweis::backdrop { background: var(--eb-surface-scrim); }
.leistung-hinweis h2 { margin: 0 0 12px; font-family: var(--eb-font-display); color: var(--eb-text-gold); font-size: 1.35rem; letter-spacing: .02em; }
.leistung-hinweis p { margin: 0 0 10px; }
.leistung-hinweis strong { color: var(--eb-text-gold); }
.leistung-hinweis .leistung-tipp { opacity: .8; font-size: .92em; }
.leistung-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.leistung-knoepfe .menueknopf { flex: 1 1 auto; text-align: center; }

/* Rechtslink in der Titel-Fußzeile (17.11.) */
.titel-fuss .titel-recht { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.titel-fuss .titel-recht:hover, .titel-fuss .titel-recht:focus-visible { color: var(--eb-text-gold); }
