/* Fossil mode (dig). Everything scoped to #dig-view. The logbook sheet, the close and
   next chips, the safe area probe and the animated scene come from
   css/puzzle.css (rules shared with :is()). */

#dig-view {
  background: #8a7a68;
  touch-action: none;
}

/* ---------- ground: hints and holes multiplied over the plate ---------- */

/* Goes inside the scene (.pz-scene), above the illustration: that way the multiply
   picks up each biome's ground color. The scene sets the saturation. */
#dig-view .dg-ground {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  mix-blend-mode: multiply;
  pointer-events: none;
}
#dig-view .dg-hint { transition: opacity 0.3s ease; }
#dig-view .dg-hint.dg-hint-faint { opacity: 0.45; }
#dig-view .dg-hint.dg-hint-gone { opacity: 0; }
#dig-view .dg-stage { transition: opacity 0.22s ease; }

/* ---------- game ---------- */

#dig-view .dg-game {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  z-index: 2;
}
#dig-view .dg-found,
#dig-view .dg-fx,
#dig-view .dg-decor { pointer-events: none; }
#dig-view .dg-dino { pointer-events: none; }
#dig-view .dg-dino.dg-tappable { cursor: pointer; }
#dig-view .dg-found .dg-piece { filter: drop-shadow(0 4px 3px rgba(46, 42, 36, 0.35)); }

/* Help glow: only after 5 s without uncovering anything, over a mound. */
#dig-view .dg-glint { opacity: 0; }
#dig-view .dg-glint.dg-on { animation: dg-glint 2.4s ease-in-out infinite; }
@keyframes dg-glint {
  0%, 100% { opacity: 0; transform: scale(0.7) rotate(0deg); }
  40%      { opacity: 1; transform: scale(1) rotate(20deg); }
  70%      { opacity: 0.35; transform: scale(0.9) rotate(35deg); }
}
#dig-view .dg-glint-core { transform-box: fill-box; transform-origin: 50% 50%; }

/* ---------- logbook: mystery silhouette, treasures and count ---------- */

#dig-view .dg-decor { transition: transform 700ms var(--ease-in-out), opacity 700ms var(--ease-in-out); }
#dig-view .dg-mystery-q {
  font-family: var(--font-hand);
  font-weight: 700;
  fill: rgba(94, 84, 70, 0.55);
  transition: opacity 600ms var(--ease-out);
}
#dig-view .dg-ink { transition: opacity 500ms var(--ease-out); }
#dig-view .dg-album-outline { transition: opacity 500ms var(--ease-out); }
#dig-view .dg-album-name {
  font-family: var(--font-hand);
  font-weight: 700;
  fill: var(--c-earth);
  opacity: 0;
  transition: opacity 500ms var(--ease-out) 150ms;
}
#dig-view .dg-album-slot.dg-filled .dg-album-outline { opacity: 0; }
#dig-view .dg-album-slot.dg-filled .dg-album-name { opacity: 1; }
#dig-view .dg-treasure image.dg-tape { filter: drop-shadow(0 1px 1.5px rgba(46, 42, 36, 0.25)); }
#dig-view .dg-tally path {
  fill: none;
  stroke: rgba(62, 58, 52, 0.78);
  stroke-width: 4;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  #dig-view .dg-glint.dg-on { animation: none; opacity: 0.8; }
}
