/* LogiPlay – HUD über der Leinwand. Mobil zuerst, Daumenzone unten. */
:root {
  --grund: #1f252d;
  --platte: #2b333d;
  --platte-hell: #38424e;
  --text: #f1f3f5;
  --leise: #a9b4c0;
  --gelb: #ffc928;
  --gruen: #3fbf6a;
  --rot: #e5534b;
  --papier: #f7f4ec;
  --tinte: #20242a;
  --schatten: 0 4px 16px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #3b4047;
  color: var(--text);
  font: 15px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

[hidden] {
  display: none !important;
}

#leinwand {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* ---------- Kopf ---------- */
#oben {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: calc(env(safe-area-inset-top) + 8px) 10px 6px;
  background: linear-gradient(rgba(31, 37, 45, 0.97), rgba(31, 37, 45, 0.9));
  z-index: 3;
  flex-wrap: nowrap;
  overflow: hidden;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--platte);
  border-radius: 10px;
  padding: 5px 8px;
  font-weight: 700;
  white-space: nowrap;
  font-size: 14px;
  flex-shrink: 0;
}

.chip.tag {
  background: var(--gelb);
  color: var(--tinte);
}

.chip.uhr {
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  justify-content: center;
}

.chip.geld {
  color: #9be3b2;
  font-variant-numeric: tabular-nums;
}

.chip.geld.minus {
  color: #ff9b94;
}

.luecke {
  flex: 1;
}

.rund.tempo {
  letter-spacing: 0;
  font-weight: 800;
  font-size: 14px;
}

.rund {
  border: 0;
  background: var(--platte);
  border-radius: 10px;
  min-width: 38px;
  height: 34px;
  padding: 0 8px;
  font-size: 15px;
}

.rund.an {
  background: var(--gelb);
  color: var(--tinte);
}

/* ---------- Bestellungen ---------- */
#bestellungen {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(env(safe-area-inset-top) + 46px);
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 10px 8px;
  z-index: 2;
  touch-action: pan-x;
  scrollbar-width: none;
  background: linear-gradient(rgba(31, 37, 45, 0.9), rgba(31, 37, 45, 0));
  min-height: 108px;
}

#bestellungen::-webkit-scrollbar {
  display: none;
}

.leer {
  color: var(--leise);
  padding: 14px 4px;
}

.bestellung {
  flex: 0 0 158px;
  background: var(--papier);
  color: var(--tinte);
  border-radius: 12px;
  padding: 7px 8px 7px;
  box-shadow: var(--schatten);
  border-top: 5px solid #8a96a3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bestellung header {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 12.5px;
}

.bestellung header b {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lohn {
  font-weight: 800;
  color: #227a44;
  white-space: nowrap;
}

.zeilen {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.zeile {
  background: #e8e2d3;
  border-radius: 7px;
  padding: 1px 5px;
  font-size: 16px;
  line-height: 1.4;
}

.zeile small {
  font-size: 11px;
  font-weight: 700;
  margin-left: 1px;
}

.zeile.fehlt {
  background: #f6d2cf;
  outline: 1.5px solid var(--rot);
}

.zeile.da {
  background: #cfeed9;
}

.bestellung footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: auto;
  font-size: 12px;
}

.frist {
  font-weight: 700;
  white-space: nowrap;
}

.frist.rot {
  color: var(--rot);
}

.status {
  font-size: 11.5px;
  color: #59616b;
  text-align: right;
}

.status.fehlt {
  color: var(--rot);
  font-weight: 700;
}

.status.ok {
  color: #227a44;
  font-weight: 700;
}

.st-offen {
  border-top-color: #8a96a3;
}
.st-kommissionieren {
  border-top-color: #4f86d9;
}
.st-packbereit {
  border-top-color: var(--gelb);
}
.st-verpacken,
.st-paket {
  border-top-color: #e4892f;
}
.st-bereit {
  border-top-color: #2fa79c;
}
.st-verschickt {
  border-top-color: var(--gruen);
  opacity: 0.7;
}
.bestellung.spaet:not(.st-verschickt) {
  box-shadow: var(--schatten), inset 0 0 0 2px var(--rot);
}

/* ---------- Knöpfe ---------- */
.knopf {
  border: 0;
  border-radius: 12px;
  background: var(--platte-hell);
  padding: 10px 14px;
  min-height: 44px;
  font-weight: 700;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}

.knopf:active {
  transform: translateY(1px);
  box-shadow: none;
}

.knopf.gelb {
  background: var(--gelb);
  color: var(--tinte);
}

.knopf.warn {
  background: #5a2a27;
}

.knopf.gross {
  font-size: 17px;
  padding: 12px 18px;
}

.knopf.klein {
  min-height: 30px;
  padding: 4px 9px;
  border-radius: 9px;
  font-size: 12.5px;
}

.knopf.voll {
  flex: 1;
}

.knopf.breit {
  display: block;
  width: 100%;
  margin-top: 8px;
}

.knopf:disabled {
  opacity: 0.45;
}

.puls {
  animation: puls 1s ease-in-out infinite;
}

@keyframes puls {
  50% {
    transform: scale(1.07);
    box-shadow: 0 0 0 4px rgba(255, 201, 40, 0.35);
  }
}

/* ---------- Fuß ---------- */
#unten {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px calc(env(safe-area-inset-bottom) + 10px);
  background: linear-gradient(rgba(31, 37, 45, 0.85), rgba(31, 37, 45, 0.98));
  z-index: 3;
}

