/* Sturmbrecher Map Maker (sturmbrecher-buch.de/map-maker/)
   Oberfläche des Karten-Tools. Dunkles, ruhiges Werkzeug-Chrome, damit die
   Karte selbst die einzige farbige Fläche im Bild bleibt.
   Schriften: EB Garamond, lokal gehostet aus ../../fonts/ (DSGVO). */

@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../../fonts/eb-garamond-v33-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('../../fonts/eb-garamond-v33-latin-italic-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg:        #16181d;
  --bg-2:      #1d2027;
  --bg-3:      #24282f;
  --line:      #33383f;
  --line-2:    #444a53;
  --fg:        #e6e8ec;
  --fg-dim:    #9aa1ac;
  --fg-faint:  #6b7280;
  --accent:    #6f9cf5;
  --accent-2:  #2f7fff;
  --warn:      #d9834a;
  --danger:    #d0574a;
  --radius:    7px;
  --tb:        176px;
  --top:       46px;
  --side:      304px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }

/* Die App füllt den Viewport; darunter folgt scrollbar der Info-Bereich. */
#app {
  display: grid;
  grid-template-columns: var(--tb) 1fr var(--side);
  grid-template-rows: var(--top) 1fr;
  grid-template-areas:
    "top top top"
    "tools stage side";
  height: 100vh;
  height: 100dvh;
}

/* ---------- Kopfleiste ---------- */

#topbar {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 7px; padding-right: 4px; }
.brand-mark { font-size: 16px; color: var(--accent); }
.brand-name {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 18px; font-weight: 600; letter-spacing: .02em;
  white-space: nowrap;
}

.map-name {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 5px 10px;
  width: 210px;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px;
}
.map-name:focus { outline: none; border-color: var(--accent); }

.spacer { flex: 1; }

.top-group {
  display: flex; align-items: center; gap: 3px;
  padding: 0 6px;
  border-left: 1px solid var(--line);
}
.top-group:first-of-type { border-left: none; }

.tb {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--fg-dim);
  height: 28px; min-width: 28px;
  padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .12s, color .12s;
}
.tb:hover { background: var(--bg-3); color: var(--fg); }
.tb:disabled { opacity: .32; cursor: default; }
.tb:disabled:hover { background: transparent; color: var(--fg-dim); }
.tb.wide { padding: 0 11px; }
.tb.primary { background: var(--accent-2); color: #fff; }
.tb.primary:hover { background: #4a90ff; }
.tb.active { background: var(--bg-3); color: var(--accent-2); box-shadow: inset 0 0 0 1px var(--accent-2); }

.zoom-label {
  min-width: 50px; text-align: center;
  background: transparent; border: 1px solid transparent; border-radius: 5px;
  color: var(--fg-dim); font-variant-numeric: tabular-nums;
  font-size: 12px; height: 28px;
}
.zoom-label:hover { background: var(--bg-3); color: var(--fg); }

.menu-wrap { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 4px;
  min-width: 200px;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  display: none;
  z-index: 40;
}
.dropdown.open { display: block; }
.dropdown button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: none; border-radius: 5px;
  padding: 7px 10px; color: var(--fg-dim);
}
.dropdown button:hover { background: var(--bg-2); color: var(--fg); }

/* ---------- Werkzeugleiste ---------- */

#toolbar {
  grid-area: tools;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 5px 6px 12px;
  display: flex; flex-direction: column; gap: 1px;
  overflow-y: auto; overflow-x: hidden;
  z-index: 15;
}
#toolbar::-webkit-scrollbar { width: 0; }
#toolList { display: flex; flex-direction: column; gap: 1px; }

.tool-collapse {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: none; border-radius: var(--radius);
  color: var(--fg-faint); padding: 5px 7px; margin-bottom: 4px;
  font-size: 11.5px; flex: 0 0 auto;
}
.tool-collapse:hover { background: var(--bg-3); color: var(--fg-dim); }
.tc-icon { font-size: 13px; width: 20px; text-align: center; flex: 0 0 auto; }

.tool-group-title {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--fg-faint); font-weight: 600;
  padding: 9px 8px 3px;
  flex: 0 0 auto;
}

