/* Das Bild bleibt ruhig, damit sich die Kinder auf ihre Mausbewegung konzentrieren. */
.mausfeld {
  position: relative;
  min-height: 280px;
  height: clamp(280px, 42vh, 390px);
  border: 1px solid var(--linie);
  border-radius: 1rem;
  background: linear-gradient(#ffffff26, #f8fff34d), url("assets/bilder/wiese.png") center / cover;
  overflow: hidden;
  user-select: none;
}
.mausfeld:has(.ziehohne) { touch-action: none; }
.mausziel {
  position: absolute;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  align-content: center;
  width: min(100%, 8.5rem);
  min-height: 70px;
  padding: .25rem;
  border-radius: .85rem;
  border: 2px solid #467764;
  background: #fffef9ee;
  color: var(--tinte);
  text-align: center;
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
  box-shadow: 0 3px 8px #2c493e24;
}
.mausziel img { width: 82%; height: clamp(42px, 8vh, 76px); object-fit: contain; pointer-events: none; }
.mausziel span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; pointer-events: none; }
.mausziel.bewegungsziel { border-style: dashed; cursor: crosshair; }
.mausziel.ziehohne { cursor: grab; }
.mausziel.zieht { cursor: grabbing; z-index: 4; }
.mausziel.fertig { visibility: hidden; }
.ablage {
  position: absolute;
  transform: translate(-50%, -50%);
  width: clamp(84px, 24%, 190px);
  height: 98px;
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: .85rem;
  border: 3px dashed #3f6957;
  background: #fffef9ea;
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
  pointer-events: none;
}
.ablage.aktiv { background: #d7edce; border-style: solid; }
.spur {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.spur .grund { stroke: #762f2a; }
.spur .rot { stroke: #b74941; }
.spur .gelaufen { stroke: #f0c687; stroke-width: 9; pointer-events: none; }
.spur path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.spur circle { fill: #ffe49a; stroke: #653d25; stroke-width: 3; }
.spur text { fill: #193d3b; font-size: 19px; font-weight: 700; pointer-events: none; }
@media (max-width: 520px) {
  .mausfeld { height: 285px; }
}

/* Die Spielfelder und Farben des Prototyps bleiben, die Trefferflächen wachsen je nach Runde. */
.mausziel.gross { width: min(100%, 9.5rem); min-height: 106px; }
.mausziel.gross img { height: clamp(56px, 11vh, 85px); }
.mausziel.mittel { width: min(100%, 8.5rem); }
.mausziel.klein { width: min(100%, 7.3rem); min-height: 66px; }
.mausziel.klein img { height: 36px; }

.mausziel.offen, .spurziel.offen circle { background: #e3f4df; border-color: #307046; color: var(--tinte); fill: #e3f4df; }
.mausziel.offen:disabled { opacity: 1; }
.ablage.gross { width: clamp(92px, 28%, 195px); height: 107px; }
.ablage.mittel { width: clamp(80px, 22%, 158px); height: 88px; }
.ablage.klein { width: clamp(62px, 17%, 118px); height: 67px; }
.sortierzeichen {
  position: absolute;
  top: -.5rem;
  right: -.45rem;
  border: 1px solid #467764;
  background: #e8f3e7;
  border-radius: 50%;
  min-width: 1.55rem;
  pointer-events: none;
}
.anleitungstext { flex: 1 1 15rem; }
.anleitung .phase { font-weight: 700; color: var(--petrol); }
.anleitung .phase + p { margin-top: .12rem; }
.auftrag {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  background: var(--weiss);
  border: 1px solid var(--linie);
  border-radius: .7rem;
  padding: .3rem .6rem;
  margin-bottom: .45rem;
}
.auftrag img { width: 40px; height: 34px; object-fit: contain; }
.auftrag span { font-weight: 700; }
.kontext {
  position: absolute;
  z-index: 6;
  display: grid;
  padding: .25rem;
  min-width: 8rem;
  border: 1px solid #467764;
  border-radius: .65rem;
  background: var(--weiss);
  box-shadow: 0 3px 12px #2c493e45;
}
.kontext button { border-color: transparent; text-align: left; }
.naechster-auftrag { margin-top: .55rem; }
.spur .parkpunkt { fill: #ffe49a; }
.spur .parkpunkt.erreicht { stroke: #275b4b; stroke-width: 5; }
.spurmarke { cursor: pointer; }
.spurmarke circle { fill: #fffef9; stroke: #762f2a; }
.spurmarke.bereit circle { fill: #fffef9; stroke: #215d53; stroke-width: 5; }
.spurmarke text { pointer-events: auto; }
.mausziel.markiert { outline: 3px dashed #306c4b; outline-offset: 3px; }

/* Die Rückmeldung steht über dem Spielfeld und reserviert Platz für zwei Zeilen. */
#status {
  min-height: 3.3rem;
  padding: .1rem .25rem;
  line-height: 1.5;
}
#status:empty { display: none; }
.uebungsaktionen { margin-top: .65rem; }
.anleitung.regelwechsel {
  background: #fff3d4;
  border: 2px solid #875e22;
  margin-bottom: .55rem;
}
#regelueberschrift { font-weight: 700; color: #694313; }
.suchauftrag { background: #fff3d4; border-color: #9c7439; }
.suchauftrag img { width: 52px; height: 40px; }

@media (max-height: 800px) {
  .uebung .mausfeld { height: clamp(270px, 40vh, 330px); }
  .uebung .anleitung { margin-bottom: .35rem; }
}

/* Rasterkarten besitzen eine sichtbare und zusammenhängende Trefferfläche. */
.zielfeld {
  height: auto;
  min-height: 13.5rem;
  display: grid;
  grid-template: repeat(2, minmax(5.3rem, auto)) / repeat(4, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  gap: .45rem;
  padding: .55rem;
}
.zielfeld .mausziel {
  position: static;
  transform: none;
  padding-inline: .25rem;
  min-width: 0;
}
.zielfeld .mausziel img { width: 90%; }
.zielfeld .kontext { max-width: calc(100% - .5rem); }
.sortierfeld { min-height: 16.5rem; }
.sortierfeld .mausziel { width: min(26%, 9.5rem); }
.sortierfeld .mausziel.klein { width: min(25%, 7.3rem); }
.sortierfeld .ablage { width: min(28%, 9.75rem); }
.sortierzeichen { right: 0; }
.bewegungsschalter { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.bewegungsschalter input { width: 1.05rem; height: 1.05rem; }
@keyframes mauszielen {
  from { translate: -.32rem; }
  to { translate: .32rem; }
}
.wandernd:not(.fertig) { animation: mauszielen 2.6s ease-in-out infinite alternate; }
.pausiert .wandernd { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .wandernd:not(.fertig) { animation-play-state: paused; }
  .bewegungsschalter { display: none; }
}

@media (max-width: 39rem) {
  .zielfeld { grid-template: none / repeat(2, minmax(0, 1fr)); }
  .zielfeld .mausziel { grid-area: auto !important; }
  .zielfeld .mausziel.gross img { height: 3rem; }
  .sortierfeld { min-height: 23rem; }
  .sortierfeld .mausziel img { height: 1.65rem; }
  .kontext button { overflow-wrap: anywhere; }
}

@media (min-width: 40rem) and (max-height: 800px) {
  main:has(#uebung:not([hidden])) { margin-block: .65rem; }
  .uebungskopf { margin-bottom: .35rem; }
}

/* Die sichtbare Karte ist die gesamte Klickfläche. Die kleinen Türen belegen weniger Platz als mittlere. */
.zielfeld .tuerziel.klein { width: min(81%, 5.8rem); min-height: 3.5rem; }
.zielfeld .tuerziel.klein img { height: 2rem; }
.zielfeld .tuerziel.mittel { width: min(94%, 8rem); min-height: 4.65rem; }
.zielfeld .tuerziel.mittel img { height: 3.1rem; }