#unten:empty {
  display: none;
}

.leiste {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
}

.auswahl {
  flex: 1;
  font-size: 15px;
}

.bauinfo {
  color: var(--leise);
  font-size: 13px;
  margin-bottom: 6px;
}

.werkzeuge {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.werkzeug {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 4px;
  gap: 1px;
  white-space: normal;
}

.werkzeug span {
  font-size: 22px;
  line-height: 1.1;
}

.werkzeug b {
  font-size: 12.5px;
  line-height: 1.15;
}

.werkzeug small {
  color: var(--leise);
  font-size: 12px;
}

.werkzeug.an {
  outline: 3px solid var(--gelb);
  background: #4a4530;
}

.werkzeug[data-arm] small {
  color: #ff9b94;
}

/* ---------- Hinweise ---------- */
#hinweis {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 160px;
  font-size: 14px;
  background: var(--gelb);
  color: var(--tinte);
  font-weight: 700;
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--schatten);
  z-index: 4;
  pointer-events: none;
  max-width: 520px;
  margin: 0 auto;
}

#hinweis::before {
  content: "";
  position: absolute;
  left: 28px;
  top: -8px;
  border: 8px solid transparent;
  border-top: 0;
  border-bottom-color: var(--gelb);
}

#toasts {
  position: fixed;
  left: 12px;
  right: 12px;
  top: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
  pointer-events: none;
}

.toast {
  background: rgba(20, 24, 30, 0.92);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 13.5px;
  box-shadow: var(--schatten);
  max-width: 440px;
  text-align: center;
  white-space: pre-line;
  transition:
    opacity 0.4s,
    transform 0.4s;
  animation: rein 0.25s ease-out;
}

.toast.gut {
  border-left: 4px solid var(--gruen);
}

.toast.warn {
  border-left: 4px solid var(--rot);
}

.toast.weg {
  opacity: 0;
  transform: translateY(-8px);
}

@keyframes rein {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

/* ---------- Dialog ---------- */
#dialog {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 18, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  padding: 12px 12px calc(env(safe-area-inset-bottom) + 12px);
}

#dialog .karte {
  width: 100%;
  max-width: 440px;
  max-height: 88vh;
  overflow-y: auto;
  touch-action: pan-y;
  background: var(--grund);
  border-radius: 18px;
  padding: 18px 16px 16px;
  box-shadow: var(--schatten);
  animation: hoch 0.25s ease-out;
}

@media (min-height: 700px) {
  #dialog {
    align-items: center;
  }
}

@keyframes hoch {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
}

.karte h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.karte p {
  margin: 8px 0;
}

.leise {
  color: var(--leise);
  font-size: 13.5px;
}

.logo {
  font-size: 46px;
  font-weight: 900;
  letter-spacing: -1.5px;
  text-align: center;
  margin-top: 6px;
}

.logo span {
  color: var(--gelb);
}

.unterzeile {
  text-align: center;
  color: var(--leise);
  margin-bottom: 14px !important;
}

