/* Europa - Aufbau und Handel */

:root {
  --grund: #11161d;
  --tafel: #1a212b;
  --tafel-hell: #222c39;
  --rand: #2f3b4b;
  --schrift: #dde5ef;
  --schrift-leise: #93a2b5;
  --gold: #d9ad52;
  --gold-dunkel: #8a6c28;
  --gruen: #6a9a52;
  --rot: #c35a4a;
  --blau: #4f7fb5;
  --radius: 8px;
  --kopf-hoehe: 52px;
  --reiter-hoehe: 42px;
}

* { box-sizing: border-box; }

/* Klassen mit eigenem display wuerden das hidden-Attribut sonst aushebeln. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--grund);
  color: var(--schrift);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid var(--rand);
  background: var(--tafel-hell);
  border-radius: var(--radius);
  padding: 7px 13px;
}
button:hover:not(:disabled) { background: #2b3747; border-color: #44556c; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.haupt {
  background: linear-gradient(180deg, #e0b75f, #b88e37);
  border-color: var(--gold-dunkel);
  color: #231a06;
  font-weight: 600;
}
button.haupt:hover:not(:disabled) { background: linear-gradient(180deg, #ecc570, #c79b3e); }
button.leise { background: transparent; }
button.klein { padding: 4px 9px; font-size: 13px; }
button.gefahr { border-color: #6d3028; color: #e2998e; }
button.gefahr:hover:not(:disabled) { background: #3a1f1b; }

input, select {
  font: inherit;
  color: inherit;
  background: #0e131a;
  border: 1px solid var(--rand);
  border-radius: 6px;
  padding: 8px 10px;
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--gold-dunkel); outline-offset: 0; }

h1, h2, h3 { margin: 0 0 .5em; font-weight: 600; }
h3 { font-size: 15px; color: var(--gold); letter-spacing: .02em; }

.hinweis { color: var(--schrift-leise); font-size: 13px; margin: .3em 0 .8em; }
.fehler { color: #e8917f; font-size: 14px; margin: .6em 0 0; }

/* ------------------------------------------------------------------ */
/* Startbildschirm                                                     */
/* ------------------------------------------------------------------ */

