/* --------------------------------------------------------------- Ein Ast */

.sb-ast {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  box-sizing: border-box;
  width: 72px;
  height: 124px;
  padding: 0 2px 2px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.sb-ast:hover,
.sb-ast:focus-visible,
.sb-ast.is-pfad {
  outline: none;
  border-color: var(--gold-deep);
  background: rgb(232 195 122 / 10%);
}

/* Vor der Wiedergeburt (28.09.2026): leuchtet mit, aber nur gestrichelt. */
.sb-ast.is-pfad.is-vorher {
  border-style: dashed;
  background: rgb(232 195 122 / 4%);
}

/*
  Das Figurenfeld. Die Figur steht unten auf, ganz gleich wie hoch ihre
  Leinwand ist, damit alle Klassen einer Ebene auf derselben Grundlinie
  stehen.
*/
.sb-figur {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 96px;
  line-height: 0;
}

.sb-figurBild {
  display: block;
  max-width: 62px;
  max-height: 92px;
  width: auto;
  height: auto;

  /* Die Optik aus dem Spiel, kein Mangel. */
  image-rendering: pixelated;
  transition: opacity 0.28s ease;
}

/* Das stehende Bild liegt GENAU über dem sitzenden. */
.sb-steht {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  opacity: 0;
}

.sb-ast:hover .sb-steht,
.sb-ast:focus-visible .sb-steht {
  opacity: 1;
}

.sb-ast:hover .sb-sitzt,
.sb-ast:focus-visible .sb-sitzt {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .sb-figurBild {
    transition: none;
  }
}

.sb-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  width: 100%;
  color: var(--ink);
  font-size: 10px;
  line-height: 12px;
  text-align: center;
}

.sb-ast:hover .sb-name,
.sb-ast.is-pfad .sb-name {
  color: var(--gold-bright);
}