.tool-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; min-height: 30px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--fg-dim);
  padding: 4px 7px;
  text-align: left;
  position: relative;
  flex: 0 0 auto;
}
.tool-btn .ti { font-size: 14px; width: 20px; text-align: center; flex: 0 0 auto; }
.tool-btn .tl { flex: 1; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-btn .tk {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9.5px; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 0 3px; flex: 0 0 auto;
}
.tool-btn:hover { background: var(--bg-3); color: var(--fg); }
.tool-btn.active { background: var(--accent-2); color: #fff; }
.tool-btn.active .tk { color: rgba(255,255,255,.7); border-color: rgba(255,255,255,.3); }

/* Hover-Info */
.tool-btn::after {
  content: attr(data-tip);
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%);
  background: #0d0f13; color: var(--fg);
  border: 1px solid var(--line-2);
  padding: 6px 10px; border-radius: 6px;
  width: max-content; max-width: 250px;
  font-size: 11.5px; line-height: 1.45;
  box-shadow: 0 6px 20px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .12s .3s;
  z-index: 60;
}
.tool-btn:hover::after { opacity: 1; }

/* Eingeklappt: nur Symbole */
#app.tools-collapsed { grid-template-columns: 46px 1fr var(--side); }
#app.tools-collapsed #toolbar { padding: 5px 4px 12px; }
#app.tools-collapsed .tool-btn { justify-content: center; padding: 4px; }
#app.tools-collapsed .tool-btn .tl,
#app.tools-collapsed .tool-btn .tk,
#app.tools-collapsed .tc-label { display: none; }
#app.tools-collapsed .tool-group-title {
  font-size: 0; padding: 7px 0 3px; text-align: center;
}
#app.tools-collapsed .tool-group-title::after {
  content: ''; display: block; height: 1px; background: var(--line); margin: 0 6px;
}
#app.tools-collapsed .tc-icon { transform: rotate(180deg); }

/* ---------- Bühne ---------- */

#stage { grid-area: stage; position: relative; overflow: hidden; background: #0f1115; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

#statusbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 22px;
  display: flex; align-items: center; gap: 16px;
  padding: 0 10px;
  background: rgba(13,15,19,.72);
  backdrop-filter: blur(4px);
  border-top: 1px solid var(--line);
  color: var(--fg-faint);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
#statusHint { color: var(--fg-dim); }
#statusCount { margin-left: auto; }

/* ---------- Seitenpanel ---------- */

#sidebar {
  grid-area: side;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  display: flex; flex-direction: column;
  overflow: hidden;
}

.tabs { display: flex; border-bottom: 1px solid var(--line); flex: 0 0 auto; }
.tab {
  flex: 1;
  background: transparent; border: none;
  border-bottom: 2px solid transparent;
  padding: 9px 4px;
  color: var(--fg-faint);
  font-size: 12px;
}
.tab:hover { color: var(--fg-dim); }
.tab.active { color: var(--fg); border-bottom-color: var(--accent-2); }

.panel { display: none; overflow-y: auto; padding: 4px 0 40px; flex: 1; }
.panel.active { display: block; }
.panel::-webkit-scrollbar { width: 9px; }
.panel::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--bg-2); }

.group { padding: 12px 13px; border-bottom: 1px solid var(--line); }
.group-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--fg-faint); margin-bottom: 10px; font-weight: 600;
}

.row { margin-bottom: 10px; }
.row:last-child { margin-bottom: 0; }
.row > label {
  display: flex; justify-content: space-between; align-items: baseline;
  color: var(--fg-dim); margin-bottom: 4px; font-size: 12px;
}
.row output { color: var(--fg); font-variant-numeric: tabular-nums; font-size: 11.5px; }

.inline { display: flex; gap: 6px; align-items: center; }
.inline > input { flex: 1; }

input[type="number"], input[type="text"], select {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 5px 8px;
}
input[type="number"]:focus, input[type="text"]:focus, select:focus {
  outline: none; border-color: var(--accent);
}

