.ysa-profile-panel {
  --ysa-profile-accent: #1fae82;
  --ysa-profile-accent-text: #15321d;
  --ysa-profile-ink: #15321d;
  --ysa-profile-surface: #ffffff;
  display: block;
  width: min(23.25rem, calc(100vw - 5.5rem));
  max-width: 100%;
  margin: 0;
  color: var(--ysa-profile-ink);
  font-family: inherit;
  line-height: 1.4;
  text-align: left;
}

.ysa-profile-panel[hidden] {
  display: none;
}

.chatmessage.assistant.has-profile-panel {
  width: calc(100% - 1.5rem);
  margin-left: 0.75rem;
  padding: 0;
  background: transparent !important;
  box-shadow: none;
}

.chatmessage.assistant.has-profile-panel > .content {
  width: 100%;
}

.ysa-profile-panel *,
.ysa-profile-panel *::before,
.ysa-profile-panel *::after {
  box-sizing: border-box;
}

.ysa-profile-panel button,
.ysa-profile-panel input,
.ysa-profile-panel textarea,
.ysa-profile-panel select {
  font: inherit;
}

.ysa-profile-shell {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 12%, transparent);
  border-radius: 1rem;
  background: var(--ysa-profile-surface);
  opacity: 1;
  transform: translateY(0);
  transition:
    transform 420ms cubic-bezier(0.32, 0.72, 0, 1),
    opacity 220ms ease-out;
  will-change: transform, opacity;
}

.ysa-profile-panel.is-closing,
.ysa-profile-panel.is-completing {
  overflow: hidden;
  pointer-events: none;
}

.ysa-profile-panel.is-opening .ysa-profile-shell,
.ysa-profile-panel.is-closing .ysa-profile-shell,
.ysa-profile-panel.is-completing .ysa-profile-shell {
  transform: translateY(100%);
}

.ysa-profile-shell[hidden] {
  display: none;
}

.ysa-profile-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.75rem 0.875rem;
  border-bottom: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 9%, transparent);
}

.ysa-profile-avatar {
  position: relative;
  display: grid;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 2px solid var(--ysa-profile-accent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ysa-profile-accent) 18%, var(--ysa-profile-surface));
  color: var(--ysa-profile-ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.ysa-profile-avatar::after {
  position: absolute;
  right: -0.08rem;
  bottom: -0.08rem;
  width: 0.65rem;
  height: 0.65rem;
  border: 2px solid var(--ysa-profile-surface);
  border-radius: 50%;
  background: var(--ysa-profile-accent);
  content: "";
}

.ysa-profile-head-copy {
  min-width: 0;
  flex: 1;
}

.ysa-profile-head-copy strong,
.ysa-profile-head-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ysa-profile-head-copy strong {
  font-size: 0.95rem;
  line-height: 1.2;
}

.ysa-profile-head-copy span {
  margin-top: 0.15rem;
  color: color-mix(in srgb, var(--ysa-profile-ink) 66%, transparent);
  font-size: 0.78rem;
}

.ysa-profile-icon-button {
  display: grid;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ysa-profile-ink) 7%, transparent);
  color: color-mix(in srgb, var(--ysa-profile-ink) 70%, transparent);
  cursor: pointer;
}

.ysa-profile-icon-button:hover {
  background: color-mix(in srgb, var(--ysa-profile-ink) 13%, transparent);
  color: var(--ysa-profile-ink);
}

.ysa-profile-icon-button:focus-visible,
.ysa-profile-button:focus-visible,
.ysa-profile-choice:focus-visible,
.ysa-profile-field input:focus-visible,
.ysa-profile-field textarea:focus-visible,
.ysa-profile-field select:focus-visible,
.ysa-profile-consent input:focus-visible,
.ysa-profile-reopen:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--ysa-profile-accent) 42%, transparent);
  outline-offset: 2px;
}

.ysa-profile-body {
  padding: 1rem 1.1rem 1.1rem;
}