details {
  margin-top: 14px;
}

summary {
  cursor: pointer;
  font-weight: 700;
  padding: 6px 0;
}

.hilfe {
  padding-left: 18px;
  margin: 6px 0;
  font-size: 14px;
}

.hilfe li {
  margin-bottom: 6px;
}

.packinhalt {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.packinhalt span {
  background: var(--platte);
  border-radius: 10px;
  padding: 4px 9px;
  font-size: 22px;
}

.packinhalt small {
  font-size: 13px;
  font-weight: 700;
}

.packinhalt em {
  font-style: normal;
  font-size: 11px;
  color: var(--leise);
  margin-left: 5px;
}

.kartons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.kartonwahl {
  border: 0;
  background: var(--platte);
  border-radius: 14px;
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 96px;
  justify-content: flex-end;
}

.kartonwahl small {
  color: var(--leise);
  font-size: 12px;
}

.kartonwahl em {
  font-style: normal;
  font-size: 11.5px;
  color: #ff9b94;
}

.kartonwahl.nein {
  opacity: 0.5;
}

.kartonwahl:not(.nein):active {
  outline: 3px solid var(--gelb);
}

.kiste {
  display: block;
  background: #c99a5e;
  border: 2px solid #8f6a3c;
  border-radius: 3px;
  margin-bottom: 6px;
  background-image: linear-gradient(90deg, transparent 42%, #e2c08a 42%, #e2c08a 58%, transparent 58%);
}

.kiste.kalt {
  background-color: #e9f6fd;
  border-color: #62b6ea;
  background-image: linear-gradient(90deg, transparent 42%, #9fd3f3 42%, #9fd3f3 58%, transparent 58%);
}

.k-S .kiste {
  width: 26px;
  height: 20px;
}
.k-M .kiste,
.k-K .kiste {
  width: 38px;
  height: 28px;
}
.k-L .kiste,
.k-KL .kiste {
  width: 52px;
  height: 38px;
}

.sterne {
  text-align: center;
  font-size: 44px;
  color: #4a525c;
  letter-spacing: 6px;
}

.sterne .an {
  color: var(--gelb);
  text-shadow: 0 0 14px rgba(255, 201, 40, 0.5);
}

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0 12px;
  text-align: center;
}

.kennzahlen div {
  background: var(--platte);
  border-radius: 10px;
  padding: 6px 2px;
}

.kennzahlen b {
  display: block;
  font-size: 17px;
}

.kennzahlen small {
  color: var(--leise);
  font-size: 11px;
}

.posten {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.posten td {
  padding: 4px 2px;
  border-bottom: 1px solid #333c47;
}

.posten td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.posten .summe td {
  border-bottom: 0;
  font-size: 16px;
  font-weight: 800;
  padding-top: 8px;
}

.plus {
  color: #9be3b2;
}

.minus {
  color: #ff9b94;
}

.tipp {
  background: var(--platte);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13.5px;
}

.shop {
  list-style: none;
  padding: 0;
  margin: 8px 0;
}

.shop li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #333c47;
}

.shop li > div {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shop small {
  color: var(--leise);
  font-size: 12.5px;
}

.shop .symbol {
  font-size: 26px;
  width: 34px;
  text-align: center;
}

.shop .gekauft {
  opacity: 0.6;
}

.hat {
  color: var(--gruen);
  font-weight: 900;
  font-size: 20px;
  padding: 0 10px;
}

.gesperrt {
  font-size: 12px;
  color: var(--leise);
}

@media (min-width: 700px) {
  .bestellung {
    flex-basis: 178px;
  }
}

/* ---------- Koop ---------- */
.person {
  --farbe: #8d99ae;
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--farbe);
  color: #fff;
  font-weight: 900;
  font-size: 13px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.25);
  position: relative;
  flex: none;
}

.person.ich {
  box-shadow: 0 0 0 2px #fff;
}

.person.weg {
  opacity: 0.4;
}

.person.bereit::after {
  content: "✓";
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gruen);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.leute {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.lobby {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  min-width: 0;
}

.lobby b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.lobby .leute {
  margin-left: auto;
}

.knopf.an {
  background: #2f5a3d;
  color: #d9f5e1;
}

.rufe {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.rufe .knopf {
  min-height: 40px;
  padding: 8px 11px;
}

.toast.ruf {
  --farbe: var(--gelb);
  border-left: 4px solid var(--farbe);
  font-weight: 700;
}

.chip.verbindung {
  padding: 4px 6px;
  font-size: 11px;
}

.trenner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 6px;
  color: var(--leise);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.trenner::before,
.trenner::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #3a4450;
}

.zweier {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.knopf.koop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 0;
  padding: 12px 6px;
  white-space: normal;
}

.knopf.koop span {
  font-size: 26px;
}

.knopf.koop small {
  color: var(--leise);
  font-weight: 500;
  font-size: 11.5px;
}

.eingabe {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 10px 0;
  font-size: 13px;
  color: var(--leise);
}

input {
  font: inherit;
  font-size: 16px; /* iOS zoomt sonst beim Antippen */
  color: var(--text);
  background: var(--platte);
  border: 2px solid var(--platte-hell);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
  width: 100%;
  min-width: 0;
}

input:focus {
  outline: none;
  border-color: var(--gelb);
}

input[name="code"] {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 800;
  text-align: center;
}

.zeile-eingabe {
  display: flex;
  gap: 8px;
}

.firmen .knopf {
  text-align: left;
}

.firmen small,
.code {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.12em;
  color: var(--gelb);
}

.leuteliste,
.team {
  list-style: none;
  padding: 0;
  margin: 10px 0;
}

.leuteliste li,
.team li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #333c47;
}

.leuteliste b {
  flex: 1;
}

.leuteliste small {
  color: var(--leise);
}

.team li > div {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.team small {
  width: 100%;
  color: var(--leise);
  font-size: 12.5px;
}

.team em {
  font-style: normal;
  font-size: 12px;
  background: var(--platte-hell);
  border-radius: 8px;
  padding: 1px 7px;
}

.team li.ich b {
  color: var(--gelb);
}

h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}

.wertung {
  text-align: center;
  background: linear-gradient(135deg, #4a3b0c, #2b333d);
  border: 1px solid #6b5716;
  border-radius: 12px;
  padding: 10px;
  margin: 10px 0;
}

.wertung b {
  display: block;
  font-size: 24px;
  color: var(--gelb);
}

.wertung small {
  color: var(--leise);
}

.woche-titel {
  display: flex;
  flex-direction: column;
  background: var(--platte);
  border-radius: 12px;
  padding: 10px 12px;
}

.woche-titel b {
  font-size: 18px;
}

.woche-titel small {
  color: var(--leise);
}

.tabs {
  display: flex;
  gap: 4px;
  background: var(--platte);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 8px;
}

.tab {
  flex: 1 1 0;
  min-width: 0;
  border: 0;
  background: none;
  border-radius: 9px;
  padding: 8px 2px;
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
  color: var(--leise);
}

.tab.an {
  background: var(--platte-hell);
  color: var(--text);
}

.rangliste {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rangliste li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-bottom: 1px solid #333c47;
}

.rangliste li.ich {
  background: rgba(255, 201, 40, 0.1);
  border-radius: 8px;
}

.rangliste .platz {
  width: 26px;
  text-align: center;
  font-weight: 800;
}

.rangliste .wer {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rangliste .wer small {
  color: var(--leise);
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rangliste b {
  font-variant-numeric: tabular-nums;
}

.rang {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 6px 0 10px;
}

.rang span {
  font-size: 44px;
}

.rang b {
  font-size: 20px;
}

.rang small {
  color: var(--leise);
}

.abzeichen {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.abzeichen li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--platte);
  border-radius: 10px;
  padding: 8px 6px;
  opacity: 0.4;
  filter: grayscale(1);
}

.abzeichen li.erreicht {
  opacity: 1;
  filter: none;
}

.abzeichen span {
  font-size: 26px;
}

.abzeichen small {
  color: var(--leise);
  font-size: 11px;
}

/* Express-Bestellung: doppelter Lohn, eigener Abholtermin */
.bestellung.express:not(.st-verschickt) {
  box-shadow:
    0 0 0 3px var(--gelb),
    var(--schatten);
}

.bestellung.express header b::before {
  content: "⚡ ";
}

.knopf.breit {
  white-space: normal;
}

.abzeichen b {
  font-size: 13.5px;
}

/* Sperrgut: der Stapler holt es, gepackt wird nicht */
.bestellung.sperr:not(.st-verschickt) {
  box-shadow:
    0 0 0 3px #b5653a,
    var(--schatten);
}

.bestellung.sperr header b::before {
  content: "🚜 ";
}

.knopf.stapler {
  padding-inline: 10px;
  max-width: 34%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Zwischenfälle */
.knopf.rot {
  background: #e5534b;
  color: #fff;
}

.chip.warn {
  background: #b06df2;
  color: #fff;
}

.ereignisse {
  text-align: center;
  font-weight: 700;
  margin: 6px 0;
}

.knopf.geschenk {
  margin-top: 8px;
}

.knopf.geschenk.an {
  background: #f472b6;
  color: #fff;
}

.chip.ziele {
  border: 0;
  font: inherit;
  cursor: pointer;
}

ul.ziele {
  list-style: none;
  padding: 0;
  margin: 4px 0 10px;
}

ul.ziele li {
  padding: 3px 0;
  color: var(--leise);
}

ul.ziele li.ja {
  color: inherit;
  font-weight: 700;
}

.knopf.emote {
  background: #3b2f5c;
}

.chip.duell {
  border: 0;
  font: inherit;
  background: #e5534b;
  color: #fff;
  cursor: pointer;
}

ul.pokale {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}

ul.pokale li small {
  display: block;
  color: var(--leise);
}

.pokalreihe {
  font-size: 26px;
  letter-spacing: 2px;
}

/* „Neu!“-Karte und Lexikon */
.neu-karte {
  text-align: center;
}

.neu-symbol {
  font-size: 64px;
  line-height: 1.1;
  animation: huepfen 1.2s ease-in-out infinite;
}

.neu-marke {
  display: inline-block;
  background: var(--gelb);
  color: #1b1f24;
  font-weight: 900;
  border-radius: 99px;
  padding: 2px 12px;
  margin: 4px 0 0;
}

@keyframes huepfen {
  50% {
    transform: translateY(-6px);
  }
}

ul.lexikon {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

ul.lexikon li {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

ul.lexikon li > span {
  font-size: 26px;
}

ul.lexikon li small {
  display: block;
  color: var(--leise);
}

ul.lexikon li.neu-offen {
  opacity: 0.45;
}

/* Personal und Karriere */
.person-gross {
  font-size: 28px;
  width: 38px;
  text-align: center;
  flex: none;
}

.rollenliste li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.rollenliste small {
  display: block;
  color: var(--leise);
}

.sterne-klein {
  color: var(--gelb);
  letter-spacing: 1px;
}

.xp {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  margin: 4px 0;
  overflow: hidden;
}

.xp span {
  display: block;
  height: 100%;
  width: var(--breite);
  background: var(--gelb);
}

ul.meilensteine {
  list-style: none;
  padding: 0;
  margin: 0 0 6px;
}

ul.meilensteine li {
  display: flex;
  gap: 10px;
  padding: 5px 0;
}

ul.meilensteine li small {
  display: block;
  color: var(--leise);
}

ul.meilensteine li.ja {
  opacity: 0.7;
}

ul.meilensteine.zu {
  opacity: 0.45;
}

.wertung small {
  display: block;
}

/* Profi-Modus: Einkauf */
ul.einkauf {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
}

ul.einkauf li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

ul.einkauf li > span {
  font-size: 24px;
}

ul.einkauf li > div:nth-child(2) {
  flex: 1;
}

ul.einkauf small {
  display: block;
  color: var(--leise);
}

ul.einkauf li.knapp small {
  color: #ff8a80;
}

.einkauf-knoepfe {
  display: flex;
  align-items: center;
  gap: 6px;
}

.einkauf-knoepfe .min {
  min-width: 26px;
  text-align: center;
}

.knopf.koop small {
  white-space: normal;
}

.chip.geist {
  background: #6b4fa0;
  color: #fff;
}


/* Fotomodus */
body.foto #oben,
body.foto #unten,
body.foto #bestellungen,
body.foto #hinweis {
  display: none !important;
}

#foto {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  display: flex;
  gap: 8px;
  justify-content: center;
  z-index: 30;
}

#foto[hidden] {
  display: none;
}


/* Schmale Handys (z. B. 360 px): Kopfleiste verdichten, damit Tempo und Menü sichtbar bleiben */
@media (max-width: 400px) {
  #oben {
    gap: 4px;
    padding-left: 8px;
    padding-right: 8px;
  }

  #oben .chip {
    padding: 4px 6px;
    font-size: 13px;
  }

  #oben .rund {
    min-width: 32px;
    padding: 0 5px;
    font-size: 14px;
  }
}

