/* Zoth presence + digest bubbles. Gold/void, no card soup. */

.zoth-face {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  bottom: 0;
  height: 100%;
  width: auto;
  max-width: 46%;
  object-fit: cover;
  object-position: 50% 12%;
  mix-blend-mode: lighten;
  opacity: 0.88;
  filter: saturate(0.92) contrast(1.04);
}
.zoth-face.east {
  right: 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
}
.zoth-face.west {
  left: 0;
  -webkit-mask-image: linear-gradient(270deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
  mask-image: linear-gradient(270deg, transparent 0%, #000 22%, #000 88%, transparent 100%);
}
.zoth-face.mid {
  left: 50%;
  transform: translateX(-50%);
  max-width: 38%;
  opacity: 0.28;
  mix-blend-mode: screen;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 70%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 24%, #000 70%, transparent 100%);
}

.zoth-seal {
  position: absolute;
  width: min(18rem, 42vw);
  opacity: 0.07;
  pointer-events: none;
  z-index: 1;
  filter: grayscale(0.2);
}
.zoth-seal.tr { top: 12%; right: 6%; }
.zoth-seal.bl { bottom: 10%; left: 6%; }

#zoth-guide {
  position: fixed;
  z-index: 36;
  left: max(14px, env(safe-area-inset-left));
  bottom: max(16px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(28rem, calc(100vw - 28px));
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  transform-origin: left bottom;
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.16, 1, 0.3, 1);
}
#zoth-guide.on {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#zoth-guide[hidden] { display: none; }
#zoth-guide img {
  width: 78px;
  height: 102px;
  object-fit: cover;
  object-position: 50% 6%;
  flex-shrink: 0;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.55));
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
}
#zoth-guide .bubble {
  position: relative;
  background: #0c0c12;
  color: #f7f4ee;
  border: 1px solid rgba(232, 200, 114, 0.32);
  padding: 10px 28px 11px 12px;
  min-width: 12rem;
}
#zoth-guide .bubble::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 16px;
  width: 10px;
  height: 10px;
  background: #0c0c12;
  border-left: 1px solid rgba(232, 200, 114, 0.32);
  border-bottom: 1px solid rgba(232, 200, 114, 0.32);
  transform: rotate(45deg);
}
#zoth-guide .who {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8c872;
  margin: 0 0 6px;
}
#zoth-guide .lines {
  margin: 0;
  padding: 0;
  list-style: none;
}
#zoth-guide .lines li {
  font-family: Fraunces, "Iowan Old Style", Palatino, serif;
  font-size: 0.92rem;
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: #f7f4ee;
  margin: 0 0 5px;
}
#zoth-guide .lines li:last-child { margin: 0; }
#zoth-guide .x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  background: none;
  color: #a8a4c2;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
#zoth-guide .x:hover { color: #e8c872; }
#zoth-guide .x:focus-visible { outline: 1px solid #e8c872; }

@media (max-width: 760px) {
  .zoth-face {
    max-width: 42%;
    height: 62%;
    top: auto;
    bottom: 28%;
    opacity: 0.7;
  }
  .zoth-face.mid { max-width: 50%; height: 58%; opacity: 0.22; }
  #zoth-guide {
    left: 10px;
    right: 10px;
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
  }
  #zoth-guide img { width: 56px; height: 72px; }
  #zoth-guide .lines li { font-size: 0.86rem; }
}

@media (prefers-reduced-motion: reduce) {
  #zoth-guide { transition: none; }
}