input[type="range"] {
  width: 100%; height: 18px;
  -webkit-appearance: none; appearance: none;
  background: transparent;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px; background: var(--line-2); border-radius: 2px;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px; height: 13px; margin-top: -5px;
  background: var(--accent); border-radius: 50%;
  border: 2px solid var(--bg-2);
}
input[type="range"]::-moz-range-track { height: 3px; background: var(--line-2); border-radius: 2px; }
input[type="range"]::-moz-range-thumb {
  width: 13px; height: 13px; background: var(--accent);
  border-radius: 50%; border: 2px solid var(--bg-2);
}

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; margin-bottom: 10px; }
.check {
  display: flex; align-items: center; gap: 6px;
  color: var(--fg-dim); cursor: pointer;
  padding: 3px 0; font-size: 12px;
}
.check input { accent-color: var(--accent-2); width: 13px; height: 13px; cursor: pointer; }
.check:hover { color: var(--fg); }

.btn-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.btn-row button {
  flex: 1 1 92px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 7px 8px;
  color: var(--fg-dim);
  transition: background .12s, color .12s;
}
.btn-row button:hover { background: #2e333c; color: var(--fg); }
.btn-row button.big { padding: 9px; font-weight: 500; }
.btn-row button.primary { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-row button.primary:hover { background: #4a90ff; }

.mini {
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 4px 7px; color: var(--fg-dim);
}
.mini:hover { color: var(--fg); }

.hint { color: var(--fg-faint); font-size: 11.5px; line-height: 1.5; margin: 9px 0 0; }

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* Schnellfarben für die Auswahl */
.swatch-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.swatch {
  width: 22px; height: 22px; padding: 0; border-radius: 5px;
  border: 1px solid var(--line); cursor: pointer;
}
.swatch:hover { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.swatch.none {
  background: var(--bg-2); color: var(--fg-dim);
  font-size: 13px; line-height: 20px;
}
.preset {
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--bg-3);
  padding: 0; overflow: hidden;
  text-align: left;
}
.preset:hover { border-color: var(--accent); }
.preset.active { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2); }
.preset .swatches { display: flex; height: 24px; }
.preset .swatches i { flex: 1; }
.preset .pname { display: block; padding: 5px 7px; color: var(--fg-dim); font-size: 11.5px; }
.preset:hover .pname { color: var(--fg); }

/* Farbliste */
.color-row {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 0;
}
.color-row label { flex: 1; color: var(--fg-dim); font-size: 12px; }
.color-row input[type="color"] {
  width: 30px; height: 22px; padding: 0;
  background: transparent; border: 1px solid var(--line-2);
  border-radius: 4px; cursor: pointer;
}
.color-row .hex {
  width: 72px; font-size: 11px; padding: 3px 5px;
  font-variant-numeric: tabular-nums;
}
.color-group-title {
  font-size: 10.5px; color: var(--fg-faint);
  margin: 11px 0 3px; letter-spacing: .06em; text-transform: uppercase;
}
.color-group-title:first-child { margin-top: 0; }

/* Ebenenliste */
.layer-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 4px; border-radius: 5px;
}
.layer-row:hover { background: var(--bg-3); }
.layer-row .lname { flex: 1; color: var(--fg-dim); }
.layer-row .lcount { color: var(--fg-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
.layer-row button {
  background: transparent; border: none; color: var(--fg-faint);
  padding: 2px 4px; border-radius: 4px; font-size: 13px;
}
.layer-row button:hover { color: var(--fg); background: var(--bg-2); }
.layer-row button.off { opacity: .3; }

/* ---------- Overlay / Modal ---------- */

.overlay {
  position: fixed; inset: 0;
  background: rgba(8,9,12,.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  backdrop-filter: blur(3px);
}
.overlay.hidden { display: none; }
.modal {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 26px 30px;
  max-width: 620px; max-height: 82vh; overflow-y: auto;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,.6);
}
.modal h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 26px; margin: 0 0 8px; font-weight: 600;
}
.modal h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--fg-faint); margin: 20px 0 9px;
}
.modal p, .modal li { color: var(--fg-dim); line-height: 1.65; }
.modal ul { padding-left: 18px; margin: 0; }
.modal li { margin-bottom: 6px; }
.modal b { color: var(--fg); font-weight: 600; }
.modal-close {
  position: absolute; right: 12px; top: 10px;
  background: transparent; border: none; color: var(--fg-faint);
  font-size: 24px; line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.modal-close:hover { color: var(--fg); background: var(--bg-3); }

.kbd-grid { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 7px 12px; align-items: center; }
.kbd-grid kbd {
  background: var(--bg-3); border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 4px; padding: 2px 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px; color: var(--fg);
  white-space: nowrap;
}
.kbd-grid span { color: var(--fg-dim); font-size: 12px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; bottom: 34px; left: 50%;
  transform: translateX(-50%) translateY(0);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 9px 18px;
  color: var(--fg);
  box-shadow: 0 10px 34px rgba(0,0,0,.5);
  z-index: 200;
  transition: opacity .2s, transform .2s;
}
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(10px); pointer-events: none; }