.ysa-profile-progress-copy {
  color: color-mix(in srgb, var(--ysa-profile-ink) 62%, transparent);
  font-size: 0.74rem;
  font-weight: 700;
}

.ysa-profile-progress {
  display: flex;
  gap: 0.35rem;
  margin: 0.55rem 0 1.2rem;
}

.ysa-profile-progress span {
  height: 0.25rem;
  flex: 1;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ysa-profile-ink) 10%, transparent);
}

.ysa-profile-progress span::after {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ysa-profile-accent);
  content: "";
  transition: width 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ysa-profile-progress span.is-done::after,
.ysa-profile-progress span.is-current::after {
  width: 100%;
}

.ysa-profile-step-heading h2,
.ysa-profile-success h2 {
  margin: 0;
  color: var(--ysa-profile-ink);
  font-family: inherit;
  font-size: 1.2rem;
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

.ysa-profile-step-heading p,
.ysa-profile-success p {
  margin: 0.35rem 0 0;
  color: color-mix(in srgb, var(--ysa-profile-ink) 66%, transparent);
  font-size: 0.86rem;
  line-height: 1.5;
  text-wrap: pretty;
}

.ysa-profile-fields {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-top: 1.1rem;
}

.ysa-profile-field > label,
.ysa-profile-field > span:first-child {
  display: block;
  margin-bottom: 0.38rem;
  color: color-mix(in srgb, var(--ysa-profile-ink) 84%, transparent);
  font-size: 0.78rem;
  font-weight: 700;
}

.ysa-profile-required {
  color: var(--ysa-profile-accent);
}

.ysa-profile-field input,
.ysa-profile-field textarea,
.ysa-profile-field select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 18%, transparent);
  border-radius: 0.7rem;
  background: color-mix(in srgb, var(--ysa-profile-ink) 2%, var(--ysa-profile-surface));
  color: var(--ysa-profile-ink);
  font-size: 1rem;
  line-height: 1.35;
}

.ysa-profile-field textarea {
  min-height: 5.5rem;
  resize: vertical;
}

.ysa-profile-field input::placeholder,
.ysa-profile-field textarea::placeholder {
  color: color-mix(in srgb, var(--ysa-profile-ink) 52%, transparent);
  opacity: 1;
}

.ysa-profile-field input[aria-invalid="true"],
.ysa-profile-field textarea[aria-invalid="true"],
.ysa-profile-field select[aria-invalid="true"] {
  border-color: #b42318;
}

.ysa-profile-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ysa-profile-choices.is-icon,
.ysa-profile-choices.is-image {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  align-items: stretch;
}

.ysa-profile-choice {
  min-height: 2.75rem;
  padding: 0.62rem 0.85rem;
  border: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 18%, transparent);
  border-radius: 999px;
  background: var(--ysa-profile-surface);
  color: var(--ysa-profile-ink);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 650;
}

.ysa-profile-choices.is-icon .ysa-profile-choice,
.ysa-profile-choices.is-image .ysa-profile-choice {
  display: flex;
  min-width: 0;
  min-height: 7rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  text-align: center;
}

.ysa-profile-choices.is-icon .ysa-profile-choice > i {
  color: color-mix(in srgb, var(--ysa-profile-ink) 84%, transparent);
  font-size: 2rem;
  line-height: 1;
}

.ysa-profile-choice-label {
  overflow-wrap: anywhere;
}

.ysa-profile-choice-media {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 0.5rem;
  background: color-mix(in srgb, var(--ysa-profile-accent) 10%, var(--ysa-profile-surface));
}

.ysa-profile-choice-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ysa-profile-choice-media.has-image .ysa-profile-choice-fallback {
  visibility: hidden;
}

.ysa-profile-choice-fallback {
  color: color-mix(in srgb, var(--ysa-profile-ink) 64%, transparent);
  font-size: 1.65rem;
  font-weight: 780;
}

