@font-face {
  font-family: "Latin Modern Mono";
  src: url("regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --fg:       #000;
  --bg:       #fff;
  --raum-xs:   7px;
  --raum-m:   21px;
  --raum-l:   42px;
  --rot:      #e73039;
  --blau:     #00437a;
  --gruen:    #006b38;
  --lila:     #a71580;
  --orange:   #f39400;
  --grau:     #b8b7b7;
  --schrift:  "Latin Modern Mono", ui-monospace, "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--schrift);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fg);
  background-color: var(--bg);
}

body.nacht {
  color: var(--bg);
  background-color: var(--fg);
}

#welt {
  display: block;
  width: 100vw;
  height: 100dvh;
  touch-action: none;
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M16 2v10M16 20v10M2 16h10M20 16h10' fill='none' stroke='%23b8b7b7' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 16 16, crosshair;
}

body.bewaffnet #welt {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath d='M16 2v10M16 20v10M2 16h10M20 16h10' fill='none' stroke='%23e73039' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") 16 16, crosshair;
}

#held {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  transform: translate(-50%, -50%) scaleX(-1);
  pointer-events: none;
  z-index: 10;
}

.anzeige {
  position: fixed;
  top: var(--raum-l);
  right: var(--raum-l);
  text-align: right;
  pointer-events: none;
  z-index: 20;
}

.schnecke,
.huhn,
.haendler,
.haendlertuch {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

.huhn { z-index: 6; }
.haendler { z-index: 7; }
.haendlertuch { z-index: 8; }

#hand {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 0;
  height: auto;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 11;
}

.formel {
  position: fixed;
  top: var(--raum-l);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1.3;
  pointer-events: none;
  z-index: 20;
}

.formel .oben {
  display: block;
  padding: 0 6px 3px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.formel.strich .oben { border-bottom-color: currentColor; }

.formel .unten {
  display: block;
  padding-top: 3px;
}

.formel .radikand {
  padding: 0 3px;
  border-top: 1px solid transparent;
  white-space: nowrap;
}

.formel.wurzel .radikand { border-top-color: currentColor; }

.formel [data-teil] { opacity: 0; }
.formel [data-teil].da { opacity: 1; }

.schweber {
  position: fixed;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  z-index: 21;
  transform: translate(-50%, 0);
  animation: schweben 2.8s linear forwards;
}

@keyframes schweben {
  from { transform: translate(-50%, 0); }
  to   { transform: translate(calc(-50% + var(--drift, 0px)), -70px); }
}

.hinweis {
  position: fixed;
  left: 50%;
  bottom: var(--raum-l);
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90vw, 46ch);
  margin: 0;
  text-align: center;
  pointer-events: none;
  z-index: 20;
}

.hinweis--weg { display: none; }

.hinweis--ende {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
}

.musikknopf {
  position: fixed;
  left: var(--raum-l);
  bottom: var(--raum-l);
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: none;
  cursor: pointer;
  outline: none;
  z-index: 20;
}

.musikknopf:hover,
.musikknopf:focus-visible { text-decoration: underline; }

.musikknopf--aus { text-decoration: line-through; }

.musikknopf--aus:hover,
.musikknopf--aus:focus-visible { text-decoration: line-through underline; }