/* ---------- Busy ---------- */

#stage.busy { cursor: progress; }
.spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,17,21,.55);
  color: var(--fg-dim);
  font-size: 13px;
  z-index: 5;
}

/* ---------- Schmale Fenster ---------- */

.only-narrow { display: none; }

@media (max-width: 1180px) {
  :root { --side: 262px; }
  .tb.wide { padding: 0 8px; }
  .map-name { width: 150px; }
}
@media (max-width: 1100px) {
  :root { --tb: 46px; }
  #app .tool-btn { justify-content: center; padding: 4px; }
  #app .tool-btn .tl, #app .tool-btn .tk, #app .tc-label { display: none; }
  #app .tool-group-title { font-size: 0; padding: 7px 0 3px; }
  #app .tool-group-title::after {
    content: ''; display: block; height: 1px; background: var(--line); margin: 0 6px;
  }
  #btnToolbarCollapse { display: none; }
}
@media (max-width: 980px) {
  #app { grid-template-columns: var(--tb) 1fr; grid-template-areas: "top top" "tools stage"; }
  #sidebar {
    position: fixed; right: 0; top: var(--top); bottom: 0; width: 290px;
    transform: translateX(100%); transition: transform .2s;
    z-index: 30;
    box-shadow: -12px 0 34px rgba(0,0,0,.45);
  }
  #sidebar.open { transform: none; }
  .only-narrow { display: inline-flex; }
  .brand-name { display: none; }
}
@media (max-width: 660px) {
  .top-group:nth-of-type(3) { display: none; }
  .map-name { width: 110px; }
}

/* =========================================================
   Info-Bereich unter der App: Beschreibung, Beispiele, FAQ.
   Er macht die Seite scrollbar; die App darüber bleibt 100dvh hoch.
   ========================================================= */

.info {
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.info-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 60px 24px 40px;
}
.info h1, .info h2 {
  font-family: "EB Garamond", Georgia, serif;
  font-weight: 600;
  color: var(--fg);
  letter-spacing: .01em;
}
.info h2 { font-size: 27px; line-height: 1.25; margin: 54px 0 14px; }
.info h2:first-child { margin-top: 0; }
.info h3 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); font-weight: 600; margin: 0 0 7px;
}
.info p, .info li {
  color: var(--fg-dim);
  font-size: 14.5px;
  line-height: 1.75;
}
.info p { margin: 0 0 14px; }
.info a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.info a:hover { border-bottom-color: var(--fg-dim); }
.info strong { color: var(--fg); font-weight: 600; }

.info-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: .14em;
  color: var(--fg-faint); font-weight: 600; margin: 0 0 10px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}
.info-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 12px;
}
.info-card p { font-size: 13.5px; line-height: 1.65; margin: 0; }

.info-figure { margin: 26px 0 8px; }
.info-figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: #dcd8cb;
}
.info-figure figcaption {
  color: var(--fg-faint); font-size: 12px; margin-top: 8px; line-height: 1.5;
}
.info-figures-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.info-steps { counter-reset: schritt; list-style: none; padding: 0; margin: 18px 0 8px; }
.info-steps li {
  counter-increment: schritt;
  position: relative;
  padding: 0 0 16px 44px;
}
.info-steps li::before {
  content: counter(schritt);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 50%;
  font-family: "EB Garamond", Georgia, serif;
  font-size: 15px; color: var(--fg);
}

.faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  margin-bottom: 10px;
  padding: 0 16px;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 0;
  color: var(--fg);
  font-size: 14.5px;
  font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '+'; color: var(--accent); margin-right: 10px; }
.faq details[open] summary::before { content: '\2212'; }
.faq details p { padding: 0 0 14px 21px; margin: 0; }

.info-roman {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-top: 22px;
}
.info-roman p { flex: 1 1 320px; margin: 0; }
.info-roman-btn {
  display: inline-block;
  background: var(--accent-2); color: #fff;
  border: none; border-radius: var(--radius);
  padding: 10px 18px; font-size: 13.5px;
  white-space: nowrap;
}
.info-roman-btn:hover { background: var(--accent); }
a.info-roman-btn { border-bottom: none; color: #fff; }

/* ---------- Fußzeile ---------- */

.mm-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.mm-footer-inner {
  max-width: 860px; margin: 0 auto;
  padding: 22px 24px 26px;
  display: flex; align-items: center; gap: 8px 22px; flex-wrap: wrap;
}
.mm-footer a, .mm-footer button {
  background: none; border: none; padding: 0;
  color: var(--fg-dim); font-size: 12.5px; text-decoration: none;
}
.mm-footer a:hover, .mm-footer button:hover { color: var(--fg); }
.mm-footer-copy { margin-left: auto; color: var(--fg-faint); font-size: 12px; }
@media (max-width: 660px) {
  .mm-footer-copy { margin-left: 0; width: 100%; }
}

/* ---------- Cookie-Consent-Banner (Klassen aus /js/consent.js) ---------- */

.consent {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 80;
  background: var(--bg-2);
  border-top: 1px solid var(--line-2);
  box-shadow: 0 -16px 40px rgba(0, 0, 0, .5);
  padding: 18px 22px;
}
.consent.is-visible { display: block; }
.consent-inner {
  max-width: 980px; margin: 0 auto;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.consent-copy { flex: 1 1 300px; }
.consent-title {
  font-family: "EB Garamond", Georgia, serif;
  font-size: 17px; font-weight: 600;
  color: var(--fg); margin: 0 0 6px;
}
.consent-text {
  margin: 0; color: var(--fg-dim);
  font-size: 13px; line-height: 1.6; max-width: 74ch;
}
.consent-text a { color: var(--fg); text-decoration: none; border-bottom: 1px solid var(--line-2); }
.consent-text a:hover { border-bottom-color: var(--fg-dim); }
.consent-actions { display: flex; gap: 10px; flex-shrink: 0; }
.consent-btn {
  padding: 9px 18px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: 13px;
  transition: background .12s, color .12s;
}
.consent-btn--accept { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.consent-btn--accept:hover { background: var(--accent); border-color: var(--accent); }
.consent-btn--ghost { background: transparent; color: var(--fg-dim); }
.consent-btn--ghost:hover { background: var(--bg-3); color: var(--fg); }
@media (max-width: 640px) {
  .consent-actions { width: 100%; }
  .consent-btn { flex: 1; text-align: center; }
}

/* =========================================================
   Werkzeug-Dokumentation im Info-Bereich
   ========================================================= */

.info h4 {
  font-size: 12px; text-transform: uppercase; letter-spacing: .09em;
  color: var(--accent); font-weight: 600; margin: 22px 0 8px;
}
.info h4:first-child { margin-top: 0; }

.doku-intro { margin-bottom: 20px; }

/* Aufklappbare Abschnitte */
.doku { margin: 20px 0 8px; }
.doku-gruppe {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--fg-faint); font-weight: 600;
  margin: 26px 0 10px;
}
.doku > details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  margin-bottom: 8px;
}
.doku > details[open] { border-color: var(--line-2); }
.doku > details > summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
}
.doku > details > summary::-webkit-details-marker { display: none; }
.doku > details > summary::before {
  content: '+';
  color: var(--accent);
  font-size: 15px; line-height: 1;
  width: 12px; flex: 0 0 auto; text-align: center;
}
.doku > details[open] > summary::before { content: '\2212'; }
.doku > details > summary:hover { background: var(--bg-3); border-radius: var(--radius); }
.doku summary h3 {
  font-family: inherit;
  font-size: 14.5px; font-weight: 600;
  text-transform: none; letter-spacing: 0;
  color: var(--fg); margin: 0;
}
.doku summary .doku-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 5px; margin-left: auto; flex: 0 0 auto;
}
.doku-body {
  border-top: 1px solid var(--line);
  padding: 16px;
}
.doku-body > :last-child { margin-bottom: 0; }
.doku-body p { font-size: 14px; }