/* ---------- Hilfe: Kacheln, Thema, Vorführung ---------- */
.hilfe-kacheln {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 10px 0 12px;
}

.kachel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 92px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: var(--platte);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.kachel:active {
  transform: translateY(1px);
  background: var(--platte-hell);
}

.kachel-symbol {
  font-size: 28px;
  line-height: 1.1;
}

.kachel b {
  font-size: 15px;
}

.kachel small {
  color: var(--leise);
  font-size: 12px;
  line-height: 1.25;
}

.kachel.vorfuehrbar::after {
  content: "▶";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gelb);
  color: var(--tinte);
  font-size: 11px;
  line-height: 22px;
  text-align: center;
}

.hilfe-thema {
  text-align: center;
}

.hilfe-thema > p {
  text-align: left;
  line-height: 1.45;
}

.hilfe-thema h3 {
  text-align: left;
  margin: 14px 0 6px;
  font-size: 15px;
}

.hilfe-schritte {
  text-align: left;
  margin: 0 0 14px;
  padding-left: 22px;
  color: var(--leise);
  line-height: 1.4;
}

.hilfe-schritte li {
  margin: 4px 0;
}

.knopf.hilfe-start {
  border: 2px solid var(--gelb);
}

ul.lexikon li .knopf.klein {
  margin-top: 6px;
}