.ysa-profile-choice:hover {
  border-color: color-mix(in srgb, var(--ysa-profile-accent) 62%, transparent);
}

.ysa-profile-choice[aria-pressed="true"],
.ysa-profile-choice[aria-checked="true"] {
  border-color: var(--ysa-profile-accent);
  background: color-mix(in srgb, var(--ysa-profile-accent) 13%, var(--ysa-profile-surface));
  color: color-mix(in srgb, var(--ysa-profile-ink) 92%, #000000);
}

.ysa-profile-field-error,
.ysa-profile-form-error {
  color: #a52a20;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.4;
}

.ysa-profile-field-error {
  display: block;
  margin-top: 0.35rem;
}

.ysa-profile-form-error {
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.6rem;
  background: #fff2f0;
}

.ysa-profile-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.62rem;
  margin-top: 1rem;
  color: color-mix(in srgb, var(--ysa-profile-ink) 76%, transparent);
  cursor: pointer;
  font-size: 0.77rem;
  line-height: 1.45;
}

.ysa-profile-consent input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0.1rem 0 0;
  flex: 0 0 auto;
  accent-color: var(--ysa-profile-accent);
}

.ysa-profile-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 9%, transparent);
}

.ysa-profile-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.66rem 1rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 750;
}

.ysa-profile-button-primary {
  margin-left: auto;
  background: var(--ysa-profile-accent);
  color: var(--ysa-profile-accent-text);
}

.ysa-profile-button-primary:hover {
  filter: brightness(0.94);
}

.ysa-profile-button-primary:disabled {
  cursor: wait;
  filter: grayscale(0.25);
  opacity: 0.68;
}

.ysa-profile-button-secondary {
  border: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 16%, transparent);
  background: transparent;
  color: var(--ysa-profile-ink);
}

.ysa-profile-success {
  display: grid;
  min-height: 16rem;
  place-items: center;
  align-content: center;
  padding: 1rem 0.25rem;
  text-align: center;
}

.ysa-profile-success-mark {
  display: grid;
  width: 3.75rem;
  height: 3.75rem;
  margin-bottom: 0.9rem;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ysa-profile-accent) 14%, var(--ysa-profile-surface));
  color: var(--ysa-profile-accent);
  font-size: 1.65rem;
  font-weight: 800;
}

.ysa-profile-reopen {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  padding: 0.65rem 1rem;
  border: 1px solid color-mix(in srgb, var(--ysa-profile-ink) 14%, transparent);
  border-radius: 999px;
  background: var(--ysa-profile-surface);
  color: var(--ysa-profile-ink);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 700;
}

html.ysa-profile-modal-open,
html.ysa-profile-modal-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.ysa-profile-modal-open .body {
  overflow: hidden !important;
}

.ysa-profile-panel.is-modal {
  --ysa-layer-profile-modal: 4000;
  --ysa-profile-modal-top: 60px;
  position: fixed;
  top: var(--ysa-profile-modal-top);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: var(--ysa-layer-profile-modal);
  display: block;
  width: 100vw;
  max-width: none;
  height: auto;
  margin: 0;
  overflow: hidden;
  background: transparent;
  isolation: isolate;
}

.ysa-profile-panel.is-modal .ysa-profile-shell {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100%;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  outline: 0;
}

.ysa-profile-panel.is-modal .ysa-profile-head {
  display: none;
}

.ysa-profile-panel.is-modal .ysa-profile-body {
  width: 100%;
  max-width: 48rem;
  min-height: 0;
  margin-inline: auto;
  padding: clamp(1.25rem, 4vw, 2rem);
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.ysa-profile-panel.is-modal .ysa-profile-success {
  min-height: 100%;
}

@media (max-width: 26rem) {
  .ysa-profile-panel:not(.is-modal) {
    width: calc(100vw - 4.75rem);
  }

  .ysa-profile-body {
    padding-inline: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ysa-profile-panel *,
  .ysa-profile-panel *::before,
  .ysa-profile-panel *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
