#listenPage {
  position: relative;
  justify-content: flex-start;
  padding-top: 8px;
}

.listen-widget {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 0;
}

.listen-widget__ecg {
  position: absolute;
  top: 28px;
  width: 58px;
  height: 44px;
  pointer-events: none;
}

.listen-widget__ecg--left {
  left: 18px;
}

.listen-widget__ecg--right {
  right: 18px;
  transform: scaleX(-1);
}

.listen-widget__ecg-line {
  display: block;
  width: 100%;
  height: 100%;
  background: rgba(34, 34, 34, 0.78);
  clip-path: polygon(
    0% 66%,
    10% 66%,
    18% 48%,
    24% 72%,
    32% 20%,
    40% 82%,
    50% 56%,
    60% 62%,
    70% 38%,
    80% 68%,
    90% 58%,
    100% 58%,
    100% 68%,
    90% 68%,
    80% 78%,
    70% 48%,
    60% 72%,
    50% 66%,
    40% 94%,
    32% 32%,
    24% 82%,
    16% 58%,
    8% 74%,
    0% 74%
  );
  background: var(--listen-heart-color, rgba(34, 34, 34, 0.78));
  opacity: 0.88;
}

.listen-widget__top {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  min-height: 168px;
  padding-top: 0;
}

.listen-widget__side {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 106px;
}

.listen-avatar {
  position: relative;
  z-index: 2;
  width: 96px;
  height: 96px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  padding: 0;
  background: #f3f3f3;
  overflow: visible;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.listen-avatar__image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center center;
}

.listen-widget__heart {
  position: absolute;
  left: 50%;
  top: 42px;
  z-index: 3;
  transform: translateX(-50%);
  font-size: 26px;
  line-height: 1;
  color: var(--listen-heart-color, rgba(34, 34, 34, 0.78));
}

.listen-editor {
  width: 100%;
  max-width: 96px;
  margin-top: -12px;
}

.listen-editor__display,
.listen-input__field {
  display: block;
  width: 100%;
  height: 28px;
  padding: 0 6px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  line-height: 28px;
  box-sizing: border-box;
}

.listen-editor__display {
  border: 0;
  background: transparent;
  color: rgba(17, 17, 17, 0.72);
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.listen-editor--editing .listen-editor__display {
  display: none;
}

.listen-input__field {
  display: none;
  border: 0;
  background: transparent;
  color: #111111;
  outline: none;
}

.listen-editor--editing .listen-input__field {
  display: block;
}

.listen-input__field::placeholder {
  color: rgba(17, 17, 17, 0.45);
}

.listen-notes {
  position: absolute;
  left: 50%;
  top: 108px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(calc(100% - 24px), 300px);
  margin: 0;
  transform: translateX(-50%);
}

.listen-editor--wide {
  width: 100%;
  max-width: none;
  margin-top: 0;
}

.listen-editor--wide:first-child {
  margin-top: 12px;
}

.listen-editor--wide:last-child {
  margin-top: -12px;
}

.listen-editor--wide .listen-editor__display,
.listen-editor--wide .listen-input__field {
  display: block;
  width: 100%;
  min-width: 0;
  height: 34px;
  margin: 0;
  border-radius: 15px;
  font-size: 14px;
  font-weight: 400;
  text-align: center;
  line-height: 34px;
  letter-spacing: 0;
  padding: 0 10px;
}

.listen-editor--wide .listen-editor__display {
  display: block;
}

.listen-editor--wide .listen-input__field {
  display: none;
}

.listen-editor--wide.listen-editor--editing .listen-editor__display {
  display: none;
}

.listen-editor--wide.listen-editor--editing .listen-input__field {
  display: block;
}

@media (max-width: 420px) {
  #listenPage {
    padding-top: 4px;
  }

  .listen-widget {
    width: min(100%, 286px);
  }

  .listen-widget__ecg {
    top: 30px;
    width: 50px;
    height: 36px;
  }

  .listen-widget__ecg--left {
    left: 14px;
  }

  .listen-widget__ecg--right {
    right: 14px;
  }

  .listen-widget__top {
    gap: 4px;
    min-height: 154px;
  }

  .listen-widget__side {
    width: 92px;
    gap: 7px;
  }

  .listen-avatar {
    width: 88px;
    height: 88px;
    overflow: visible;
  }

  .listen-widget__heart {
    top: 38px;
    font-size: 24px;
  }

  .listen-editor {
    max-width: 88px;
    margin-top: -10px;
  }

  .listen-editor--wide {
    width: 100%;
    max-width: none;
    margin-top: 0;
  }

  .listen-editor--wide:first-child {
    margin-top: 7px;
  }

  .listen-editor--wide:last-child {
    margin-top: -12px;
  }

  .listen-editor__display,
  .listen-input__field {
    height: 24px;
    font-size: 11px;
    line-height: 24px;
  }

  .listen-editor__display {
    display: block;
  }

  .listen-input__field {
    display: none;
  }

  .listen-editor--editing .listen-input__field {
    display: block;
  }

  .listen-notes {
    left: 50%;
    top: 102px;
    width: min(calc(100% - 20px), 284px);
    gap: 3px;
    margin: 0;
    transform: translateX(-50%);
  }

  .listen-editor--wide .listen-editor__display,
  .listen-editor--wide .listen-input__field {
    width: 100%;
    min-width: 0;
    height: 32px;
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    line-height: 32px;
    letter-spacing: 0;
    padding: 0 8px;
  }

  .listen-editor--wide .listen-editor__display {
    display: block;
  }

  .listen-editor--wide .listen-input__field {
    display: none;
  }

  .listen-editor--wide.listen-editor--editing .listen-editor__display {
    display: none;
  }

  .listen-editor--wide.listen-editor--editing .listen-input__field {
    display: block;
  }
}
