/* Role-aware onboarding companion for PrymeStudy auth runtime. */
.ps-auth-role-character {
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--ps-auth-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 16% 12%, color-mix(in srgb, var(--ps-auth-accent) 13%, transparent), transparent 42%),
    var(--ps-auth-bg);
  overflow: hidden;
}

.ps-auth-role-character__scene {
  min-height: 178px;
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.ps-auth-role-character__visual {
  position: relative;
  width: 138px;
  height: 138px;
  display: grid;
  place-items: center;
}

.ps-auth-role-character__halo {
  position: absolute;
  inset: 6px;
  border: 1px solid color-mix(in srgb, var(--ps-auth-accent) 35%, var(--ps-auth-line));
  border-radius: 38% 62% 55% 45% / 54% 42% 58% 46%;
  animation: ps-role-orbit 8s linear infinite;
}

.ps-auth-role-character__avatar {
  position: relative;
  z-index: 2;
  width: 98px;
  height: 98px;
  color: var(--ps-auth-accent-strong);
  filter: drop-shadow(0 14px 24px color-mix(in srgb, var(--ps-auth-accent) 18%, transparent));
  animation: ps-role-float 3.4s ease-in-out infinite;
}

.ps-auth-role-character__avatar svg { width: 100%; height: 100%; overflow: visible; }
.ps-auth-role-character__avatar .body { fill: var(--ps-auth-surface); stroke: currentColor; stroke-width: 2; }
.ps-auth-role-character__avatar .soft { fill: var(--ps-auth-accent-soft); stroke: currentColor; stroke-width: 1.6; }
.ps-auth-role-character__avatar .line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ps-auth-role-character__avatar .eye { fill: currentColor; transform-origin: center; animation: ps-role-blink 5.2s infinite; }
.ps-auth-role-character__avatar .hand { transition: transform .28s cubic-bezier(.2,.8,.2,1); transform-origin: center; }
.ps-auth-role-character[data-secret="true"] .hand-left { transform: translate(18px,-18px) rotate(24deg); }
.ps-auth-role-character[data-secret="true"] .hand-right { transform: translate(-18px,-18px) rotate(-24deg); }
.ps-auth-role-character[data-secret="true"] .eye { opacity: .18; }

.ps-auth-role-character__copy small {
  display: block;
  margin-bottom: 7px;
  color: var(--ps-auth-accent-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ps-auth-role-character__copy strong {
  display: block;
  color: var(--ps-auth-text);
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.ps-auth-role-character__copy p {
  margin: 8px 0 0;
  color: var(--ps-auth-muted);
  font-size: 12px;
  line-height: 1.55;
}
.ps-auth-role-character__steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.ps-auth-role-character__steps span {
  padding: 6px 8px;
  border: 1px solid var(--ps-auth-line);
  border-radius: 999px;
  background: var(--ps-auth-surface);
  color: var(--ps-auth-muted);
  font-size: 9px;
  font-weight: 760;
}

.ps-auth-role-character[data-role="lecturer"] { --role-tone: #f5a623; }
.ps-auth-role-character[data-role="lecturer"] .ps-auth-role-character__halo { border-color: color-mix(in srgb, #f5a623 38%, var(--ps-auth-line)); }
.ps-auth-role-character[data-role="tutor"] { --role-tone: #8b5cf6; }
.ps-auth-role-character[data-role="institution_admin"] { --role-tone: #10b981; }
.ps-auth-role-character[data-role="lecturer"] .ps-auth-role-character__avatar,
.ps-auth-role-character[data-role="tutor"] .ps-auth-role-character__avatar,
.ps-auth-role-character[data-role="institution_admin"] .ps-auth-role-character__avatar { color: var(--role-tone); }

@keyframes ps-role-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-7px) rotate(1deg); } }
@keyframes ps-role-orbit { to { transform: rotate(360deg); } }
@keyframes ps-role-blink { 0%,46%,49%,100% { transform: scaleY(1); } 47%,48% { transform: scaleY(.08); } }

@media (prefers-reduced-motion: reduce) {
  .ps-auth-role-character__avatar,
  .ps-auth-role-character__halo,
  .ps-auth-role-character__avatar .eye { animation: none; }
}

@media (max-width: 1180px) {
  .ps-auth-role-character__scene { grid-template-columns: 112px minmax(0,1fr); }
  .ps-auth-role-character__visual { width: 108px; height: 108px; }
  .ps-auth-role-character__avatar { width: 80px; height: 80px; }
}

@media (max-width: 900px) {
  .ps-auth-role-character { display: none; }
}