.lobby { position: fixed; inset: 0; display: grid; place-items: center; }
.lobby-karte { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .5; }
.lobby-inhalt {
  position: relative;
  width: min(560px, 92vw);
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
  background: rgba(17, 22, 29, .9);
  border: 1px solid var(--rand);
  border-radius: 14px;
  backdrop-filter: blur(3px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
}
.lobby h1 {
  font-size: 40px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .1em;
}
.untertitel { color: var(--schrift-leise); margin: 0 0 24px; }

.lobby-karten { display: grid; gap: 12px; }
.grosse-karte {
  display: grid;
  grid-template-columns: 52px 1fr;
  grid-template-rows: auto auto;
  gap: 2px 14px;
  text-align: left;
  padding: 16px;
  background: var(--tafel);
}
.grosse-karte .plus {
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  font-size: 30px;
  line-height: 1;
  color: var(--gold);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border: 1px solid var(--gold-dunkel);
  border-radius: 50%;
}
.grosse-karte strong { font-size: 17px; }
.grosse-karte small { color: var(--schrift-leise); }

.lobby-form { display: grid; gap: 14px; }
.lobby-form label { display: grid; gap: 5px; font-size: 14px; }
.lobby-form label small { color: var(--schrift-leise); font-weight: 400; }
.knopfzeile { display: flex; gap: 10px; justify-content: flex-end; }

.siedlungs-liste {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow: auto;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  background: #0e131a;
}
.siedlungs-liste li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid #1b232e;
  cursor: pointer;
}
.siedlungs-liste li:last-child { border-bottom: 0; }
.siedlungs-liste li:hover { background: #151d27; }
.siedlungs-liste li[aria-selected="true"] { background: #243244; box-shadow: inset 3px 0 0 var(--gold); }
.siedlungs-liste .name { flex: 1; }
.siedlungs-liste .punkte { color: var(--schrift-leise); font-variant-numeric: tabular-nums; }
.leer { padding: 16px; color: var(--schrift-leise); text-align: center; }

.ampel { width: 9px; height: 9px; border-radius: 50%; background: #4a5667; flex: none; }
.ampel.an { background: var(--gruen); box-shadow: 0 0 7px rgba(106, 154, 82, .8); }

/* ------------------------------------------------------------------ */
/* Spielgeruest                                                        */
/* ------------------------------------------------------------------ */

.spiel { position: fixed; inset: 0; display: flex; flex-direction: column; }

.kopf {
  min-height: var(--kopf-hoehe);
  flex: none;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
  background: var(--tafel);
  border-bottom: 1px solid var(--rand);
}
.siedlung { display: grid; line-height: 1.2; min-width: 150px; }
.siedlung strong { color: var(--gold); }
.siedlung .ort { font-size: 12px; color: var(--schrift-leise); }

.rohstoffe { display: flex; gap: 14px; flex: 1; flex-wrap: wrap; }
/* Wert oben, Zuwachs klein darunter - spart Breite in der Kopfleiste */
.rohstoff {
  display: grid; grid-template-columns: 22px auto; column-gap: 6px; align-items: center;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.rohstoff .sym { grid-row: span 2;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 4px;
  font-size: 12px;
  background: #2a3647;
}
.rohstoff.holz .sym { background: #4a3a24; color: #d7a86a; }
.rohstoff.stein .sym { background: #333a42; color: #b4bdc8; }
.rohstoff.bretter .sym { background: #4d3a26; color: #e6c08e; }
.rohstoff.essen .sym { background: #3b4a28; color: #a9c972; }
.rohstoff.getreide .sym { background: #4a4424; color: #e3cf7a; }
.rohstoff.mehl .sym { background: #45433d; color: #f2ede0; }
.rohstoff.brot .sym { background: #4d3820; color: #e8b46e; }
.rohstoff.silber .sym { background: #3a4049; color: #d6dde6; }
.rohstoff.gold .sym { background: #4a3f1c; color: #e8c662; }
.rohstoff .rate { font-size: 11px; color: var(--schrift-leise); }
.rohstoff .rate.sinkt { color: #d98a78; }
.rohstoff .rate.still { opacity: .55; }
.rohstoff.sinkt .wert { color: #f0c2b6; }
.rohstoff.voll .wert { color: var(--gold); }

.kopf-rechts { display: flex; align-items: center; gap: 14px; }
.kennzahl { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.kennzahl .sym { color: var(--gold); }

.reiter {
  height: var(--reiter-hoehe);
  flex: none;
  display: flex;
  gap: 2px;
  padding: 0 10px;
  background: #151b24;
  border-bottom: 1px solid var(--rand);
}
.reiter button {
  border: 0;
  background: transparent;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  color: var(--schrift-leise);
  position: relative;
}
.reiter button:hover { background: transparent; color: var(--schrift); }
.reiter button.aktiv { color: var(--gold); border-bottom-color: var(--gold); }
.punkt {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--rot);
  color: #fff;
  font-size: 11px;
  margin-left: 4px;
}

.buehne { flex: 1; position: relative; overflow: hidden; }
.ansicht { position: absolute; inset: 0; overflow: auto; }
.ansicht canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.ansicht canvas.greift { cursor: grabbing; }
.ansicht canvas.bauen { cursor: crosshair; }

/* ------------------------------------------------------------------ */
/* Siedlungsansicht                                                    */
/* ------------------------------------------------------------------ */

.werkzeug {
  position: absolute;
  left: 12px; top: 12px;
  width: 216px;
  max-height: calc(100% - 24px);
  overflow: auto;
  padding: 10px;
  background: rgba(26, 33, 43, .95);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
}
.werkzeug h3 { margin-bottom: 6px; }
.werkzeug::-webkit-scrollbar { width: 8px; }
.werkzeug::-webkit-scrollbar-thumb { background: #35425a; border-radius: 4px; }
.bau-knopf {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 0 8px;
  width: 100%;
  text-align: left;
  padding: 5px 8px;
  margin-bottom: 3px;
  line-height: 1.25;
  background: var(--tafel-hell);
}
.bau-knopf.gewaehlt { border-color: var(--gold); background: #2e3a28; }
.bau-knopf .icon {
  grid-row: 1 / 3;
  align-self: center;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 4px;
  background: #0f141b;
  color: var(--gold);
  font-weight: 700;
  font-size: 13px;
}
.bau-knopf .titel { font-size: 13px; }
.bau-reiter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  margin-bottom: 8px;
}
.bau-reiter button {
  padding: 4px 2px;
  font-size: 11.5px;
  line-height: 1.2;
  white-space: normal;
  background: transparent;
  color: var(--schrift-leise);
}
.forschung-titel { margin: 12px 0 6px; }
.forschung-zeile {
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  background: var(--tafel-hell);
}
.forschung-kopf { display: flex; justify-content: space-between; font-size: 13px; }
.forschung-kopf .stufe { color: var(--gold); font-variant-numeric: tabular-nums; }
.forschung-stufen { display: flex; gap: 3px; margin: 4px 0; }
.forschung-stufen i { flex: 1; height: 4px; border-radius: 2px; background: #0f141b; }
.forschung-stufen i.voll { background: var(--gold); }
.forschung-stufen i.laeuft { background: var(--gold-dunkel); }
.forschung-zeile .kosten { font-size: 11px; color: var(--schrift-leise); }
.forschung-zeile button { width: 100%; margin-top: 4px; font-size: 11px; white-space: normal; }
.forschung-zeile button.zu-teuer { color: #c9806f; }
.bau-reiter button.aktiv {
  color: var(--gold);
  border-color: var(--gold-dunkel);
  background: var(--tafel-hell);
}
.bau-knopf .kosten { font-size: 11px; color: var(--schrift-leise); }
.bau-knopf.zu-teuer .kosten { color: #c9806f; }

.legende {
  position: absolute;
  right: 12px; bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-width: 330px;
  padding: 8px 10px;
  background: rgba(26, 33, 43, .92);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  font-size: 12px;
}
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { width: 11px; height: 11px; border-radius: 2px; display: block; }

.hinweisbox {
  position: absolute;
  left: 50%; bottom: 16px;
  transform: translateX(-50%);
  max-width: 560px;
  padding: 9px 14px;
  background: rgba(26, 33, 43, .96);
  border: 1px solid var(--gold-dunkel);
  border-radius: var(--radius);
  font-size: 14px;
}

/* ------------------------------------------------------------------ */
/* Europakarte                                                         */
/* ------------------------------------------------------------------ */

.karten-hilfe {
  position: absolute;
  left: 12px; top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.massstab {
  padding: 5px 9px;
  font-size: 12px;
  color: var(--schrift-leise);
  background: rgba(26, 33, 43, .9);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
}
.karten-info {
  position: absolute;
  right: 12px; top: 12px;
  width: 250px;
  padding: 12px;
  background: rgba(26, 33, 43, .96);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
}
.karten-info h3 { margin-bottom: 6px; }
.karten-info dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 0 0 10px; font-size: 13px; }
.karten-info dt { color: var(--schrift-leise); }
.karten-info dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ */
/* Tafeln                                                              */
/* ------------------------------------------------------------------ */

.spalten {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  padding: 14px 14px 0;
}
.tafel {
  background: var(--tafel);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 14px;
}
.tafel.breit { margin: 14px; }
.tafel h3 { margin-top: 14px; }
.tafel h3:first-child { margin-top: 0; }

.zeile {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #222b36;
}
.zeile:last-child { border-bottom: 0; }
.zeile .haupttext { display: grid; gap: 2px; }
.zeile .neben { font-size: 12.5px; color: var(--schrift-leise); }
.zeile .zahl { font-variant-numeric: tabular-nums; }
.zeile .werkzeuge { display: flex; gap: 6px; align-items: center; }
.zeile input[type="number"] { width: 78px; }

.balken { height: 4px; border-radius: 2px; background: #2a3442; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--gold); }

.bericht { border-bottom: 1px solid #222b36; padding: 11px 0; }
.bericht:last-child { border-bottom: 0; }
.bericht .kopfzeile { display: flex; gap: 10px; align-items: baseline; }
.bericht .titel { font-weight: 600; flex: 1; }
.bericht.ungelesen .titel::before { content: "\25CF"; color: var(--gold); margin-right: 6px; font-size: 10px; }
.bericht .zeit { font-size: 12px; color: var(--schrift-leise); }
.bericht pre {
  margin: 6px 0 0;
  white-space: pre-wrap;
  font: inherit;
  color: var(--schrift-leise);
}
.bericht.kampf .titel { color: #e8917f; }
.schlacht { margin-top: 8px; font-size: 13px; }
.schlacht h4 { margin: 12px 0 4px; font-size: 13px; color: var(--schrift); }
.schlacht-ergebnis { font-weight: 600; }
.schlacht-ergebnis.sieg { color: #86b86a; }
.schlacht-ergebnis.niederlage { color: #e8917f; }
.schlacht-tabelle { width: 100%; border-collapse: collapse; margin-bottom: 4px; }
.schlacht-tabelle th, .schlacht-tabelle td {
  padding: 3px 6px;
  text-align: right;
  border-bottom: 1px solid #222b36;
  font-variant-numeric: tabular-nums;
}
.schlacht-tabelle th { color: var(--schrift-leise); font-weight: 500; font-size: 12px; }
.schlacht-tabelle th:first-child, .schlacht-tabelle td:first-child { text-align: left; }
.schlacht-tabelle td.verlust { color: #e8917f; }
.schlacht-tabelle td.leer { text-align: left; color: var(--schrift-leise); }
.schlacht-rechnung { margin: 8px 0; color: var(--schrift-leise); font-size: 12px; display: grid; gap: 2px; }
.schlacht-beute { margin-top: 6px; }
.schlacht-brand { margin-top: 4px; color: #e8917f; }
@media (max-width: 600px) {
  .schlacht-tabelle th:nth-child(3), .schlacht-tabelle td:nth-child(3) { display: none; }
}
.bericht.handel .titel { color: #86b86a; }

.marke { font-size: 11px; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--rand); color: var(--schrift-leise); }
.marke.online { border-color: var(--gruen); color: #9ccb80; }
.marke.wolke { border-color: #4a5667; }

.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 10px; }
.felder label { display: grid; gap: 3px; font-size: 12.5px; color: var(--schrift-leise); }

.meldung {
  position: fixed;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  max-width: 560px;
  padding: 11px 18px;
  background: #22303f;
  border: 1px solid var(--rand);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .5);
  z-index: 50;
}
.meldung.schlecht { border-left-color: var(--rot); }
.meldung.gut { border-left-color: var(--gruen); }

/* Auftragsbuch */
.auftragsbuch {
  position: absolute;
  right: 12px; top: 12px;
  width: 240px;
  max-height: calc(100% - 90px);
  overflow: auto;
  padding: 8px 10px;
  background: rgba(26, 33, 43, .95);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  font-size: 13px;
}
.auftragsbuch.hat-fertige { border-color: var(--gold-dunkel); }
.auftrag-kopf {
  width: 100%; text-align: left; min-height: 32px;
  background: none; border: 0; padding: 2px 0;
  color: var(--gold); font-weight: 600; font-size: 14px; cursor: pointer;
}
.auftrag { padding: 7px 0 6px; border-top: 1px solid var(--rand); }
.auftrag-balken { height: 5px; margin: 5px 0 4px; background: #2a3442; border-radius: 3px; overflow: hidden; }
.auftrag-balken i { display: block; height: 100%; background: var(--gold-dunkel); }
.auftrag.fertig .auftrag-balken i { background: var(--gold); }
.auftrag-fuss { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.auftrag-stand { font-variant-numeric: tabular-nums; color: var(--schrift-leise); }
.auftrag-lohn { font-size: 12px; color: var(--schrift-leise); }
.auftrag.fertig button { min-height: 30px; }

@media (max-width: 760px) {
  .auftragsbuch { width: 190px; }
  .rohstoffe { gap: 10px; font-size: 13px; }
  .kopf { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 10px; }
  .werkzeug { width: 190px; }
  .legende { display: none; }
}

/* ------------------------------------------------------------------ */
/* Dialog                                                              */
/* ------------------------------------------------------------------ */

.dialog-feld {
  width: min(460px, 92vw);
  padding: 18px;
  color: var(--schrift);
  background: var(--tafel);
  border: 1px solid var(--rand);
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.dialog-feld::backdrop { background: rgba(6, 9, 14, .64); }
.dialog-feld .felder { margin-bottom: 14px; }
.dialog-feld .knopfzeile { margin-top: 4px; }

/* Militaer-Reiter: Gruppen und Zuege */
h4.gruppe {
  margin: 14px 0 2px;
  font-size: 13px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--schrift-leise);
  border-left: 3px solid var(--rand);
  padding-left: 7px;
}
h4.gruppe.militaer { border-left-color: #c35a4a; }
h4.gruppe.handel { border-left-color: #6a9a52; }
.gruppe-summe { font-size: 12px; color: var(--schrift-leise); margin: 0 0 4px 10px; }
.spalten.unterwegs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .spalten.unterwegs { grid-template-columns: 1fr; } }
.zug-karte {
  border: 1px solid var(--rand);
  border-left-width: 3px;
  border-radius: 6px;
  padding: 7px 10px;
  margin-bottom: 6px;
  background: var(--tafel-hell);
}
.zug-karte.militaer { border-left-color: #c35a4a; }
.zug-karte.handel { border-left-color: #6a9a52; }
.zug-karte.feind { border-color: #c35a4a; background: rgba(195,90,74,.12); }
.zug-kopf { display: flex; gap: 8px; align-items: baseline; }
.zug-symbol { width: 18px; text-align: center; }
.zug-titel { flex: 1; font-weight: 600; font-size: 13.5px; }
.zug-karte.feind .zug-titel { color: #e8917f; }
.zug-info, .zug-fracht { font-size: 12px; color: var(--schrift-leise); margin-left: 26px; }
.zug-fracht { color: #9cc282; }
.zug-balken { height: 4px; margin: 6px 0 0 26px; background: #0f141b; border-radius: 2px; overflow: hidden; }
.zug-balken i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .9s linear; }
.zug-karte.handel .zug-balken i { background: #86b86a; }
.zug-karte.feind .zug-balken i { background: #e8917f; }

/* Siedlungsstufe */
.kopf-stufe { margin-left: 6px; font-size: 12px; color: var(--schrift-leise); }
.bau-knopf.gesperrt { opacity: .45; }
.bau-knopf.gesperrt .kosten { font-style: italic; }
.stufe-info { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.stufe-info .stufe-name { color: var(--gold); font-weight: 600; }

/* Reiter Forschung */
.forschung-reiter { margin: 8px 0 12px; max-width: 520px; }
.forschung-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.forschung-liste .forschung-zeile { margin: 0; }
.forschung-reiter { grid-template-columns: repeat(3, 1fr); }
.bau-gruppe {
  margin: 10px 0 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--schrift-leise);
}
.bau-gruppe:first-of-type { margin-top: 2px; }

/* Alarm bei einem fremden Angriff */
.alarm {
  padding: 6px 12px; border-radius: 6px; font-weight: 700; font-size: 13px; white-space: nowrap;
  background: #5a1f18; color: #ffd9cf; border: 1px solid #e8705a;
  animation: alarm-puls 1.2s ease-in-out infinite;
}
@keyframes alarm-puls { 50% { box-shadow: 0 0 14px rgba(232, 112, 90, .8); } }
.lager-inhalt { margin-top: 4px; }
.abwesenheit-liste { margin: 8px 0 14px; padding-left: 18px; display: grid; gap: 6px; font-size: 14px; }
.abwesenheit-liste li.gut { color: #b9d8a3; }
.abwesenheit-liste li.schlecht { color: #f0b3a6; }

/* Hinweise unten rechts */
.legende.hinweise { display: grid; gap: 6px; max-width: 340px; font-size: 13px; }
.legende.hinweise.warnung { border-color: #e8705a; background: rgba(60, 24, 20, .94); }
.legende.hinweise.tipp { border-color: var(--gold-dunkel); }
.hinweis-text { line-height: 1.35; }
.hinweis-fuss { display: flex; align-items: center; gap: 6px; }
.hinweis-fuss button { min-width: 32px; min-height: 28px; }
.hinweis-zahl { font-size: 11px; color: var(--schrift-leise); flex: 1; text-align: center; }
.legende-zu { order: 99; }

/* Einklappbare Bauleiste */
.bau-kopf {
  width: 100%; text-align: left; min-height: 32px; padding: 2px 0; margin-bottom: 6px;
  background: none; border: 0; color: var(--gold); font-weight: 600; font-size: 15px; cursor: pointer;
}
.werkzeug.zu { width: auto; padding: 6px 12px; }
.werkzeug.zu .bau-kopf { margin-bottom: 0; }

/* ------------------------------------------------------------------ */
/* Handy im Querformat und kleine Fenster                              */
/* ------------------------------------------------------------------ */
@media (max-height: 520px), (max-width: 760px) {
  :root { --kopf-hoehe: 40px; --reiter-hoehe: 34px; }
  .kopf { gap: 8px; padding: 2px 8px; flex-wrap: nowrap; overflow-x: auto; }
  .siedlung { min-width: 0; }
  .siedlung .ort, .kopf-stufe { display: none; }
  .siedlung strong { font-size: 13px; white-space: nowrap; }
  .rohstoffe { gap: 8px; flex-wrap: nowrap; font-size: 12px; }
  .rohstoff { grid-template-columns: 18px auto; column-gap: 4px; }
  .rohstoff .sym { width: 18px; height: 18px; font-size: 10px; }
  .rohstoff .rate { font-size: 9.5px; }
  .kopf-rechts { gap: 8px; font-size: 12px; }
  .kopf-rechts .kennzahl { white-space: nowrap; }
  #btnAbmelden { padding: 4px 8px; }
  .alarm { padding: 4px 8px; font-size: 12px; }
  .reiter { overflow-x: auto; padding: 0 4px; }
  .reiter button { padding: 4px 10px; font-size: 13px; white-space: nowrap; }
  .werkzeug { left: 6px; top: 6px; width: 190px; max-height: calc(100% - 12px); padding: 8px; }
  .auftragsbuch { right: 6px; top: 6px; width: 200px; max-height: calc(100% - 12px); font-size: 12px; }
  .legende, .legende.hinweise { display: grid; right: 6px; bottom: 6px; max-width: 230px; font-size: 11.5px; padding: 6px 8px; }
  .legende:not(.hinweise) { display: none; }
  .hinweisbox { bottom: 6px; max-width: min(560px, calc(100vw - 260px)); max-height: 45%; overflow: auto; font-size: 12.5px; padding: 7px 10px; }
  .meldung { max-width: 70vw; font-size: 13px; }
  button.klein { min-height: 30px; }
  /* Ist ein Infofeld offen, treten die Hinweise zurueck */
  .ansicht:has(.hinweisbox:not([hidden])) .legende.hinweise { display: none; }
  .auftragsbuch { width: auto; min-width: 150px; max-width: 220px; }
  .tafel { padding: 10px 12px; }
}
.version { font-size: 11px; color: var(--schrift-leise); margin-top: -6px; }
