.profile-bio {
  font-size: 16px;
  opacity: 70%;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  /* cap display at 10 rows; max-height backs up line-clamp where unsupported */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 10;
  line-clamp: 10;
  max-height: calc(1.6em * 10);
  overflow: hidden;
  cursor: pointer;
  transition: opacity var(--t-base) ease;
}

.profile-bio--placeholder {
  font-style: italic;
  opacity: 45%;
}

.bio-edit-wrap {
  position: relative;
  width: 100%;
  animation: bio-input-in var(--t-base) var(--ease-snap);
}

.profile-bio-input {
  width: 100%;
  min-height: 120px;
  resize: none;
  border: 1px solid rgba(var(--pink), 0.6);
  border-radius: 8px;
  background: rgba(var(--pink), 0.08);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  padding: 10px 12px;
  outline: none;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  transition: border-color var(--t-fast) ease, background var(--t-base) ease;
}

.profile-bio-input:focus {
  border-color: rgb(var(--pink));
  background: rgba(var(--pink), 0.14);
}

.bio-counter {
  margin-top: 6px;
  text-align: right;
  font-size: 13px;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
  transition: color var(--t-base) ease, opacity var(--t-base) ease;
}
.bio-counter.is-full {
  color: rgb(var(--pink));
  opacity: 1;
}

@keyframes bio-input-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bio-edit {
  flex: 5;
  position: relative;
  padding-top: 16px;
}

.bio-edit-btn {
  position: absolute;
  top: 12px;
  right: 4px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: rgba(var(--pink), 0.2);
  cursor: pointer;
  transition:
    background var(--t-base) ease,
    transform var(--t-fast) var(--ease-snap);
}

.bio-edit-btn:hover {
  background: rgba(var(--pink), 0.32);
}

.bio-edit-btn:active {
  transform: scale(0.92);
}

.bio-edit-btn:focus-visible {
  outline: 2px solid rgb(var(--pink));
  outline-offset: 2px;
}

/* touch: no hover-reveal, so keep the edit button visible at a 44px target */
@media (hover: none) {
  .bio-edit-btn {
    display: flex;
    width: 44px;
    height: 44px;
  }
}

.bio-edit-btn img {
  width: 16px;
  height: 16px;
}

@media (hover: hover) and (min-width: 1025px) {
  .bio-edit:hover .profile-bio {
    outline: 1px dashed rgba(var(--pink), 0.65);
    outline-offset: 6px;
    border-radius: 6px;
  }

  .bio-edit:hover .bio-edit-btn {
    display: flex;
  }
}