#vorfuehrung {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 90px;
  z-index: 5;
  max-width: 520px;
  margin: 0 auto;
  background: var(--papier);
  color: var(--tinte);
  border-radius: 16px;
  padding: 10px 12px 10px;
  box-shadow: var(--schatten);
  border-top: 5px solid var(--gelb);
}

.vf-kopf {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.vf-kopf span {
  color: #6b7480;
  font-weight: 700;
  white-space: nowrap;
}

#vorfuehrung p {
  margin: 6px 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.vf-balken {
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
  margin-bottom: 8px;
}

.vf-balken i {
  display: block;
  height: 100%;
  width: calc(var(--fortschritt, 0) * 100%);
  background: var(--gelb);
}

.vf-balken.wartet i {
  width: 35%;
  animation: vf-laeuft 1.1s linear infinite;
}

@keyframes vf-laeuft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(290%);
  }
}

.vf-knoepfe {
  display: flex;
  gap: 8px;
}

.vf-knoepfe .knopf {
  flex: 1;
}

.vf-knoepfe [data-aktion="vf-zurueck"] {
  flex: 0 0 52px;
}

.zeig-hier {
  outline: 3px solid var(--gelb);
  outline-offset: -3px;
  animation: zeig-puls 0.9s ease-in-out infinite;
}

@keyframes zeig-puls {
  50% {
    box-shadow: 0 0 0 6px rgba(255, 201, 40, 0.45);
  }
}

#zeigefinger {
  position: fixed;
  z-index: 6;
  font-size: 34px;
  line-height: 1;
  pointer-events: none;
  transform: translate(-50%, 2px);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
  animation: zeig-tipp 1.1s ease-in-out infinite;
}

#zeigefinger.von-oben {
  transform: translate(-50%, calc(-100% - 2px)) rotate(180deg);
  animation-name: zeig-tipp-oben;
}

@keyframes zeig-tipp {
  50% {
    translate: 0 8px;
  }
}

@keyframes zeig-tipp-oben {
  50% {
    translate: 0 -8px;
  }
}

body.foto #vorfuehrung,
body.foto #zeigefinger {
  display: none !important;
}

/* Menü: alle Knöpfe und Reihen mit gleichem Abstand */
.menue {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.menue > .knopf.breit,
.menue > p {
  margin: 0;
}

#dialog .leise a {
  color: var(--gelb);
}