/* Tabellen */
.doku-scroll { overflow-x: auto; margin: 0 0 16px; }
table.doku-tab {
  width: 100%; min-width: 460px;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.doku-tab caption {
  text-align: left; color: var(--fg-faint); font-size: 12px;
  padding-bottom: 8px;
}
table.doku-tab th, table.doku-tab td {
  text-align: left; vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.6;
}
table.doku-tab thead th {
  color: var(--fg-faint); font-weight: 600;
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  border-bottom-color: var(--line-2);
}
table.doku-tab td { color: var(--fg-dim); }
table.doku-tab td:first-child { padding-right: 16px; }
table.doku-tab .td-name { color: var(--fg); white-space: nowrap; }
table.doku-tab .td-wert { color: var(--fg); white-space: nowrap; font-variant-numeric: tabular-nums; }
table.doku-tab tbody tr:last-child th,
table.doku-tab tbody tr:last-child td { border-bottom: none; }

.doku-btn {
  display: block;
  width: 163px; height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
}
.doku-tab td kbd, .doku-body kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10.5px; color: var(--fg-dim);
  border: 1px solid var(--line-2); border-radius: 3px;
  padding: 1px 5px; white-space: nowrap;
}

/* Abbildungen */
.doku-fig { margin: 16px 0; }
.doku-fig img {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: #d9d4c5;
}
.doku-fig figcaption {
  color: var(--fg-faint); font-size: 12px; margin-top: 7px; line-height: 1.55;
}
.doku-figs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin: 16px 0;
}
.doku-figs .doku-fig { margin: 0; }
.doku-figs-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.doku-panel img { background: var(--bg-2); }
.doku-panel-row {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 20px; align-items: start;
  margin: 16px 0;
}
@media (max-width: 620px) {
  .doku-panel-row { grid-template-columns: 1fr; }
}
.doku-panel-row .doku-fig { margin: 0; }

.doku-note {
  border-left: 2px solid var(--line-2);
  padding: 2px 0 2px 14px;
  margin: 16px 0;
}
.doku-note p { margin: 0; font-size: 13.5px; }

.doku-toolbar-shot {
  display: grid;
  grid-template-columns: minmax(0, 168px) minmax(0, 1fr);
  gap: 24px; align-items: start;
  margin: 18px 0 26px;
}
@media (max-width: 620px) {
  .doku-toolbar-shot { grid-template-columns: 1fr; }
  .doku-btn { width: 100%; max-width: 163px; }
}

.doku-fig img.doku-img-klein { max-width: 620px; }

/* Schmale Bildschirme: Tabellen stapeln statt seitlich scrollen */
@media (max-width: 560px) {
  .doku-scroll { overflow-x: visible; }
  table.doku-tab,
  table.doku-tab tbody,
  table.doku-tab tr,
  table.doku-tab td { display: block; width: auto; min-width: 0; }
  table.doku-tab thead { display: none; }
  table.doku-tab tr {
    border-bottom: 1px solid var(--line);
    padding: 11px 0;
  }
  table.doku-tab tbody tr:last-child { border-bottom: none; }
  table.doku-tab td {
    border-bottom: none;
    padding: 2px 0;
    white-space: normal;
  }
  table.doku-tab td:first-child { padding-right: 0; }
  table.doku-tab .td-name { color: var(--fg); font-weight: 600; }
  table.doku-tab .td-wert { color: var(--fg-faint); font-size: 12.5px; }
}
