.guild-specialist {
  --motion: 1;
  --spell: #a9eac5;
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: minmax(29px, 1fr) auto;
  justify-items: center;
  padding: 1px 4px 3px;
  color: var(--spell);
  background: radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--spell) 16%, #10191d), #10191d 70%);
  text-align: center;
  pointer-events: none;
}

.guild-specialist[data-specialist="ruan"] { --spell: #f7cd7c; }
.guild-specialist[data-specialist="rhys"] { --spell: #c9b9ff; }
.guild-specialist[data-specialist="brendan"] { --spell: #b5dcfa; }

.guild-specialist-scene {
  position: relative;
  width: 96px;
  max-width: 100%;
  align-self: stretch;
}

.guild-specialist-label {
  display: grid;
  gap: 1px;
  max-width: 100%;
  line-height: 1.05;
}

.guild-specialist-title {
  font-size: 11px;
  color: #fff5de;
  overflow-wrap: anywhere;
}

.guild-specialist-detail {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .025em;
}

.guild-ai-terminal {
  position: absolute;
  left: 18px;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 4px;
  width: 34px;
  height: 23px;
  padding-left: 6px;
  border: 1px solid currentColor;
  border-top-width: 4px;
  border-radius: 3px;
  background: #17332d;
  box-shadow: 0 0 10px #79f7b657, inset 0 0 7px #79f7b62b;
  transform: translateY(-50%);
}

.guild-ai-prompt { font: 700 17px/.7 monospace; }

.guild-ai-cursor {
  width: 7px;
  border-bottom: 2px solid currentColor;
  transform: translateY(3px);
  animation: guild-ai-type calc(360ms * var(--motion)) steps(2) 3;
}

.guild-ai-trace {
  position: absolute;
  top: 50%;
  left: 52px;
  width: 28px;
  height: 12px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-1px) skewX(35deg);
  transform-origin: left top;
  animation: guild-ai-connect calc(920ms * var(--motion)) both;
}

.guild-ai-trace::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: -3px;
  width: 5px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.guild-dispatch-trail {
  position: absolute;
  left: 14px;
  right: 16px;
  top: 55%;
  border-top: 1px dashed currentColor;
  opacity: .55;
  transform: rotate(-9deg);
}

.guild-dispatch-letter {
  position: absolute;
  left: 21px;
  top: 50%;
  width: 23px;
  height: 15px;
  margin-top: -7px;
  border: 1px solid #fbe1a6;
  border-radius: 2px;
  background: #a86c32;
  overflow: hidden;
  transform: rotate(-9deg);
  animation: guild-dispatch-send calc(980ms * var(--motion)) ease-in-out both;
}

.guild-dispatch-letter::after {
  content: "";
  position: absolute;
  width: 17px;
  aspect-ratio: 1;
  top: -12px;
  left: 2px;
  border: 1px solid #ffe8a7;
  background: #dfad58;
  transform: rotate(45deg);
}

.guild-dispatch-seal {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  place-items: center;
  width: 32px;
  aspect-ratio: 1;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #52402b;
  overflow: hidden;
  box-shadow: 0 0 10px #f7cd7c6e;
  transform: translateY(-50%);
  animation: guild-dispatch-stamp calc(1.1s * var(--motion)) both;
}

.guild-dispatch-portrait {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 23%;
}

.guild-dispatch-initial { font-size: 15px; font-weight: 700; }

.guild-sight-orb {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 36px;
  aspect-ratio: 1;
  border: 1px solid #ded5ff;
  border-radius: 50%;
  background: radial-gradient(circle at 29% 22%, #cfbefb 0 4%, #745aaa 23%, #45366c 55%, #1e2440 88%);
  box-shadow: 0 0 11px #a790fc91, inset 0 0 6px #d6c4ff6b;
  transform: translate(-50%, -57%);
}

.guild-sight-line {
  position: absolute;
  inset: 10px 9px 11px;
  border-right: 1px solid #f5ddff;
  border-bottom: 1px solid #f5ddff;
  transform: skewY(-26deg) rotate(-16deg);
  animation: guild-sight-reveal calc(1s * var(--motion)) both;
}

.guild-sight-node {
  position: absolute;
  width: 4px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff7ff;
  box-shadow: 0 0 6px 1px #faebff;
  animation: guild-sight-reveal calc(850ms * var(--motion)) both;
}

.guild-sight-start { left: 7px; top: 23px; }
.guild-sight-mid { left: 21px; top: 19px; animation-delay: calc(130ms * var(--motion)); }
.guild-sight-end { left: 24px; top: 8px; animation-delay: calc(240ms * var(--motion)); }

.guild-sight-stand {
  position: absolute;
  left: 50%;
  top: calc(50% + 12px);
  width: 27px;
  height: 5px;
  border-radius: 0 0 50% 50%;
  background: #bb9868;
  box-shadow: 0 2px #4c3425, inset 0 1px #f1d9a8;
  transform: translateX(-50%);
}

.guild-owl-detour,
.guild-owl-route {
  position: absolute;
  left: 13px;
  top: 55%;
  width: 48px;
  height: 12px;
  border-top: 1px dashed #da886c;
  border-radius: 50%;
  transform: rotate(-23deg);
  opacity: .55;
}

.guild-owl-route {
  left: 22px;
  top: 60%;
  width: 57px;
  border-color: currentColor;
  transform: rotate(-5deg);
  opacity: .9;
  animation: guild-sight-reveal calc(1s * var(--motion)) both;
}

.guild-owl-tower {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 12px;
  height: 20px;
  border: 1px solid #b5dcfa;
  background: linear-gradient(90deg, #34465c, #526c81);
  transform: translateY(-35%);
}

.guild-owl-tower::before {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: -10px;
  height: 9px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.guild-owl {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 60px;
  width: 21px;
  height: 17px;
  transform: translateY(-65%);
  animation: guild-owl-deliver calc(1.12s * var(--motion)) cubic-bezier(.2,.7,.3,1) both;
}

.guild-owl::before {
  content: "";
  position: absolute;
  inset: 1px -8px 2px;
  background: #d6c099;
  clip-path: polygon(0 0, 41% 33%, 59% 33%, 100% 0, 88% 70%, 70% 100%, 30% 100%, 12% 70%);
  animation: guild-owl-fly calc(290ms * var(--motion)) ease-in-out 4 alternate;
}

.guild-owl-face {
  position: absolute;
  inset: 0 2px 1px;
  border-radius: 33% 33% 55% 55%;
  background:
    radial-gradient(circle at 30% 41%, #252126 0 1px, transparent 1.7px),
    radial-gradient(circle at 70% 41%, #252126 0 1px, transparent 1.7px),
    linear-gradient(160deg, #fff2cd, #c4a77f);
  box-shadow: 0 1px 3px #20171a;
}

.guild-owl-face::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  border: 2px solid transparent;
  border-top: 4px solid #ac6234;
}

@keyframes guild-ai-type { 50% { opacity: .15; } }
@keyframes guild-ai-connect { 0%, 30% { opacity: 0; scale: 0 1; } 78% { opacity: 1; } }
@keyframes guild-dispatch-send { 0% { opacity: 0; transform: translateX(-12px) rotate(-20deg); } 70% { transform: translateX(16px) rotate(-11deg); } }
@keyframes guild-dispatch-stamp { 0%, 51% { opacity: .28; scale: .78; } 78% { scale: 1.14; } }
@keyframes guild-sight-reveal { 0%, 23% { opacity: 0; } 72% { filter: brightness(1.7); } }
@keyframes guild-owl-deliver {
  0% { opacity: 0; transform: translate(-48px, -3px) rotate(-18deg); }
  40% { transform: translate(-22px, -18px) rotate(13deg); }
  67% { transform: translate(-10px, -15px) rotate(-10deg); }
}
@keyframes guild-owl-fly { to { scale: 1 .43; } }

@media (prefers-reduced-motion: reduce) {
  .guild-specialist { --motion: 0; }
}

.guild-specialist[data-static="true"],
:is([data-pace="quick"], [data-pace="still"], [data-static="true"]) .guild-specialist {
  --motion: 0;
}
