body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 120px 20px 40px;
  text-align: center;
  background-color: #111;
  background-image: radial-gradient(ellipse at center, #1c1c1c 0%, #111 100%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  color: #fff;
  font-family: 'Crimson Pro', serif;
  overflow-x: hidden;
}

h1 {
  font-size: 1.4em;
  font-weight: 400;
  letter-spacing: 1px;
  opacity: 0.75;
  margin: 0 0 12px;
}

.entry-whisper {
  font-size: 0.9em;
  font-style: italic;
  opacity: 0.45;
  margin-bottom: 48px;
  animation: fadeOut 9s forwards 2s;
}
@keyframes fadeOut { 0%{opacity:.45} 100%{opacity:0} }

#drawButton {
  background: none;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 10px 22px;
  color: #fff;
  font-size: 0.9em;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.8s ease;
  margin-top: 16px;
}
#drawButton:hover  { border-color: #fff; }
#drawButton.fade-out { opacity: 0; pointer-events: none; }

/* ---------- result container (static) ---------- */
.totem-result {
  margin-top: 40px;
  opacity: 0;
  transition: opacity 1.2s ease;
  max-width: 360px;

  /* reserve enough height for image + name + reflection */
  min-height: 220px;

  position: relative;   /* stop re-centering / re-flow */
  will-change: opacity; /* hint for smooth fade */
}
.totem-result.show { opacity: 1; }

/* ---------- name & reflection ---------- */
.totem-name {
  font-size: 1em;
  margin-bottom: 10px;
  opacity: 0.85;
  letter-spacing: 0.5px;
  font-weight: normal;
  font-style: italic;
}
.totem-label { opacity: 0.6; margin-right: 4px; }

.totem-reflection {
  font-style: italic;
  font-size: 0.95em;
  opacity: 0.75;
  white-space: pre-wrap;
  min-height: 40px;
}

/* ---------- image (no-jitter fade-in) ---------- */
.totem-image {
  display: block;
  width: 120px;
  height: 120px;             /* fixed height → no layout shift */
  margin: 0 auto 16px;
  opacity: 0;
  transition: opacity 0.9s ease-in-out;
  object-fit: contain;
  background: none;
  border: none;
  will-change: opacity;      /* smoother compositor fade */
}
.totem-image.show { opacity: 1; }

.return-icon {
  position: fixed;
  top: 20px;
  left: 20px;
  color: #fff;
  text-decoration: none;
  font-size: 1.8em;
  z-index: 100;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease;
}

.return-icon:hover {
  transform: scale(1.2);
}
