/* Nur Colony Flow: Spielfeld, Slots, Vorrat, Siegbildschirm. */

/* Spielfeld */
#feld {
  width: min(100%, 56vh);
  aspect-ratio: 1;
  display: block;
  align-self: center;
  background: var(--panel);
  border: 7px solid var(--panel-rand);
  border-radius: 26px;
  box-shadow: 0 6px 0 #0000001a;
  touch-action: manipulation;
}

#meldung {
  margin: 0;
  text-align: center;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  text-shadow: 0 2px 0 #00000038;
  min-height: 1.4em;
}

/* die fuenf Slots */
.slots {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  width: 100%;
  align-self: center;
}

.slot {
  flex: 0 1 72px;
  aspect-ratio: 1;
  background: #fffdf8;
  border-radius: 14px;
  box-shadow: inset 0 -4px 0 #0000000f, 0 3px 0 #0000001a;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
}

.slot.voll {
  background: var(--f);
  box-shadow: inset 0 -7px 0 #0000002e, 0 3px 0 #00000026;
  color: #4e3115;
  text-shadow: 0 1px 0 #ffffff6b;
}

/* Vorrat: Saeulen, aus denen die naechsten Trupps hervorschauen */
.stapel { display: flex; gap: clamp(5px, 2vw, 10px); justify-content: center; flex-wrap: wrap; align-items: flex-start; }

.saeule {
  background: none;
  border: 0;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.saeule:active { transform: translateY(2px); }

.saeule:disabled { opacity: 0.4; }

.saeule.tipp .kachel { outline: 3px solid #fff; outline-offset: 2px; }

.kachel {
  width: clamp(40px, 12.5vw, 54px);
  height: clamp(40px, 12.5vw, 54px);
  border-radius: 15px;
  background: var(--f);
  box-shadow: inset 0 -8px 0 #00000030, 0 3px 0 #00000026;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 19px;
  color: #4e3115;
  text-shadow: 0 1px 0 #ffffff70;
  position: relative;
}

.kachel.warte {
  width: clamp(34px, 10.5vw, 46px);
  height: 20px;
  margin-top: -8px;
  font-size: 13px;
  align-items: start;
  padding-top: 1px;
  filter: brightness(0.93);
}

.mehr { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 0 #00000038; margin-top: 3px; }

#knopf-weiter { align-self: center; padding: 10px 24px; font-size: 17px; background: var(--gold); color: #fff; border-color: #d2912f; }

#meine { display: grid; gap: 6px; max-height: 32vh; overflow: auto; }

.meine-zeile { display: flex; gap: 6px; }

.meine-zeile > button:first-child { flex: 1; display: flex; align-items: center; gap: 8px; justify-content: flex-start; background: #fffdf8; font-size: 13px; font-weight: 700; }

.meine-zeile canvas { width: 30px; height: 30px; image-rendering: pixelated; border-radius: 6px; }

.meine-zeile .weg { flex: 0 0 auto; color: #b5402f; }

#vorschau { width: min(100%, 34vh); aspect-ratio: 1; display: block; margin: 0 auto; image-rendering: pixelated; background: #fffdf8; border-radius: 14px; border: 2px solid var(--panel-rand); }

#bild-info { font-size: 13px; opacity: 0.85; min-height: 1.4em; margin: 6px 0 0; }

/* Gratulation: zwei Sekunden, dann geht es von selbst weiter */
#jubel {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #4a2d1255;
  z-index: 50;
}

#jubel[hidden] { display: none; }

#konfetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.jubel-karte {
  background: var(--panel);
  border: 5px solid var(--panel-rand);
  border-radius: 24px;
  padding: 24px 34px;
  text-align: center;
  box-shadow: 0 8px 0 #00000026;
  animation: aufpoppen 0.3s cubic-bezier(0.2, 1.4, 0.5, 1);
}

.jubel-gross { margin: 0; font-size: 30px; font-weight: 800; color: var(--gold); text-shadow: 0 2px 0 #00000014; }

#jubel-zeile { margin: 6px 0 0; font-weight: 700; }

#jubelhuhn { width: 160px; height: 150px; display: block; margin: 0 auto; }

.blase {
  position: relative;
  display: inline-block;
  margin: 0 0 6px;
  padding: 8px 14px;
  background: #fffdf8;
  border: 3px solid var(--panel-rand);
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
}

.blase::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -11px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--panel-rand);
}

@keyframes aufpoppen {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .jubel-karte { animation: none; }
}

